PDN-C4-PPT - Chapter 4 Windows Forms GUI/EDP Yingcai Xiao...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 4 Windows Forms GUI/EDP Yingcai Xiao
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
  Concepts: GUI   Windows Forms —for writing GUI based applications (Windows Applications). GUI : Graphical User Interface, to make programs easy to use, WYSIWYG (What you see is what you get). Look => Appearance (Layout Design) Feel => Response (Event Handling) User => Button Click => Event => Event Handler (a method). GUI-based application => Event-driven programming
Background image of page 2
  Concepts: GUI Design Principles Users first: let users control the program not the other way around. Elegant: simple but powerful. E.g.: iPot, iPhone, Google Intuitive: don’t need to much training to use it. Compare operating interfaces of cars and airplanes. Clarity : use icons and key words that are standardized or clearly defined. (AWK?). Give users hints when they hesitating. Hierarchical : only put the most frequently used and most important controls at the top level. Speedy: users do not have patience to wait for too long. Forgiving : allow users to make mistakes. Undo and redo. More : http://www.iie.org.mx/Monitor/v01n03/ar_ihc2.htm http://www.asktog.com/basics/firstPrinciples.html
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
  Concepts: EDP   Event-Driven Programming (EDP): Application waits (idles) after initialization until the user generates an event trough an input device (keyboard, mouse, …). The OS dispatches the event to the application who owns the window. The corresponding event handler(s) of the application is invoked to process the event.
Background image of page 4
Events A menu in C++: char c; bool done = false; while(!done) { cout << “Please make your selection, q to end:” cin >> c; switch(c) { case “+”: add( ); break; case “-”: sub( ); break; case “q”: done = true; break; } } Event Loop Event Mapping Event Event Handler
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
(1) Event generators: keyboard, GUI items (buttons, menus, …). (2) Events / Messages (Mouse Click, Key Down, …) (3) Event Loop (an infinite loop constantly waits for events) (4) Event Mapping (dispatch events to corresponding event handlers) (5) Event Handlers (methods for processing the events: OnMouseClick(), …) (6) Event registration: inform event mapper which event an event hander is for. Key Components of EDP
Background image of page 6
(1) Event generators - commonly used GUI items are predefined. (2) Events / Messages - commonly used ones predefined . (3) Event Loop: - taken care of by .NET. (4) Event Mapping: - taken care of by .NET. (5) Event Handlers - to be implemented by programmers. (6) Event Registration - code implemented by .NET. - to be used by programmers. Key Components of EDP in .NET
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Implementing Windows Applications with Visual Studio .NET Steps 1: Create a project (say PA2 as a Windows Application). (The default project location is Documents:Visual Studio:Projects:PA2.) 2: Design the form: customize form properties, add controls from the toolbox. 3: Add fields to the form (to hold data).
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS 573 taught by Professor Dr.xiao during the Spring '10 term at The University of Akron.

Page1 / 35

PDN-C4-PPT - Chapter 4 Windows Forms GUI/EDP Yingcai Xiao...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online