private void button_advanced_Click(object sender, EventArgs e) { try { //string toSend = applicationCode + ",1{$Options};"; //clientWriter.WriteLine(toSend); //clientWriter.Flush(); Form optionsForm = new Main_Dialog(); optionsForm.ShowDialog(); } catch (Exception ex) { AppendLine("error: " + ex.Message); } //string toSend = applicationCode + "," + "1{$Options};"; //sendString(toSend); //this.Hide(); //this.Show(); }
public GameOptionsTheraMem(Form parentCaller) { InitializeComponent(); this.parentForm = parentCaller as Main_Dialog; for (int i = 0; i < panel1.Controls.Count; i++) { RadioButton tempButton = panel1.Controls[i] as RadioButton; if (tempButton.Checked) { string buttonName = tempButton.Name; int indexOfFirstLetter = 0; for (int j = tempButton.Name.Length - 1; j > indexOfFirstLetter; j--) { if (Char.IsUpper(buttonName[j])) { indexOfFirstLetter = j; } } this.setGameMode = tempButton.Name.Substring(indexOfFirstLetter, (buttonName.Length) - indexOfFirstLetter); } } }