private void On_SiegeTimerTimeSelect(object sender, MouseButtonEventArgs e) { Label oLabel = (Label)sender; int nMinutes = Convert.ToInt32(oLabel.Tag); EventExtensions.RaiseEvent(SiegeTimeSelected, this, new ObjectiveSiegeTimeSelectedEventArgs(nMinutes)); canvasCustomContextMenu.Visibility = System.Windows.Visibility.Hidden; Canvas.SetZIndex(this, m_nZIndex); }
private void imageRemove_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { m_bRunEffect = false; if (SiegeTimer.Timer != null) { SiegeTimer.Timer.Stop(); } EventExtensions.RaiseEvent(RemoveSiegeTimer, this, null); }
/// <summary> /// Dispatch Timer /// > Countdown Tick /// </summary> /// <param name="count"></param> /// <param name="interval"></param> /// <param name="ts"></param> private void Countdown(int count, TimeSpan interval, Action <int> ts) { SiegeTimer.Timer = new System.Windows.Threading.DispatcherTimer(); SiegeTimer.Timer.Interval = interval; SiegeTimer.Timer.Tick += (_, a) => { if (count-- <= 0) { SiegeTimer.Timer.Stop(); labelTimer.Content = ""; EventExtensions.RaiseEvent(TimerFinished, this, null); SetEffect(); } else { ts(count); } }; ts(count); SiegeTimer.Timer.Start(); }
/// <summary> /// Selecting a Match /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void On_MatchSelectionClick(object sender, MouseButtonEventArgs e) { Model.API.world oWorld = Match.worlds.Find(x => x.color.ToLower() == ((Label)sender).Tag.ToString()); EventExtensions.RaiseEvent(MatchSelected, this, new MatchSelectedEventArgs(Match, oWorld)); }
private void On_MouseDoubleClick(object sender, MouseButtonEventArgs e) { EventExtensions.RaiseEvent(Click, this, new ObjectiveItemDoubleclickEventArgs(Objective, Ri_Remaining, TimeHeld)); SetEffect(Brushes.Yellow, 1); }
private void labelObjectiveName_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { EventExtensions.RaiseEvent(Click, this, null); }
/// <summary> /// Feuern des Events /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void labelRegion_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { EventExtensions.RaiseEvent(RegionSelected, this, new RegionSelectedEventArgs(m_oRegion)); }