Ejemplo n.º 1
0
        private void LoadProjectConfigFile(string file)
        {
            try
            {
                AutoConfig cfg = AutoConfig.GetInstance();
                cfg.ProjectConfigFile = file;
                cfg.ParseConfigFile();

                this._driveFile = cfg.ProjectDriveFile;

                //init textbox
                this.tbProjectName.Text = cfg.ProjectName;
                this.tbScreenPrint.Text = cfg.ScreenPrintDir;
                this.tbDriveFile.Text   = cfg.ProjectDriveFile;
                this.tbLogFolder.Text   = cfg.LogDir;
                this.tbLogTemplate.Text = cfg.LogTemplate;
                for (int i = 0; i < this.cbProjectDomain.Items.Count; i++)
                {
                    if (this.cbProjectDomain.Items[i].ToString().ToUpper() == cfg.ProjectDomain.ToUpper())
                    {
                        this.cbProjectDomain.SelectedIndex = i;
                        break;
                    }
                }

                if (cfg.IsHighlight)
                {
                    this.cbHighlight.Checked = true;
                }
                else
                {
                    this.cbHighlight.Checked = false;
                }
            }
            catch (Exception ex)
            {
                AutoTesterErrorMsgBox("Error: Can not parse config file: " + ex.ToString());
            }
        }