Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting Started Example ICS2O curriculum

Similar presentations


Presentation on theme: "Getting Started Example ICS2O curriculum"— Presentation transcript:

1 Getting Started Example ICS2O curriculum
Visual Studio C# Getting Started Example ICS2O curriculum

2 C# Language Overview "C# is intended to be a simple, modern, general-purpose, object-oriented programming language" Developed by Anders Hejlsberg 15 years old – created after Java

3 Top 10 Programming Languages C# is number 4
IEEE Spectrum, July Stephen Cass Based on "12 metrics from 10 sources (including IEEE Xplore, Google, and GitHub) to rank the most popular programming languages"

4 The .NET Framework collection of software/libraries used by Windows applications C# is one of many languages supported by .NET

5 Types of Projects Graphical / Forms Text / Console

6 Project Name You can specify the project name as you create a new project or as you save a project This is where the solution folder will be created Project name Project name Solution name

7 Console Applications Hello World

8 DESIGN MODE Forms Applications RUN MODE

9 Visual Studio Modes Visual Studio has 2 different modes
Design Runtime Control properties can be modified at design time (static), or while the program is running (dynamic)

10 Visual Studio Environment
Visual Studio is a professional integrated development environment (IDE) Tools: Designer Window (1) Solution Explorer Window (2) Properties Window (3) Free versions are available as Visual Studio Express on Microsoft's website (2) (1) (3)

11 Forms Basics TOOLBOX Form is a container for the controls that the user will use while the program is executing. Add controls from the toolbox

12 Objects Objects are created from their associated Class
A Class is like a blueprint which defines the properties and methods/tasks. Form object Label objects TextBox objects Button objects

13 First Set of Controls Forms, Labels, Textboxes, Buttons
Form - window that is displayed on the screen which contains other objects. Label – displays text within a Form TextBox – defined region used to accept text input from a user Button – defined area that is used to start an event generated by the user Note: Most of your application code will be associated with a Button Click event. If you double click on Control you will have the opportunity to view/modify the code or actions that will occur when the event happens.

14 Using TextBox for Input
GUI control object that is used to obtain keyboard input from the user Example string name = txtName.Text; int age = int.Parse(txtName.age);

15 Using Buttons for Events
Control object for user-generated events. Write code behind for a Button Click

16 Using Labels for Output
GUI control object that is used to display text at a specific location on a form Example lblMessage.Text = "Some Message"; The displayed text is defined by the Text property of the Label The data on the left side of the = operator must be a string

17 Using Textbox for Output
GUI control object that is used to display or obtain text at a specific location on a form Example tbMessage.Text = "Some text message"; Set the property ReadOnly to True to displaying text

18 Using Dialogs as Output
Message box a small window (dialog box) that displays a text Example MessageBox.Show("Some text message"); MessageBox is a Class and not a control on a form To create a message box you call the Show method on the Class. The argument that is passed must be a string

19 ICS2O Curriculum Console / GUI Random Listbox Math operations
Picturebox (GUI) Files Variables Timers (GUI) 1D Array Data type conversions User input (GUI) radio buttons / checkboxes Selection if / booleans Conditional Loops Counted loops (for)

20

21 Resources Used


Download ppt "Getting Started Example ICS2O curriculum"

Similar presentations


Ads by Google