private void PrintBtn_Click(object sender, EventArgs e) { NCCReporter.Section sec = new NCCReporter.Section(null, 0, 0, 0); List <string> rows = new List <string>(); rows.Add("Collar Cross Reference Factors for:"); rows.Add("Material Type " + MaterialTypeComboBox.Text); rows.Add("Mode " + ModeComboBox.Text); rows.Add("Detector " + mp.det.Id.DetectorName); rows.Add("Current Date " + DateTime.Now.ToShortDateString() + ' ' + DateTime.Now.ToShortTimeString()); rows.Add(""); rows.Add("Reference Date " + ReferenceDateTimePicker.Value.ToShortDateString()); rows.Add("Relative doubles rate (k2) " + RelativeDoublesRateTextBox.Text); string path = System.IO.Path.GetTempFileName(); FileStream f = new FileStream(path, FileMode.OpenOrCreate); StreamWriter s = new StreamWriter(f); s.AutoFlush = true; foreach (string r in rows) { s.WriteLine(r); } f.Close(); PrintForm pf = new PrintForm(path, this.Text); pf.ShowDialog(); File.Delete(path); }
private void PrintBtn_Click(object sender, EventArgs e) { NCCReporter.Section sec = new NCCReporter.Section(null, 0, 0, 0); List<NCCReporter.Row> rows = new List<NCCReporter.Row>(); rows = mult.ToLines(null); sec.AddRange(rows); string path = System.IO.Path.GetTempFileName(); FileStream f = new FileStream(path, FileMode.OpenOrCreate); StreamWriter s = new StreamWriter(f); s.AutoFlush = true; foreach (NCCReporter.Row r in rows) s.WriteLine(r.ToLine(' ')); f.Close(); PrintForm pf = new PrintForm(path, this.Text); pf.ShowDialog(); File.Delete(path); }
private void PrintBtn_Click(object sender, EventArgs e) { NCCReporter.Section sec = new NCCReporter.Section(null, 0, 0, 0); List <string> rows = new List <string>(); //Addrows string path = System.IO.Path.GetTempFileName(); FileStream f = new FileStream(path, FileMode.OpenOrCreate); StreamWriter s = new StreamWriter(f); s.AutoFlush = true; foreach (string r in rows) { s.WriteLine(r); } f.Close(); PrintForm pf = new PrintForm(path, this.Text); pf.ShowDialog(); File.Delete(path); }
private void PrintBtn_Click(object sender, EventArgs e) { NCCReporter.Section sec = new NCCReporter.Section(null, 0, 0, 0); List <NCCReporter.Row> rows = new List <NCCReporter.Row>(); rows = known_alpha.ToLines(null); sec.AddRange(rows); string path = System.IO.Path.GetTempFileName(); FileStream f = new FileStream(path, FileMode.OpenOrCreate); StreamWriter s = new StreamWriter(f); s.AutoFlush = true; foreach (NCCReporter.Row r in rows) { s.WriteLine(r.ToLine(' ')); } f.Close(); PrintForm pf = new PrintForm(path, this.Text); pf.ShowDialog(); File.Delete(path); }
private void PrintBtn_Click(object sender, EventArgs e) { NCCReporter.Section sec = new NCCReporter.Section(null, 0, 0, 0); List<string> rows = new List<string>(); rows.Add ("Collar Cross Reference Factors for:"); rows.Add("Material Type " + MaterialTypeComboBox.Text); rows.Add("Mode " + ModeComboBox.Text); rows.Add("Detector " + mp.det.Id.DetectorName); rows.Add("Current Date " + DateTime.Now.ToShortDateString() + ' ' + DateTime.Now.ToShortTimeString()); rows.Add(""); rows.Add("Reference Date " + ReferenceDateTimePicker.Value.ToShortDateString()); rows.Add("Relative doubles rate (k2) " + RelativeDoublesRateTextBox.Text); string path = System.IO.Path.GetTempFileName(); FileStream f = new FileStream(path, FileMode.OpenOrCreate); StreamWriter s = new StreamWriter(f); s.AutoFlush = true; foreach (string r in rows) s.WriteLine(r); f.Close(); PrintForm pf = new PrintForm(path, this.Text); pf.ShowDialog(); File.Delete(path); }