Exemplo n.º 1
0
        public MainWindowVM()
        {
            CoverVisiblity             = Visibility.Collapsed;
            FreezeBtn                  = new NoConditionCMD(pressFreezeBtn);
            RepeatAlarmBtn             = new NoConditionCMD(pressConfirmBtn);
            Blocker.AlarmOverCallBack  = TimeOverCallBack;
            Blocker.RepeatOverCallBack = () => CoverVisiblity = Visibility.Collapsed;

            if (Properties.Settings.Default.IsRunning && Properties.Settings.Default.IsStrong)
            {
                Tick = Properties.Settings.Default.InitialedTick;
                Blocker.StartBlocking(Properties.Settings.Default.OverTime.Subtract(DateTime.Now).TotalMilliseconds);
            }
        }
Exemplo n.º 2
0
 private void pressFreezeBtn(Object obj)
 {
     Blocker.StartBlocking(Tick * TimePerTick * 60000);
     CoverVisiblity     = Visibility.Visible;
     CoverBtnVisibility = Visibility.Collapsed;
 }