示例#1
0
        void uiTimer_Tick(object sender, EventArgs e)
        {
            if (!bootup.Join(10)) //still under bootup cycle
            {
                return;
            }
            uiTimer.Enabled = false;
            if (boot_ok == 0)
            {
                Program.MsgShow(StringResource.str("bootfail"));
                bootmsg.Text = "";
                bootup       = new Thread(PackerBoot);

                bootup.IsBackground = false;

                bootup.Start();
                uiTimer.Enabled = true;
            }
            else
            {
                StringResource.SetLanguage();

                Program.SwitchTo("runmode");
                this.Visible = false;
                this.bgPicture.Dispose();
            }
        }
示例#2
0
        static public void Initialize()
        {
/*
 *          System.Diagnostics.Process[] pses = System.Diagnostics.Process..GetProcessesByName("TSioex");
 *          if (pses.Length > 0)
 *          {
 *              System.Diagnostics.Process.GetCurrentProcess().Kill();
 *            return;
 *          }
 */
            Thread.Sleep(3000);
            try
            {
                StringResource.SetLanguage();
                msgwnd  = new MsgDlg();
                app_cfg = new SqlConfig("app");
                app_cfg.LoadConfigFromFile();

                curr_cfg = app_cfg.Current;

                packers = new List <UIPacker>();
                for (int i = 0; i < Int32.Parse(curr_cfg.Element("machine_number").Value); i++)
                {
                    UIPacker p = new UIPacker(i); line++;
                    p.InitConfig();
                    packers.Add(p);
                }
                line = 999;
                NodeMaster.Dummy(); line++;

                singlewnd = new SingleModeWnd(); line++;
                runwnd    = new RunModeWnd(); line++;


                histwnd = new ProdHistory(); line++;

                kbdwnd    = new kbdWnd(); line++;
                bottomwnd = new BottomWnd(); line++;
                alertwnd  = new AlertWnd(); line++;
                alertwnd.UpdateUI(); //load alert configuration which is in app_config.xml too

                pwdwnd    = new PwdWnd(); line++;
                engwnd    = new EngWnd(); line++;
                configwnd = new ConfigMenuWnd(); line++;
                prodwnd   = new ProdWnd(); line++;
                prodnum   = new ProdNum(); line++;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                System.Diagnostics.Process.GetCurrentProcess().Kill();
            }
        }
示例#3
0
 private void btn_language_Click(object sender, EventArgs e)
 {
     if (StringResource.language == "zh-CN")
     {
         StringResource.SetLanguage("en-US");
         WTRegedit("locale", "en-US");
     }
     else
     {
         StringResource.SetLanguage("zh-CN");
         WTRegedit("locale", "zh-CN");
     }
     UpdateDisplay(false);
 }