示例#1
0
        static Notifications()
        {
            _api = new GitHubApi("0c8114842aa3da6959e3", "1e2052e4699998bad9d9fe61160e35048e103240");
            _api.SetAuthenticationToken(SettingsStore.GetPat());

            /*_timer = NSTimer.CreateRepeatingTimer (new TimeSpan (0, 1, 0), delegate {
             *      DoNotificationCheck();
             *      Console.WriteLine("Timer Ran");
             * });*/
            _timer          = new Timer(60 * 1000);
            _timer.Elapsed += delegate {
                DoNotificationCheck();
                Console.WriteLine("Timer Ran");
            };
            _timer.Start();
        }
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();

            NSCellStateValue value;

            if (SettingsStore.GetStartAtLogon())
            {
                value = NSCellStateValue.On;
            }
            else
            {
                value = NSCellStateValue.Off;
            }

            StartAtLoginCheckbox.State = value;
        }
 partial void StartAtLoginChange(MonoMac.Foundation.NSObject sender)
 {
     SettingsStore.SetStartAtLogon(StartAtLoginCheckbox.State == NSCellStateValue.On);
 }
示例#4
0
 public static void UpdateApiToken()
 {
     _api.SetAuthenticationToken(SettingsStore.GetPat());
 }