BitrixAQA.MainForm.MainForm C# (CSharp) Method

MainForm() public method

Инициализируем главную форму
public MainForm ( string args = null ) : System
args string аргументы прилдожения
return System
        public MainForm(string[] args = null)
        {
            InitializeComponent();
            form = this;
            OptionsForm optionsForm = new OptionsForm();
            cbBrowsers.SelectedIndex = cbBrowsers.FindString("FireFox");
            tcMain.Selected += new System.Windows.Forms.TabControlEventHandler(this.tc_TabSelect_Log);
            cbUrlsCheckPageOnErrors.CheckedChanged += new System.EventHandler(this.cbCheckUrl1_VisibleChild);
            cmbboxConnType.TextChanged += new System.EventHandler(this.cmbboxConnType_TextChanged);
            cmbboxConnType.TextChanged += new System.EventHandler(this.cmbboxConnType_TextChanged1);
            Shared.browserName = MainForm.form.cbBrowsers.SelectedItem.ToString();
            cmbboxConnType.SelectedIndex = 0;
            dataGVResult.Visible = false;
            tbLog.Visible = true;
            //перемещаем последний лог в архив
            if (File.Exists(Shared.StartupPath + "log.html"))
            {
                File.AppendAllText(Shared.StartupPath + "ArchiveLog.html", File.ReadAllText(Shared.StartupPath + "log.html"));
                File.Delete(Shared.StartupPath + "log.html");
            }

            //начинаем работу
            //Log.Gap();
            Log.PlainTextToHTMLLog("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
            Log.PlainTextToHTMLLog("<div style=\"margin: 50px 0px 0px 50px;\"></div>");
            Log.PlainTextToHTMLLog("<head><style>.plus, .minus { display: inline-block; padding-left: 20px;}.plus { background: url(plus.gif) no-repeat 5px 5px;} .minus { background: url(minus.gif) no-repeat 5px 5px; }</style><script>function collapse(id, link){var block = document.getElementById(id); if (block.style.display == \"none\"){block.style.display = \"block\";link.className = \"minus\";	}else{block.style.display = \"none\";link.className = \"plus\";}return false;}function collapseSpan(id, link){var block = document.getElementById(id);if (block.style.display == \"none\"){block.style.display = \"block\";}else{block.style.display =\"none\";}return false;}</script></head>");
            Log.MesNormal("============ новая сессия " + DateTime.Now + " ============", false);
            Log.Gap();

            XmlDocument reader = new XmlDocument();
            reader.Load("options.xml");

            if (File.Exists("options.xml") == false)
                File.Create("options.xml");

            MainForm.form.tbCheckUrlsUrlToCheck.Text = reader.GetValue("/Options/CheckUrls_options/url");
            MainForm.form.tbCheckUrlsLogin.Text = reader.GetValue("/Options/CheckUrls_options/login");
            MainForm.form.tbCheckUrlsPass.Text = reader.GetValue("/Options/CheckUrls_options/password");
        }