Exemplo n.º 1
0
        public BreakTimer(AbstractPlatform platform)
        {
            Platform = platform;
            Platform.SystemResumed += delegate {
                Log.Info ("System resumed, waking UpdateThread...");
                CheckNowAsync ();
            };

            LastBreak = LastBreakSuggested = platform.Clock.Now;
            IdleTimeAccumulatedSinceLastBreak = TimeSpan.Zero;
        }
        public AwarenessController(AbstractPlatform platform)
        {
            Platform = platform;
            Platform.ApplicationLaunched += ApplicationLaunched;
            Platform.ApplicationWillQuit += ApplicationWillQuit;

            BreakTimer = new BreakTimer(Platform);
            BreakTimer.BreakSuggested += BreakSuggested;

            BowlPlayer = new BowlPlayer(Platform);
        }
Exemplo n.º 3
0
        public AwarenessController(AbstractPlatform platform)
        {
            Platform = platform;
            Platform.ApplicationLaunched += ApplicationLaunched;
            Platform.ApplicationWillQuit += ApplicationWillQuit;

            BreakTimer = new BreakTimer (Platform);
            BreakTimer.BreakSuggested += BreakSuggested;

            BowlPlayer = new BowlPlayer (Platform);
        }
Exemplo n.º 4
0
        public BreakTimer(AbstractPlatform platform)
        {
            Platform = platform;
            Platform.SystemResumed += delegate {
                Log.Info("System resumed, waking UpdateThread...");
                CheckNowAsync();
            };

            LastBreak = LastBreakSuggested = platform.Clock.Now;
            IdleTimeAccumulatedSinceLastBreak = TimeSpan.Zero;
        }
        public AwarenessNotifyIconController(AbstractPlatform platform, AwarenessController controller)
        {
            Platform = platform;
            Platform.ApplicationWillQuit += ApplicationWillQuit;

            Controller = controller;
            Controller.BreakTimer.BreakChecked += BreakChecked;
            Controller.BreakTimer.BreakSuggested += BreakSuggested;

            Icon = new NotifyIcon {
                Visible = true,
                ContextMenu = BuildContextMenu (),
                Icon = new Icon (Platform.ResourceNamed ("bowl.ico"))
            };

            Icon.DoubleClick += (sender, args) => DoubleClick.Raise (this);
            Icon.BalloonTipClicked += BalloonTipClicked;
        }
Exemplo n.º 6
0
 public iTunes(AbstractPlatform platform)
 {
     Platform = platform;
     iTunesGoQuietScript = Platform.ResourceNamed ("iTunesGoQuiet.as");
 }
Exemplo n.º 7
0
 public TimeTextFieldController(AbstractPlatform platform, NSTextField field, string name)
 {
     Platform = platform;
     Field = field;
     Name = name;
 }
Exemplo n.º 8
0
 public BreakTimeTextFieldController(AbstractPlatform platform, NSTextField field)
     : base(platform, field, "Break time")
 {
 }
Exemplo n.º 9
0
        public static IDictionary<NSTextField, TimeTextFieldController> BuildControllers(AbstractPlatform platform, NSTextField work, NSTextField break_)
        {
            var breakController = new BreakTimeTextFieldController (platform, break_);
              var workController = new WorkTimeTextFieldController (platform, work);

              breakController.Other = workController;
              workController.Other = breakController;

              return new Dictionary<NSTextField,TimeTextFieldController> { {work, workController}, {break_, breakController} };
        }
Exemplo n.º 10
0
 public BowlPlayer(AbstractPlatform platform)
 {
     Platform = platform;
     BowlSoundPath = Platform.ResourceNamed ("bowl.wav");
 }
Exemplo n.º 11
0
 public BowlPlayer(AbstractPlatform platform)
 {
     Platform      = platform;
     BowlSoundPath = Platform.ResourceNamed("bowl.wav");
 }