37
Introduction www.CSharpSchool.blog.ir In The Name Of Allah, The Beneficent, The Merciful C #

Introduction In The Name Of Allah, The Beneficent, The Merciful

Embed Size (px)

Citation preview

Page 1: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Introduction

www.CSharpSchool.blog.ir

In The Name Of Allah, The Beneficent, The Merciful

C#

Page 2: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Contents

• Visual Studio 2012 IDE• Creating Applications– Console Application– Windows Forms Application– ASP.NET Web Page

• C# and the .NET Framework

2

Page 3: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Setting the Visual C# Settings

3

Page 4: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Visual C# Keyboard Settings

• After installing Visual Studio 2012, select the Visual C# Settings from the Default Collection of Settings window.

• This sets the keyboard commands and the user interface for the C# environment.– Run: Ctrl-F5, Debug: F5, Build: Ctrl-Shift-B, etc.– New Website command in the Start Page if you select Web

Development settings.• If you miss the window, or select another setting, then

select the command Import and Export Settings from the Tools menu.

4

Page 5: Introduction  In The Name Of Allah, The Beneficent, The Merciful

5

Page 6: Introduction  In The Name Of Allah, The Beneficent, The Merciful

6

Page 7: Introduction  In The Name Of Allah, The Beneficent, The Merciful

7

Page 8: Introduction  In The Name Of Allah, The Beneficent, The Merciful

8

Page 9: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Creating a Console Application

9

Page 10: Introduction  In The Name Of Allah, The Beneficent, The Merciful

10

Page 11: Introduction  In The Name Of Allah, The Beneficent, The Merciful

11

Page 12: Introduction  In The Name Of Allah, The Beneficent, The Merciful

12

Page 13: Introduction  In The Name Of Allah, The Beneficent, The Merciful

13

Write the code and press Ctrl-F5

Page 14: Introduction  In The Name Of Allah, The Beneficent, The Merciful

14

Page 15: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Creating a Windows Forms Application

15

Page 16: Introduction  In The Name Of Allah, The Beneficent, The Merciful

16

Page 17: Introduction  In The Name Of Allah, The Beneficent, The Merciful

17

Page 18: Introduction  In The Name Of Allah, The Beneficent, The Merciful

18

Drag & drop a label and button onto the form

Page 19: Introduction  In The Name Of Allah, The Beneficent, The Merciful

19

Double-click the button

Page 20: Introduction  In The Name Of Allah, The Beneficent, The Merciful

20

Write the code and press Ctrl-F5

Page 21: Introduction  In The Name Of Allah, The Beneficent, The Merciful

21

Click the button

Page 22: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Creating an ASP.NET Web Page

22

Page 23: Introduction  In The Name Of Allah, The Beneficent, The Merciful

23

Do NOT select File -> New ->

Project -> ASP.NET Web

Forms Application

Page 24: Introduction  In The Name Of Allah, The Beneficent, The Merciful

24

Page 25: Introduction  In The Name Of Allah, The Beneficent, The Merciful

25

Right-click the project name and select Add -> Add New Item

(equivalently: Add -> Web Form)

Page 26: Introduction  In The Name Of Allah, The Beneficent, The Merciful

26

Page 27: Introduction  In The Name Of Allah, The Beneficent, The Merciful

27

Switch to Design View

Page 28: Introduction  In The Name Of Allah, The Beneficent, The Merciful

28

Put a Label, press the Enter key, and put a Button

Page 29: Introduction  In The Name Of Allah, The Beneficent, The Merciful

29

Double-click the button

Page 30: Introduction  In The Name Of Allah, The Beneficent, The Merciful

30

Write the code and press Ctrl-F5

Page 31: Introduction  In The Name Of Allah, The Beneficent, The Merciful

31

Click the button

Page 32: Introduction  In The Name Of Allah, The Beneficent, The Merciful

32

Page 33: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Visual Studio 2012

• A powerful integrated development environment (IDE)• Automates the steps required to compile source code• Intelligently detect errors and suggest code where

appropriate as you are typing (Intellisense)• Includes designers, enabling simple drag&drop design of

UI elements• Includes starter projects• Enables deployment• Enables debugging• etc.

33

Page 34: Introduction  In The Name Of Allah, The Beneficent, The Merciful

Visual Studio Solutions

• You create solutions in Visual Studio• Solutions contain projects• Solutions can contain multiple projects– This enables you to work on shared code

34

Page 35: Introduction  In The Name Of Allah, The Beneficent, The Merciful

35

Solution Explorer

Properties Window

Toolbox Designer

Page 36: Introduction  In The Name Of Allah, The Beneficent, The Merciful

36

Source Code

SolutionProjectSource

Files

Page 37: Introduction  In The Name Of Allah, The Beneficent, The Merciful

با تشکر از توجه شما

عبداله صارمی نایینی1393

پایان