static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); { OpenSkieScheduler3.ScheduleDataSet schedule; if (xperdex.classes.Options.Default["Use static DSN", true].Bool) { schedule = new OpenSkieScheduler3.ScheduleDataSet(xperdex.classes.StaticDsnConnection.dsn); } else { schedule = new OpenSkieScheduler3.ScheduleDataSet(new xperdex.classes.DsnConnection(xperdex.classes.Options.Default["Use DSN", "MySQL"].Value)); } if (Environment.CommandLine.Contains("drop")) { schedule.Drop(); } if (Environment.CommandLine.Contains("exit")) { return; } schedule.Create(); schedule.Fill(); ScheduleDesigner form = new ScheduleDesigner(schedule); Application.Run(form); } }
public BingoGameVerifier() { schedule = new OpenSkieScheduler3.ScheduleDataSet(StaticDsnConnection.dsn); schedule.Create(); schedule.Fill(); bingo_events = new BingoEventInterface(); bingo_game_tracking = new BingoSQLTracking.BingoTracking(); bingo_game_tracking.ConnnectBingoTrackingToDatabase(StaticDsnConnection.dsn.DataSource); bingo_game_tracking.Create(); bingo_game_tracking.HookEvents(bingo_events); bingo_game_tracking.LoadCurrent(); // setup to be able to serve information to others. //bingo_game_core = new BingoGameCore3.Networking.FlashdriveSlaveHost(); //bingo_game_core.Start(); //bingo_game_core_data = new BingoGameCore3.BallData.FlashdriveController(); //bingo_game_core_data.Events = bingo_events; //bingo_game_core_data.Start(); //bingo_game_ball_device = bingo_game_core_data; // setup events to track the state of the current game. bingo_events.BingodayChanged += new BingoEvents.SimpleDateEvent(bingo_events_BingodayChanged); bingo_events.SessionChanged += new BingoEvents.SimpleIntEvent(bingo_events_SessionChanged); bingo_events.GameChanged += new BingoEvents.SimpleIntEvent(bingo_events_GameChanged); bingo_events.BallPulled += new BingoEvents.SimpleIntEvent(bingo_events_BallPulled); }
public CardSQLReader(DataRow dataRowCardsetRange) { dataRowCardset = dataRowCardsetRange.GetParentRow("cardset_has_cardset_range"); DataTable ranges = dataRowCardsetRange.Table; bool double_action = (dataRowCardsetRange["double_action"] == DBNull.Value)?false:Convert.ToBoolean(dataRowCardsetRange["double_action"]); card_stock = new byte[Convert.ToInt32(dataRowCardset["cards"]), 5, 5]; schedule = ranges.DataSet as OpenSkieScheduler3.ScheduleDataSet; DataRow Cardset = dataRowCardsetRange.GetParentRow(CardsetRange.CardsetInfoRelationName); readers.Add(this); }
public CardReader(DataRow dataRowCardsetRange) { DataTable ranges = dataRowCardsetRange.Table; bool double_action = (dataRowCardsetRange["double_action"] == DBNull.Value)?false:Convert.ToBoolean(dataRowCardsetRange["double_action"]); OpenSkieScheduler3.ScheduleDataSet schedule = ranges.DataSet as OpenSkieScheduler3.ScheduleDataSet; DataRow Cardset = dataRowCardsetRange.GetParentRow(CardsetRange.CardsetInfoRelationName); String default_cardset_path = Options.File("cardset_files.ini")["CONFIG"]["Default Cardset Path", "f:\\ftn3000\\data\\cards"].Value; readers.Add(this); this.Name = dataRowCardsetRange[OpenSkieScheduler3.BingoGameDefs.CardsetRange.NameColumn].ToString(); this.FileName = Cardset["name"] as String; cf = new CardFactory(); if (!System.IO.File.Exists(FileName)) { FileName = SwapPath(FileName, default_cardset_path); if (!System.IO.File.Exists(FileName)) { if (FileName == "") { return; } else { MessageBox.Show("Cardset " + FileName + " does not exist."); } throw new Exception("File not found"); } } { fs = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); br = new BinaryReader(fs); if (double_action) { card_stock = new byte[(Convert.ToInt32(dataRowCardsetRange["end"]) - (offset = (Convert.ToInt32(dataRowCardsetRange["start"]) - 1))) * 2 , 5, 5]; } else { card_stock = new byte[(Convert.ToInt32(dataRowCardsetRange["end"]) - (offset = (Convert.ToInt32(dataRowCardsetRange["start"]) - 1))) , 5, 5]; } offset += (Int32)dataRowCardsetRange["offset"]; } }
public void StoreCards(OpenSkieScheduler3.ScheduleDataSet schedule, DataRow cardset) { DataRow card; int n; for (n = 0; n < data.GetLength(0); n++) { card = schedule.cardset_cards.NewRow(); card["card_number"] = n + 1; card["b1"] = data[n, 0, 0, 0]; card["b2"] = data[n, 0, 0, 1]; card["b3"] = data[n, 0, 0, 2]; card["b4"] = data[n, 0, 0, 3]; card["b5"] = data[n, 0, 0, 4]; card["i1"] = data[n, 0, 1, 0]; card["i2"] = data[n, 0, 1, 1]; card["i3"] = data[n, 0, 1, 2]; card["i4"] = data[n, 0, 1, 3]; card["i5"] = data[n, 0, 1, 4]; card["n1"] = data[n, 0, 2, 0]; card["n2"] = data[n, 0, 2, 1]; card["n3"] = data[n, 0, 2, 2]; card["n4"] = data[n, 0, 2, 3]; card["g1"] = data[n, 0, 3, 0]; card["g2"] = data[n, 0, 3, 1]; card["g3"] = data[n, 0, 3, 2]; card["g4"] = data[n, 0, 3, 3]; card["g5"] = data[n, 0, 3, 4]; card["o1"] = data[n, 0, 4, 0]; card["o2"] = data[n, 0, 4, 1]; card["o3"] = data[n, 0, 4, 2]; card["o4"] = data[n, 0, 4, 3]; card["o5"] = data[n, 0, 4, 4]; card[CardsetInfo.PrimaryKey] = cardset[CardsetInfo.PrimaryKey]; schedule.cardset_cards.Rows.Add(card); } }
public Form1() { schedule = new OpenSkieScheduler3.ScheduleDataSet(); calls = new List <int[]>(); InitializeComponent(); }