Example #1
0
 private void UpdateServerTimer(MonitorEventArgs <TimeSpan> args)
 {
     ((Label)Control).Content = string.Format(Properties.Resources.MSG_TIME_DISPLAY,
                                              Convert.ToInt32(args.Package.TotalHours),
                                              Convert.ToInt32(args.Package.TotalMinutes),
                                              Convert.ToInt32(args.Package.TotalSeconds));
 }
Example #2
0
        private void UpdateServerServiceStatus(MonitorEventArgs <ServiceControllerStatus> args)
        {
            LogWrapper.ErrorFormat("ServerService {0} has status {1}", _controller.ServiceName, args.Package.ToString());

            // TODO: Update a label on the main form

            if (args.Package == ServiceControllerStatus.Stopped)
            {
                _controller.Start();
            }
        }