コード例 #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);



            using (var frm = new frmOption())
            {
                var optionSelected = 0;
                if (frm.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                optionSelected = frm.OptionSelected;
                if (optionSelected == 1)
                {
                    Application.Run(new Form1());
                    //Application.Run(new frmSmsMonitor());
                }
                else
                {
                    Application.Run(new frmOutputWindow());
                }
            }
        }
コード例 #2
0
 private void menu_C_3_Tuychon_Click(object sender, EventArgs e)
 {
     try
     {
         frmOption f = new frmOption(m_v, m_userid.ToString());
         f.MdiParent     = this;
         f.ShowInTaskbar = false;
         f.Show();
     }
     catch
     {
     }
 }
コード例 #3
0
        /// <summary>
        /// 初始化
        /// </summary>
        public static void Init()
        {
            //MongoDB驱动版本的取得
            FileVersionInfo info = FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\MongoDB.Driver.dll");

            MongoUtility.Basic.Utility.MongoDbDriverVersion = info.ProductVersion;
            info = FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\MongoDB.Bson.dll");
            MongoUtility.Basic.Utility.MongoDbBsonVersion = info.ProductVersion;
            //异常处理器的初始化
            Common.Utility.ExceptionAppendInfo  = "MongoDbDriverVersion:" + MongoUtility.Basic.Utility.MongoDbDriverVersion + System.Environment.NewLine;
            Common.Utility.ExceptionAppendInfo += "MongoDbBsonVersion:" + MongoUtility.Basic.Utility.MongoDbBsonVersion + System.Environment.NewLine;
            if (File.Exists(ConfigHelper._configFilename))
            {
                ConfigHelper.LoadFromConfigFile(ConfigHelper._configFilename);
                SystemManager.InitLanguage();
            }
            else
            {
                SystemManager.config = new Config();
                var _frmLanguage = new frmLanguage();
                _frmLanguage.ShowDialog();
                SystemManager.InitLanguage();
                var _frmOption = new frmOption();
                _frmOption.ShowDialog();
                ConfigHelper.SaveToConfigFile(ConfigHelper._configFilename);
            }
            //设定MongoUtility
            RuntimeMongoDBContext._mongoConnectionConfigList = config.ConnectionList;

            //SystemManager.DEBUG_MODE = true;
            SystemManager.DebugMode = false;
            SystemManager.MonoMode  = Type.GetType("Mono.Runtime") != null;
            Application.Run(new frmMain());
            //delete tempfile directory when exit
            if (Directory.Exists(MongoUtility.GFS.TempFileFolder))
            {
                Directory.Delete(MongoUtility.GFS.TempFileFolder, true);
            }
        }
コード例 #4
0
 private void thiêtLâpThôngSôToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmOption fr = new frmOption();
     fr.ShowDialog();
 }
コード例 #5
0
ファイル: SystemManager.cs プロジェクト: jango2015/MongoCola
		/// <summary>
		/// 初始化
		/// </summary>
		public static void Init()
		{
			//MongoDB驱动版本的取得
			FileVersionInfo info = FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\MongoDB.Driver.dll");
			MongoUtility.Basic.Utility.MongoDbDriverVersion = info.ProductVersion;
			info = FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\MongoDB.Bson.dll");
			MongoUtility.Basic.Utility.MongoDbBsonVersion = info.ProductVersion;
			//异常处理器的初始化
			Common.Utility.ExceptionAppendInfo = "MongoDbDriverVersion:" + MongoUtility.Basic.Utility.MongoDbDriverVersion + System.Environment.NewLine;
			Common.Utility.ExceptionAppendInfo += "MongoDbBsonVersion:" + MongoUtility.Basic.Utility.MongoDbBsonVersion + System.Environment.NewLine;
			if (File.Exists(ConfigHelper._configFilename)) {
				ConfigHelper.LoadFromConfigFile(ConfigHelper._configFilename);
				SystemManager.InitLanguage();
			} else {
				SystemManager.config = new Config();
				var _frmLanguage = new frmLanguage();
				_frmLanguage.ShowDialog();
				SystemManager.InitLanguage();
				var _frmOption = new frmOption();
				_frmOption.ShowDialog();
				ConfigHelper.SaveToConfigFile(ConfigHelper._configFilename);
			}
			//设定MongoUtility
			RuntimeMongoDBContext._mongoConnectionConfigList = config.ConnectionList;
			
			//SystemManager.DEBUG_MODE = true;
			SystemManager.DebugMode = false;
			SystemManager.MonoMode = Type.GetType("Mono.Runtime") != null;
			Application.Run(new frmMain());
			//delete tempfile directory when exit
			if (Directory.Exists(MongoUtility.GFS.TempFileFolder)) {
				Directory.Delete(MongoUtility.GFS.TempFileFolder, true);
			}
		}
