예제 #1
0
        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);
        }
예제 #2
0
        private void imageRemove_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            m_bRunEffect = false;
            if (SiegeTimer.Timer != null)
            {
                SiegeTimer.Timer.Stop();
            }

            EventExtensions.RaiseEvent(RemoveSiegeTimer, this, null);
        }
예제 #3
0
        /// <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();
        }
예제 #4
0
 /// <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));
 }
예제 #5
0
 private void On_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     EventExtensions.RaiseEvent(Click, this, new ObjectiveItemDoubleclickEventArgs(Objective, Ri_Remaining, TimeHeld));
     SetEffect(Brushes.Yellow, 1);
 }
예제 #6
0
 private void labelObjectiveName_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     EventExtensions.RaiseEvent(Click, this, null);
 }
예제 #7
0
 /// <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));
 }