示例#1
0
        public LoginForm(CustomizeHandler _customizeHandler)
        {
            InitializeComponent();
            this.button2.Enabled = !Program.IsReleaseVersion;

            this.customizeHandler = _customizeHandler;

            this.textBox_userID.Text = UserConfiguration.Singleton.UserID;
            this.checkBox1.Checked   = UserConfiguration.Singleton.SavePassword;
            if (UserConfiguration.Singleton.SavePassword)
            {
                this.textBox_password.Text = UserConfiguration.Singleton.Password;
            }
        }
示例#2
0
        static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                OMCS.GlobalUtil.SetMaxLengthOfUserID(byte.Parse(ConfigurationManager.AppSettings["MaxLengthOfUserID"]));
                ESPlus.GlobalUtil.SetMaxLengthOfUserID(byte.Parse(ConfigurationManager.AppSettings["MaxLengthOfUserID"]));
                bool haveRun = ESBasic.Helpers.ApplicationHelper.IsAppInstanceExist("GGMeeting");
                if (haveRun)
                {
                    MessageBox.Show("GGMeeting已经在运行!");
                    return;
                }

                CustomizeHandler customizeHandler = new CustomizeHandler();
                LoginForm form = new LoginForm(customizeHandler);
                form.Text = ConfigurationManager.AppSettings["Title"];
                if (DialogResult.OK != form.ShowDialog())
                {
                    return;
                }

                DeviceSelectForm selectGroupForm = new DeviceSelectForm(form.MultimediaManager);
                if (DialogResult.OK != selectGroupForm.ShowDialog())
                {
                    form.MultimediaManager.Dispose();
                    form.RapidPassiveEngine.Close();
                    return;
                }

                MainForm mainForm = new MainForm();
                mainForm.Text = form.Text;
                mainForm.Show();
                mainForm.Initialize(form.RapidPassiveEngine, form.MultimediaManager, form.GroupOutter, form.UserID, "tester01", form.UserID == "tester01");
                customizeHandler.Initialize(mainForm);

                Application.Run(mainForm);
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message + "\n" + ee.StackTrace);
            }
        }
示例#3
0
文件: Program.cs 项目: liweizl/GGTalk
        static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                OMCS.GlobalUtil.SetMaxLengthOfUserID(byte.Parse(ConfigurationManager.AppSettings["MaxLengthOfUserID"]));
                ESPlus.GlobalUtil.SetMaxLengthOfUserID(byte.Parse(ConfigurationManager.AppSettings["MaxLengthOfUserID"]));
                bool haveRun = ESBasic.Helpers.ApplicationHelper.IsAppInstanceExist("GGMeeting");
                if (haveRun)
                {
                    MessageBox.Show("GGMeeting已经在运行!");
                    return;
                }

                CustomizeHandler customizeHandler = new CustomizeHandler();
                LoginForm        form             = new LoginForm(customizeHandler);
                form.Text = ConfigurationManager.AppSettings["Title"];
                if (DialogResult.OK != form.ShowDialog())
                {
                    return;
                }

                DeviceSelectForm selectGroupForm = new DeviceSelectForm(form.MultimediaManager);
                if (DialogResult.OK != selectGroupForm.ShowDialog())
                {
                    form.MultimediaManager.Dispose();
                    form.RapidPassiveEngine.Close();
                    return;
                }

                MainForm mainForm = new MainForm();
                mainForm.Text = form.Text;
                mainForm.Show();
                mainForm.Initialize(form.RapidPassiveEngine, form.MultimediaManager, form.GroupOutter, form.UserID, "tester01", form.UserID == "tester01");
                customizeHandler.Initialize(mainForm);

                Application.Run(mainForm);
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message + "\n" + ee.StackTrace);
            }
        }