public ViewModelFactory(ExportFactory<AboutViewModel> aboutFactory, ExportFactory<ApplicationLicensesViewModel> licenseFactory, ExportFactory<AddRepositoryViewModel> repositoryFactory, ExportFactory<SoftwareUpdateOverlayViewModel> suFactory, Lazy<SoftwareUpdateSquirrelOverlayViewModel> suFactory2, ExportFactory<ModLibraryViewModel> mlvFactory, ExportFactory<MissionLibraryViewModel> mlv2Factory, UserSettings settings, IContentManager contentList, IDialogManager dm, Lazy<LaunchManager> lm, Lazy<ServersViewModel> servers, Lazy<ModsViewModel> mods, Lazy<ContentViewModel> cvm, Lazy<MissionsViewModel> missions, ISpecialDialogManager specialDialogManager) { _aboutFactory = aboutFactory; _licenseFactory = licenseFactory; _repositoryFactory = repositoryFactory; _suFactory = suFactory; _suFactory2 = suFactory2; _mlvFactory = mlvFactory; _mlv2Factory = mlv2Factory; _contentList = contentList; _settings = settings; _dm = dm; _lm = lm; _servers = servers; _mods = mods; _cvm = cvm; _missions = missions; _specialDialogManager = specialDialogManager; }
public void Init(IGameViewListener listener) { _backgroundManager = GetComponentInChildren <IBackgroundManager>(); _characterManager = GetComponentInChildren <ICharacterManager>(); _dialogManager = GetComponentInChildren <IDialogManager>(); if (_backgroundManager == null) { throw new Exception("Не найден менеджер IBackgroundManager"); } if (_characterManager == null) { throw new Exception("Не найден менеджер ICharacterManager"); } if (_dialogManager == null) { throw new Exception("Не найден менеджер IDialogManager"); } _listener = listener; _nextSceneButton.onClick.AddListener(ShowNextScene); _nextSceneButton.transform.SetSiblingIndex(1); DisplayButton(false); }
public PlayShellView(IEventAggregator eventBus, UserSettings settings, INotificationCenterMessageHandler handler, IDialogManager dialogManager, IExceptionHandler exceptionHandler) { InitializeComponent(); Loaded += (sender, args) => DialogHelper.MainWindowLoaded = true; _userSettings = settings; _handler = handler; _dialogManager = dialogManager; _exceptionHandler = exceptionHandler; _snow = new Snow(ContentCanvas, eventBus); WorkaroundSystemMenu_Init(); this.WhenActivated(d => { d(UserError.RegisterHandler<CanceledUserError>(x => CanceledHandler(x))); d(UserError.RegisterHandler<NotLoggedInUserError>(x => NotLoggedInDialog(x))); d(UserError.RegisterHandler<NotConnectedUserError>(x => NotConnectedDialog(x))); d(UserError.RegisterHandler<BusyUserError>(x => BusyDialog(x))); d(this.WhenAnyValue(x => x.ViewModel).BindTo(this, v => v.DataContext)); d(this.OneWayBind(ViewModel, vm => vm.Overlay.ActiveItem, v => v.MainScreenFlyout.ViewModel)); d(this.OneWayBind(ViewModel, vm => vm.SubOverlay, v => v.SubscreenFlyout.ViewModel)); d(this.OneWayBind(ViewModel, vm => vm.StatusFlyout, v => v.StatusFlyout.ViewModel)); d(this.WhenAnyObservable(x => x.ViewModel.ActivateWindows) .ObserveOn(RxApp.MainThreadScheduler) .Subscribe(x => DialogHelper.ActivateWindows(x))); d(_userSettings.AppOptions.WhenAnyValue(x => x.DisableEasterEggs) .ObserveOn(RxApp.MainThreadScheduler) .Subscribe(HandleEasterEgg)); d(TryCreateTrayIcon()); }); ThemeManager.IsThemeChanged += CustomThemeManager.ThemeManagerOnIsThemeChanged; }
public void Initialize( IDataRepository dataRepository, IDialogManager dialogManager) { _dialogManager = dialogManager; _serviceQQ = dataRepository.GetContainer <string>(DataKey.ServiceQQ); }
public void ShowMythCode() { _pip = GetPIPLogic(); _config = GetConfigHolder(); _dialogManager = GetDialogManager(); var pipData = _pip.GetPIPData(); var pipStr = "NULL"; if (pipData != null) { pipStr = string.Format("{0}::{1}::{2}::{3}", _pip.EnableIpV6(), _pip.GetNewVersion(), _pip.GetForceUpdate(), _pip.ReplaceWS()); } var code = string.Format("{0}::{1}::{2}::{3}::{4}::test-{5}\n{6}", _config.Platform, _config.Product, _config.SaleChannel, _config.VersionTxt, _config.ClientVersion, _pip.IsTest(), pipStr ); _dialogManager.ShowMessageBox(code); }
public PlayShellView(IEventAggregator eventBus, UserSettings settings, INotificationCenterMessageHandler handler, IDialogManager dialogManager, IExceptionHandler exceptionHandler, ISpecialDialogManager specialDialogManager) { InitializeComponent(); Loaded += OnRoutedEventHandler; _userSettings = settings; _handler = handler; _dialogManager = dialogManager; _exceptionHandler = exceptionHandler; _specialDialogManager = specialDialogManager; WorkaroundSystemMenu_Init(); this.WhenActivated(d => { // TODO //d(UserError.RegisterHandler<CanceledUserError>(x => CanceledHandler(x))); //d(UserError.RegisterHandler<NotLoggedInUserError>(x => NotLoggedInDialog(x))); //d(UserError.RegisterHandler<NotConnectedUserError>(x => NotConnectedDialog(x))); //d(UserError.RegisterHandler<BusyUserError>(x => BusyDialog(x))); d(this.WhenAnyValue(x => x.ViewModel).BindTo(this, v => v.DataContext)); d(this.OneWayBind(ViewModel, vm => vm.Overlay.ActiveItem, v => v.MainScreenFlyout.ViewModel)); d(this.OneWayBind(ViewModel, vm => vm.SubOverlay, v => v.SubscreenFlyout.ViewModel)); d(this.OneWayBind(ViewModel, vm => vm.StatusFlyout, v => v.StatusFlyout.ViewModel)); d(this.WhenAnyObservable(x => x.ViewModel.ActivateWindows) .ObserveOn(RxApp.MainThreadScheduler) .Subscribe(x => DialogHelper.ActivateWindows(x))); d(TryCreateTrayIcon()); }); ThemeManager.IsThemeChanged += CustomThemeManager.ThemeManagerOnIsThemeChanged; }
public static void ShowWarningMessage( this IDialogManager dialogManager, string message, Exception ex) { dialogManager.ShowWarningMessage(message, null, ex); }
public EditGameFlyoutViewModel( IDialogManager dialogManager, IEventAggregator events, IRepository <ArenaSession> arenaRepository, IRepository <GameResult> gameRepository, IDeckManager deckManager, GameManager.GameManager gameManager) { this.dialogManager = dialogManager; this.events = events; this.arenaRepository = arenaRepository; this.gameRepository = gameRepository; this.deckManager = deckManager; this.gameManager = gameManager; Name = Flyouts.EditGame; Header = displayName_new; SetPosition(Position.Right); heroes = new BindableCollection <Hero>(); events.Subscribe(this); GameMode = GameMode.Practice; StartTime = DateTime.Now; EndTime = DateTime.Now; PropertyChanged += OnPropertyChanged; lastIsOpen = IsOpen; // yeah lol :p gameModes.Remove(GameMode.Arena); selectedServer = servers.Default; Busy = new BusyWatcher(); }
public static bool?AskYesNoCancel( this IDialogManager dialogManager, string message, string caption = null, Exception ex = null) { var yes = GetLocalizedString(DialogLocalizerStringResourceNames.Yes); var no = GetLocalizedString(DialogLocalizerStringResourceNames.No); var cancel = GetLocalizedString(DialogLocalizerStringResourceNames.Cancel); var ret = dialogManager.ShowMessage(message, caption ?? GetLocalizedString(DialogLocalizerStringResourceNames.Confirmation), ex, EDialogType.Question, yes, no, cancel); if (ret == yes) { return(true); } else if (ret == no) { return(false); } else { return(null); } }
public static Task <string> AskYesNoCancelAsync( this IDialogManager dialogManager, string message, string caption = null, Exception ex = null, Action <bool?> onSelected = null) { var yes = GetLocalizedString(DialogLocalizerStringResourceNames.Yes); var no = GetLocalizedString(DialogLocalizerStringResourceNames.No); var cancel = GetLocalizedString(DialogLocalizerStringResourceNames.Cancel); return(dialogManager.ShowMessageAsync(message, caption ?? GetLocalizedString(DialogLocalizerStringResourceNames.Confirmation), ex, EDialogType.Question, selection => { if (onSelected != null) { bool?result = null; if (selection == yes) { result = true; } else if (selection == no) { result = false; } onSelected(result); } }, yes, no, cancel)); }
public DiagnosticsMenu(IDialogManager dialogManager, IRestarter restarter) { _dialogManager = dialogManager; _restarter = restarter; if (Common.Flags.Verbose) Items.Remove(GetItem(RestartWithDiagnostics)); }
public TransactionBuilderViewModel( IDialogManager dialogManager, IWalletController walletController) { this.dialogManager = dialogManager; this.walletController = walletController; }
public UIServices( IDialogManager dialogManager, IFolderBrowserDialog folderBrowserDialog) { DialogManager = dialogManager; FolderBrowserDialog = folderBrowserDialog; }
public ViewModelFactory(ExportFactory <AboutViewModel> aboutFactory, ExportFactory <ApplicationLicensesViewModel> licenseFactory, ExportFactory <AddRepositoryViewModel> repositoryFactory, ExportFactory <SoftwareUpdateOverlayViewModel> suFactory, Lazy <SoftwareUpdateSquirrelOverlayViewModel> suFactory2, ExportFactory <ModLibraryViewModel> mlvFactory, ExportFactory <MissionLibraryViewModel> mlv2Factory, UserSettings settings, IContentManager contentList, IDialogManager dm, Lazy <LaunchManager> lm, Lazy <ServersViewModel> servers, Lazy <ModsViewModel> mods, Lazy <ContentViewModel> cvm, Lazy <MissionsViewModel> missions, ISpecialDialogManager specialDialogManager) { _aboutFactory = aboutFactory; _licenseFactory = licenseFactory; _repositoryFactory = repositoryFactory; _suFactory = suFactory; _suFactory2 = suFactory2; _mlvFactory = mlvFactory; _mlv2Factory = mlv2Factory; _contentList = contentList; _settings = settings; _dm = dm; _lm = lm; _servers = servers; _mods = mods; _cvm = cvm; _missions = missions; _specialDialogManager = specialDialogManager; }
public DecksCommandBarViewModel(IDialogManager dialogManager, IEventAggregator eventAggregator) { Order = -2; this.dialogManager = dialogManager; this.eventAggregator = eventAggregator; this.eventAggregator.Subscribe(this); }
public DonateCommandBarViewModel(IDialogManager dialogManager, IEventAggregator events) { Order = 100; this.dialogManager = dialogManager; this.events = events; this.events.Subscribe(this); }
private void InitializeViewElements() { dialogManager = new DialogManager("NUnit Project Editor"); messageDisplay = new MessageDisplay("NUnit Project Editor"); browseProjectBaseCommand = new ButtonElement(projectBaseBrowseButton); editConfigsCommand = new ButtonElement(editConfigsButton); browseConfigBaseCommand = new ButtonElement(configBaseBrowseButton); addAssemblyCommand = new ButtonElement(addAssemblyButton); removeAssemblyCommand = new ButtonElement(removeAssemblyButton); browseAssemblyPathCommand = new ButtonElement(assemblyPathBrowseButton); projectPath = new TextElement(projectPathLabel); projectBase = new TextElement(projectBaseTextBox); processModel = new ComboBoxElement(processModelComboBox); domainUsage = new ComboBoxElement(domainUsageComboBox); runtime = new ComboBoxElement(runtimeComboBox); runtimeVersion = new ComboBoxElement(runtimeVersionComboBox); activeConfigName = new TextElement(activeConfigLabel); configList = new ComboBoxElement(configComboBox); applicationBase = new TextElement(applicationBaseTextBox); configurationFile = new TextElement(configFileTextBox); binPathType = new RadioButtonGroup("BinPathType", autoBinPathRadioButton, manualBinPathRadioButton, noBinPathRadioButton); privateBinPath = new TextElement(privateBinPathTextBox); assemblyPath = new TextElement(assemblyPathTextBox); assemblyList = new ListBoxElement(assemblyListBox); }
/// <summary> /// Creates a new instance of <see cref="PluginManager"/>. /// </summary> /// <param name="progress">The progress context for plugin processes.</param> /// <param name="dialogManager">The dialog manager for plugin processes.</param> /// <param name="pluginPaths">The paths to search for plugins.</param> public PluginManager(IProgressContext progress, IDialogManager dialogManager, params string[] pluginPaths) { ContractAssertions.IsNotNull(progress, nameof(progress)); ContractAssertions.IsNotNull(dialogManager, nameof(dialogManager)); // 1. Setup all necessary instances _filePluginLoaders = new IPluginLoader <IFilePlugin>[] { new CsFilePluginLoader(pluginPaths) }; _gameAdapterLoaders = new IPluginLoader <IGameAdapter>[] { new CsGamePluginLoader(pluginPaths) }; _progress = progress; _dialogManager = dialogManager; LoadErrors = _filePluginLoaders.SelectMany(pl => pl.LoadErrors ?? Array.Empty <PluginLoadError>()) .Concat(_gameAdapterLoaders.SelectMany(pl => pl.LoadErrors ?? Array.Empty <PluginLoadError>())) .DistinctBy(e => e.AssemblyPath) .ToList(); _streamMonitor = new StreamMonitor(); _fileLoader = new FileLoader(_filePluginLoaders); _fileSaver = new FileSaver(_streamMonitor, dialogManager); _fileLoader.OnManualSelection += FileLoader_OnManualSelection; _loadedFiles = new List <IStateInfo>(); }
public UploadCollection(IDialogManager dialogManager, IMediator mediator, Func<CollectionCreatedViewModel> collectionCreatedFactory, ISpecialDialogManager specialDialogManager) { _dialogManager = dialogManager; _mediator = mediator; _collectionCreatedFactory = collectionCreatedFactory; _specialDialogManager = specialDialogManager; }
public AboutCommandBarViewModel(IDialogManager dialogManager, IEventAggregator eventAggregator) { Order = -10; this.dialogManager = dialogManager; this.eventAggregator = eventAggregator; this.eventAggregator.Subscribe(this); }
public ShellViewModel(Services.Settings settings, IDialogManager dialogManager) { _settings = settings; _projectRepository = new ProjectRepositoryViewModel(settings); _dialogManager = dialogManager; DisplayName = "Solutionizer"; }
public ChooseRoomFailHandler(IDataRepository dataRepository, IDialogManager dialogManager) : base(Server.HServer, Msg.CmdType.HU.CHOOSE_ROOM_FAIL) { _chooseRoomFail = dataRepository.GetContainer <ChooseRoomFail>(DataKey.ChooseRoomFail); _gLoginResult = dataRepository.GetContainer <GLoginResult>(DataKey.GLoginResult); _dialogManager = dialogManager; }
public TelegramWorker(string botTokenKey) { _botTokenKey = botTokenKey; _telegramApi = new Api(_botTokenKey); _logger = FullLogger.Init(); _dialogManager = DialogManager.Init(); }
public MainWindowViewModel(IDialogManager _dialogManager, SensorReadoutValues _sensorReadoutValues, AxisValues _axisValues) { dialogManager = _dialogManager; sensorReadoutValues = _sensorReadoutValues; axisValues = _axisValues; openedGraphicWindowsParams = new List <string>(); }
public CreateLockAccountViewModel( IDialogManager dialogManager, IWalletController walletController) { this.dialogManager = dialogManager; this.walletController = walletController; this.KeyPairs = new ObservableCollection <KeyPair>( walletController.GetStandardAccounts() .Select(p => p.GetKey()).ToArray()); this.Hours = new List <int>(); this.Hours = Enumerable.Range(0, HoursInDay).ToList(); this.Minutes = Enumerable.Range(0, MinutesInHour).ToList(); var now = DateTime.UtcNow; this.MinimumDate = now.Date; this.UnlockDate = now; // Set unlock time var time = now.TimeOfDay; this.UnlockHour = time.Hours; this.UnlockMinute = time.Minutes; }
public GamesPreLaunchEventHandler(IDialogManager dialogManager, UserSettings settings, IronFrontService ifService, IRestarter restarter) { _dialogManager = dialogManager; _settings = settings; _ifService = ifService; _restarter = restarter; }
public SettingsWindowCommandViewModel(IDialogManager dialogManager, IEventAggregator eventAggregator) { Order = 0; this.dialogManager = dialogManager; this.eventAggregator = eventAggregator; this.eventAggregator.Subscribe(this); }
public void Initialize( IDataRepository dataRepository, IDialogManager dialogManager) { _dialogManager = dialogManager; _featureSwitch = dataRepository.GetContainer <FeatureSwitch>(DataKey.FeatureSwitch); }
protected void RunImportOperationAsync(IContentDirectory cd, IList <string> mediaFiles) { ILogger logger = ServiceRegistration.Get <ILogger>(); _importPlaylistOperation = new ImportPlaylistOperation(); IList <Guid> items = _importPlaylistOperation.Execute(mediaFiles, GetShareLocation()); if (items == null) { logger.Info("PlaylistImportModel: Playlist import cancelled"); return; } IDialogManager dialogManager = ServiceRegistration.Get <IDialogManager>(); if (items.Count == 0) { dialogManager.ShowDialog(Consts.RES_PLAYLIST_SAVE_FAILED_TITLE, Consts.RES_NO_ITEMS_WERE_IMPORTED_SKIPPING_SAVE_TEXT, DialogType.OkDialog, false, DialogButtonType.Ok); return; } string playlistName = PlaylistName; PlaylistRawData playlistRawData = new PlaylistRawData(Guid.NewGuid(), playlistName, ManagePlaylistsModel.ConvertAVTypeToPlaylistType(AVType.Audio), items); try { cd.SavePlaylist(playlistRawData); dialogManager.ShowDialog(Consts.RES_PLAYLIST_SAVED_SUCCESSFULLY_TITLE, LocalizationHelper.Translate(Consts.RES_PLAYLIST_SAVED_SUCCESSFULLY_TEXT, playlistName), DialogType.OkDialog, false, DialogButtonType.Ok); } catch (Exception e) { dialogManager.ShowDialog(Consts.RES_PLAYLIST_SAVE_FAILED_TITLE, e.Message, DialogType.OkDialog, false, DialogButtonType.Ok); } _importPlaylistOperation = null; }
public void Initialize( IDataRepository dataRepository, IDialogManager dialogManager) { _dialogManager = dialogManager; _user = dataRepository.GetContainer <User>(DataKey.MyUser); }
private SetStructProjectionController( IDialogManager dialogManager, IClientAccessor clientAccessor) { _dialogManager = dialogManager; _clientAccessor = clientAccessor; }
public void Initialize( IDialogManager dialogManager, RemoteAPI remoteAPI) { _dialogManager = dialogManager; _remoteAPI = remoteAPI; }
public CurrentSessionCommandBarViewModel(IDialogManager dialogManager, IEventAggregator events) { this.Order = 10; this.dialogManager = dialogManager; this.events = events; this.events.Subscribe(this); }
public MenuState(IGraphics graphics, IDialogManager dialogManager, IInputManager inputManager, ISongManager songManager) { _dialogManager = dialogManager; _graphics = graphics; _inputManager = inputManager; _songManager = songManager; }
protected override void ShowDialog(IDialogManager dialogMangaer) { var ret = dialogMangaer.ShowDialog(config => { config.Caption = "Dialog Title"; config.Content = "Select one."; config.IsCopySupported = false; config.Callback = new DelegateDialogCallback <DialogSelection> { ClosingHandler = selection => { using (new ForegroundColorScope(ConsoleColor.DarkYellow)) { Console.WriteLine("Dialog closing. Id: {0}, Content: {1}, IsDefault: {2}", selection.Id, selection.Content, selection.IsDefault); } return(true); }, ClosedHandler = selection => { using (new ForegroundColorScope(ConsoleColor.DarkYellow)) { Console.WriteLine("Dialog closed. Id: {0}, Content: {1}, IsDefault: {2}", selection.Id, selection.Content, selection.IsDefault); } }, }; }, EDialogType.Question, "One", "Two", "Three"); using (new ForegroundColorScope(ConsoleColor.Green)) { Console.WriteLine("Selected: {0}", ret); } }
public NewConnectionNodeController( IDialogManager dialogManager, IConnectionProvider connectionProvider) { _dialogManager = dialogManager; _connectionProvider = connectionProvider; }
public ShellViewModel(IDialogManager dialogs, [ImportMany] IEnumerable <IStartupScreen> workspaces) { this.dialogs = dialogs; Items.AddRange(workspaces.OrderBy(x => x.Sequence).ToList()); ActivateItem(Items.FirstOrDefault()); }
public DecksCommandBarViewModel(IDialogManager dialogManager, IEventAggregator eventAggregator) { this.Order = -2; this.dialogManager = dialogManager; this.eventAggregator = eventAggregator; this.eventAggregator.Subscribe(this); }
public void SetMatch(ListItem item) { if (item == null) { return; } IDialogManager dialogManager = ServiceRegistration.Get <IDialogManager>(); string header = LocalizationHelper.Translate("[Media.ConfirmAction]"); string text = LocalizationHelper.Translate("[Media.ReimportMediaItem.Confirmation]"); Guid handle = dialogManager.ShowDialog(header, text, DialogType.YesNoDialog, false, DialogButtonType.No); _dialogCloseWatcher = new DialogCloseWatcher(this, handle, dialogResult => { if (dialogResult == DialogResult.Yes) { _matchedAspects = (IDictionary <Guid, IList <MediaItemAspect> >)item.AdditionalProperties[KEY_ASPECTS]; ServiceRegistration.Get <ILogger>().Info("Re-import: Setting matched aspects"); } if (_matchDialogHandle.HasValue) { ServiceRegistration.Get <IScreenManager>().CloseDialog(_matchDialogHandle.Value); } _dialogCloseWatcher?.Dispose(); ClearData(); }); }
public StaffingResourcePhoneListViewModel(IDomainUnitOfWorkManager<IDomainUnitOfWork> unitOfWorkManager, IPartFactory<ItemSelectorViewModel> phoneTypeSelectorFactory, IErrorHandler errorHandler, IDialogManager dialogManager) : base(unitOfWorkManager, errorHandler) { _phoneTypeSelectorFactory = phoneTypeSelectorFactory; _dialogManager = dialogManager; }
public StaffingResourceSummaryViewModel(IDomainUnitOfWorkManager<IDomainUnitOfWork> unitOfWorkManager, IPartFactory<StaffingResourceNameEditorViewModel> nameEditorFactory, IErrorHandler errorHandler, IDialogManager dialogManager) : base(unitOfWorkManager, errorHandler) { _nameEditorFactory = nameEditorFactory; _dialogManager = dialogManager; }
protected virtual void DoCloseCheck(IDialogManager dialogs, Action<bool> callback) { dialogs.ShowMessageBox( "You have unsaved data. Are you sure you want to close this document? All changes will be lost.", "Unsaved Data", MessageBoxOptions.YesNo, box => callback(box.WasSelected(MessageBoxOptions.Yes)) ); }
public LicenseRegistrationViewModel( ILicenseManager licenseManager, IDialogManager dialogManager, INetworkOperations network) { _licenseManager = licenseManager; _dialogManager = dialogManager; _network = network; }
public ProfilesMenuViewModel(IMediator mediator, IDialogManager dialogManager) { _mediator = mediator; _dialogManager = dialogManager; this.SetCommand(x => x.ProfilesMenuCommand).Subscribe(x => ShowProfilesMenu = !ShowProfilesMenu); ReactiveUI.ReactiveCommand.CreateAsyncTask(x => OpenNewProfileDialog()) .SetNewCommand(this, x => x.AddNewProfileCommand) .Subscribe(); }
public StaffingResourcePhoneListViewModel( IUnitOfWorkManager<IResourceMgtUnitOfWork> unitOfWorkManager, ExportFactory<ItemSelectorViewModel> phoneTypeSelectorFactory, IDialogManager dialogManager) : base(unitOfWorkManager) { _phoneTypeSelectorFactory = phoneTypeSelectorFactory; _dialogManager = dialogManager; }
public StaffingResourceAddressListViewModel( IUnitOfWorkManager<IResourceMgtUnitOfWork> unitOfWorkManager, ExportFactory<ItemSelectorViewModel> addressTypeSelectorFactory, IDialogManager dialogManager) : base(unitOfWorkManager) { _unitOfWorkManager = unitOfWorkManager; _addressTypeSelectorFactory = addressTypeSelectorFactory; _dialogManager = dialogManager; }
public StaffingResourceAddressListViewModel(IDomainUnitOfWorkManager<IDomainUnitOfWork> unitOfWorkManager, IPartFactory<ItemSelectorViewModel> addressTypeSelectorFactory, IErrorHandler errorHandler, IDialogManager dialogManager) : base(unitOfWorkManager, errorHandler) { _unitOfWorkManager = unitOfWorkManager; _addressTypeSelectorFactory = addressTypeSelectorFactory; _dialogManager = dialogManager; }
public WpfStartupManager(ISystemInfo systemInfo, ICacheManager cacheManager, IDialogManager dialogManager) : base(systemInfo, cacheManager) { UiRoot.Main = new UiRoot(dialogManager); // This is the main UserError handler so that when the MainWindow is not yet existing, or no longer existing, we can handle usererrors // TODO: We should re-evaluate if handling UserErrors before or after the MainWindow is useful, or that they should either be handled differently // or that we should make sure that such errors can only occur during the life cycle of the MainWindow? _wpfErrorHandler = new WpfErrorHandler(dialogManager); UserError.RegisterHandler(x => _wpfErrorHandler.Handler(x)); }
public AppOverlayViewModel(UserSettings settings, IDialogManager dialogManager) { DisplayName = "External Apps"; _userSettings = settings; _dialogManager = dialogManager; this.SetCommand(x => x.AddAppCommand).RegisterAsyncTask(AddApp).Subscribe(); this.SetCommand(x => x.RemoveAppCommand).Subscribe(x => RemoveApp((ExternalApp) x)); ExternalApps.EnableCollectionSynchronization(_externalAppsLock); }
public LoadPlugins(ProfilerData profilerData, GuiModel guiModelData, IDialogManager dialogManager, ICommonDialogsService commonDialogsService) { _profilerData = profilerData; _guiModelData = guiModelData; _dialogManager = dialogManager; _commonDialogsService = commonDialogsService; }
public ShellViewModel(SubViewModel subViewModel, IFlyoutManager flyoutManager, IDialogManager dialogManager) { _subViewModel = subViewModel; _flyoutManager = flyoutManager; _dialogManager = dialogManager; Title = "Hello world"; _subViewModel.SomeText = "Some text"; _showFlyoutCommand = new RelayCommand(OnShowFlyout); _showDialogCommand = new RelayCommand(OnShowDialog); }
public SupportCommandBarViewModel( IDialogManager dialogManager, IEventAggregator events, SupportViewModel supportViewModel) { this.Order = 95; this.dialogManager = dialogManager; this.events = events; this.supportViewModel = supportViewModel; this.events.Subscribe(this); }
public StaffingResourceRatesViewModel(IDomainUnitOfWorkManager<IDomainUnitOfWork> unitOfWorkManager, IPartFactory<ItemSelectorViewModel> rateTypeSelectorFactory, IErrorHandler errorHandler, IDialogManager dialogManager) : base(unitOfWorkManager, errorHandler) { // ReSharper disable DoNotCallOverridableMethodsInConstructor DisplayName = "Rates"; // ReSharper restore DoNotCallOverridableMethodsInConstructor _rateTypeSelectorFactory = rateTypeSelectorFactory; _dialogManager = dialogManager; }
public AddRepositoryView(IDialogManager dialogManager) { _dialogManager = dialogManager; InitializeComponent(); this.WhenActivated(d => { d(UserError.RegisterHandler<RepositoryDownloadUserError>(x => UiRoot.Main.ErrorDialog(x))); d(this.WhenAnyValue(x => x.ViewModel).BindTo(this, v => v.DataContext)); var obs = this.WhenAnyObservable(x => x.ViewModel.AddRepoCommand.IsExecuting); d(obs.BindTo(this, v => v.ProgressRing.IsActive)); d(obs.Select(x => !x).BindTo(this, v => v.Url.IsEnabled)); Url.Focus(); }); }
public MainForm() { InitializeComponent(); this.messageDisplay = new MessageDisplay("Nunit Project Editor"); this.dialogManager = new DialogManager("NUnit Project Editor"); this.newProjectCommand = new MenuElement(newToolStripMenuItem); this.openProjectCommand = new MenuElement(openToolStripMenuItem); this.closeProjectCommand = new MenuElement(closeToolStripMenuItem); this.saveProjectCommand = new MenuElement(saveToolStripMenuItem); this.saveProjectAsCommand = new MenuElement(saveAsToolStripMenuItem); }
public GameSettingsOverlayViewModel(Lazy<GamesViewModel> gvm, IMediator mediator, IDialogManager dialogManager) { DisplayName = "Game Settings"; _gvm = gvm; _mediator = mediator; this.SetCommand(x => x.ShowAdvancedStartupParamsCommand).Subscribe(ShowAdvancedStartupParams); this.SetCommand(x => x.GoBikGameStartupParameters).Subscribe(GoBikGameStartupParametersInfo); DiagnosticsMenu = new GameDiagnosticsMenu(dialogManager); this.WhenAnyObservable(x => x.GameSettings.Changed) .Where(x => x.PropertyName != "IsValid" && x.PropertyName != "Error") .Subscribe(x => SaveSettings(GameSettings)); }
public LoginViewModel(IAuthenticationService authenticationService, IDialogManager dialogManager, [Import(AllowDefault = true)] IGlobalCache globalCache) { Busy = new BusyWatcher(); _authenticationService = authenticationService; _dialogManager = dialogManager; _globalCache = globalCache; // ReSharper disable DoNotCallOverridableMethodsInConstructor DisplayName = ""; // ReSharper restore DoNotCallOverridableMethodsInConstructor #if DEBUG _username = "******"; _password = "******"; #endif }
public MainWindowViewModel(ICommonDialogsService commonDialogsService, IDialogManager dialogManager) { _commonDialogsService = commonDialogsService; _dialogManager = dialogManager; if (Designer.IsInDesignModeStatic) return; manageAppExit(); registerMessengers(); GuiModelData = new GuiModel(); loadPlugins(); loadConfig(); GuiModelData.PropertyChanged += GuiModelData_PropertyChanged; setCommands(); doStart(string.Empty); }