コード例 #1
0
ファイル: BreakTimer.cs プロジェクト: kelegorm/awareness
        public BreakTimer(AbstractPlatform platform)
        {
            Platform = platform;
            Platform.SystemResumed += delegate {
                Log.Info ("System resumed, waking UpdateThread...");
                CheckNowAsync ();
            };

            LastBreak = LastBreakSuggested = platform.Clock.Now;
            IdleTimeAccumulatedSinceLastBreak = TimeSpan.Zero;
        }
コード例 #2
0
        public AwarenessController(AbstractPlatform platform)
        {
            Platform = platform;
            Platform.ApplicationLaunched += ApplicationLaunched;
            Platform.ApplicationWillQuit += ApplicationWillQuit;

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

            BowlPlayer = new BowlPlayer(Platform);
        }
コード例 #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);
        }
コード例 #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;
        }
コード例 #5
0
        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;
        }
コード例 #6
0
ファイル: iTunes.cs プロジェクト: kelegorm/awareness
 public iTunes(AbstractPlatform platform)
 {
     Platform = platform;
     iTunesGoQuietScript = Platform.ResourceNamed ("iTunesGoQuiet.as");
 }
コード例 #7
0
 public TimeTextFieldController(AbstractPlatform platform, NSTextField field, string name)
 {
     Platform = platform;
     Field = field;
     Name = name;
 }
コード例 #8
0
 public BreakTimeTextFieldController(AbstractPlatform platform, NSTextField field)
     : base(platform, field, "Break time")
 {
 }
コード例 #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} };
        }
コード例 #10
0
ファイル: BowlPlayer.cs プロジェクト: kelegorm/awareness
 public BowlPlayer(AbstractPlatform platform)
 {
     Platform = platform;
     BowlSoundPath = Platform.ResourceNamed ("bowl.wav");
 }
コード例 #11
0
 public BowlPlayer(AbstractPlatform platform)
 {
     Platform      = platform;
     BowlSoundPath = Platform.ResourceNamed("bowl.wav");
 }