Exemple #1
0
        private void CloseWindow()
        {
            using (this.MTBusy.Section())
            {
                try
                {
                    // -- 9000

                    BusyDlgTools.Show("Prime4096", "アプリケーションを終了しています...", () =>
                    {
                        Prime53Lite.RemovePrimeDat();
                    },
                                      true
                                      );

                    Ground.Destroy();

                    // ----
                }
                catch (Exception e)
                {
                    MessageBox.Show("" + e, "Error @ CloseWindow()", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.MTBusy.Enter();
                this.Close();
            }
        }
Exemple #2
0
        private void Main2(ArgsReader ar)
        {
            using (new MSection(Ground.MtxProcStartEnd))
            {
                Prime53.INIT();
                Ground.LoadConf();

                {
                    string errorReportFile = Path.Combine(ProcMain.SelfDir, Consts.ERROR_REPORT_LOCAL_FILE);

                    FileTools.Delete(errorReportFile);

                    try
                    {
                        using (MSection.Unsection(Ground.MtxProcStartEnd))
                        {
#if DEBUG // test code
                            //new Test0001().Test01();
                            new Test0001().Test02();
                            //new Test0001().Test03();
                            //new Test0001().Test04();
                            //new Test0001().Test05();
                            //new Test0001().Test06();
                            //new Test0001().Test07();
#else
                            this.Main3(ar);
#endif
                        }
                    }
                    catch (Exception e)
                    {
                        File.WriteAllText(errorReportFile, GetLiteMessage(e), Encoding.UTF8);
                        throw;
                    }
                }

                Common.RemoveReportFile();
            }
            Ground.Destroy();
        }