Advertisement
Guest User

Set Settings

a guest
Sep 15th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.03 KB | None | 0 0
  1.  StreamReader streamReader = new StreamReader("Settings.txt");
  2.             string id = streamReader.ReadLine();
  3.             if (File.Exists("Settings.txt"))
  4.             {
  5.                 if (id.Contains("TopMost:True"))
  6.                 {
  7.                     this.TopMost = true;
  8.                     ScriptHub SC = new ScriptHub();
  9.                     SC.TopMost = true;
  10.                     Eternity et = new Eternity();
  11.                     et.TopMost = true;
  12.                 }
  13.               else if (id.Contains("TopMost:False"))
  14.                 {
  15.                     this.TopMost = false;
  16.                     ScriptHub SC = new ScriptHub();
  17.                     SC.TopMost = false;
  18.                     Eternity et = new Eternity();
  19.                     et.TopMost = false;
  20.                 }
  21.                 if (id.Contains("AutoAttach:True"))
  22.                 {
  23.                     this.checkBox2.Checked = true;
  24.                     this.RbxCheck.Start();
  25.                 }
  26.                 else if (id.Contains("AutoAttach:False"))
  27.                 {
  28.                     this.checkBox2.Checked = false;
  29.                     RbxCheck.Stop();
  30.                     RbxCheck2.Stop();
  31.                     RbxClosedCheck.Stop();
  32.                     RbxClosedCheck2.Stop();
  33.                 }
  34.                 string id2 = File.ReadAllText("Settings.txt");
  35.                 if(id2.Contains(@"TopMost:True")&id2.Contains("AutoAttach:True"))
  36.                 {
  37.                     this.checkBox1.Checked = true;
  38.                     this.checkBox2.Checked = true;
  39.                     RbxCheck.Start();
  40.                     this.TopMost = true;
  41.                     ScriptHub SC = new ScriptHub();
  42.                     SC.TopMost = true;
  43.                     Eternity et = new Eternity();
  44.                     et.TopMost = true;
  45.                 }
  46.                 else if (id2.Contains(@"TopMost:False") & id2.Contains("AutoAttach:False"))
  47.                 {
  48.                     this.checkBox1.Checked = false;
  49.                     this.checkBox2.Checked = false;
  50.                     RbxCheck.Start();
  51.                     this.TopMost = false;
  52.                     ScriptHub SC = new ScriptHub();
  53.                     SC.TopMost = false;
  54.                     Eternity et = new Eternity();
  55.                     et.TopMost = false;
  56.                 }
  57.             }
  58.             else
  59.             {
  60.                 StreamWriter sw = new StreamWriter(@"Settings.txt");
  61.                 sw.WriteLine(@"TopMost:False
  62. AutoAttach:False");
  63.                 sw.Close();
  64.             }
  65.             if (File.Exists("DoNotDelete.txt"))
  66.             {
  67.                 StreamReader sr = new StreamReader("DoNotDelete.txt");
  68.                 string idk = streamReader.ReadLine();
  69.                 if (idk.Contains("True"))
  70.                 {
  71.                     this.checkBox2.Checked = false;
  72.                     RbxCheck.Stop();
  73.                     RbxCheck2.Stop();
  74.                     RbxClosedCheck.Stop();
  75.                     RbxClosedCheck2.Stop();
  76.                 }
  77.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement