private void generateTray_Click(object sender, EventArgs e) { foreach (Form f in Application.OpenForms) { if (f.Name == "trayForm") { return; } } modeTray = 4; a = new trayForm(); a.Show(); }
private void TextOGlitchForm1_Load(object sender, EventArgs e) { ramClean.Enabled = true; a = new trayForm(); if (this.args.Length > 0 && checkArgs) { if (args[0] == "-tray") { ifTrayLaunched = true; launchTray(); } checkArgs = false; } if (!ifTrayLaunched) { name = new Thread(nameChanging); name.IsBackground = true; name.Start("Text'O'Glitch"); } }