private void Message_Load(object sender, EventArgs e) { this.Visible = false; Point p = new Point(this.ParentForm.Width / 2 - this.Width / 2, (this.ParentForm.Height / 2) - (this.Height / 2) - 39); this.Location = p; // this.richTextBox1.MouseWheel += new MouseEventHandler(richtextBox1_MouseWheel); Props.AddNotification("LOG: " + message); richTextBox1.Text = message; richTextBox1.ReadOnly = true; this.Visible = true; this.BringToFront(); }
private void Form1_Load(object sender, EventArgs e) { this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\\SkidSimulator"); if (key == null) { Registry.CurrentUser.CreateSubKey("Software\\SkidSimulator"); } key = Registry.CurrentUser.OpenSubKey("Software\\SkidSimulator"); if (key != null) { Object o = key.GetValue("BgPath"); if (o != null) { string path = o as String; try { if (File.Exists(path)) { this.BackgroundImage = Image.FromFile(path); } } catch { MessageBox.Show("Cannot load or find background image path."); } } Object o2 = key.GetValue("skidName"); if (o2 != null) { string name = o2 as String; Props.SetSkidName(name); } Object o3 = key.GetValue("newSkid"); if (o3 != null) { Props.ShowMessage("Welcome back " + skidName.Text); } else { Selector selector = new Selector(); Props.mainForm.Controls.Add(selector); } Object o4 = key.GetValue("hackerType"); if (o4 != null) { string hType = o4 as String; Props.hacker = (Props.hackerType)Enum.Parse(typeof(Props.hackerType), hType); } Object o5 = key.GetValue("Fullscreen"); if (o5 != null) { bool full = bool.Parse(o5 as string); if (full) { Props.HandleFullscreen(); } } } if (Props.hacker == Props.hackerType.Hecks) { Props.AddNotification("How does a condom work?"); } this.DoubleBuffered = true; Keyhook.Initialize(); Props.staticpad = new Textpad(); Props.staticmd = new CMD(); itemImage1.OpenForm = Props.staticmd; itemImage2.OpenForm = Props.staticpad; itemImage4.isGT = true; Props.doWeInit = true; UpdateTime(); }