示例#1
0
 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;
        }
示例#3
0
        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;
        }
示例#5
0
        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;
        }
示例#7
0
 public virtual void Default(SettingsScreenViewModel viewModel)
 {
 }
示例#8
0
 public virtual void Apply(SettingsScreenViewModel viewModel)
 {
 }
示例#9
0
        /*
         * 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;
        }
 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);
 }
 public virtual void Default(SettingsScreenViewModel viewModel)
 {
 }
 public virtual void Apply(SettingsScreenViewModel viewModel)
 {
 }