CST238 GUI Programming Dr. Sherry Yang Oregon Institute of Technology.

Slides:



Advertisements
Similar presentations
Introduction to Microsoft Office 2007 with focus on MS Word
Advertisements

What is an operating system? Is it software?
History of the Graphical User Interface (GUI)
© by Pearson Education, Inc. All Rights Reserved.
Computers in Principle & Practice I - V Deena Engel Computers in Principle and Practice I V , Sections 1 & 2 Fall, 2009 Deena Engel .
Introduction to Visual Basic Programming. Lecture Outline History What is Visual Basic First Look at the VB 6.0 Environment Some VB Terminology Our first.
The Importance of the User Interface Lecture-1 The Essential Guide to UI Design: Chapter 1 1Computer Systems Interface.
MCT260-Operating Systems I Operating Systems I Interfaces to Operating Systems.
Operating Systems. Software Software – the instructions that make the CPU do useful things Divided into two main categories – System software – Applications.
COMPUTER TECHNOLOGY (S1 OBJ AND OBJ 3-2) SOFTWARE UNIT 1—PART B.
ECS15: Introduction to Computers Fall 2013 Patrice Koehl
1 CGS1060 Mobile UIs Copyright 2012 by Janson Industries.
Windows 10. The New Microsoft Operating System to be released July 29 th. It’s not just a PC operating system, it’s a lot more, it includes phones,
Operating System.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Operating Systems Chapter 4.
Section 6.1 Explain the development of operating systems Differentiate between operating systems Section 6.2 Demonstrate knowledge of basic GUI components.
Lesson 4 Computer Software
PROG Mobile Java Application Development PROG Mobile Java Application Development Event Handling Creating Menus.
Platforms for Learning in Computer Science July 28, 2005.
Lab 8 – C# Programming Adding two numbers CSCI 6303 – Principles of I.T. Dr. Abraham Fall 2012.
Hardware vs. Software Computer systems consist of both hardware and software. Hardware refers to anything you can physically touch. Keyboards, mice, monitors,
Instructor: Li Ma Department of Computer Science Texas Southern University, Houston August, 2011.
 When Bill Gates saw how successful the apple “Lisa” computer and “Mac” computer were doing he decided to create an operating system with a GUI himself.
The Graphical User Interface
CS110/CS119 Introduction to Computing (Java)
Operating Systems. Operating systems  Between the hardware and the application software lies the operating system. The operating system is a program.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Module 2 Part I Introduction To Windows Operating Systems Intro & History Introduction To Windows Operating Systems Intro & History.
CSE 501N Fall ‘09 00: Introduction 27 August 2009 Nick Leidenfrost.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
IE 411/511: Visual Programming for Industrial Applications
CSc 2310 Principles of Programming (Java) Dr. Xiaolin Hu.
What is Computer Software?. Hardware vs Software Got to have both to get the job done!
CST 229 Introduction to Grammars Dr. Sherry Yang Room 213 (503)
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Prof. Barbara Bernal NEW Office in J 126 Office Hours: M 4pm - 5:30 PM Class Lecture: M 6 PM - 8:30 in J133 Weekly Web Lecture between Tuesday to Sunday.
Chapter 4 System Software. Software Programs that tell a computer what to do and how to do it. Sets of instructions telling computers to perform actions.
Visual BASIC 1 Introduction
CST 320 Compiler Methods Dr. Sherry Yang PV 171 (541)
1 Software Systems Development CEN Spring 2011 TR 12:30 PM – 1:45 PM ENB 116 Instructor:Dr. Rollins Turner Dept. of Computer Science and Engineering.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
ACS 367 Interface Design History. Brief History n Early research –SRI in 1960s »The very system that I am using to access this information has its intellectual.
Python Programming Graphical User Interfaces Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
CPS120: Introduction to Computer Science Winter 2002 Instructor: Paul J. Millis.
E.g.: MS-DOS interface. DIR C: /W /A:D will list all the directories in the root directory of drive C in wide list format. Disadvantage is that commands.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Module 2 Part I Introduction To Windows Operating Systems Intro & History Introduction To Windows Operating Systems Intro & History.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Hello World Basic Tutorial Nova Southeastern University Cristal Locke This presentation is copyrighted by Cristal Locke, August 5, All rights reserved.
USER INTERFACE DESIGN (UID). Introduction & Overview The interface is the way to communicate with a product Everything we interact with an interface Eg.
Graphical User Interface Saint-Petersburg IT College Saint-Petersburg 2014.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
CONTENT  Introduction Introduction  Operating System (OS) Operating System (OS) Operating System (OS)  Summary Summary  Application Software Application.
INFORMATION SYSTEM – SOFTWARE TOPIC: GRAPHICAL USER INTERFACE.
CST 223 Concepts of Programming Languages Dr. Sherry Yang PV 171
Certificate in Accounting NOS 116, 118, 213, 222 Lecture 1: Introduction.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Chapter 2 Operating Systems
Linux Operating Systems Taking Control of the Terminal
The Importance of the User Interface
Computer Software Digital Literacy.
Console and GUI Programs
Computer Software Digital Literacy.
Computer Technology Notes #3
The Importance of the User Interface
History of the Graphical User Interface (GUI)
Presentation transcript:

