示例#1
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);
            }
        }
示例#2
0
 public void Initialize(MainForm form)
 {
     this.mainForm = form;
 }