コード例 #1
0
 public SettingsController(IContainer container)
 {
     _container              = container;
     _dcsWorldService        = container.Resolve <IDcsWorldService>();
     _settingsService        = container.Resolve <ISettingsService>();
     _profileSettingsService = container.Resolve <IProfileSettingsService>();
 }
コード例 #2
0
 public SelectInitialViewportsWizardStepViewModel(IContainer container)
     : base(container)
 {
     _settingsService        = container.Resolve <ISettingsService>();
     _dcsWorldService        = container.Resolve <IDcsWorldService>();
     _profileSettingsService = container.Resolve <IProfileSettingsService>();
 }
コード例 #3
0
        public GameViewModel(IContainer container)
        {
            DcsProcessMonitor.Instance.DcsProcessExited += OnDcsProcessExited;

            _container  = container;
            _controller = container.Resolve <GameController>();

            _settingsService = _container.Resolve <ISettingsService>();
            _dcsWorldService = container.Resolve <IDcsWorldService>();

            IsUpdateAvailable =
                IsDcsOutOfDate.AsObservable().Merge(
                    IsCheckingLatestVersion.AsObservable().Merge(
                        IsLoading.AsObservable().Merge(
                            FailedVersionCheck.AsObservable()))).Select(_ => IsDcsOutOfDate.Value && !IsLoading.Value && !IsCheckingLatestVersion.Value && !FailedVersionCheck.Value)
                .ToReactiveProperty();

            var canPlayObservable =
                SelectedInstall
                .Select(_ => Unit.Default)
                .Merge(IsPlayingDcs.Select(_ => Unit.Default))
                .Merge(IsUpdateAvailable.Select(_ => Unit.Default)).Select(_ => CanLaunchDcs());

            LaunchDcsCommand = canPlayObservable.ToReactiveCommand();

            SelectInstallCommand.Subscribe(OnSelectInstall);
            UpdateDcsCommand.Subscribe(OnUpdateDcs);
            RepairDcsCommand.Subscribe(OnRepairDcs);
            LaunchDcsCommand.Subscribe(OnLaunchDcs);
            CheckForUpdatesCommand.Subscribe(OnCheckForUpdates);
            ShowNewsArticleCommand.Subscribe(OnShowNewsArticle);
            CleanShadersCommand.Subscribe(OnCleanShaders);

            IsVREnabled.Subscribe(OnIsVREnabledChanged);

            _checkPlayingTimer          = new DispatcherTimer();
            _checkPlayingTimer.Interval = TimeSpan.FromSeconds(1);
            _checkPlayingTimer.Tick    += OnCheckPlayingTimerTick;
            _checkPlayingTimer.Start();
        }
コード例 #4
0
 public SupportController(IContainer container)
 {
     _settingsService = container.Resolve <ISettingsService>();
     _dcsWorldService = container.Resolve <IDcsWorldService>();
 }
コード例 #5
0
 public ManualsController(IContainer container)
 {
     _dcsWorldService = container.Resolve <IDcsWorldService>();
 }
コード例 #6
0
 public SelectViewportsWizardStepViewModel(IContainer container, ModuleViewportTemplate[] templates)
     : base(container)
 {
     _templates       = templates;
     _dcsWorldService = container.Resolve <IDcsWorldService>();
 }