CST238 GUI Programming Dr. Sherry Yang Oregon Institute of Technology

Week 1 Introduction Syllabus, class information Brief GUI introduction First Windows Forms program – code only Using Designer In-Class Exercise Take-home lab#1

Instructor Sherry Yang or Room 213 Office Hours: Mon/Thurs 4-6 or by appointment Class webpage:

Instructor Background Professor of Software Engineering Technology Department of Computer Systems Engineering Technology Ph.D. in Computer Science Senior Software Engineer Application Software Engineer Klamath Falls

Getting to Know Each Other Pair up with one other person. Find out a little more about the person. – Name – Year in program – Something interesting about the person – Any previous GUI programming experience – Any previous C# experience Introduce the person to the class.

Course Description This course is designed to introduce the basic concepts associated with Graphical User Interface (GUI) Programming in the Windows environment. We will start with.NET framework and windows forms. We might explore other framework if time permits. We will also spend time on various aspects associated with user interface design. Students are expected to complete all in-class lab tasks and assigned coding projects. PREREQUISITES:CST 211 with C or better & SPE111

Evaluation Methods The final grade, which may range from A to F, is determined by a composite evaluation of the student's performance in: Tests/Quizzes30% In-Class Assignments15% Labs/Assignments45% Presentations10%

Grading Your grade will be calculated as follows:* 90%+ = A 80%+ = B 70%+ = C 60%+ = D 59%- = F * Class participation will be considered in evaluating "borderline" grades. You must turn in ALL of the labs and complete the project to pass the course with a C or better. If you failed to turn in all assignments, you will receive an Incomplete.

Textbook Sells, Chris & Michael Weinhardt, “Windows Forms 2.0 Programming”, Addison-Wesley Profession, Johnson, Jeff, GUI Bloopers 2.0, Common User Interface Design Don’ts and Dos.

Student Responsibilities Attendance: – Students are expected to attend all class sessions. If you know you will be absent on a certain day, please inform the instructor in advance so arrangements can be made to provide you with the material covered. Please make every effort to attend all class sessions. There will be no make up in-class exercises. – Labs will be used as help sessions and to check off lab assignments. (Monday evening – Lecture/Lab. Saturday labs as needed in person or via Google Hangout) Instructor will be out of town on some Saturdays for conferences and meetings.

Student Responsibilities Tests: – All tests are open book, open notes. No electronic devices are allowed. – There will be no make up tests unless there is an emergency. If you miss a test for any reason, you can make it up with additional projects. – In case of emergency, please contact Abbie Allen in Student Services. She will inform all of your instructors.

