Exemple #1
0
        private void RunOA3()
        {
            OA3_Action oaAction = new OA3_Action();

            if (ValidateForm(this))
            {
                oaAction._ReplaceSku = gbOsRadio.Controls.OfType <RadioButton>().FirstOrDefault(r => r.Checked).Name.ToString();
                oaAction._SelectedMotherBoardText = gbMB.Controls.OfType <RadioButton>().FirstOrDefault(r => r.Checked).Text;
                oaAction._ReplaceModel            = _boxxFamily;
                oaAction._OutputPath = _OutputPath;
                oaAction.CreateConfigXml();
                oaAction._OA3ToolPath = _OA3ToolPath;

                if (cbDefaultKey.Checked)
                {
                    oaAction.DefaultKey();
                }
                oaAction.Assemble();
                oaAction._DriveLetter  = _MappedDrive;
                oaAction._SerialNumber = _SerialNumber;
                oaAction.Inject();
                //oaAction.Validate();
                //oaAction.Report();
                //close all programs and restart the computer
                Restart();
            }
        }