public SNGPH() { InitializeComponent(); isok = true; strRanks = new String[101] { "", "KK+,AKs", "QQ+,AK", "JJ+,AK", "TT+,AQ+", "99+,AQ+", "88+,AQo+,ATs+", "88+,AJo+,ATs+", "66+,AT+", "66+,ATo+,A9s+", "55+,ATo+,A8s+,KQs", "44+,A9o+,A8s+,KQs", "44+,A9o+,A7s+,KJs+", "44+,AKs,AQs,AJs,ATs,A9s,A8s,A8o+,A7s,A5s,KJs+", "44+,A8o+,A4s+,KJs+", "33+,A7o+,A4s+,KTs+", "33+,A7o+,A3s+,KQo,KTs+", "33+,A7o+,A2s+,KQo,KTs+", "33+,AKo,AQo,AJo,ATo,A9o,A8o,A7o,A5o,A2s+,KQo,KTs+", "33+,A5o+,A2s+,KQo,KTs+", "33+,A4o+,A2s+,KJo+,KTs+", "33+,A4o+,A2s+,KJo+,KTs+,QJs", "33+,A3o+,A2s+,KJo+,KTs+,QJs", "22+,A2+,KJo+,K9s+,QJs", "22+,A2+,KTo+,K9s+,QJs", "22+,A2+,KTo+,K8s+,QTs+", "22+,A2+,K9o+,K7s+,QTs+,JTs", "22+,A2+,K9o+,K6s+,QJo,QTs+,JTs", "22+,A2+,K9o+,K6s+,QJo,Q9s+,JTs", "22+,A2+,K8o+,K5s+,QJo,Q9s+,JTs", "22+,A2+,K8o+,K4s+,QTo+,Q9s+,JTs", "22+,A2+,K7o+,K4s+,QTo+,Q9s+,JTs", "22+,A2+,K7o+,K2s+,QTo+,Q9s+,JTs", "22+,A2+,K6o+,K2s+,QTo+,Q8s+,JTs", "22+,A2+,K5o+,K2s+,QTo+,Q8s+,J9s+", "22+,A2+,K5o+,K2s+,Q9o+,Q8s+,J9s+", "22+,A2+,K5o+,K2s+,Q9o+,Q8s+,JTo,J9s+", "22+,A2+,K4o+,K2s+,Q9o+,Q8s+,JTo,J9s+", "22+,A2+,K4o+,K2s+,Q9o+,Q6s+,JTo,J9s+,T9s", "22+,A2+,K3o+,K2s+,Q9o+,Q6s+,JTo,J9s+,T9s", "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J4o+,J2s+,T6o+,T4s+,97o+,96s+,86s+", "22+,A2+,K2+,Q2+,J4o+,J2s+,T6o+,T3s+,97o+,96s+,86s+,76s", "22+,A2+,K2+,Q2+,J3o+,J2s+,T6o+,T3s+,97o+,95s+,86s+,76s", "22+,A2+,K2+,Q2+,J3o+,J2s+,T6o+,T2s+,97o+,95s+,87o,86s+,76s", "22+,A2+,K2+,Q2+,J3o+,J2s+,T6o+,T2s+,96o+,95s+,87o,85s+,76s", "22+,A2+,K2+,Q2+,J3o+,J2s+,T5o+,T2s+,96o+,95s+,87o,85s+,76s", "22+,A2+,K2+,Q2+,J2+,T5o+,T2s+,96o+,95s+,87o,85s+,76s", "22+,A2+,K2+,Q2+,J2+,T5o+,T2s+,96o+,94s+,87o,85s+,75s+", "22+,A2+,K2+,Q2+,J2+,T4o+,T2s+,96o+,94s+,87o,85s+,75s+", "22+,A2+,K2+,Q2+,J2+,T4o+,T2s+,96o+,94s+,86o+,85s+,75s+,65s", "22+,A2+,K2+,Q2+,J2+,T4o+,T2s+,95o+,93s+,86o+,84s+,75s+,65s", "22+,A2+,K2+,Q2+,J2+,T3o+,T2s+,95o+,93s+,86o+,84s+,75s+,65s", "22+,A2+,K2+,Q2+,J2+,T3o+,T2s+,95o+,93s+,86o+,84s+,76o,75s+,65s", "22+,A2+,K2+,Q2+,J2+,T3o+,T2s+,95o+,92s+,86o+,84s+,76o,74s+,65s", "22+,A2+,K2+,Q2+,J2+,T2+,95o+,92s+,86o+,84s+,76o,74s+,65s,54s", "22+,A2+,K2+,Q2+,J2+,T2+,95o+,92s+,85o+,84s+,76o,74s+,65s,54s", "22+,A2+,K2+,Q2+,J2+,T2+,94o+,92s+,85o+,83s+,76o,74s+,64s+,54s", "22+,A2+,K2+,Q2+,J2+,T2+,94o+,92s+,85o+,83s+,75o+,74s+,64s+,54s", "22+,A2+,K2+,Q2+,J2+,T2+,94o+,92s+,85o+,82s+,75o+,73s+,64s+,54s", "22+,A2+,K2+,Q2+,J2+,T2+,93o+,92s+,85o+,82s+,75o+,73s+,64s+,54s", "22+,A2+,K2+,Q2+,J2+,T2+,93o+,92s+,85o+,82s+,75o+,73s+,65o,64s+,54s", "22+,A2+,K2+,Q2+,J2+,T2+,93o+,92s+,84o+,82s+,75o+,73s+,65o,63s+,53s+", "22+,A2+,K2+,Q2+,J2+,T2+,92+,84o+,82s+,75o+,73s+,65o,63s+,53s+", "22+,A2+,K2+,Q2+,J2+,T2+,92+,84o+,82s+,74o+,73s+,65o,63s+,53s+,43s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,84o+,82s+,74o+,72s+,65o,63s+,53s+,43s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,84o+,82s+,74o+,72s+,64o+,63s+,54o,53s+,43s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,84o+,82s+,74o+,72s+,64o+,63s+,54o,52s+,43s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,83o+,82s+,74o+,72s+,64o+,62s+,54o,52s+,43s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,74o+,72s+,64o+,62s+,54o,52s+,42s+", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,73o+,72s+,64o+,62s+,54o,52s+,42s+", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,73o+,72s+,64o+,62s+,53o+,52s+,42s+", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,73o+,72s+,63o+,62s+,53o+,52s+,42s+", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,73o+,72s+,63o+,62s+,53o+,52s+,43o,42s+,32s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,72+,63o+,62s+,53o+,52s+,43o,42s+,32s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,72+,63o+,62s+,52+,43o,42s+,32s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,72+,62+,52+,43o,42s+,32s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,72+,62+,52+,42+,32s", "22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,72+,62+,52+,42+,32" }; Player p0 = new Player(trackBar0, position0, chips0, prepost0, bets0, allin0, labelCall0, labelWin0, labelEVwin0, labelEVlose0); Player p1 = new Player(trackBar1, position1, chips1, prepost1, bets1, allin1, labelCall1, labelWin1, labelEVwin1, labelEVlose1); Player p2 = new Player(trackBar2, position2, chips2, prepost2, bets2, allin2, labelCall2, labelWin2, labelEVwin2, labelEVlose2); Player p3 = new Player(trackBar3, position3, chips3, prepost3, bets3, allin3, labelCall3, labelWin3, labelEVwin3, labelEVlose3); Player p4 = new Player(trackBar4, position4, chips4, prepost4, bets4, allin4, labelCall4, labelWin4, labelEVwin4, labelEVlose4); Player p5 = new Player(trackBar5, position5, chips5, prepost5, bets5, allin5, labelCall5, labelWin5, labelEVwin5, labelEVlose5); Player p6 = new Player(trackBar6, position6, chips6, prepost6, bets6, allin6, labelCall6, labelWin6, labelEVwin6, labelEVlose6); Player p7 = new Player(trackBar7, position7, chips7, prepost7, bets7, allin7, labelCall7, labelWin7, labelEVwin7, labelEVlose7); Player p8 = new Player(trackBar8, position8, chips8, prepost8, bets8, allin8, labelCall8, labelWin8, labelEVwin8, labelEVlose8); Player p9 = new Player(trackBar9, position9, chips9, prepost9, bets9, allin9, labelCall9, labelWin9, labelEVwin9, labelEVlose9); game = new Game(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, labelSumChips, labelBetsSum, labelEVpushCall, labelEVfoldVal, labelEVpushCallVal, labelEVdiffVal); RangeSelectors = new RangeSelector[10]; for (int i = 0; i < 10; i++) RangeSelectors[i] = (RangeSelector)panel2.Controls["trackBar" + Convert.ToString(i)]; // alkuasetuksiksi Party SNG, neljä pelaajaa, push -moodi, AA, 20/40, 4 positio // comboBoxBlinds.Items.AddRange(blindsParty); // comboBoxBlinds.SelectedIndex = 5; //comboBoxGame.SelectedIndex = 1; comboBoxPlayers.SelectedIndex = 2; radioButtonPush.Checked = true; comboBoxHand.SelectedIndex = 0; position3.Checked = true; allin2.Checked = true; LoadBlindStructs(); if (comboBoxCasinos.Items.Count == 0) { isok = false; return; } toolTip1.SetToolTip(trackBar0, ""); toolTip1.Active = true; #if (!DEBUGOMA) buttonOpenFile.Hide(); // näytetään kuvanavausnappi vain debug-moodissa #endif Text = "SNGEGT-GT"; tableTimer.Enabled = false; #if (DEBUGOMA) Text = "SNGEGT-Debug"; buttonOpenFile.Show(); tableTimer.Enabled = false; #endif // kaikille yhteisen sliderin asetukset trackBarAll.Maximum = 100; trackBarAll.Minimum = 1; trackBarAll.SmallChange = 1; trackBarAll.LargeChange = 5; trackBarAll.Value = 10; List<BlindInfo> blindstruct = ((BlindSaver)structures[comboBoxCasinos.SelectedItem.ToString()]).blinds; party = new TableFinder(new partyTableReader(((BlindSaver)structures["Party"]).blinds, new IntPtr(-1))); //MessageBox.Show(Convert.ToString(System.Windows.Forms.SystemInformation.CaptionHeight)); StackToRange = new StackToRangeForm(); presetForm = new PresetRangeForm(); for (int i = 0; i < RangeSelectors.Length; i++) RangeSelectors[i].setRanges(presetForm.getRanges()); this.HandHistoryForm = new GameSelectForm(this); dataGridView2.ColumnCount = 0; String cardvalues = "AKQJT98765432"; DataGridViewTextBoxColumn column = new DataGridViewTextBoxColumn(); column.SortMode = DataGridViewColumnSortMode.NotSortable; dataGridView2.Columns.Add(column); for (int i = 0; i < cardvalues.Length; i++) { column = new DataGridViewTextBoxColumn(); column.SortMode = DataGridViewColumnSortMode.NotSortable; column.Name = cardvalues[i].ToString(); column.HeaderText = column.Name; dataGridView2.Columns.Add(column); } dataGridView2.RowCount = 13; for (int i = 0; i < cardvalues.Length; i++) { dataGridView2.Rows[i].Cells[0].Value = cardvalues[i]; dataGridView2.Rows[i].Cells[0].Style.BackColor = SystemColors.Control ; dataGridView2.Rows[i].Cells[0].Style.SelectionBackColor = SystemColors.Control; dataGridView2.Rows[i].Height = 14; } dataGridView2.Columns[0].Width = 20; dataGridView2.Columns[0].Frozen = true; DataGridViewCell cell; for (int i = 0; i < dataGridView2.Rows.Count; i++) for (int j = 1; j < dataGridView2.Columns.Count; j++) { cell = dataGridView2.Rows[i].Cells[j]; cell.Value = cardvalues[i].ToString() + cardvalues[j - 1].ToString(); if (i + 1 == j) continue; if (i + 1 < j) cell.Value += "s"; else cell.Value = cardvalues[j-1].ToString() + cardvalues[i].ToString() +"o"; } graphBitmap = new Bitmap(graphImage.Width, graphImage.Height); fillingform = false; }
private void openFileDialog_FileOk(object sender, CancelEventArgs e) { //MessageBox.Show("kuva OK"); DialogResult res = MessageBox.Show("Onko party", "Onko party", MessageBoxButtons.YesNo); //DialogResult res = DialogResult.No; if (res == DialogResult.Yes) { res = MessageBox.Show("Onko speeed", "Onko speed", MessageBoxButtons.YesNo); iCasinoName = "Party"; if (res == DialogResult.Yes) iCasinoName = "Party speed"; party = new TableFinder(new partyTableReader(((BlindSaver)structures[iCasinoName]).blinds, new IntPtr(-1))); } else { res = MessageBox.Show("Onko Stars", "Onko stars", MessageBoxButtons.YesNo); if (res == DialogResult.Yes) { party = new TableFinder(new StarsTable(((BlindSaver)structures["PokerStars"]).blinds, new IntPtr(-1))); iCasinoName = "PokerStars"; } else { party = new TableFinder(new FullTiltTable(((BlindSaver)structures["FullTilt"]).blinds, new IntPtr(-1))); iCasinoName = "FullTilt"; } } setFormsAndDoCalc(false, openFileDialog.FileName); }