Upload
dinhxuanthu
View
40
Download
8
Embed Size (px)
DESCRIPTION
Control
Citation preview
1Thit k giao din
Th.S Cao Thi Phng [email protected]
CONTROLS
SGU - Khoa CNTT - Thit k giao din 2
Previous content
The design of everyday things
Chapter 1 Chapter 2
Assignment 1
Chapter 3 Assignment 2 (partly)
2SGU - Khoa CNTT - Thit k giao din 3
Content
1. Input & Output design
2. Controls
1. Introduction
2. Some typical control types
3. User Controls
SGU - Khoa CNTT - Thit k giao din 4
Input design & Output design
Input design: Input entity data (data list): e.g. book, customer, product Input relational data: e.g. book borrow, sale order Input search
Output design: Output to screen Output to printer Output to file Output search result
3SGU - Khoa CNTT - Thit k giao din 5
Input design Input decides the correctness of systems
Two (2) types of input: Real-time input: use form & controls Batch input: ~ import mass of structured data
The best input design is the simplest & most natural one. Error prevention & Data validation
SGU - Khoa CNTT - Thit k giao din 6
Input design
Input design guidelines:
Match the forms to real source documents Input necessary data only Have default value Display a list of values for selectable fields Have correct tab order Provide descriptive labels for every fields Provide examples for special requirement (e.g. special format) Always allow to exit the input screen without saving
4SGU - Khoa CNTT - Thit k giao din 7
Output design
Different output: screen, printed paper or both.
Output to screen: Especially grid (table) control Data binding
Output to printed paper: report Report tools; e.g. Crystal Report, Jasper Report
SGU - Khoa CNTT - Thit k giao din 8
Output design
Report design:
Based on existing reports Should be evaluated by users as soon as possible Notice report header/footer & page header/footer Spacing is important Group information Uniform & consistent Many powerful report tools
5SGU - Khoa CNTT - Thit k giao din 9
Content
1. Input & Output design
2. Controls
1. Introduction
2. Some typical control types
3. User Controls
SGU - Khoa CNTT - Thit k giao din 10
Controls
Also called widgets Reusable user interface components Handle both input & output Event handling: callback function (delegate, listener) Set of controls have different style. E.g. XP, Vista,
MAC style
6SGU - Khoa CNTT - Thit k giao din 11
Controls
Controls on MAC OS and Wins XP OS
SGU - Khoa CNTT - Thit k giao din 12
Controls Windows GUI Evolution
7
8
9SGU - Khoa CNTT - Thit k giao din 17
Controls
Different style controls
SGU - Khoa CNTT - Thit k giao din 18
Controls
Programming languages provide common &standard control classes:
C#: System.Windows.Forms, Java: awt, swing, swt (eclipse)
Properties, methods, event handlers of controlclasses have same basis but different syntax &
features.
Inherit (derive) control classes
10
SGU - Khoa CNTT - Thit k giao din 19
Controls
SDI: Single Document Interface: one window acts as an interface. E.g. Window Explorer 6, Notepad
MDI: Multiple Document Interface: at least one parent and many child windows. E.g. Ms. Word 2k3,
Firefox
SGU - Khoa CNTT - Thit k giao din 20
ControlsSDI application
11
SGU - Khoa CNTT - Thit k giao din 21
Controls
MDI application
SGU - Khoa CNTT - Thit k giao din 22
Controls
MDI application
12
SGU - Khoa CNTT - Thit k giao din 23
Controls for container
Dialog (form): modal
SGU - Khoa CNTT - Thit k giao din 24
Controls for container
Dialog (form): modeless
13
SGU - Khoa CNTT - Thit k giao din 25
Controls for container
Panel
FlowLayoutPanel
SGU - Khoa CNTT - Thit k giao din 26
Controls for container
TableLayoutPanel
14
SGU - Khoa CNTT - Thit k giao din 27
Controls for container
TabControl
SGU - Khoa CNTT - Thit k giao din 28
Controls for organize content
Scrollbar
Groupbox
15
SGU - Khoa CNTT - Thit k giao din 29
Controls for organize content
Listbox
Combobox
SGU - Khoa CNTT - Thit k giao din 30
Controls for text
Textbox
16
SGU - Khoa CNTT - Thit k giao din 31
Controls for choices
Checkbox
Radio button
Toggle button
SGU - Khoa CNTT - Thit k giao din 32
Controls for commands
Menu
Button
Context Menu
17
SGU - Khoa CNTT - Thit k giao din 33
Controls for commands
Toolbar
Hyperlink
Ribbon
SGU - Khoa CNTT - Thit k giao din 34
Controls for others
DateTimePicker
TreeView
Spinner(DomainUpDown)
18
SGU - Khoa CNTT - Thit k giao din 35
Controls Datagrid
DataGrid(Table)
SGU - Khoa CNTT - Thit k giao din 36
User control (i.e. custom widget)
Inherit standard control classes to provide better diplay style & more features:
Java: usually free widgets .NET: mostly commercial control sets.
DevExpress Winform (from $799) Telerik RadControls for WinForms (from $799) Infragistic NetAdvantage for Win Client (from $995)
19
SGU - Khoa CNTT - Thit k giao din 37
Controls DevExpress Winform
SGU - Khoa CNTT - Thit k giao din 38
Controls DevExpress Winform
MDI tabsRibbon
20
SGU - Khoa CNTT - Thit k giao din 39
Controls DevExpress Winform
XtraRichEdit
XtraCombo
SGU - Khoa CNTT - Thit k giao din 40
Controls DevExpress Winform
XtraNavBar (Navigation bar)(Ms. Outlook 2007)
(Side bar)(Ms. Outlook 2003)
(Explorer bar)(Win Explorer)
21
SGU - Khoa CNTT - Thit k giao din 41
Controls DevExpress Winform
XtraGrid
SGU - Khoa CNTT - Thit k giao din 42
Controls DevExpress Winform
XtraGrid
22
SGU - Khoa CNTT - Thit k giao din 43
Controls Telerik RadControl
RadGridView
SGU - Khoa CNTT - Thit k giao din 44
Controls Infragistics Windows Forms Controls
23
SGU - Khoa CNTT - Thit k giao din 45
GUI programming
The more powerful & usable GUI components as
well as technical solutions are presented, the
higher quality & usability applications are
required.
SGU - Khoa CNTT - Thit k giao din 46
Reference http://www.eclipse.org/swt/ http://en.csharp-
online.net/CSharp_Certification%2C_Development%2C_and_Training
http://www.apl.jhu.edu/~hall/CWP-Chapter13/ http://www.linuxjournal.com/article/2627 (extend Java
widget)
24
SGU - Khoa CNTT - Thit k giao din 47
Lab C# GUI code
C# panel: anchor, dock
SGU - Khoa CNTT - Thit k giao din 48
LabC# user control
c & lm theo hng dn: http://www.java2s.com/Code/CSharp/GUI-Windows-Form/User-Control.htm http://www.akadia.com/services/dotnet_user_controls.html
User-control nhp a ch Vit Nam: Nhp s nh, tn ng Nhp / chn phng, x; qun huyn Nhp / chn tnh, thnh Link googlemap