private void ConfigManagerUI_FormClosing(Object sender, FormClosingEventArgs e) { if (conf.autosync == 1) { syncController.InitializeAutoSync(); } }
private void btn_autosync_Click(object sender, RibbonControlEventArgs e) { if (_syncController.GetAutosync() == false) { if (_config.calendarName != null) { btn_autosync.Label = "Deactivate"; _confManager.SetAutoSync(1); } _syncController.InitializeAutoSync(); } else if (_syncController.GetAutosync() == true) { _confManager.SetAutoSync(0); _syncController.StopSync(); btn_autosync.Label = "Activate"; } }
private void SyncRibbon_Load(object sender, RibbonUIEventArgs e) { _confManager = new ConfigurationManager(); _config = _confManager.GetConfig(); _syncController = new SyncController(_confManager); if (_config.autosync == 1) { _syncController.InitializeAutoSync(); btn_autosync.Label = "Deactivate"; } else { _syncController.InitializeSync(); } updateInterval = (_confManager.GetUpdateInterval() / 1000); edb_interval.Text = updateInterval.ToString(); }