首页 人机交互用户界面设计实验报告

人机交互用户界面设计实验报告

举报
开通vip

人机交互用户界面设计实验报告.实验一图形用户界面的设计一实验目的和要求熟悉图形用户界面的设计原则2)利用一种设计工具完成图形化的用户界面设计二实验内容与步骤(一)实验内容:利用常用的设计工具(VC/VB/Delphi/PB等)完成一个通用图形用户界面设计,要遵循界面设计的一般原则(一致性、快捷方式、提供错误处理),注意颜色的使用,学会使用图标、按钮、屏幕布局、菜单和对话框的设计(二)实验步骤1.设计多个对话框,完成填表输入界面的设计,合理使用图标、按钮、颜色;2.设计不同形式的菜单,完成对不同对话框的调用;3.提供简单的错误处理、联机帮助三界...

人机交互用户界面设计实验报告
.实验一图形用户界面的设计一实验目的和要求熟悉图形用户界面的设计原则2)利用一种设计工具完成图形化的用户界面设计二实验 内容 财务内部控制制度的内容财务内部控制制度的内容人员招聘与配置的内容项目成本控制的内容消防安全演练内容 与步骤(一)实验内容:利用常用的设计工具(VC/VB/Delphi/PB等)完成一个通用图形用户界面设计,要遵循界面设计的一般原则(一致性、快捷方式、提供错误处理),注意颜色的使用,学会使用图标、按钮、屏幕布局、菜单和对话框的设计(二)实验步骤1.设计多个对话框,完成填表输入界面的设计,合理使用图标、按钮、颜色;2.设计不同形式的菜单,完成对不同对话框的调用;3.提供简单的错误处理、联机帮助三界面示例1、登录界面2、主界面1/16.3代码:登录界面:usingSystem;usingSystem.Drawing;usingSystem.Collections;usingSystem.ComponentModel;usingSystem.Windows.Forms;usingSystem.Data;2/16.usingSystem.Data.OleDb;Downloadbyhttp://www.codefans.netnamespaceWealthMIS.user{Form1的摘要说明。publicclassLogin:System.Windows.Forms.Form{privateSystem.Windows.Forms.ButtonbtClose;privateSystem.Windows.Forms.TextBoxpassword;privateSystem.Windows.Forms.Labellabel3;privateSystem.Windows.Forms.Labellabel2;privateSystem.Windows.Forms.Labellabel1;privateSystem.Windows.Forms.ComboBoxcomboName;必需的设计器变量。privateSystem.ComponentModel.Containercomponents=null;privateSystem.Windows.Forms.ButtonbtSure;privateOleDbConnectionoleConnection1=null;publicLogin(){//Windows窗体设计器支持所必需的//InitializeComponent();//TODO:在InitializeComponent调用后添加任何构造函数代码}清理所有正在使用的资源。protectedoverridevoidDispose(booldisposing){if(disposing){if(components!=null){components.Dispose();3/16.}}base.Dispose(disposing);}#regionWindows窗体设计器生成的代码设计器支持所需的方法-不要使用代码编辑器修改此方法的内容。privatevoidInitializeComponent(){System.ComponentModel.ComponentResourceManagerresources=newSystem.ComponentModel.ComponentResourceManager(typeof(Login));this.btClose=newSystem.Windows.Forms.Button();this.btSure=newSystem.Windows.Forms.Button();this.password=newSystem.Windows.Forms.TextBox();this.label3=newSystem.Windows.Forms.Label();this.label2=newSystem.Windows.Forms.Label();this.label1=newSystem.Windows.Forms.Label();this.comboName=newSystem.Windows.Forms.ComboBox();this.SuspendLayout();//btClosethis.btClose.FlatStyle=System.Windows.Forms.FlatStyle.Popup;this.btClose.ForeColor=System.Drawing.Color.Black;this.btClose.Location=newSystem.Drawing.Point(159,220);this.btClose.Name="btClose";this.btClose.Size=newSystem.Drawing.Size(75,23);this.btClose.TabIndex=27;this.btClose.Text="取消";this.btClose.Click+=newSystem.EventHandler(this.btClose_Click);//btSurethis.btSure.FlatStyle=System.Windows.Forms.FlatStyle.Popup;this.btSure.ForeColor=System.Drawing.Color.Black;this.btSure.Location=newSystem.Drawing.Point(46,220);this.btSure.Name="btSure";this.btSure.Size=newSystem.Drawing.Size(75,23);this.btSure.TabIndex=26;this.btSure.Text="确定";this.btSure.Click+=newSystem.EventHandler(this.btSure_Click);4/16.//passwordthis.password.BorderStyle=System.Windows.Forms.BorderStyle.FixedSingle;this.password.Location=newSystem.Drawing.Point(130,136);this.password.Name="password";this.password.PasswordChar='*';this.password.Size=newSystem.Drawing.Size(100,21);this.password.TabIndex=25;this.password.Text="admin";//label3this.label3.Font=newSystem.Drawing.Font("宋体",10.5F,System.Drawing.FontStyle.Bold,System.Drawing.GraphicsUnit.Point,((byte)(134)));this.label3.ForeColor=System.Drawing.Color.Black;this.label3.Location=newSystem.Drawing.Point(66,136);this.label3.Name="label3";this.label3.Size=newSystem.Drawing.Size(56,23);this.label3.TabIndex=23;this.label3.Text="密码";//label2this.label2.Font=newSystem.Drawing.Font("宋体",10.5F,System.Drawing.FontStyle.Bold,System.Drawing.GraphicsUnit.Point,((byte)(134)));this.label2.ForeColor=System.Drawing.Color.Black;this.label2.Location=newSystem.Drawing.Point(66,96);this.label2.Name="label2";this.label2.Size=newSystem.Drawing.Size(56,23);this.label2.TabIndex=22;this.label2.Text="用户名";//label1this.label1.Font=newSystem.Drawing.Font("楷体_GB2312",18F,System.Drawing.FontStyle.Bold,System.Drawing.GraphicsUnit.Point,((byte)(134)));this.label1.ForeColor=System.Drawing.Color.Black;this.label1.Location=newSystem.Drawing.Point(42,48);this.label1.Name="label1";this.label1.Size=newSystem.Drawing.Size(208,28);this.label1.TabIndex=21;this.label1.Text="理财管理信息系统";5/16.//comboNamethis.comboName.Location=newSystem.Drawing.Point(130,96);this.comboName.Name="comboName";this.comboName.Size=newSystem.Drawing.Size(104,20);this.comboName.TabIndex=28;//Loginthis.AutoScaleBaseSize=newSystem.Drawing.Size(6,14);this.BackColor=System.Drawing.Color.SeaShell;this.BackgroundImage=((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));this.ClientSize=newSystem.Drawing.Size(298,287);this.Controls.Add(this.comboName);this.Controls.Add(this.btClose);this.Controls.Add(this.btSure);this.Controls.Add(this.password);this.Controls.Add(this.label3);this.Controls.Add(this.label2);this.Controls.Add(this.label1);this.MaximizeBox=false;this.MinimizeBox=false;this.Name="Login";this.StartPosition=System.Windows.Forms.FormStartPosition.CenterScreen;this.Text="登录";this.Load+=newSystem.EventHandler(this.Login_Load);this.ResumeLayout(false);this.PerformLayout();}#endregion应用程序的主入口点。[STAThread]staticvoidMain(){Application.Run(newMainForm());}6/16.privatevoidbtSure_Click(objectsender,System.EventArgse){try{stringsql="selectuName,PWDfromfamilywhereuName='"+this.comboName.Text+"'";if(oleConnection1==null)oleConnection1=MainForm.getConnection();OleDbCommandcmd=oleConnection1.CreateCommand();cmd.CommandText=sql;OleDbDataReaderdr=cmd.ExecuteReader();if(!dr.Read()){MessageBox.Show("无此用户,请重试!","提示");dr.Close();cmd.Dispose();return;}else{if(!dr.GetString(1).Equals(this.password.Text.ToString())){MessageBox.Show("\n密码错误,请重试!","提示");dr.Close();cmd.Dispose();return;}Menumainmenu=((MainForm)(this.MdiParent)).getMainMenu();for(inti=0;i<6;i++){mainmenu.MenuItems[i].Visible=true;}StatusBarstatusBar=((MainForm)(this.MdiParent)).getStatusBar();statusBar.Panels[0].Text="当前登录用户";statusBar.Panels[1].Text=this.comboName.Text.Trim();statusBar.Panels[2].Text=DateTime.Now.ToString();statusBar.Panels[3].Text="理财管理信息系统";dr.Close();cmd.Dispose();this.Close();7/16.}}catch(Exceptionee){MessageBox.Show("\n"+ee.ToString());}}privatevoidbtClose_Click(objectsender,System.EventArgse){this.Close();}privatevoidLogin_Load(objectsender,System.EventArgse){if(oleConnection1==null)oleConnection1=MainForm.getConnection();//取出系统的所有用户名//显示在下拉列表,这样用户登录的时候//选择用户名就可以了,不用再输入用户名了stringsql="selectuNamefromfamily";OleDbCommandcmd=newOleDbCommand(sql,oleConnection1);OleDbDataReaderdr=cmd.ExecuteReader();intflag=0;while(dr.Read()){this.comboName.Items.Add(dr.GetString(0));flag++;}//如果系统存在用户,则默认选中第一个用户if(flag>0)this.comboName.SelectedIndex=0;dr.Close();cmd.Dispose();}}}主界面:usingSystem;usingSystem.Drawing;usingSystem.Collections;usingSystem.ComponentModel;usingSystem.Windows.Forms;usingSystem.Data;8/16.usingSystem.Data.OleDb;Downloadbyhttp://www.codefans.netnamespaceWealthMIS.user{Form1的摘要说明。publicclassLogin:System.Windows.Forms.Form{privateSystem.Windows.Forms.ButtonbtClose;privateSystem.Windows.Forms.TextBoxpassword;privateSystem.Windows.Forms.Labellabel3;privateSystem.Windows.Forms.Labellabel2;privateSystem.Windows.Forms.Labellabel1;privateSystem.Windows.Forms.ComboBoxcomboName;必需的设计器变量。privateSystem.ComponentModel.Containercomponents=null;privateSystem.Windows.Forms.ButtonbtSure;privateOleDbConnectionoleConnection1=null;publicLogin(){//Windows窗体设计器支持所必需的//InitializeComponent();//TODO:在InitializeComponent调用后添加任何构造函数代码}清理所有正在使用的资源。protectedoverridevoidDispose(booldisposing){if(disposing){if(components!=null){components.Dispose();9/16.}}base.Dispose(disposing);}#regionWindows窗体设计器生成的代码设计器支持所需的方法-不要使用代码编辑器修改此方法的内容。privatevoidInitializeComponent(){System.ComponentModel.ComponentResourceManagerresources=newSystem.ComponentModel.ComponentResourceManager(typeof(Login));this.btClose=newSystem.Windows.Forms.Button();this.btSure=newSystem.Windows.Forms.Button();this.password=newSystem.Windows.Forms.TextBox();this.label3=newSystem.Windows.Forms.Label();this.label2=newSystem.Windows.Forms.Label();this.label1=newSystem.Windows.Forms.Label();this.comboName=newSystem.Windows.Forms.ComboBox();this.SuspendLayout();//btClosethis.btClose.FlatStyle=System.Windows.Forms.FlatStyle.Popup;this.btClose.ForeColor=System.Drawing.Color.Black;this.btClose.Location=newSystem.Drawing.Point(159,220);this.btClose.Name="btClose";this.btClose.Size=newSystem.Drawing.Size(75,23);this.btClose.TabIndex=27;this.btClose.Text="取消";this.btClose.Click+=newSystem.EventHandler(this.btClose_Click);//btSurethis.btSure.FlatStyle=System.Windows.Forms.FlatStyle.Popup;this.btSure.ForeColor=System.Drawing.Color.Black;this.btSure.Location=newSystem.Drawing.Point(46,220);this.btSure.Name="btSure";this.btSure.Size=newSystem.Drawing.Size(75,23);this.btSure.TabIndex=26;this.btSure.Text="确定";this.btSure.Click+=newSystem.EventHandler(this.btSure_Click);10/16.//passwordthis.password.BorderStyle=System.Windows.Forms.BorderStyle.FixedSingle;this.password.Location=newSystem.Drawing.Point(130,136);this.password.Name="password";this.password.PasswordChar='*';this.password.Size=newSystem.Drawing.Size(100,21);this.password.TabIndex=25;this.password.Text="admin";//label3this.label3.Font=newSystem.Drawing.Font("宋体",10.5F,System.Drawing.FontStyle.Bold,System.Drawing.GraphicsUnit.Point,((byte)(134)));this.label3.ForeColor=System.Drawing.Color.Black;this.label3.Location=newSystem.Drawing.Point(66,136);this.label3.Name="label3";this.label3.Size=newSystem.Drawing.Size(56,23);this.label3.TabIndex=23;this.label3.Text="密码";//label2this.label2.Font=newSystem.Drawing.Font("宋体",10.5F,System.Drawing.FontStyle.Bold,System.Drawing.GraphicsUnit.Point,((byte)(134)));this.label2.ForeColor=System.Drawing.Color.Black;this.label2.Location=newSystem.Drawing.Point(66,96);this.label2.Name="label2";this.label2.Size=newSystem.Drawing.Size(56,23);this.label2.TabIndex=22;this.label2.Text="用户名";//label1this.label1.Font=newSystem.Drawing.Font("楷体_GB2312",18F,System.Drawing.FontStyle.Bold,System.Drawing.GraphicsUnit.Point,((byte)(134)));this.label1.ForeColor=System.Drawing.Color.Black;this.label1.Location=newSystem.Drawing.Point(42,48);this.label1.Name="label1";this.label1.Size=newSystem.Drawing.Size(208,28);this.label1.TabIndex=21;this.label1.Text="理财管理信息系统";11/16.//comboNamethis.comboName.Location=newSystem.Drawing.Point(130,96);this.comboName.Name="comboName";this.comboName.Size=newSystem.Drawing.Size(104,20);this.comboName.TabIndex=28;//Loginthis.AutoScaleBaseSize=newSystem.Drawing.Size(6,14);this.BackColor=System.Drawing.Color.SeaShell;this.BackgroundImage=((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));this.ClientSize=newSystem.Drawing.Size(298,287);this.Controls.Add(this.comboName);this.Controls.Add(this.btClose);this.Controls.Add(this.btSure);this.Controls.Add(this.password);this.Controls.Add(this.label3);this.Controls.Add(this.label2);this.Controls.Add(this.label1);this.MaximizeBox=false;this.MinimizeBox=false;this.Name="Login";this.StartPosition=System.Windows.Forms.FormStartPosition.CenterScreen;this.Text="登录";this.Load+=newSystem.EventHandler(this.Login_Load);this.ResumeLayout(false);this.PerformLayout();}#endregion应用程序的主入口点。[STAThread]staticvoidMain(){Application.Run(newMainForm());}12/16.privatevoidbtSure_Click(objectsender,System.EventArgse){try{stringsql="selectuName,PWDfromfamilywhereuName='"+this.comboName.Text+"'";if(oleConnection1==null)oleConnection1=MainForm.getConnection();OleDbCommandcmd=oleConnection1.CreateCommand();cmd.CommandText=sql;OleDbDataReaderdr=cmd.ExecuteReader();if(!dr.Read()){MessageBox.Show("无此用户,请重试!","提示");dr.Close();cmd.Dispose();return;}else{if(!dr.GetString(1).Equals(this.password.Text.ToString())){MessageBox.Show("\n密码错误,请重试!","提示");dr.Close();cmd.Dispose();return;}Menumainmenu=((MainForm)(this.MdiParent)).getMainMenu();for(inti=0;i<6;i++){mainmenu.MenuItems[i].Visible=true;}StatusBarstatusBar=((MainForm)(this.MdiParent)).getStatusBar();statusBar.Panels[0].Text="当前登录用户";statusBar.Panels[1].Text=this.comboName.Text.Trim();statusBar.Panels[2].Text=DateTime.Now.ToString();statusBar.Panels[3].Text="理财管理信息系统";dr.Close();cmd.Dispose();this.Close();13/16.}}catch(Exceptionee){MessageBox.Show("\n"+ee.ToString());}}privatevoidbtClose_Click(objectsender,System.EventArgse){this.Close();}privatevoidLogin_Load(objectsender,System.EventArgse){if(oleConnection1==null)oleConnection1=MainForm.getConnection();//取出系统的所有用户名//显示在下拉列表,这样用户登录的时候//选择用户名就可以了,不用再输入用户名了stringsql="selectuNamefromfamily";OleDbCommandcmd=newOleDbCommand(sql,oleConnection1);OleDbDataReaderdr=cmd.ExecuteReader();intflag=0;while(dr.Read()){this.comboName.Items.Add(dr.GetString(0));flag++;}//如果系统存在用户,则默认选中第一个用户if(flag>0)this.comboName.SelectedIndex=0;dr.Close();cmd.Dispose();}}}四实验总结1.界面要具有一致性、常用操作要有快捷方式、提供简单的错误处理、对操作人员的重要操作要有信息反馈、操作可逆、设计良好的联机帮助、合理划分并14/16.高效地使用显示屏、保证信息显示方式与数据输入方式的协调一致颜色是一种有效的强化手段,同时具有美学价值。使用颜色时应注意如下几点:限制同时显示的颜色数;画面中活动对象的颜色应鲜明,而非活动对象应暗淡;尽量避免不相容的颜色放在一起,如黄与蓝,红与绿等,除非作对比时用;若用颜色表示某种信息或对象属性,要使用户理解这种表示,并尽量采用通用的表示规则。3.图标是可视地表示实体信息的简洁、抽象的符号。图标设计是方寸艺术,需要在很小的范围内表现出图标的内涵。设计图标时应该着重考虑视觉冲击力,要使用简单的颜色,利用眼睛对色彩和网点的空间混合效果,做出精彩图标。1)设计按钮应该具有交互性,应该有3到6种状态效果(点击时的状态、鼠标放在上面但未点击的状态、点击前鼠标未放在上面时的状态、点击后鼠标未放在上面时的状态、不能点击时的状态、独立自动变化的状态),按钮应具备简洁的图示效果,应能够让使用者产生功能上的关联反应。属于一个群组的按钮应该风格统一,功能差异大的按钮应该有所区别。2)设计屏幕布局(Layout)时应该使各功能区重点突出,应遵循如下几条原则:平衡原则、预期原则、经济原则、顺序原则、规则化3)菜单在图形界面的应用程序中使用得非常普遍,是软件界面设计的一个重要组成方面,描述了一个软件的大致功能和风格。菜单中的选项在功能上与按钮相当,一般具有下列一种或几种类型的选项:命令项、菜单项和窗口项。菜单的结构一般有单一菜单、线状序列菜单、树状结构菜单、网状结构菜单等,其中树状结构菜单是最常见的结构。设计菜单界面时应注意的一般性原则:功能组织菜单,合理分类,并力求简短,前后一致;合理组织菜单界面的结构与层次;按一定的规则对菜单项进行排序;菜单选项的标题要力求文字简短、含义明确,并且最好以关键词开始;常用选项要设置快捷键;充分利用菜单选项的使能与禁止、可见与隐藏属性;使用弹出式菜单。4)在处理大量相关数据的场合下,需要输入一系列的数据,这时填表输入界面是最理想的数据输入界面。在设计填表输入界面时应遵循的原则:一致性;有含义的 表格 关于规范使用各类表格的通知入职表格免费下载关于主播时间做一个表格详细英语字母大小写表格下载简历表格模板下载 标题;使用易于理解的指导性说明文字;栏目按逻辑分组排序;表15/16.格的组织结构和用户任务相一致;光标移动方便;出错提示;提供帮助;表格显示应美观、清楚,避免过分拥挤。16/16
本文档为【人机交互用户界面设计实验报告】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
个人认证用户
is_916672
暂无简介~
格式:doc
大小:273KB
软件:Word
页数:0
分类:
上传时间:2021-09-27
浏览量:3