コード例 #1
0
ファイル: UserForm.cs プロジェクト: JustMinely/Vexease
        protected override void OnClosing(CancelEventArgs e)
        {
            e.Cancel = true;
            // DialogResult result = MessageBox.Show("当前为用户状态,不能自主终止程序,是否隐藏窗口,最小化到系统托盘?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.None);

            Application.DoEvents();
            ViewMethod.CloseTips(this);
            base.OnClosing(e);
        }
コード例 #2
0
ファイル: UserForm.cs プロジェクト: JustMinely/Vexease
 private void UserForm_Load(object sender, EventArgs e)
 {
     MaximizeBox = false; //最大化不可用
     MinimizeBox = false; //最小化不可用
     //ControlBox = false;//上面三个按钮隐藏,以后用...
     //ShowInTaskbar = false;//不在任务栏上显示
     FormBorderStyle = FormBorderStyle.FixedSingle;//不可调整大小。可包括控件菜单栏、标题栏、“最大化”按钮和“最小化”按钮。只能使用“最大化”和“最小化”按钮改变大小。创建单线边框。
     ViewMethod.Colwidth3(LvUser);
     ViewMethod.StatusChange(LvUser);
 }
コード例 #3
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
        private void LblColor_MouseEnter(object sender, EventArgs e)
        {
            Label lbl = sender as Label;

            if (lbl == LblOptimization)
            {
                ViewMethod.ColorChange(LblOptimization, "E");
            }
            if (lbl == LblStatus)
            {
                ViewMethod.ColorChange(LblStatus, "E");
            }
        }
コード例 #4
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
        private void BtnColor_MouseEnter(object sender, EventArgs e)
        {
            Button button = sender as Button;

            if (button == BtnConsole)
            {
                ViewMethod.ColorChange(BtnConsole, "E");
            }
            if (button == BtnRegustry)
            {
                ViewMethod.ColorChange(BtnRegustry, "E");
            }
            if (button == BtnCmd)
            {
                ViewMethod.ColorChange(BtnCmd, "E");
            }
            if (button == BtnPS)
            {
                ViewMethod.ColorChange(BtnPS, "E");
            }
            if (button == BtnCtrlPnl)
            {
                ViewMethod.ColorChange(BtnCtrlPnl, "E");
            }
            if (button == BtnTaskMgr)
            {
                ViewMethod.ColorChange(BtnTaskMgr, "E");
            }
            if (button == BtnSys)
            {
                ViewMethod.ColorChange(BtnSys, "E");
            }
            if (button == BtnRunTool)
            {
                ViewMethod.ColorChange(BtnRunTool, "E");
            }
            if (button == BtnProcCtrl)
            {
                ViewMethod.ColorChange(BtnProcCtrl, "E");
            }
            if (button == BtnIm)
            {
                ViewMethod.ColorChange(BtnIm, "E");
            }
            if (button == BtnEx)
            {
                ViewMethod.ColorChange(BtnEx, "E");
            }
        }
コード例 #5
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
        private void BtnYorN_MouseUp(object sender, MouseEventArgs e)
        {
            BtnYorN btnYorN = new BtnYorN();

            if (btnYorN == BtnWListYorN)
            {
                ViewMethod.ContracAndAmplifica(PnlWList, BtnWListYorN, "W_Clicked");
            }
            if (btnYorN == BtnBListYorN)
            {
                ViewMethod.ContracAndAmplifica(PnlBList, BtnBListYorN, "B_Clicked");
            }
            if (btnYorN == BtnListPathYorN)
            {
                BtnYorNCtrl.CheckYorN(BtnListPathYorN, "P_Load");
            }
        }
