public UserBreak()
 {
     ScreenImageComposer.Instance.attachWidget(textWidget);
     if (subscribedToSystemStateHandler == false)
     {
         TopicBroker.subscribeTopic("SYSTEM_STATE_EVENT", this);
         subscribedToSystemStateHandler = true;
     }
 }
        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();
        }
 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 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;
        }