功能性界面选择按钮函数的编写
来源:互联网 发布:韩国服装批发软件 编辑:程序博客网 时间:2024/06/06 00:42
这个是多个功能性界面选择按钮函数的编写。
private void Btn_FunForm_Click(object sender, EventArgs e) { //******************************************************************** //对于并列功能选择按钮的函数的书写 //分为9个步骤 //利用switch进行判断 //Button的tabindex进行按顺序赋值 //******************************************************************* //1.先判断动作主体是否是Button类型 if (!(sender is Button)) { return; } //2.强制赋值 Button Btntest=(Button)(sender); //3.获取序号 int BtnIndex = Btntest.TabIndex; //4.是否是退出按钮 if (BtnIndex == 20) { if (MessageBox.Show("确定要关闭吗?", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } this.Cursor = Cursors.WaitCursor; Application.DoEvents(); this.Close(); return; } //5.是否到期 if (GlobleData.Setting.SetUpCheck && File.Exists(Application.StartupPath + "\\TxtFile\\cfg.txt") && (System.DateTime.Now - File.GetCreationTime(Application.StartupPath + "\\TxtFile\\cfg.txt")).TotalDays > 31) { MessageBox.Show("软件使用期限超过一个月,请联系集成商!"); return; } //6.和中间量进行比较 if (BtnTemp == Btntest) { return; } if (BtnTemp != null) { BtnTemp.BackColor = Color.White; } BtnTemp = Btntest; BtnTemp.BackColor = Color.Yellow; //7.是否还在初始化 if (GlobleData.Operator.Screenapp == true) { return; } GlobleData.Operator.Screenapp = true; //8.初始化过程 GlobleData.SetScrFlag(); GlobelFunc.Frm_Hide(frm_Temp); switch (BtnIndex) { case 1: { GlobelFunc.Frm_Show(F1); frm_Temp = F1; break; } case 2: { GlobelFunc.Frm_Show(F2); frm_Temp = F2; break; } case 3: { GlobelFunc.Frm_Show(F3); frm_Temp = F3; break; } case 4: { GlobelFunc.Frm_Show(F4); frm_Temp = F4; break; } case 5: { GlobelFunc.Frm_Show(F5); frm_Temp = F5; break; } case 6: { GlobelFunc.Frm_Show(F6); frm_Temp = F6; break; } case 7: { GlobelFunc.Frm_Show(F7); frm_Temp = F7; break; } case 8: { GlobelFunc.Frm_Show(F8); frm_Temp = F8; break; } case 9: { GlobelFunc.Frm_Show(F9); frm_Temp = F9; break; } case 10: { GlobelFunc.Frm_Show(F10); frm_Temp = F10; break; } default: { break; } } //9.变量进行清理 GlobleData.Screen.CurrentScreen = GlobleData.Screen.FormInfor[BtnIndex];; GlobleData.Operator.Screenapp = false; }
- 功能性界面选择按钮函数的编写
- 隐藏标准选择界面按钮
- 在jsp中按钮实现界面跳转的功能
- 编写行选择函数
- 编写行选择函数
- 编写行选择函数
- 编写实现函数strcat功能的程序
- 编写实现strstr()函数功能的代码
- Gridview控件添加编辑按钮时候需编写的函数》
- 改变按钮的界面
- 选择屏幕中 如何自定义 功能按钮
- 核函数的选择方法(待编写)
- 注册界面中选择按钮项的html和Js代码
- 开始界面的编写
- 日历界面的编写
- GUI界面的选择
- 按钮功能的实现
- 编写一个函数 实现strncpy一样的功能(图)
- CentOS 5.5 yum源
- Java 开源博客——B3log Solo 0.5.0 正式版发布了!
- ZJUT 1317 掷飞盘 (高斯解期望问题)
- 【100题】第七十六题~第八十题
- TLD算法环境搭建
- 功能性界面选择按钮函数的编写
- CentOS yum的详细使用方法
- 编译原理=符号表的认识
- 线程基础
- 关于发行手机应用的5项重要营销建议
- ERP与电子商务整合乃大势所趋
- 安装centos开发包
- linux如何从程序中获得/设置环境变量
- 使用vim+ctags+cscope阅读内核源码