private void LoadSettings() { settings = new SettingsForm(this); colorFix = new ColorFixClass(); launcher = new Launcher(); settings.LoadSettings(); if (!settings.GetSinglePlayerRB()) //Set Radiobutton { HamachiIPLbl.Visible = true; HamachiIPTxt.Visible = true; MultiPlayerRB.Checked = true; } else SinglePlayerRB.Checked = true; HamachiIPTxt.Text = settings.GetHamachiIP(); //Set Hamachi IP address if (settings.GetColorFixOption() == ColorFix.A) //Set color fix { ColorFixMMI.Visible = true; UseFix1MMI.Checked = true; UseFix2MMI.Checked = false; } else if (settings.GetColorFixOption() == ColorFix.B) { ColorFixMMI.Visible = true; UseFix2MMI.Checked = true; UseFix1MMI.Checked = false; } else ColorFixMMI.Visible = false; StatusSBLb.Text = settings.GetCurOS().ToString() + " " + settings.GetCurOST().ToString(); }
private void LaunchStarcraft(object sender, EventArgs e) { if (settings.GetColorFixOption() != ColorFix.NULL) //If color fix is needed { if (settings.GetColorFixOption() == ColorFix.A) //Perform color fix A colorFix.ColorFixA(); else if (settings.GetColorFixOption() == ColorFix.B) //Perform color fix B colorFix.ColorFixB(); } Launcher launchSC = new Launcher(); String InjectIP = "test"; if (SinglePlayerRB.Checked) //Launch Normal or UDP mode arguments launchSC.Argument = " \"" + settings.GetSCDirectory() + "\\" + settings.GetSCExe() + "\""; else launchSC.Argument = InjectIP + settings.GetHamachiIP() + " \"" + settings.GetSCDirectory() + "\""; Thread Starcraft = new Thread(launchSC.StartSC); Starcraft.Start(); Starcraft.Join(); if(settings.GetColorFixOption() == ColorFix.A) //Undo color fix A colorFix.UndoColorFixA(); else if (settings.GetColorFixOption() == ColorFix.B) //Undo color fix B colorFix.UndoColorFixB(); }