public SettingsController(Window owner, Settings settings) { mSettings = settings; mView = new SettingsView(); mViewModel = new SettingsViewModel(mSettings); RegisterCommands(); mView.Owner = owner; mView.WindowStartupLocation = WindowStartupLocation.CenterOwner; mView.DataContext = mViewModel; }
public SettingsViewModel(Settings settings) { mSettings = settings; Password = mSettings.Password; StandardPath = mSettings.DefaultPath; SelectedEncryptionMethod = mSettings.SelectedEncryptionMethod ?? mSettings.EncryptionMethods.FirstOrDefault(); SelectedSteganographicMethod = mSettings.SelectedSteganographicMethod ?? mSettings.SteganographicMethods.FirstOrDefault(); }
private void LoadConfig() { mSettings = Settings.Instance; }