示例#1
0
 /// <summary>
 /// Intended to be used when resetting a game, and only then. Lets us distinguish the files from each other when the backup is made.
 /// </summary>
 /// <param name="seed"></param>
 /// <param name="title"></param>
 /// <param name="pladetal"></param>
 /// <param name="resetTime"></param>
 public void Initialize(string seed, string title, int pladetal, DateTime resetTime)
 {
     //TODO: Refactor the contents of the intialize functions out into seperate functions for types of things that has to be initted, make it more clear
     _log.Info("Starting event object initialization...");
     NumberBoard = new BingoNumberBoard();
     NumberBoard.Initialize();
     CompetitionList       = new BindableCollection <CompetitionObject>();
     BingoNumberQueue      = new BindableCollection <BingoNumber>();
     BnkOptions            = new BankoOptions();
     CmpOptions            = new CompetitionOptions();
     SInfo                 = new SeedInfo(seed);
     PInfo                 = new PlateInfo();
     WindowSettings        = new WinSettings();
     EventTitle            = title;
     PInfo.PlatesGenerated = pladetal;
     WindowSettings        = new WinSettings();
     _creationTime         = DateTime.Now;
     NotifyOfPropertyChange(() => CreationTime);
     _initialised   = true;
     IsBingoRunning = false;
     IsResat        = true;
     ResetTime      = resetTime;
     _log.Info("Event object initialization done.");
     PInfo.CardGenerator = new Generator(SInfo.Seed);
     TimeOpt             = new TimerOptions();
     LatestNumbersQueue  = new BindableCollection <string>();
     for (int i = 0; i < 10; i++)
     {
         LatestNumbersQueue.Add("");
     }
     AvailableNumbersQueue = new BindableCollection <BingoNumber>();
     for (int i = 1; i <= 90; i++)
     {
         BingoNumber j = new BingoNumber();
         j.Value = i;
         AvailableNumbersQueue.Add(j);
     }
 }
示例#2
0
 public void Initialize(string seed, string title, int pladetal)
 {
     _log.Info("Starting event object initialization...");
     NumberBoard = new BingoNumberBoard();
     NumberBoard.Initialize();
     CompetitionList       = new BindableCollection <CompetitionObject>();
     BingoNumberQueue      = new BindableCollection <BingoNumber>();
     BnkOptions            = new BankoOptions();
     CmpOptions            = new CompetitionOptions();
     SInfo                 = new SeedInfo(seed);
     PInfo                 = new PlateInfo();
     WindowSettings        = new WinSettings();
     EventTitle            = title;
     PInfo.PlatesGenerated = pladetal;
     PInfoText             = "Antal plader: " + pladetal;
     SInfoText             = "Seed: " + SInfo.Seed;
     _creationTime         = DateTime.Now;
     NotifyOfPropertyChange(() => CreationTime);
     _initialised   = true;
     IsBingoRunning = false;
     _log.Info("Event object initialization done.");
     PInfo.CardGenerator = new Generator(SInfo.Seed);
     TimeOpt             = new TimerOptions();
     LatestNumbersQueue  = new BindableCollection <string>();
     for (int i = 0; i < 10; i++)
     {
         LatestNumbersQueue.Add("");
     }
     AvailableNumbersQueue = new BindableCollection <BingoNumber>();
     for (int i = 1; i <= 90; i++)
     {
         BingoNumber j = new BingoNumber();
         j.Value = i;
         AvailableNumbersQueue.Add(j);
     }
 }
示例#3
0
 public void Reset(BingoNumberBoard Board)
 {
   BNBoard.ResetBoard();
 }
示例#4
0
 public ControlsScreenViewModel()
 {
   OFVM = new OptionsFlyoutViewModel();
   _BNBoard = new BingoNumberBoard();
   DisplayName = "BingoBanko Kontrol-Skærm";
 }
示例#5
0
    public void Initialize(string seed, string title, int pladetal)
    {
      _log.Info("Starting event object initialization...");
      _seedManipulated = false;
      _eventTitle = title;
      _originalSeed = seed;
      _platesGenerated = pladetal;
      _seed = GenerateSeedFromKeyword(_originalSeed);
      _creationTime = DateTime.Now;
      _bingoNumberBoard = new BingoNumberBoard();
      _competitionList = new BindableCollection<CompetitionObject>();
      _bingoNumberQueue = new BindableCollection<BingoNumber>();
      BnkOptions = new BankoOptions();
      CmpOptions = new CompetitionOptions();
      VsOptions = new VisualsOptions();

      for (int i = 1; i < 91; i++)
      {
        _bingoNumberQueue.Add(new BingoNumber(i));
      }
      _initialised = true;
      worker.DoWork += worker_DoWork;
      worker.RunWorkerCompleted += worker_RunWorkerCompleted;
      _log.Info("Event object initialization done.");
    }