private void button2_Click(object sender, EventArgs e) { using (StratergyForm sf = new StratergyForm()) { sf.ShowDialog(); } }
private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (useStratCheck.Checked) { if (LoadingDefaults) { return; } using (StratergyForm sf = new StratergyForm()) { if (sf.ShowDialog() == System.Windows.Forms.DialogResult.OK) { GameConfig.StratergySquares = sf.StratergyArray; GameConfig.UseStrat = GameConfig.StratergySquares != null && GameConfig.StratergySquares.Length > 0; if (GameConfig.UseStrat) { /* * for (int i = 0; i < StratergySquares.Length; i++) * { * if (StratergySquares[i] == 1) * { * stratDisplay.SetSquare(i, Brushes.Green); * } * }*/ foreach (int sv in GameConfig.StratergySquares) { stratDisplay.SetSquare(sv, Brushes.Green); } } else { useStratCheck.Checked = false; stratDisplay.Reset(); } } else { useStratCheck.Checked = false; GameConfig.UseStrat = false; } } } else { GameConfig.UseStrat = false; stratDisplay.Reset(); } numberofBets.Enabled = !GameConfig.UseStrat; }
private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (useStratCheck.Checked) { if (LoadingDefaults) return; using (StratergyForm sf = new StratergyForm()) { if (sf.ShowDialog() == System.Windows.Forms.DialogResult.OK) { GameConfig.StratergySquares = sf.StratergyArray; GameConfig.UseStrat = GameConfig.StratergySquares != null && GameConfig.StratergySquares.Length > 0; if (GameConfig.UseStrat) { /* for (int i = 0; i < StratergySquares.Length; i++) { if (StratergySquares[i] == 1) { stratDisplay.SetSquare(i, Brushes.Green); } }*/ foreach (int sv in GameConfig.StratergySquares) { stratDisplay.SetSquare(sv, Brushes.Green); } } else { useStratCheck.Checked = false; stratDisplay.Reset(); } } else { useStratCheck.Checked = false; GameConfig.UseStrat = false; } } } else { GameConfig.UseStrat = false; stratDisplay.Reset(); } numberofBets.Enabled = !GameConfig.UseStrat; }