Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (checkBox1.Checked&checkBox2.Checked)
- {
- if (File.Exists(@"Settings.txt"))
- {
- File.Delete(@"Settings.txt");
- Thread.Sleep(350);
- StreamWriter sw = new StreamWriter(@"Settings.txt");
- sw.WriteLine(@"TopMost:True
- AutoAttach:True");
- sw.Close();
- }
- else
- {
- StreamWriter sw = new StreamWriter(@"Settings.txt");
- sw.WriteLine(@"TopMost:True
- AutoAttach:True");
- sw.Close();
- }
- }
- else if (checkBox1.Checked)
- {
- if (File.Exists(@"Settings.txt"))
- {
- File.Delete(@"Settings.txt");
- StreamWriter sw = new StreamWriter(@"Settings.txt");
- sw.WriteLine(@"TopMost:True
- AutoAttach:False");
- sw.Close();
- }
- else
- {
- StreamWriter sw = new StreamWriter(@"Settings.txt");
- sw.WriteLine(@"TopMost:True
- AutoAttach:False");
- sw.Close();
- }
- }
- else if (checkBox2.Checked)
- {
- if (File.Exists(@"Settings.txt"))
- {
- File.Delete(@"Settings.txt");
- StreamWriter sw = new StreamWriter(@"Settings.txt");
- sw.WriteLine(@"TopMost:False
- AutoAttach:True");
- sw.Close();
- if (File.Exists("DoNotDelete.txt"))
- {
- File.Delete(@"DoNotDelete.txt");
- StreamWriter SW = new StreamWriter(@"DoNotDelete.txt");
- SW.Write("False");
- SW.Close();
- }
- else
- {
- StreamWriter SW = new StreamWriter(@"DoNotDelete.txt");
- SW.Write("False");
- SW.Close();
- }
- }
- else
- {
- StreamWriter sw = new StreamWriter(@"Settings.txt");
- sw.WriteLine(@"TopMost:False
- AutoAttach:True");
- sw.Close();
- if (File.Exists("DoNotDelete.txt"))
- {
- File.Delete(@"DoNotDelete.txt");
- StreamWriter SW = new StreamWriter(@"DoNotDelete.txt");
- SW.Write("False");
- SW.Close();
- }
- else
- {
- StreamWriter SW = new StreamWriter(@"DoNotDelete.txt");
- SW.Write("False");
- SW.Close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement