public virtual void InitializeSettingsScreen(SettingsScreenViewModel viewModel) { // This is called when a SettingsScreenViewModel is created viewModel.Apply.Action = this.ApplyHandler; viewModel.Default.Action = this.DefaultHandler; SettingsScreenViewModelManager.Add(viewModel); }
/* * Home Work: implement this command so, that settings are reverted to default values. * Hint: Declare default settings in the SettingsService. * Don't forget to update both SettingsService and SettingsScreen */ public override void Default(SettingsScreenViewModel viewModel) { base.Default (viewModel); viewModel.Volume = SettingsService.Volume = SettingsService.DefaultVolume; viewModel.Resolution = SettingsService.Resolution = SettingsService.DefaultResolution; }
public override void Apply(SettingsScreenViewModel viewModel) { base.Apply(viewModel); /* Pass selected values to the service */ SettingsService.Resolution = viewModel.Resolution; SettingsService.Volume = viewModel.Volume; }
public override void Apply(SettingsScreenViewModel viewModel) { base.Apply (viewModel); /* Pass selected values to the service */ SettingsService.Resolution = viewModel.Resolution; SettingsService.Volume = viewModel.Volume; }
public override void InitializeSettingsScreen(SettingsScreenViewModel viewModel) { base.InitializeSettingsScreen(viewModel); /* Add known resolutions to the list */ viewModel.AvailableResolutions.AddRange(SettingsService.AvailableResolutions); /* Setup current resolution */ viewModel.Resolution = SettingsService.Resolution; /* Setup volume */ viewModel.Volume = SettingsService.Volume; }
public override void InitializeSettingsScreen(SettingsScreenViewModel viewModel) { base.InitializeSettingsScreen (viewModel); /* Add known resolutions to the list */ viewModel.AvailableResolutions.AddRange (SettingsService.AvailableResolutions); /* Setup current resolution */ viewModel.Resolution = SettingsService.Resolution; /* Setup volume */ viewModel.Volume = SettingsService.Volume; }
public virtual void Default(SettingsScreenViewModel viewModel) { }
public virtual void Apply(SettingsScreenViewModel viewModel) { }
/* * Home Work: implement this command so, that settings are reverted to default values. * Hint: Declare default settings in the SettingsService. * Don't forget to update both SettingsService and SettingsScreen */ public override void Default(SettingsScreenViewModel viewModel) { base.Default(viewModel); viewModel.Volume = SettingsService.Volume = SettingsService.defaultVolume; viewModel.Resolution = SettingsService.Resolution; }