void monthCalendar1_DaySelected(object sender, Pabo.Calendar.DaySelectedEventArgs e) { Pabo.Calendar.SelectedDatesCollection dates = this.monthCalendar1.SelectedDates; if (manual_dataset == null) { manual_dataset = new BingoGameEvent.GameEventDataSet(StaticDsnConnection.dsn); DsnSQLUtil.MatchCreate(StaticDsnConnection.dsn, manual_dataset); } if (dates.Count > 0) { { List <DateTime> selectedDates = new List <DateTime>(); for (int idx = 0; idx < dates.Count; idx++) { selectedDates.Add(dates[idx]); } the_day = dates[0]; GetSessions(the_day, selectedDates); //sessions = BingoGameList.GetPlayedSessions( dates[ 0 ] ); manual_dataset.FillToday(the_day, selectedDates); } } dataGridView1.DataSource = manual_dataset.games; dataGridView1.Columns["bingo_game_id"].Visible = false; dataGridView1.Columns["bingoday"].Visible = true; dataGridView1.Columns["bingoday"].HeaderText = "Date"; dataGridView1.Columns["session"].HeaderText = "Session"; dataGridView1.Columns["session"].Width = 150; dataGridView1.Columns["game"].HeaderText = "Game"; dataGridView1.Columns["game"].Width = 150; dataGridView1.Columns["session_id"].Visible = false; dataGridView1.Columns["game_id"].Visible = false; dataGridView1.AllowUserToAddRows = false; dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGridView1.RowHeadersVisible = false; dataGridView1.ScrollBars = ScrollBars.Vertical; dataGridView1.EditMode = DataGridViewEditMode.EditProgrammatically; int width = dataGridView1.Width; width -= dataGridView1.Columns["bingoday"].Width; width -= dataGridView1.Columns["session"].Width; width -= dataGridView1.Columns["game"].Width; width -= dataGridView1.Columns["ballset"].Width; width -= dataGridView1.Columns["closed_at"].Width; dataGridView1.Columns["created"].Width = width; dataGridView1.Columns["created"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; return; }
void MyOnLoad(object sender, EventArgs e) { //TestBoundries(); if (Environment.CommandLine.Contains("hide")) { this.Visible = false; //this.ShowInTaskbar = false; } if (Environment.CommandLine.Contains("HIDE")) { this.Visible = false; this.ShowInTaskbar = false; } if (!Environment.CommandLine.Contains("config")) { #if test button2.Enabled = false; button3.Enabled = false; button4.Enabled = false; button5.Enabled = false; button6.Enabled = false; buttonOptionEdit.Enabled = false; #endif } // might take this option out of the starter... and just Start... #if asdfasdfasdf if (Options.Default["System:" + Environment.MachineName]["Bingo Game Core"]["External Game Data"]["Enable Reciever", "0"].Bool) { //String_Utilities.BuildSessionRangeCondition( null, DateTime.Now, 0 ); BingoGameCore4.Networking.EltaninReceiver.BingodayChanged += new BingoGameCore4.Networking.ExternalReceiver.OnBingodayChange(ExternalReceiver_BingodayChanged); BingoGameCore4.Networking.EltaninReceiver.SessionChanged += new BingoGameCore4.Networking.ExternalReceiver.OnSessionChange(ExternalReceiver_SessionChanged); BingoGameCore4.Networking.EltaninReceiver.GameChanged += new BingoGameCore4.Networking.ExternalReceiver.OnGameChange(ExternalReceiver_GameChanged); BingoGameCore4.Networking.ExternalReceiver.Start(); } #endif schedule_dsn = new DsnConnection(StaticDsnConnection.dsn.DataSource); schedule = new OpenSkieScheduler3.ScheduleDataSet(schedule_dsn); schedule.Fill(); BingoGameCore4.RateRank.Setup(schedule_dsn); BingoGameCore4.RateRank.game_points = new BingoGameCore4.Database.RankPointsExtended(schedule); input_db = new DsnConnection(Options.File("RateRank.ini")[Options.ProgramName + "/config"]["Input Database DSN", "MySQL"].Value); Text = Text + "[" + input_db.DataSource + "]"; OptionMap options = Options.Database(input_db)[Options.ProgramName]; StateWriter.WritePackRateDetails = options["Write called_game_player_pack_stats (per card info)", "1"].Bool; if (options["config"]["Enable Game Check Timer", "0"].Bool) { timer_gameEventDataSet = new BingoGameEvent.GameEventDataSet(input_db); check_winner = new System.Windows.Forms.Timer(); check_winner.Interval = options["config"]["Game Check Timer Length", "5000"].Integer; check_winner.Tick += new EventHandler(check_winner_Tick); check_winner.Start(); } monthCalendar1.ActiveMonth.Year = DateTime.Now.Year; monthCalendar1.ActiveMonth.Month = DateTime.Now.Month; monthCalendar1.MonthChanged += new Pabo.Calendar.MonthChangedEventHandler(monthCalendar1_MonthChanged); monthCalendar1.DaySelected += new Pabo.Calendar.DaySelectedEventHandler(monthCalendar1_DaySelected); listBoxSessions.SelectedIndexChanged += new EventHandler(listBoxSessions_SelectedIndexChanged); dataGridView1.SelectionChanged += new EventHandler(dataGridView1_SelectionChanged); dataGridView1.MouseCaptureChanged += new EventHandler(dataGridView1_MouseCaptureChanged); }