コード例 #6
0
        public static bool LogicLoop(bool continueRun)
        {
            //  Prompt user for action
            Console.WriteLine("Would you like to add a customer (add), delete a customer (delete), view all customers (view), or exit (exit)?");
            string programAction = Console.ReadLine();

            Console.WriteLine();

            //  Add, View, Delete, Exit
            if (programAction == "add" ||
                programAction == "Add")
            {
                //  Add method
                AddMethod.Add();
                return(continueRun);
            }
            else if (programAction == "view" ||
                     programAction == "View")
            {
                //  View method
                ViewMethod.View();
                return(continueRun);
            }
            else if (programAction == "delete" ||
                     programAction == "Delete")
            {
                //  Delete method
                DeleteMethod.Delete();
                return(continueRun);
            }
            else if (programAction == "exit" ||
                     programAction == "Exit")
            {
                //  Exit program
                continueRun = false;
                return(continueRun);
            }
            else
            {
                //  Show error, return to loop
                Console.WriteLine("Command not found.");
                Console.WriteLine();
                return(continueRun);
            }
        }
コード例 #7
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
        private void Label_Click(object sender, EventArgs e)
        {
            Label lbl = sender as Label;

            if (lbl == LblConsole)
            {
                ViewMethod.ContracAndAmplifica(LvConsole);
            }
            if (lbl == LblRegustriy)
            {
                ViewMethod.ContracAndAmplifica(LvRegustry);
            }
            if (lbl == LblSys)
            {
                ViewMethod.ContracAndAmplifica(LvSys);
            }
            if (lbl == LblCtrlPnl)
            {
                ViewMethod.ContracAndAmplifica(LvCtrlPnl);
            }
            if (lbl == LblRunTool)
            {
                ViewMethod.ContracAndAmplifica(LvRunTool);
            }
            if (lbl == LblTaskMgr)
            {
                ViewMethod.ContracAndAmplifica(LvTaskMgr);
            }
            if (lbl == LblCmd)
            {
                ViewMethod.ContracAndAmplifica(LvCmd);
            }
            if (lbl == LblPS)
            {
                ViewMethod.ContracAndAmplifica(LvPS);
            }
            if (lbl == LblBListTitleN)
            {
                ViewMethod.ContracAndAmplifica(PnlBList);
            }
            if (lbl == LblWListTN)
            {
                ViewMethod.ContracAndAmplifica(PnlWList);
            }
        }
コード例 #8
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
        //
        //收放
        //
        private void BtnYorN_Click(object sender, EventArgs e)
        {
            BtnYorN btnYorN = sender as BtnYorN;

            if (btnYorN == BtnBListYorN)
            {
                BtnYorNCtrl.CheckYorN(BtnBListYorN, "B_Clicked");
                ViewMethod.ContracAndAmplifica(PnlBList, BtnBListYorN, "B_Clicked");
            }
            if (btnYorN == BtnWListYorN)
            {
                BtnYorNCtrl.CheckYorN(BtnWListYorN, "W_Clicked"); ViewMethod.ContracAndAmplifica(PnlWList, BtnWListYorN, "W_Clicked");
            }
            if (btnYorN == BtnListPathYorN)
            {
                BtnYorNCtrl.CheckYorN(BtnListPathYorN, "P_Clicked");
            }
        }
コード例 #9
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
        //
        //checkbutton-状态列表的收缩
        //
        private void BtnYorN_Load(object sender, EventArgs e)
        {
            BtnYorN btnYorN = sender as BtnYorN;

            if (btnYorN == BtnBListYorN)
            {
                BtnYorNCtrl.CheckYorN(BtnBListYorN, "B_Load");
                ViewMethod.Contraction(BtnBListYorN, PnlBList, "B_Load");
            }
            if (btnYorN == BtnWListYorN)
            {
                BtnYorNCtrl.CheckYorN(BtnWListYorN, "W_Load");
                ViewMethod.Contraction(BtnWListYorN, PnlWList, "W_Load");
            }
            if (btnYorN == BtnListPathYorN)
            {
                BtnYorNCtrl.CheckYorN(BtnListPathYorN, "P_Load");
            }
        }
