Exemplo n.º 1
0
 public static void Perform(Perform_d dPerform)
 {
     using (BusyDlg f = new BusyDlg(dPerform))
     {
         f.ShowDialog();
     }
 }
Exemplo n.º 2
0
        private void _開始ボタン_Click(object sender, EventArgs e)
        {
            this.SaveData();
            Gnd.SaveData();

            try
            {
                Gnd.Conv = new Conv();
                Gnd.Conv.Prep();
            }
            catch (Exception ex)
            {
                Gnd.ConvLog.Writeln(ex);

                MessageBox.Show(
                    ex.Message,
                    "開始できません",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning
                    );

                return;
            }
            this.Visible = false;

            using (BusyDlg f = new BusyDlg())
            {
                f.Th = new Thread((ThreadStart) delegate
                {
                    try
                    {
                        Gnd.Conv.Main();
                    }
                    catch (Exception ex)
                    {
                        Gnd.ConvLog.Writeln(ex);

                        Gnd.Conv.Errored = true;
                        Gnd.Conv.Error   = ex;
                    }
                    finally
                    {
                        Gnd.Conv.MainCleanup();
                    }
                });

                Gnd.BusyDlg = f;
                f.ShowDialog();
                Gnd.BusyDlg = null;
            }
            Gnd.ConvLog.Close();

            using (ResultDlg f = new ResultDlg())
            {
                f.ShowDialog();
            }
            this.Close();
        }
Exemplo n.º 3
0
        private void Go(string batFile)
        {
            this.Visible = false;

            using (BusyDlg f = new BusyDlg(batFile))
            {
                f.ShowDialog();
            }
            this.Close();
        }
Exemplo n.º 4
0
        private void CloseWindow()
        {
            this.MT_Enabled           = false;
            this.TaskTrayIcon.Visible = false;

            // プロセス終了時にすること
            {
                using (Form f = new BusyDlg(Background.End))
                {
                    f.ShowDialog();
                }
            }

            this.Close();
        }
Exemplo n.º 5
0
        private void 設定SToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.MT_Enabled           = false;
            this.TaskTrayIcon.Visible = false;

            using (Form f = new BusyDlg(Background.End))
            {
                f.ShowDialog();
            }
            using (Form f = new SettingWin())
            {
                f.ShowDialog();
            }

            this.TaskTrayIcon.Visible = true;
            this.MT_Enabled           = true;
        }
Exemplo n.º 6
0
        public static void perform(operation_d operation, IWin32Window owner = null, bool forceNoDlg = false)
        {
            if (performing || forceNoDlg)
            {
                operation();
            }
            else
            {
                using (BusyDlg f = new BusyDlg(operation))
                {
                    performing = true;
                    f.ShowDialog(owner);
                    performing = false;

                    if (f._e != null)
                    {
                        throw new ExceptionCarrier(f._e);
                    }
                }
            }
        }
Exemplo n.º 7
0
        private void 直ちに更新UToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.MT_Enabled           = false;
            this.TaskTrayIcon.Visible = false;

            using (Form f = new BusyDlg(Background.End))
            {
                f.ShowDialog();
            }

            {
                TimeData now = TimeData.Now();

                foreach (Gnd.ClientInfo info in Gnd.ClientInfos)
                {
                    info.Time次回更新 = now;
                }
            }

            this.TaskTrayIcon.Visible = true;
            this.MT_Enabled           = true;
        }
Exemplo n.º 8
0
        private void BtnDoTest_Click(object sender, EventArgs e)
        {
            this.Visible = false;

            Gnd.ClientInfo escInfo = _info;
            _info = new Gnd.ClientInfo();
            this.SaveData();
            ClientData client = new ClientData(_info);

            _info = escInfo;

            using (Form f = new BusyDlg(new ClientData.ClientDataTh(client).End))
            {
                f.ShowDialog();
            }
            using (Form f = new ResultWin(client))
            {
                f.ShowDialog();
            }
            this.Visible = true;
            this.UIRefresh();
        }