Academic Dishonesty: – No plagiarism or cheating is allowed in this class. Please refer to your student handbook regarding policies on academic dishonesty. A copy of the policy is posted on the class webpage. – It is okay to get help on your assignments. Please acknowledge all source of help, including them in the program documentation as appropriate. Student Responsibilities

Assignments: – All in-class exercises and take-home labs are due in class. They must be checked off by the instructor. – There will be a 20% penalty for late assignments per week. – All late assignments and project must be submitted by Wednesday of Finals week to be graded. Student Responsibilities

Accommodations for Students with Disabilities If you have a disability and feel that you may need accommodation in this course, please speak with the instructor as soon as possible.

History of the Graphical User Interface (GUI) Thanks to Frank University for this material

1950s – Command-line interfaces (CLIs) require typing memorized commands DOS screen from 1980:

1968 – Doug Engelbart demonstrates NLS, a system which uses a mouse, pointers, hypertext, and multiple windows “The Demo” The first mouse

1970s – Researchers at Xerox Palo Alto Research Center (many from SRI) develop WIMP paradigm (Windows, Icons, Menus, Pointers) 1973 – Xerox Alto: commercial failure due to expense, poor user interface, and lack of programs Image:

1979 – Steve Jobs and other Apple engineers visit Xerox. Pirates of Silicon Valley dramatizes the events, but Apple had already been working on the GUI before the visitApple had already been working on the GUI “I felt like one of the Mongol hoards coming to loot and plunder a bunch of defenseless villagers.” – Steve Wozniak in Pirates of Silicon Valley

1981 – Xerox Star: focus on WYSIWYG. Commercial failure (25K sold) due to expense ($16K each), performance (minutes to save a file, couple of hours to recover from crash), and poor marketing Image:

1980s – Text user interfaces (TUIs), retronym coined after GUIs

1983 – Apple Lisa: Many developers from Xerox, not commercially successful Images:

1984 – Apple Macintosh popularizes the GUI. Super Bowl commercial shown once, most expensive ever made at that time Image:

1984 – MIT’s X Window System: hardware- independent platform and networking protocol for developing GUIs on UNIX-like systems Image:

1985 – Windows 1.0 – provided GUI interface to MS- DOS. No overlapping windows (tiled instead). Image: “You’re stealing from us!” – Steve Jobs to Bill Gates in Pirates of Silicon Valley

1985 – Microsoft and IBM start work on OS/2 meant to eventually replace MS-DOS and Windows 1986 – Apple threatens to sue Digital Research because their GUI desktop looked too much like Apple’s Mac. Digital Research cripples their desktop so Apple won’t sue DRI’s GEM 1.1 desktop

1987 – Windows 2.0 – Overlapping and resizable windows, keyboard and mouse enhancements Image:

1987 – Macintosh II: first full-color Mac

NeXT and NeXTSTEP In 1988 Steve Jobs acquires Objective-C license for NeXT Used Objective-C to build the NeXTSTEP Operating System Objective-C made interface design for NeXTSTEP much easier NeXTSTEP was derived from BSD Unix In 1995 NeXT gets full rights to Objective-C from Stepstone

1988 – OS/ Standard Edition (SE) has GUI written by Microsoft, looks a lot like Windows 2 “I believe OS/2 is destined to be the most important operating system, and possibly program, of all time.” – Bill Gates (1987)

1988 – Apple sues Microsoft claiming Windows 2.0 violates Apple's copyrights on the "visual displays" of the Macintosh. Microsoft countersues and eventually wins in – Xerox sues Apple for violating copyrights used in Lisa and Macintosh, but judge dismisses lawsuit without any action 1990 – Windows 3.0: Access to 16 MB. Microsoft and IBM split ways on OS/2

1992 – Windows 3.1 – Widely popular DOS shell: TrueType fonts, multimedia, standardized common dialog box Image:

