private void cmbAccent_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cmbAccent.SelectedItem != null) { ViewModel.TsunamiViewModel tvm = (ViewModel.TsunamiViewModel)FindResource("TsunamiVM"); Models.Preferences.ColorItem ci = (Models.Preferences.ColorItem)cmbAccent.SelectedItem; tvm.Preference.AccentColor = ci.Name; } }
private void DownloadFolder_Click(object sender, RoutedEventArgs e) { string path = Classes.Utils.RetrieveDirectory(); if (!string.IsNullOrWhiteSpace(path)) { ViewModel.TsunamiViewModel tvm = (ViewModel.TsunamiViewModel)FindResource("TsunamiVM"); tvm.Preference.PathDownload = path; } }
public Loading() { InitializeComponent(); Loaded += Splash_Loaded; tvm = (ViewModel.TsunamiViewModel)FindResource("TsunamiVM"); }
private void confCancel_Click(object sender, RoutedEventArgs e) { ViewModel.TsunamiViewModel tvm = (ViewModel.TsunamiViewModel)FindResource("TsunamiVM"); tvm.Preference.reloadPreferenceFromFile(); }
private void confApply_Click(object sender, RoutedEventArgs e) { ViewModel.TsunamiViewModel tvm = (ViewModel.TsunamiViewModel)FindResource("TsunamiVM"); tvm.Preference.savePreferenceToFile(); }