private void button5_Click(object sender, EventArgs e) { var texts = this.checkedListBox1.CheckedItems.Cast <object>() .Select <object, string>(x => this.checkedListBox1.GetItemText(x)); foreach (string r in texts) { Interface1.CurrentReportView(r); } string text = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"\PIA\Reports\" + Interface1.CurRepViewSend()); string Name = AppDomain.CurrentDomain.BaseDirectory + @"\PIA\Reports\" + Interface1.CurRepViewSend(); Interface1.ReptoCSV(text, Name); }
private void button2_Click(object sender, EventArgs e) { if (checkBox1.Text == "") { checkBox1.Checked = false; checkBox1.Visible = false; } checkBox1.Visible = true; checkBox1.Text = "Are you sure you want" + Environment.NewLine + "to overwrite the old Report:" + Environment.NewLine + Interface1.CurRepViewSend(); button2.Text = "Confirm Save"; if (checkBox1.Text == "Are you sure you want" + Environment.NewLine + "to overwrite the old Report:" + Environment.NewLine + Interface1.CurRepViewSend() && checkBox1.Checked == true) { string Name = AppDomain.CurrentDomain.BaseDirectory + @"\PIA\Reports\" + Interface1.CurRepViewSend(); Interface1.RepSave(textBox4.Text, Name); Interface1.clear(); checkBox1.Text = ""; checkBox1.Checked = false; checkBox1.Visible = false; button2.Text = "Save"; textBox4.ReadOnly = true; button4.Visible = false; button5.Visible = false; } }