예제 #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            RuleManager.Load();
            RefreshRules();

            monitor = new Monitor();
            monitor.Start();

            reportForm = new ReportForm(monitor.GetApp);

            List <string> errors = null;

            ActivityTracker.SetCurrentActivityLog(Log.Load(monitor.GetApp, DateTime.Now, out errors));

            if (errors != null && errors.Count != 0)
            {
                ReportErrorDuringLoading(errors);
            }

            ActivityTracker.CurrentLogExtended += this.CurrentLogExtended;
            ActivityTracker.CurrentLogChanged  += this.CurrentLogChanged;
            ActivityTracker.UserStatusChanged  += this.UserStatusChanged;

            CurrentLogChanged(DateTime.Now);
        }
예제 #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            RuleManager.Load();
            RefreshRules();

            monitor = new Monitor();
            monitor.Start();

            reportForm = new ReportForm(monitor.GetApp);

            ActivityTracker.SetCurrentActivityLog(Persistence.Load(monitor.GetApp));
            ActivityTracker.CurrentLogExtended += this.CurrentLogExtended;
            ActivityTracker.CurrentLogChanged  += this.CurrentLogChanged;
            ActivityTracker.UserStatusChanged  += this.UserStatusChanged;

            CurrentLogChanged(DateTime.Now);
        }