private void StartGame_Click(object sender, EventArgs e) { int status = Starter.StartGame(); switch (status) { case 1: monitor.Start(); if (Globals.LauncherConfig.MinimizeToTray) { TrayIcon.Visible = true; this.Hide(); } break; case -1: MessageBox.Show("Cannot establish a connection to the server"); return; case -2: MessageBox.Show("Failed to receive data"); return; case -3: MessageBox.Show("Wrong email and/or password"); return; case -4: MessageBox.Show("The launcher is not running from the game directory"); return; default: MessageBox.Show("Unexpected error"); return; } }
private void pictureBox1_Click(object sender, EventArgs e) { pForm._m = new Mutex(true, "#32770"); Starter.Start(); }