Beispiel #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                MyConfig.LoadData();
                videofrm      = new VideoFrm();
                SplashFrm.num = 30;
                // Thread.Sleep(1000);
                Global.MNum   = mySoftReg.GetMNum();
                SplashFrm.num = 60;

                settingfrm    = new SettingFrm();
                iofrm         = new IOFrm();
                reportfrm     = new ReportFrm();
                SplashFrm.num = 99;
                Thread.Sleep(200);
                SplashFrm.num = 100;

                this.Visible       = true;
                videofrm.MdiParent = this;
                videofrm.Dock      = DockStyle.Fill;

                videofrm.Show();
                videofrm.Activate();
                this.WindowState = FormWindowState.Maximized;
                Init();  //主要处理线程开始跑起来
            }
            catch (Exception eee)
            {
                MessageBox.Show(eee.ToString());
            }
            Opacity = 100;
        }
Beispiel #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                MyConfig.LoadConfig("xxx");
                SplashFrm.num = 10;

                Global.InitHTuple(); //初始化检查球直径的阈值参数

                Global.MNum     = mySoftReg.GetMNum();
                Global.TimeLeft = mytestReg.TimeLeft();
                if (Global.TimeLeft > 100)
                {
                    Global.IsRegister = true;
                }
                else
                {
                    Global.IsRegister = false;
                }

                //MyConfig.LoadData();
                videofrm = new VideoFrm(this);

                SplashFrm.num = 50;
                // Thread.Sleep(1000);

                settingfrm = new SettingFrm(this);

                iofrm = new IOFrm(this);

                SplashFrm.num = 99;

                Thread.Sleep(200);
                SplashFrm.num      = 100;
                this.Visible       = true;
                videofrm.MdiParent = this;
                videofrm.Dock      = DockStyle.Fill;

                videofrm.Show();
                videofrm.Activate();
                this.WindowState = FormWindowState.Maximized;


                //InitIOCard();  //初始化IO卡


                //MyInit();  //初始化各个线程

                //myLS.init(); //初始化相机

                myLS.ImageGrabbed += MyLS_ImageGrabbed;
            }
            catch (Exception eee)
            {
                MessageBox.Show(eee.ToString());
            }
            Opacity = 100;
        }
Beispiel #3
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;

                if (this.ActiveMdiChild == videofrm)
                {
                    Cursor.Current = Cursors.Arrow;
                    return;
                }
                videofrm.MdiParent = this;
                videofrm.Dock      = DockStyle.Fill;
                videofrm.Show();
                videofrm.Activate();
                Cursor.Current = Cursors.Arrow;
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.ToString());
            }
        }