private void Button_Click(object sender, RoutedEventArgs e) { var f = new FolderBrowserDialog(); f.SelectedPath = SettingConfiguration.GetStringValue("BackupPath"); f.ShowDialog(); if (f != null && !string.IsNullOrEmpty(f.SelectedPath)) { SettingConfiguration.UpdateKey("BackupPath", f.SelectedPath); vm.DataPath = f.SelectedPath + vm.GetFileName(); } }
public BackUpViewModel() { MyTitle = "Backup Data"; this.OnError += BackUpViewModel_OnError; this.OnComplete += BackUpViewModel_OnComplete; TotalData = 100; ProgressValue = 0; var path = SettingConfiguration.GetStringValue("BackupPath"); if (!string.IsNullOrEmpty(path)) { DataPath = path + GetFileName(); } }