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); }
public AwarenessController(AbstractPlatform platform) { Platform = platform; Platform.ApplicationLaunched += ApplicationLaunched; Platform.ApplicationWillQuit += ApplicationWillQuit; BreakTimer = new BreakTimer (Platform); BreakTimer.BreakSuggested += BreakSuggested; BowlPlayer = new BowlPlayer (Platform); }
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; }
public iTunes(AbstractPlatform platform) { Platform = platform; iTunesGoQuietScript = Platform.ResourceNamed ("iTunesGoQuiet.as"); }
public TimeTextFieldController(AbstractPlatform platform, NSTextField field, string name) { Platform = platform; Field = field; Name = name; }
public BreakTimeTextFieldController(AbstractPlatform platform, NSTextField field) : base(platform, field, "Break time") { }
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} }; }
public BowlPlayer(AbstractPlatform platform) { Platform = platform; BowlSoundPath = Platform.ResourceNamed ("bowl.wav"); }
public BowlPlayer(AbstractPlatform platform) { Platform = platform; BowlSoundPath = Platform.ResourceNamed("bowl.wav"); }