コード例 #1
0
 private void checkSettingsExist()
 {
     if (isUpdate == null)
     {
         isUpdate          = new Settings();
         isUpdate.Parametr = "updateCalendar";
     }
     if (timer == null)
     {
         timer          = new Settings();
         timer.Parametr = "timerCalendar";
     }
 }
コード例 #2
0
        private void Fill()
        {
            this.Title = "Обновление календаря";
            var settings = UoW.Session.QueryOver <Settings>().List();

            isUpdate = settings.FirstOrDefault(x => x.Parametr == "updateCalendar");
            if (isUpdate != null)
            {
                ycheckbutton.Active = bool.Parse(isUpdate.ValueSettting);
            }
            timer = settings.FirstOrDefault(x => x.Parametr == "timerCalendar");
            if (timer != null)
            {
                yspinbutton.Value = double.Parse(timer.ValueSettting);
            }
        }