Академический Документы
Профессиональный Документы
Культура Документы
.NET Programming for Engineers, John Allwork, Publisher: Elektor, 2009, ISBN: 978-0-905705-81-1
1
2009 Elektor International Media C# Programming for Engineers, J Allwork
3.
4.
5. 6. 7.
8.
9. 10.
Introduction, Development environment User Interface, controls Properties and events Dialogs and forms C# language basics C# language arrays and strings C# language -program flow Object Oriented programming Methods Object Oriented programming Classes File handling Multimedia & Graphs
Debugging Run-time placement Threads Internet communication Databases Introduction and displaying Databases Creating Databases Accessing from code Plotting DLL and API Hardware interfacing - USB interface
2009 Elektor International Media C# Programming for Engineers, J Allwork
Form
Code editor
Toolbar
messages
6
Properties/events window
10
11
Run C#, start a new Project, > Windows Application and call it Hello world Save the project. Select File>Save All. Display the form (click form1.cs[Design] tab). Add button (drag and drop) from Toolbox to form
12
13
14
15
C# and .NET programming introduction 16 Run program, click button. Hello World is displayed Your first C# program ! Note use dot notation to access property C# is case sensitive
16
17
Topics
Adding methods to class Static classes available to all objects Overriding default methods Inheritance Protected declaration
18
21
Lets create Circle Class from our Point Class Can add radius and area Code: public Circle : Point
24
28
29
Summary:
Adding methods Static classes available to all objects Overriding default methods Inheritance extend class Protected declaration
31
32
35
listBox1.Items.Add(serialPort1.ReadLine());
}
36
42
USB 1.0 and 2.0 compatible communication at up to 2Mbits/s 18 digital I/O lines (6 as A/D inputs) Programmable Microchip 16F877A PIC Pre-programmed code to interface to USB
43
44
46
47