コード例 #1
0
        public SettingsWindow(
            ISettingsViewModel viewModel)
        {
            InitializeComponent();

            DataContext = viewModel;
        }
コード例 #2
0
 public SettingsOverview(ISettingsViewModel viewmodel)
 {
     InitializeComponent();
     ShouldClose = false;
     _viewmodel = viewmodel;
     this.Closing += SettingsOverview_Closing;
     this.Loaded += SettingsOverview_Loaded;
 }
コード例 #3
0
        public SettingsModule(ISettingsViewModel vm)
            : this()
        {
            DataContext = vm;

            _navigationContent = (FrameworkElement)FindResource("BackButton");
            _navigationContent.DataContext = vm;
        }
コード例 #4
0
 public GithubExplorerRibbon(
     ITaskPaneContentHost contentHost, 
     ISettingsViewModel settingsViewModel, 
     Func<ICreateIssueViewModel> createIssuesViewModelFactory)
 {
     this.contentHost = contentHost;
     this.settingsViewModel = settingsViewModel;
     this.createIssuesViewModelFactory = createIssuesViewModelFactory;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the DownloadMovieViewModel class.
 /// </summary>
 /// <param name="movieService">Instance of MovieService</param>
 /// <param name="settingsViewModel">Instance of SettingsViewModel</param>
 /// <param name="movieSettingsViewModel">Instance of MovieSettingsViewModel</param>
 public DownloadMovieViewModel(IMovieService movieService, ISettingsViewModel settingsViewModel,
     IMovieSettingsViewModel movieSettingsViewModel)
 {
     _movieService = movieService;
     _settingsViewModel = settingsViewModel;
     _cancellationDownloadingMovie = new CancellationTokenSource();
     MovieSettings = movieSettingsViewModel;
     RegisterMessages();
     RegisterCommands();
 }
コード例 #6
0
ファイル: MediaViewer.xaml.cs プロジェクト: Zargess/VHKPlayer
 public MediaViewer(ISettingsViewModel viewmodel, IVideoPlayerController controller)
 {
     InitializeComponent();
     ShouldClose = false;
     this.Closing += MediaViewer_Closing;
     this.Loaded += MediaViewer_Loaded;
     this.View.Video.MediaEnded += (sender, ee) => controller.PlayQueue();
     _viewmodel = viewmodel;
     _viewmodel.PropertyChanged += SettingsChanged;
 }
コード例 #7
0
 public CameraSettingsViewModel(Logger logger)
 {
     Settings = new ISettingsViewModel[]
     {
         // Camera Time
         new SettingViewModel<CommandCameraSetTime>("Camera Time", SettingType.Single, new string[] {},
             (command, value) => command.Set(DateTime.Now),
             camera => null, logger),
         // Camera Default Mode
         new SettingViewModel<CommandCameraDefaultMode>("Camera Default Mode", SettingType.Multi,
             EnumUtils.GetEnumValues<Mode>(),
             (command, value) => command.Select(EnumUtils.ParseValue<Mode>(value)),
             camera => camera.SettingsCache().OnDefault.ToString(), logger),
         // Camera Mode
         new SettingViewModel<CommandCameraMode>("Camera Mode", SettingType.Multi,
             EnumUtils.GetEnumValues<Mode>(),
             (command, value) => command.Select(EnumUtils.ParseValue<Mode>(value)),
             camera => camera.SettingsCache().Mode.ToString(), logger),
         // Camera Photo Resolution
         new SettingViewModel<CommandCameraPhotoResolution>("Photo Resolution", SettingType.Multi,
             EnumUtils.GetEnumValues<PhotoResolution>(),
             (command, value) => command.Select(EnumUtils.ParseValue<PhotoResolution>(value)),
             camera => camera.SettingsCache().PhotoResolution.ToString(), logger),
         // Camera Video Resolution
         new SettingViewModel<CommandCameraVideoResolution>("Video Resolution", SettingType.Multi,
             EnumUtils.GetEnumValues<VideoResolution>(),
             (command, value) => command.Select(EnumUtils.ParseValue<VideoResolution>(value)),
             camera => camera.ExtendedSettingsCache().VideoResolution.ToString(), logger),
         // Camera Time Lapse
         new SettingViewModel<CommandCameraTimeLapse>("Time Lapse", SettingType.Multi,
             EnumUtils.GetEnumValues<TimeLapse>(),
             (command, value) => command.Select(EnumUtils.ParseValue<TimeLapse>(value)),
             camera => camera.SettingsCache().TimeLapse.ToString(), logger),
         // Camera Burst Rate
         new SettingViewModel<CommandCameraBurstRate>("Burst Rate", SettingType.Multi,
             EnumUtils.GetEnumValues<BurstRate>(),
             (command, value) => command.Select(EnumUtils.ParseValue<BurstRate>(value)),
             camera => camera.ExtendedSettingsCache().BurstRate.ToString(), logger),
         // Camera Video Standard
         new SettingViewModel<CommandCameraVideoStandard>("Video Standard", SettingType.Multi,
             EnumUtils.GetEnumValues<VideoStandard>(),
             (command, value) => command.Select(EnumUtils.ParseValue<VideoStandard>(value)),
             camera => camera.SettingsCache().VideoStandard.ToString(), logger),
         // Camera Beep Sound
         new SettingViewModel<CommandCameraBeepSound>("Beep Sound", SettingType.Multi,
             EnumUtils.GetEnumValues<BeepSound>(),
             (command, value) => command.Select(EnumUtils.ParseValue<BeepSound>(value)),
             camera => camera.SettingsCache().BeepSound.ToString(), logger),
         // Camera Led Blink
         new SettingViewModel<CommandCameraLedBlink>("Led Blink", SettingType.Multi,
             EnumUtils.GetEnumValues<BeepSound>(),
             (command, value) => command.Select(EnumUtils.ParseValue<LedBlink>(value)),
             camera => camera.SettingsCache().LedBlink.ToString(), logger)
     };
 }
コード例 #8
0
 public InstallArgumentProcessor(
     IProcessManager processManager,
     ICertificateManager certificateManager,
     ISignHelper signHelper,
     IEnvironmentInformation environmentInformation,
     ISettingsViewModel settingsViewModel)
 {
     this.processManager = processManager;
     this.certificateManager = certificateManager;
     this.signHelper = signHelper;
     this.environmentInformation = environmentInformation;
     this.settingsViewModel = settingsViewModel;
 }
コード例 #9
0
ファイル: SettingsDialog.xaml.cs プロジェクト: LionFree/Cush
        public SettingsDialog(ISettingsViewModel vm, CushWindow owningWindow, DialogSettings settings)
            : base(owningWindow, settings)
        {
            DataContext = vm;
            InitializeComponent();
            _originalScheme = new ColorScheme(this.ColorScheme);

            if (vm.ConfigFileHasPassword)
                InitializePassword();

            //Apply.IsEnabled = false;

            var cvs = CollectionViewSource.GetDefaultView(FontCombo.ItemsSource);
            cvs.SortDescriptions.Clear();
            cvs.SortDescriptions.Add(new SortDescription("Source", ListSortDirection.Ascending));
            cvs.Refresh();
        }
コード例 #10
0
        public NavigationContentViewModel(ISettingsViewModel settingsViewModel, IMessageBus bus)
        {
            _settingsViewModel = settingsViewModel;
            bus.Listen<AppUpdateAvailableMessage>().SubscribeOnceUI(_ =>
                {
                    ShowUpdate = true;
                });
            bus.Listen<AppUpdateProgressMessage>().SubscribeUI(msg =>
                {
                    ShowProgress = true;
                    ShowUpdate = false;
                    ProgressValue = msg.ProgressPercentage;
                });

            StartUpdateCommand = new ReactiveCommand();
            bus.RegisterMessageSource(StartUpdateCommand.Select(c => new RequestAppUpdateMessage()));
        }
コード例 #11
0
ファイル: MainViewModel.cs プロジェクト: sat-dev/MySamples
        public MainViewModel(IMainModel mainModel, ISettingsViewModel settingsViewModel,
            IDownloadsViewModel downloadsViewModel,
            ILogger logger)
        {
            if (mainModel == null)
                throw new ArgumentNullException("mainModel");
            if (settingsViewModel == null)
                throw new ArgumentNullException("settingsViewModel");
            if (downloadsViewModel == null)
                throw new ArgumentNullException("downloadsViewModel");
            if (logger == null)
                throw new ArgumentNullException("logger");

            this.mainModel = mainModel;
            this.settingsViewModel = settingsViewModel;
            this.downloadsViewModel = downloadsViewModel;
            this.logger = logger;
        }
コード例 #12
0
 public UnitTestSettings(ISettingsViewModel vm)
     : this()
 {
     DataContext = vm;
 }
コード例 #13
0
 public IndenterSettings(ISettingsViewModel vm)
     : this()
 {
     DataContext = vm;
 }
コード例 #14
0
 public SaveCommand(ISettingsViewModel settings)
 {
     _settings = settings;
     _settings.PropertyChanged += SettingsPropertyChanged;
 }
コード例 #15
0
 public SettingsWindowFactory(
     ISettingsViewModel viewModel)
 {
     this.viewModel = viewModel;
 }
コード例 #16
0
 public GithubExplorerRibbon(ISettingsViewModel settingsViewModel, ICreateIssueViewModel createIssuesViewModel)
 {
     this.settingsViewModel = settingsViewModel;
     this.createIssuesViewModel = createIssuesViewModel;
 }
コード例 #17
0
 public GeneralSettings(ISettingsViewModel vm) : this()
 {
     DataContext = vm;
 }
コード例 #18
0
 public InspectionSettings(ISettingsViewModel vm) : this()
 {
     DataContext = vm;
 }
コード例 #19
0
ファイル: SaveSettings.cs プロジェクト: AKorets/YAPA
 /// <summary>
 /// Creates a new instance of this command.
 /// </summary>
 /// <param name="host">The hosting Window control</param>
 public SaveSettings(ISettingsViewModel host)
 {
     _host = host;
 }
コード例 #20
0
ファイル: SelfwinApp.cs プロジェクト: gleroi/selfnet
        public async Task SaveSettings(ISettingsViewModel settings)
        {
            var newSettings = new SelfWinSettings(settings.Url, settings.Port, settings.Username, settings.Password);

            SaveToApplicationData(newSettings);

            await ValidateSettings();
        }