コード例 #10
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
        private void AdmForm_Load(object sender, EventArgs e)
        {
            MaximizeBox     = false;                       //最大化不可用
            MinimizeBox     = false;                       //最小化不可用
            FormBorderStyle = FormBorderStyle.FixedSingle; //不可调整大小。可包括控件菜单栏、标题栏、“最大化”按钮和“最小化”按钮。只能使用“最大化”和“最小化”按钮改变大小。创建单线边框。
                                                           //隐藏标签,改成设置Itemsize为(1,1)了

            /*TabCtrlAdm.Region = new Region(new RectangleF(PageCtrlPnl.Left,
             * PageCtrlPnl.Top, PageCtrlPnl.Width, PageCtrlPnl.Height));*/

            PnlWListTN.Width = PageAbout.Width - 100;
            // LvCmd.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            ViewMethod.Colwidth2(LvCmd);
            ViewMethod.Colwidth2(LvConsole);
            ViewMethod.Colwidth2(LvCtrlPnl);
            ViewMethod.Colwidth2(LvSys);
            ViewMethod.Colwidth2(LvPS);
            ViewMethod.Colwidth2(LvRegustry);
            ViewMethod.Colwidth2(LvRunTool);
            ViewMethod.Colwidth2(LvTaskMgr);
        }
コード例 #11
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
        private void BtnYorNStatus_MouseUp(object sender, MouseEventArgs e)
        {
            BtnYorN btnYorN = sender as BtnYorN;

            if (btnYorN == BtnRegustriyYorN)
            {
                ViewMethod.StatusChange(btnYorN, LvRegustry, "Registry_Clicked");
            }
            if (btnYorN == BtnConsoleYorN)
            {
                ViewMethod.StatusChange(btnYorN, LvConsole, "Mmc_Clicked");
            }
            if (btnYorN == BtnSysYorN)
            {
                ViewMethod.StatusChange(BtnSysYorN, LvSys, "Sys_Clicked");
            }
            if (btnYorN == BtnCtrlPnlYorN)
            {
                ViewMethod.StatusChange(BtnCtrlPnlYorN, LvCtrlPnl, "CtrlPnl_Clicked");
            }
            if (btnYorN == BtnRunToolYorN)
            {
                ViewMethod.StatusChange(BtnRunToolYorN, LvRunTool, "RunTool_Clicked");
            }
            if (btnYorN == BtnTaskMgrYorN)
            {
                ViewMethod.StatusChange(BtnTaskMgrYorN, LvTaskMgr, "Taskmgr_Clicked");
            }
            if (btnYorN == BtnCmdYorN)
            {
                ViewMethod.StatusChange(BtnCmdYorN, LvCmd, "Cmd_Clicked");
            }
            if (btnYorN == BtnPSYorN)
            {
                ViewMethod.StatusChange(BtnPSYorN, LvPS, "PwrShell_Clicked");
            }
        }
コード例 #12
0
ファイル: AdmForm.cs プロジェクト: JustMinely/Vexease
 //
 //大标题的双击
 //
 private void LblStatus_DoubleClick(object sender, EventArgs e)
 {
     ViewMethod.DoubleCliclLbl(BtnConsole, BtnRegustry, BtnSys, BtnCtrlPnl, BtnRunTool, BtnTaskMgr, BtnCmd, BtnPS, BtnProcCtrl);
 }
コード例 #13
0
ファイル: PwdChangeForm.cs プロジェクト: JustMinely/Vexease
 private void TxtNewPwd_Leave(object sender, EventArgs e)
 {
     ViewMethod.PwdSet(TxtNewPwd, "NewLeave");
 }
コード例 #14
0
ファイル: PwdChangeForm.cs プロジェクト: JustMinely/Vexease
 private void TxtRe_Leave(object sender, EventArgs e)
 {
     ViewMethod.PwdSet(TxtRe, "ReLeave");
 }
コード例 #15
0
ファイル: PwdChangeForm.cs プロジェクト: JustMinely/Vexease
 private void TxtRe_Enter(object sender, EventArgs e)
 {
     ViewMethod.PwdSet(TxtRe, "ReEnter");
 }
コード例 #16
0
ファイル: PwdChangeForm.cs プロジェクト: JustMinely/Vexease
 private void TxtNewPwd_Enter(object sender, EventArgs e)
 {
     ViewMethod.PwdSet(TxtNewPwd, "NewEnter");
 }