コード例 #1
0
        private static void Main()
        {
            Thread.CurrentThread.CurrentUICulture =
                new CultureInfo("zh-Hans");

            // The following line provides localization for data formats.
            Thread.CurrentThread.CurrentCulture =
                new CultureInfo("zh-Hans");


            IConfigurationSource config = new XmlConfigurationSource("ARConfig.xml");

            var asm = Assembly.Load("LibEntity");

            ActiveRecordStarter.Initialize(asm, config);
            Log.Debug("[WM]....Starting...");
            RuntimeManager.Bind(ProductCode.EngineOrDesktop);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var mf = new MainFormWm();

            Log.Debug("[WM]....Main Form Construction Finished...");
            var lf = new LoginForm(mf);

            Application.Run(lf);
        }
コード例 #2
0
        private void Exit()
        {
            //设置最新预警结果窗体为null
            MainFormWm.CleanLatestWarningResult();

            Close();
            Dispose();
            GC.Collect();
        }
コード例 #3
0
 private void PreWarningLastedResultQuery_FormClosing(object sender, FormClosingEventArgs e)
 {
     MainFormWm.GetLatestWarningResultInstance().Hide();
     e.Cancel = true;
 }