private void roundBtn1_Click(object sender, EventArgs e) { bool flag = this.MessageTitleTxt.Text == "" || this.MessageTitleTxt.Text == "Title"; bool flag1 = this.MessageDescTxt.Text == "" || this.MessageDescTxt.Text == "Message"; if (!File.Exists("bin_copy/Program.cs")) { string test = @"bin"; string test2 = @"bin_copy"; frmMain.Copy(test, test2); } string text = File.ReadAllText("bin_copy/Program.cs"); if (!flag) { text = text.Replace("Your Title", MessageTitleTxt.Text); } if (!flag1) { text = text.Replace("Your Desc", MessageDescTxt.Text); } if (!flag & !flag1) { text = text.Replace("//MessageBox", "MessageBox"); } File.WriteAllText("bin_copy/Program.cs", text); frm2 f = new frm2(); f.Close(); this.Close(); }
private void CloseBtn_Click(object sender, EventArgs e) { frm2 f = new frm2(); f.Close(); this.Close(); }