public Form1() { if (!File.Exists("C:\\blank.htm")) { File.WriteAllText("C:\\blank.htm", "<html><head>blank></head><body></body></html>"); } InitializeComponent(); zedallprobes.GraphPane.Title.Text = "各探头阻值()"; zedallprobes.IsShowPointValues = true; btn_start.Enabled = true; saveFileDialog1.AddExtension = true; saveFileDialog1.CheckPathExists = true; saveFileDialog1.OverwritePrompt = true; saveFileDialog1.ValidateNames = true; saveFileDialog1.DefaultExt = ".rec"; saveFileDialog1.Filter = "Record File(*.rec)|*.rec|All Files(*.*)|*.*"; saveFileDialog1.FileName = ""; openFileDialog1.CheckFileExists = true; openFileDialog1.Multiselect = false; openFileDialog1.ValidateNames = true; openFileDialog1.Filter = "Record File(*.rec)|*.rec|All Files(*.*)|*.*"; openFileDialog1.DefaultExt = ".rec"; openFileDialog1.FileName = ""; cb_probetype.SelectedIndex = 0; cb_probetype.SelectedValueChanged += new EventHandler(cb_temprange_SelectedValueChanged); this.webBrowser1.IsWebBrowserContextMenuEnabled = false; this.webBrowser1.AllowWebBrowserDrop = false; //this.webBrowser1.ScrollBarsEnabled = false; this.webBrowser1.WebBrowserShortcutsEnabled = false; try { this.webBrowser1.ObjectForScripting = this; } catch { } this.Text = this.Text + "(" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + ")"; LoadDefaultRecordPage(); test = new TestDocument(); process = new TestProcess(this); input_dlg = new Input(); msg_dlg = new MsgDlg(); NewToolStripMenuItem_Click(null, null); this.webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted); backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork); backgroundWorker1.WorkerSupportsCancellation = true; backgroundWorker1.WorkerReportsProgress = true; backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker1_RunWorkerCompleted); }