コード例 #6
0
        //thiet lap
        private void thiêtLâpThôngSôToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmOption fr = new frmOption();

            fr.ShowDialog();
        }
コード例 #7
0
ファイル: FrmMain.cs プロジェクト: zanderphh/TMS
        private void btnDressRent_Click(object sender, EventArgs e)
        {
            if (tspMenues.Items[tspMenues.Items.IndexOf(btnDressRent) + 1].Image == null)
            {
                while (_rentNum > 0)
                {
                    tspMenues.Items.RemoveAt(tspMenues.Items.IndexOf(btnDressRent) + 1);
                    _rentNum--;
                }
            }
            else
            {
                ToolStripButton toolStripButton1 = new ToolStripButton()
                {
                    Text      = @"订单查询",
                    Font      = new Font("微软雅黑", 11),
                    ForeColor = Color.White,
                    Margin    = new Padding(60, 5, 0, 5),
                    TextAlign = ContentAlignment.MiddleLeft
                };
                toolStripButton1.Click += (o, args) =>
                {
                    FrmOrdersSearch frmDressRentSearch = new FrmOrdersSearch()
                    {
                        Dock = DockStyle.Fill, AutoSize = false, AutoScaleMode = AutoScaleMode.None
                    };
                    CreateNewPage(toolStripButton1.Text, frmDressRentSearch);
                };
                tspMenues.Items.Insert(tspMenues.Items.IndexOf(btnDressRent) + (_rentNum + 1), toolStripButton1);
                _rentNum++;

                ToolStripButton toolStripButton2 = new ToolStripButton()
                {
                    Text      = @"排单查询",
                    Font      = new Font("微软雅黑", 11),
                    ForeColor = Color.White,
                    Margin    = new Padding(60, 5, 0, 5),
                    TextAlign = ContentAlignment.MiddleLeft
                };
                toolStripButton2.Click += (o, args) =>
                {
                    FrmRentList frmRentList = new FrmRentList(String.Empty)
                    {
                        Dock = DockStyle.Fill, AutoSize = false, AutoScaleMode = AutoScaleMode.None
                    };
                    CreateNewPage(toolStripButton2.Text, frmRentList);
                };
                tspMenues.Items.Insert(tspMenues.Items.IndexOf(btnDressRent) + (_rentNum + 1), toolStripButton2);
                _rentNum++;

                ToolStripButton toolStripButton3 = new ToolStripButton()
                {
                    Text      = @"出租查询",
                    Font      = new Font("微软雅黑", 11),
                    ForeColor = Color.White,
                    Margin    = new Padding(60, 5, 0, 5),
                    TextAlign = ContentAlignment.MiddleLeft
                };
                toolStripButton3.Click += (o, args) =>
                {
                    FrmDressRentedInfo frmDressRentedInfo = new FrmDressRentedInfo()
                    {
                        Dock = DockStyle.Fill
                    };
                    CreateNewPage(toolStripButton3.Text, frmDressRentedInfo);
                };
                tspMenues.Items.Insert(tspMenues.Items.IndexOf(btnDressRent) + (_rentNum + 1), toolStripButton3);
                _rentNum++;

                ToolStripButton toolStripButton5 = new ToolStripButton()
                {
                    Text      = @"短信设置",
                    Font      = new Font("微软雅黑", 11),
                    ForeColor = Color.White,
                    Margin    = new Padding(60, 5, 0, 5),
                    TextAlign = ContentAlignment.MiddleLeft
                };
                toolStripButton5.Click += (o, args) =>
                {
                    frmOption frmOption = new frmOption();
                    frmOption.ShowDialog();
                };
                tspMenues.Items.Insert(tspMenues.Items.IndexOf(btnDressRent) + (_rentNum + 1), toolStripButton5);
                _rentNum++;
            }
        }
コード例 #8
0
        private void toolStripButton_SoftOption_Click(object sender, EventArgs e)
        {
            frmOption option = new frmOption();

            option.ShowDialog(this);
        }
コード例 #9
0
        private void ToolStripMenuItem_Tool_Config_Click(object sender, EventArgs e)
        {
            frmOption option = new frmOption();

            option.Show();
        }
コード例 #10
0
        private void ShowOptions()
        {
            var dlg = new frmOption();

            dlg.ShowDialog();
        }