Пример #1
0
        public LaunchViewModel(
            ConfigService configService,
            ThemeService themeService,
            VersionService versionService,
            LibraryService libraryService,
            AssetService assetService,
            AccountService accountService,
            AuthService authService,
            AuthlibInjectorService authlibInjectorService,
            LaunchService launchService,
            DownloadService downloadService,
            LogService logService,

            IWindowManager windowManager,
            GreetingViewModel greetingVM,
            VersionsManagementViewModel versionsVM,
            LaunchStatusViewModel statusVM,
            AccountEditViewModel accountEditVM,
            DownloadStatusViewModel downloadVM,
            ErrorReportViewModel errorReportVM,
            ProfileSelectViewModel profileSelectVM)
        {
            _windowManager = windowManager;
            _config        = configService.Entries;

            _versionService         = versionService;
            _libraryService         = libraryService;
            _assetService           = assetService;
            _accountService         = accountService;
            _authService            = authService;
            _authlibInjectorService = authlibInjectorService;
            _launchService          = launchService;
            _downloadService        = downloadService;
            _logService             = logService;

            _statusVM         = statusVM;
            _accountEditVM    = accountEditVM;
            _profileSelectVM  = profileSelectVM;
            _downloadStatusVM = downloadVM;
            _errorReportVM    = errorReportVM;

            _launchService.Exited += OnGameExited;

            _versionService.Loaded  += hasAny => HasVersion = hasAny;
            _versionService.Created += _ => HasVersion = true;

            _statusVM.Closed += (sender, e) => OnLaunchCompleted();

            ThemeService = themeService;
            GreetingVM   = greetingVM;
            VersionsVM   = versionsVM;
        }
Пример #2
0
 public LaunchesController(LaunchService launchService)
 {
     _launchService = launchService;
 }