public AddNumberViewModel() { DisplayName = "Indtast tal.."; NumberToAdd = 1; Event = IoC.Get <BingoEvent>(); CanConfirmNumber = false; }
protected override void OnViewReady(object view) { _eventAggregator = IoC.Get <IEventAggregator>(); _eventAggregator.Subscribe(this); _windowManager = IoC.Get <IWindowManager>(); Event = IoC.Get <BingoEvent>(); NotifyOfPropertyChange(() => CanGeneratePlatesButton); }
private void CopyEvent(BingoEvent fr, BingoEvent to) { to.Initialize(fr.SInfo.Seed, fr.EventTitle, fr.PInfo.PlatesGenerated); to.BingoNumberQueue = fr.BingoNumberQueue; to.BnkOptions = fr.BnkOptions; to.CmpOptions = fr.CmpOptions; to.CompetitionList = fr.CompetitionList; to.EventTitle = fr.EventTitle; to.Generating = fr.Generating; to.NumberBoard = fr.NumberBoard; to.PInfo = fr.PInfo; to.RecentFiles = fr.RecentFiles; to.WindowSettings = fr.WindowSettings; to.SInfo = fr.SInfo; //to.VsOptions = fr.VsOptions; }
public bool LoadSession(string sessionName) { if (!DirectoriesInitialised) { CreateApplicationDirectories(); } _log.Info("LOADSESSION"); BingoEvent ev = new BingoEvent(); ev = DeSerializeObject <BingoEvent>(SaveDirectory + "\\BingoBankoKontrol" + "\\LatestEvents" + "\\" + sessionName + ".xml"); CopyEvent(ev, Event); Event.WindowSettings.PrsSettings.IsOverLayOpen = false; //TODO: There should be no errors at this point, provided that no files has been corrupted or anything. if it has, the application will crash //We should come up with some way of avoiding this, might be a buch of valuechecks or something. return(true); }
public BingoTimer(int seconds) { Event = IoC.Get <BingoEvent>(); this._currentTimeSpan = new TimeSpan(); this._localTimeSpan = new TimeSpan(); this._emptyTimeSpan = new TimeSpan(); //setting up dispatcher and stopwatch this._stopWatch = new Stopwatch(); this._timer = new DispatcherTimer(); this._timer.Tick += new EventHandler(dispatcherTimer_Tick); this._timer.Interval = new TimeSpan(0, 0, 0, 0, milliseconds: 10); this._countUp = true; if (seconds > 0) { this._currentTimeSpan = this._currentTimeSpan.Add(new TimeSpan(0, 0, 0, seconds)); this.CountDownInput = seconds; this._countUp = false; } }
protected override void OnViewReady(object view) { _winMan = IoC.Get <IWindowManager>(); _events = IoC.Get <IEventAggregator>(); Event = IoC.Get <BingoEvent>(); }
protected override void OnViewReady(object view) { Event = IoC.Get <BingoEvent>(); }