예제 #1
0
 public static FileCpyForm GetFileCpyForm()
 {
     if (cpyfrm == null)
     {
         cpyfrm = new FileCpyForm();
     }
     return(cpyfrm);
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     this.Close();
     cpyfrm = null;
 }
예제 #3
0
        private void panel_Head_MouseUp(object sender, MouseEventArgs e)
        {
            DateTime MouseUpTime = DateTime.Now;

            TimeSpan ts = (TimeSpan)(MouseUpTime - MouseDownTime);

            if (ts.TotalMilliseconds >= mouselast)
            {
                KeypadForm f = KeypadForm.GetKeypadForm("", KeypadMode.password);
                if (f.ShowDialog() == DialogResult.OK)
                {
                    //退出程序,进入wince 
                    if (f.KeyText == password_EnterWinCE)
                    {
                        System.Diagnostics.Process.Start("explorer.exe", "");
                        //System.Diagnostics.Process.Start("\\NORFlash\\001\\COPY.bat", "");
                        Application.DoEvents();
                        Application.Exit();
                    }
                    else if (f.KeyText == password_Update) //软件升级
                    {
                        if (File.Exists("\\HardDisk\\AdvaMACSysUpdater.exe"))
                        {
                            System.Diagnostics.Process.Start("\\HardDisk\\AdvaMACSysUpdater.exe", "");

                            Application.DoEvents();
                            Application.Exit();
                        }
                        else
                            if (File.Exists("\\USB Hard Disk\\AdvaMACSysUpdater.exe"))
                            {
                                System.Diagnostics.Process.Start("\\USB Hard Disk\\AdvaMACSysUpdater.exe", "");

                                Application.DoEvents();
                                Application.Exit();
                            }

                    }
#if WindowsCE
#else
                    else if (f.KeyText == password_Test) //test
                    {
                        if (_VirtualSetForm == null)
                            _VirtualSetForm = new VirtualSetForm();

                        _VirtualSetForm.Show();
                    }
#endif
                    else if (f.KeyText == password_Reset) //系统数据复位
                    {
                        CDataPool.GetDataPoolObject().Reset();

                        if (WarnErrOper != null)
                            WarnErrOper.Reset();

                        if (historyOper != null)
                            historyOper.Reset();
                    }
                    else if (f.KeyText == password_Backup_History)//历史记录备份
                    {
                        FileCpyForm.GetFileCpyForm().StartCopy();
                    }
                }
            }
        }