Пример #1
0
        static void Main()
        {
            Application.SetCompatibleTextRenderingDefault(false);
            ///这句话如果写到后面去的话,在没有Config文件的时候,服务器树形列表显示不正确
            Application.EnableVisualStyles();

            if (File.Exists(ConfigHelper._configFilename))
            {
                SystemManager.ConfigHelperInstance = ConfigHelper.LoadFromConfigFile(ConfigHelper._configFilename);
                SystemManager.InitLanguage();
            }
            else
            {
                SystemManager.ConfigHelperInstance = new ConfigHelper();
                frmLanguage _frmLanguage = new frmLanguage();
                _frmLanguage.ShowDialog();
                SystemManager.InitLanguage();
                frmOption _frmOption = new frmOption();
                _frmOption.ShowDialog();
                SystemManager.ConfigHelperInstance.SaveToConfigFile(ConfigHelper._configFilename);
            }
            //SystemManager.DEBUG_MODE = true;
            SystemManager.MONO_MODE = Type.GetType("Mono.Runtime") != null;
            Application.Run(new frmMain());

            //delete tempfile directory when exit
            if (Directory.Exists(MongoDBHelper.TempFileFolder))
            {
                Directory.Delete(MongoDBHelper.TempFileFolder, true);
            }
        }
Пример #2
0
        static void Main()
        {
            Application.SetCompatibleTextRenderingDefault(false);
            ///这句话如果写到后面去的话,在没有Config文件的时候,服务器树形列表显示不正确
            Application.EnableVisualStyles();

            if (File.Exists(ConfigHelper._configFilename))
            {
                SystemManager.ConfigHelperInstance = ConfigHelper.LoadFromConfigFile(ConfigHelper._configFilename);
                SystemManager.InitLanguage();
            }
            else
            {
                SystemManager.ConfigHelperInstance = new ConfigHelper();
                frmLanguage _frmLanguage = new frmLanguage();
                _frmLanguage.ShowDialog();
                SystemManager.InitLanguage();
                frmOption _frmOption = new frmOption();
                _frmOption.ShowDialog();
                SystemManager.ConfigHelperInstance.SaveToConfigFile(ConfigHelper._configFilename);
            }
            //SystemManager.DEBUG_MODE = true;
            SystemManager.MONO_MODE = Type.GetType("Mono.Runtime") != null;
            Application.Run(new frmMain());

            //delete tempfile directory when exit
            if (Directory.Exists(MongoDBHelper.TempFileFolder))
            {
                Directory.Delete(MongoDBHelper.TempFileFolder, true);
            }
        }
Пример #3
0
        private static void Main()
        {
            Application.SetCompatibleTextRenderingDefault(false);
            ///这句话如果写到后面去的话,在没有Config文件的时候,服务器树形列表显示不正确
            Application.EnableVisualStyles();

            FileVersionInfo info = FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\MongoDB.Driver.dll");

            SystemManager.MongoDbDriverVersion = info.ProductVersion;

            info = FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\MongoDB.Bson.dll");
            SystemManager.MongoDbBsonVersion = info.ProductVersion;

            if (File.Exists(ConfigHelper._configFilename))
            {
                SystemManager.ConfigHelperInstance = ConfigHelper.LoadFromConfigFile(ConfigHelper._configFilename);
                SystemManager.InitLanguage();
            }
            else
            {
                SystemManager.ConfigHelperInstance = new ConfigHelper();
                var _frmLanguage = new frmLanguage();
                _frmLanguage.ShowDialog();
                SystemManager.InitLanguage();
                var _frmOption = new frmOption();
                _frmOption.ShowDialog();
                SystemManager.ConfigHelperInstance.SaveToConfigFile(ConfigHelper._configFilename);
            }
            //SystemManager.DEBUG_MODE = true;
            SystemManager.DebugMode = false;
            SystemManager.MonoMode  = Type.GetType("Mono.Runtime") != null;
            Application.Run(new frmMain());
            //Application.Run(new frmServerMonitor());
            //delete tempfile directory when exit
            if (Directory.Exists(MongoDbHelper.TempFileFolder))
            {
                Directory.Delete(MongoDbHelper.TempFileFolder, true);
            }
        }
Пример #4
0
        private static void Main()
        {
            Application.SetCompatibleTextRenderingDefault(false);
            ///这句话如果写到后面去的话,在没有Config文件的时候,服务器树形列表显示不正确
            Application.EnableVisualStyles();

            FileVersionInfo info = FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\MongoDB.Driver.dll");
            SystemManager.MongoDbDriverVersion = info.ProductVersion;

            info = FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\MongoDB.Bson.dll");
            SystemManager.MongoDbBsonVersion = info.ProductVersion;

            if (File.Exists(ConfigHelper._configFilename))
            {
                SystemManager.ConfigHelperInstance = ConfigHelper.LoadFromConfigFile(ConfigHelper._configFilename);
                SystemManager.InitLanguage();
            }
            else
            {
                SystemManager.ConfigHelperInstance = new ConfigHelper();
                var _frmLanguage = new frmLanguage();
                _frmLanguage.ShowDialog();
                SystemManager.InitLanguage();
                var _frmOption = new frmOption();
                _frmOption.ShowDialog();
                SystemManager.ConfigHelperInstance.SaveToConfigFile(ConfigHelper._configFilename);
            }
            //SystemManager.DEBUG_MODE = true;
            SystemManager.DebugMode = false;
            SystemManager.MonoMode = Type.GetType("Mono.Runtime") != null;
            Application.Run(new frmMain());
            //Application.Run(new frmServerMonitor());  
            //delete tempfile directory when exit
            if (Directory.Exists(MongoDbHelper.TempFileFolder))
            {
                Directory.Delete(MongoDbHelper.TempFileFolder, true);
            }
        }
Пример #5
0
 /// <summary>
 /// 配置
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OptionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmOption mfrm = new frmOption();
     mfrm.ShowDialog();
     mfrm.Close();
     mfrm.Dispose();
 }