1993 – Windows NT – MS’s first 32 bit OS, no longer a shell over MS-DOS HTML forms incorporate radio buttons, check boxes, drop-down lists, etc – Windows 95 – 32 bit, fewer hardware demands than NT “We have always been shameless about stealing good ideas.” - Steve Jobs in Triumph of the Nerds (1996)

1998 – Windows 98: Integration with Web, IE is bundled with OS (controversy)

2001 – Windows XP – Product activation, GUI enhancements, first support for 64-bit processors

2001 – Apple revamps GUI with MacOS X (BSD Unix core) Image:

2002 –Minority Report popularizes concepts of the gesture UI 2005 – Ajax technique coined by Jesse James Garrett, sparks move from desktop apps to web apps TED talk by John Underkoffler

2007 – Apple’s iPhone popularizes the touch screen interface

2008 – HTML5 working draft proposes UI elements to match desktop app functionality 2010 – Windows 7 introduces few UI tweaks but is commercially successful 2010 – Apple’s iPad brings touch screen interface to the tablet 2010 – Apple files lawsuit against HTC (maker of Android phones) claiming 20 patents were violated, some related to UIApple files lawsuit

2012 – MS ditches skeumorphs in Windows 8 and brings Metro touch-screen UI to the desktop Image:

2014

Building a GUI App Start with platform / framework – Determines the development language – Provides a set of UI widgets – May have some design strategy – High-level vs. low-level Common characteristics – Event-driven paradigm – Relying on the framework to handle low level functionality

GUI Programming Windows Desktop Apps – Based on.NET framework – Windows Forms programming with C# Three key pieces: – Forms – Controls – Events

Building Forms from code Create class that inherits from System.Windows.Forms.Form Set form properties in constructor Pass form object to Application.Run to make it the start up form Use Show() or ShowDialog() to open secondary forms

Application Object System.Windows.Forms.Application – Singleton Application.Run starts message loop Application.Exit ends message loop – Closing the start-up form invokes Application.Exit Use properties to get information about running program

Control Interface for a form is built using controls Framework includes many useful controls – Button, TextBox, Labels, etc. Large third-party control market You can create your own custom controls Some controls are supplied by other framework – i.e. Ribbon control is in WPF but in.NET Framework

Controls Positioning controls on Form Set Top & Left properties or Set the Location Property (x,y) Sizing controls – Set the Width and/or Height properties or – Set the Size property

Add controls to a Form Create a private field for the control Create instance of control and set property values in form constructor Set control properties Add control instance to form’s Controls collection

Events and Event Handlers Events are raised as user interacts with program – A button is clicked – A form is resized You can write a function that handles these events, called event handlers An event may have multiple event handlers An event handler may handle multiple events

Dynamic Event Handler in C# Use += operator to attach an event handler Use -= operator to detach an event handler Example: public MyForm() { ShowMessageButton.Click += ClickHandler; …. } private void ClickHandler(object send, EventArgs e) { …. }

Windows Forms in Visual Studio Designer in Visual Studio can make the programmer’s job a little easier. Professional programmers prefer to code the forms by hand instead of using designer.

Using the Designer Drag/Drop controls from Toolbox to Designer Set properties of form and controls in Properties window Attach event handlers using Events Windows Add event handler code (code behind)

In-Class Exercise #1 Must be checked off tonight! Write a simple Windows Forms program with labels, textbox and button. – It should reverse the string that the user typed in and display it below.

Take Home Lab #1 Due next Monday (week 2) Implement a number guessing game. -It should check and make sure that the user entered a valid integer. -It should check and see if the user entered a number between 0 and It should generate a random number. -It should be able to reset and get a different random number. -It should check and see if the user entered the correct random number. -It should tell the user to guess higher or lower if the number is incorrect. -It should keep track of number of tries before the user guessed the right number. -It should keep track of best score so far. Number of tries: 0 Best Score so far: 2