Esempio n. 1
0
        private void Header_MenuItemClick(string itemText, int menuIndex, int pageIndex)
        {
            switch (menuIndex)
            {
            case 0:
                this.SelectPage(GasMonitorManager.realDataFrm.Guid);
                break;

            case 1:
                this.SelectPage(GasMonitorManager.realSeriesFrm.Guid);
                break;

            case 2:
                this.SelectPage(GasMonitorManager.alarmSetFrm.Guid);
                break;

            case 3:
                PasswordInputFrm frm = new PasswordInputFrm();

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    this.ShowSuccessTip("登录成功");
                    this.SelectPage(GasMonitorManager.systenSetFrm.Guid);
                }
                else
                {
                    this.ShowErrorTip("登录失败");
                }
                break;

            case 4:
                this.SelectPage(GasMonitorManager.logFrm.Guid);
                break;
            }
        }
Esempio n. 2
0
        private void uiAvatar_Click(object sender, EventArgs e)
        {
            PasswordInputFrm frm = new PasswordInputFrm();

            frm.Text  = "是否要重启系统";
            frm.Title = "重启系统";
            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                ExitWindows.Reboot();
            }
        }