Beispiel #1
0
        public FAutoTestActionBase(FAutoTestConfig testConfig)
        {
            f      = testConfig;
            f.Top  = Screen.PrimaryScreen.Bounds.Height - f.Height;
            f.Left = Screen.PrimaryScreen.Bounds.Width - f.Width;
            f.Show();

            ReadConfig();

            f.CollectTick += new EventHandler(f_CollectTick);
        }
Beispiel #2
0
        public FAutoTestActionMaterial(FCollectionMetrial form, FAutoTestConfig testConfig)
            : base(testConfig)
        {
            actionForm = form;

            if (htKeyPartIndex == null || htKeyPartIndex.Count <= 0)    // 没有KeyPart设置时,只做集成上料
            {
                actionForm.opsetCollectObject.CheckedIndex = 0;
                actionForm.edtINNO.Checked = true;
                actionForm.edtINNO.Value   = f.GetAppConfig("INNO");
            }
            else if (f.GetAppConfig("INNO") == "")  //没有集成上料,当有KeyPart设置时,做KeyPart上料
            {
                actionForm.opsetCollectObject.CheckedIndex = 1;
            }
            else        // INNO和KeyPart都有设置
            {
                actionForm.opsetCollectObject.CheckedIndex = 2;
                actionForm.edtINNO.Checked = true;
                actionForm.edtINNO.Value   = f.GetAppConfig("INNO");
            }
        }
Beispiel #3
0
        public override void Execute()
        {
            try
            {
                bool find = false;

                foreach (System.Windows.Forms.Form child in BenQGuru.eMES.Client.Service.ApplicationService.Current().MainWindows.MdiChildren)
                {
                    if (child.GetType().FullName == this._typeName)
                    {
                        child.BringToFront();
                        child.Show();
                        find = true;
                        break;
                    }
                }

                if (!find)
                {
                    // Modify by Icyer 2007/04/18   允许从DLL加载界面
                    //object form = Assembly.GetAssembly( Type.GetType(this._typeName) ).CreateInstance(this._typeName);
                    object form = null;
                    if (_dllFileName == string.Empty)
                    {
                        form = Assembly.GetAssembly(Type.GetType(this._typeName)).CreateInstance(this._typeName);
                    }
                    else
                    {
                        string strPath = System.Windows.Forms.Application.ExecutablePath;
                        strPath = strPath.Substring(0, strPath.LastIndexOf("\\") + 1) + _dllFileName;
                        form    = Assembly.LoadFile(strPath).CreateInstance(this._typeName);
                        if (form is BenQGuru.eMES.ClientBase.FormBase)
                        {
                            ((BenQGuru.eMES.ClientBase.FormBase)form).DataProvider = Service.ApplicationService.Current().DataProvider;
                        }
                    }
                    // Modify end

                    if (form is System.Windows.Forms.Form)
                    {
                        ((System.Windows.Forms.Form)form).MdiParent = BenQGuru.eMES.Client.Service.ApplicationService.Current().MainWindows;

                        if (this._typeName != "BenQGuru.eMES.Client.FLogin")
                        {
                            ((System.Windows.Forms.Form)form).WindowState = System.Windows.Forms.FormWindowState.Maximized;
                        }

                        ((System.Windows.Forms.Form)form).Show();

                        // Added by Icyer 2007/04/09
                        // 检查是否需要打开自动测试界面
                        if (System.Configuration.ConfigurationManager.AppSettings["EnabledAutoTest"] == "1" &&
                            FAutoTestAction.FAutoTestActionBase.CheckIsTestForm((System.Windows.Forms.Form)form) == true)
                        {
                            FAutoTestConfig config = new FAutoTestConfig();
                            config.StartTestForm((System.Windows.Forms.Form)form);
                        }
                        // Added end
                    }
                }
            }
            catch (Exception ex)
            {
                //ApplicationRun.GetInfoForm().Add(new UserControl.Message(ex));
            }
        }
Beispiel #4
0
 public FAutoTestActionPack(FGenLotIDMerge form, FAutoTestConfig testConfig)
     : base(testConfig)
 {
     actionForm = form;
 }
Beispiel #5
0
 public FAutoTestActionOQC(FCollectionOQC form, FAutoTestConfig testConfig)
     : base(testConfig)
 {
     actionForm = form;
 }
Beispiel #6
0
 public FAutoTestActionIDMerge(FCollectionIDMerge form, FAutoTestConfig testConfig)
     : base(testConfig)
 {
     actionForm = form;
 }
Beispiel #7
0
 public FAutoTestActionBurnOut(FBurnOut form, FAutoTestConfig testConfig)
     : base(testConfig)
 {
     actionForm = form;
 }
Beispiel #8
0
 public FAutoTestActionTest(FCollectionGDNG form, FAutoTestConfig testConfig)
     : base(testConfig)
 {
     actionForm = form;
 }