public ActiveStateLog()
        {
            new Configuration().addConfigEntry("dataBaseNameActiveStateLog", "activeStateLog");
            TopicBroker.subscribeTopic("ACTIVITY_STATE_CHANGE_EVENT", this);
            TopicBroker.publishTopic("ACTIVIVE_STATE_LOG_EVENT", this);
            Configuration config = new Configuration();

            logpath = config.getActiveStateLogPath();
        }
Example #2
0
 public UserBreak()
 {
     ScreenImageComposer.Instance.attachWidget(textWidget);
     if (subscribedToSystemStateHandler == false)
     {
         TopicBroker.subscribeTopic("SYSTEM_STATE_EVENT", this);
         subscribedToSystemStateHandler = true;
     }
 }
 public void start()
 {
     timeInState.Start();
     TopicBroker.subscribeTopic("MOUSE_KEY_EVENT", this);
     TopicBroker.subscribeTopic("SYSTEM_STATE_EVENT", this);
     activeIdleTimeout.Interval = timeToIdleMilliSeconds;
     activeIdleTimeout.Tick    += new EventHandler(idleTimeoutCallback);
     activeIdleTimeout.Start();
 }
        public ActivityWatcher()
        {
            Configuration config = new Configuration();

            config.addConfigEntry("secondsToIdle", 3 * 60 * 1000);
            config.addConfigEntry("secondsToInactive", 5 * 60 * 1000);

            timeToIdleMilliSeconds     = config.secondsToIdle * 1000;
            timeToInactiveMilliSeconds = config.secondsToInactive * 1000;
            TopicBroker.publishTopic("ACTIVITY_STATE_CHANGE_EVENT", this);
        }
        public NoBreakWarner()
        {
            Configuration config = new Configuration();

            config.addConfigEntry(MinutesNoBreakWarningString, 1);
            config.addConfigEntry(MinutesSnoozeTimeString, 1);
            millisecondsNoBreakWarning = Int32.Parse(new Configuration().getValueString(MinutesNoBreakWarningString)) * 60 * 1000;
            millisecondsSnoozeTime     = Int32.Parse(new Configuration().getValueString(MinutesSnoozeTimeString)) * 60 * 1000;
            noBreakTimer.Interval      = millisecondsNoBreakWarning;
            TopicBroker.subscribeTopic("ACTIVITY_STATE_CHANGE_EVENT", this);
            TopicBroker.subscribeTopic("SYSTEM_STATE_EVENT", this);
            noBreakTimer.Tick += NoBreakTimer_Tick;
        }
 public SystemStateHandler()
 {
     SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
     TopicBroker.publishTopic("SYSTEM_STATE_EVENT", this);
 }
 public MouseKeyHandler()
 {
     this.Subscribe(Hook.GlobalEvents());
     TopicBroker.publishTopic("MOUSE_KEY_EVENT", this);
 }