private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { MdbCheckerManager cm = MdbCheckerManager.GetInstance(); cm.Check(cbxCheckPartial.Checked); m_log = cm.Log.ToArray(); }
private void button1_Click(object sender, EventArgs e) { Util.MdbFileName = this.tbxFile.Text; MdbCheckerManager cm = MdbCheckerManager.GetInstance(); cm.LoadConfig(Path.GetDirectoryName(Application.ExecutablePath) + @"/CheckerConfigs/" + cbxSolution.Text + ".xml"); this.progressBar1.Visible = true; backgroundWorker1.RunWorkerAsync(); }
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { MdbCheckerManager cm = MdbCheckerManager.GetInstance(); lbxLog.DataSource = cm.Errors; lblProblemCount.Text = cm.Errors.Count.ToString(); lblRecordCount.Text = cm.CheckItemCount.ToString(); tbxLog.Lines = m_log; AppManager am = AppManager.GetInstance(); am.AppForm.LoadLayers(cm.CheckItems.Keys.ToList()); this.progressBar1.Visible = false; }
private void buttonItem11_Click(object sender, EventArgs e) { MdbCheckerManager cm = MdbCheckerManager.GetInstance(); SaveFileDialog dlg = new SaveFileDialog(); dlg.Filter = "txt|*.txt"; DialogResult dlgret = dlg.ShowDialog(); if (dlgret == DialogResult.OK) { StreamWriter sw = File.CreateText(dlg.FileName); foreach (string s in cm.Log) { sw.WriteLine(s); } sw.Flush(); sw.Close(); } }