//private void OnSettingsWindowLoaded(object sender, RoutedEventArgs e) //{ // //applyButton.Click += //} private void SetTimeMinutes() { ConfigurationModel configuration = ConfigurationModel.GetInstance(); leftTimeMinute.Content = (int)configuration.LeftTime.TotalMinutes; breakTimeMinute.Content = (int)configuration.BreakTime.TotalMinutes; }
private void ApplyButtonClick(object sender, RoutedEventArgs e) { TimeSpan leftTime = TimeSpan.FromMinutes(Convert.ToDouble(leftTimeMinute.Content)); TimeSpan breakTime = TimeSpan.FromMinutes(Convert.ToDouble(breakTimeMinute.Content)); ConfigurationModel configuration = ConfigurationModel.GetInstance(); configuration.LeftTime = leftTime; configuration.BreakTime = breakTime; }
public MainViewModel() : this(ConfigurationModel.GetInstance()) { }
public SettingsViewModel() : this(ConfigurationModel.GetInstance()) { }