示例#1
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            _eventAggregator.Unsubscribe(this);
            Log log = new Log();

            log.Text = "Program forceblly closed";
            log.Type = LogType.ProgramClosed;
            LogsManager.GetLogsManager().AddLog(log);
        }
示例#2
0
        static async Task Main()
        {
            Log log = new Log();

            log.Text = "Program forceblly closed";
            log.Type = LogType.ProgramClosed;
            LogsManager.GetLogsManager().AddLog(log);
            await LogsManager.GetLogsManager().SyncLogs();

            Console.WriteLine("Logged");
            Console.WriteLine("ProgramClosed");
        }
示例#3
0
 /// <summary>
 ///     The Constructor
 /// </summary>
 public MainControlViewModel(IEventAggregator eventAggregator, User user)
 {
     _user            = user;
     stateMngr        = StateControllersManager.GetStateController();
     logMngr          = LogsManager.GetLogsManager();
     filelMngr        = FilesManager.GetFilesManager();
     StartTime        = startTime.ToString("HH:mm");
     StopTime         = endTime.ToString("HH:mm");
     _eventAggregator = eventAggregator;
     _eventAggregator.Subscribe(this);
     appTimer          = new Timer(1000);
     appTimer.Elapsed += AppTimer_Elapsed;
     appTimer.Start();
 }