Exemple #1
0
        public void RestartTimer(Model.SiegeTimer oSiegeTimer)
        {
            TimeSpan oTimespanToGo;

            if (SiegeTimer.Timer != null)
            {
                SiegeTimer.Timer.Stop();
            }

            SiegeTimer = oSiegeTimer;

            oTimespanToGo = SiegeTimer.End - DateTime.Now;

            Countdown((int)oTimespanToGo.TotalSeconds, TimeSpan.FromSeconds(1), cur => labelTimer.Content = string.Format("{0:%m}:{0:ss}", new TimeSpan(0, 0, cur)));
        }
Exemple #2
0
        public SiegeTimerItem(Model.SiegeTimer oSiegeTimer, LogWriter oLogWriter, Model.API.matches_match oMatch)
        {
            TimeSpan oTimespanToGo;

            InitializeComponent();
            SiegeTimer   = oSiegeTimer;
            m_oLogWriter = oLogWriter;
            Match        = oMatch;

            labelObjectiveMapName.Content = SiegeTimer.Map.Identifier;
            labelObjectiveName.Content    = SiegeTimer.XMLObjective.Name;
            imageObjectiveType.Source     = new BitmapImage(this.GetIconUri(SiegeTimer.XMLObjective, SiegeTimer.APIObjective.current_owner.color));

            oTimespanToGo = SiegeTimer.End - DateTime.Now;

            Countdown((int)oTimespanToGo.TotalSeconds, TimeSpan.FromSeconds(1), cur => labelTimer.Content = string.Format("{0:%m}:{0:ss}", new TimeSpan(0, 0, cur)));
        }
Exemple #3
0
 public SiegeTimerEventArgs(Model.SiegeTimer oSiegeTimer)
 {
     SiegeTimer = oSiegeTimer;
 }