public void ShowPityTimerOverlay(History History, PityTimerRepository PityTimers) { if (_pityOverlay == null) { _pityOverlay = new Controls.PityTimer.PityTimerOverlay(History, PityTimers); Hearthstone_Deck_Tracker.Core.MainWindow.Closed += ClosePityTimerOverlay; _pityOverlay.Closed += (sender, e) => _pityOverlay = null; } _pityOverlay.Show(); }
public void ShowPityWin(History History, PityTimerRepository PityTimers) { if (_pityWin == null) { _pityWin = new Controls.PityTimer.PityTimer(History, PityTimers) { Owner = Hearthstone_Deck_Tracker.Core.MainWindow, }; _pityWin.Closed += (sender, e) => _pityWin = null; _pityWin.Loaded += (sender, e) => _pityWin.Title = _name + ": " + _pityWin.Title; _pityWin.Show(); } _pityWin.Focus(); }
public void ShowPityWin(Settings Settings, History History, PityTimerRepository PityTimers) { if (this._pityWin == null) { this._pityWin = new Controls.PityTimer.PityTimer(History, PityTimers, Settings) { Owner = Hearthstone_Deck_Tracker.Core.MainWindow, }; this._pityWin.Closed += (sender, e) => this._pityWin = null; this._pityWin.Loaded += (sender, e) => this._pityWin.Title = this._name + ": " + this._pityWin.Title; this._pityWin.Show(); } this._pityWin.Focus(); }
public PityTimer(PackTracker.History History, PityTimerRepository PityTimers) { InitializeComponent(); _pityTimers = PityTimers; dd_Packs.SelectionChanged += (sender, e) => { if (e.AddedItems.Count == 1) { Ep_Prev.DataContext = Ep_Label.DataContext = _pityTimers.GetPityTimer((int)e.AddedItems[0], Rarity.EPIC, false, true); Leg_Prev.DataContext = Leg_Label.DataContext = _pityTimers.GetPityTimer((int)e.AddedItems[0], Rarity.LEGENDARY, false, true); } }; Loaded += (sender, e) => dd_Packs.DataContext = History; }
public PityTimer(PackTracker.History History, PityTimerRepository PityTimers, PackTracker.Settings settings) { this.InitializeComponent(); this._pityTimers = PityTimers; this.dd_Packs.SelectionChanged += (sender, e) => { if (e.AddedItems.Count == 1) { this.Ep_Prev.DataContext = this.Ep_Label.DataContext = this._pityTimers.GetPityTimer((int)e.AddedItems[0], Rarity.EPIC, false, true); this.Leg_Prev.DataContext = this.Leg_Label.DataContext = this._pityTimers.GetPityTimer((int)e.AddedItems[0], Rarity.LEGENDARY, false, true); } }; this.dd_Packs.ShowUntracked = settings.ShowUntracked; Loaded += (sender, e) => this.dd_Packs.DataContext = History; }
public PityTimerOverlay(PackTracker.History History, PityTimerRepository PityTimers) { InitializeComponent(); DataContext = this; if (History.Count > 0) { _packId = History.Last().Id; Chart_Epic.DataContext = PityTimers.GetPityTimer((int)_packId, Rarity.EPIC, false, true); Chart_Leg.DataContext = PityTimers.GetPityTimer((int)_packId, Rarity.LEGENDARY, false, true); } History.CollectionChanged += (sender, e) => { foreach (Pack Pack in e.NewItems) { Chart_Epic.DataContext = PityTimers.GetPityTimer(Pack.Id, Rarity.EPIC, false, true); Chart_Leg.DataContext = PityTimers.GetPityTimer(Pack.Id, Rarity.LEGENDARY, false, true); _packId = Pack.Id; } OnPropertyChanged("PackId"); }; }