/// <summary> /// la tabella filettatura mi interessa caricarla solamente quando ne ho necessita. /// le macchine invece mi servono sempre.. /// </summary> //private TabellaFilettature _tabellaFilettatura; public MainViewModel(IModalDialogService modalDialogService, IMessageBoxService messageBoxService) { _modalDialogService = modalDialogService; _messageBoxService = messageBoxService; ProgramPreference preference; try { LoadData(); preference = PathFolderHelper.GetPreferenceData(); if (preference == null) { // Creo nuovo e apro finestra dialogo preferenze preference = new ProgramPreference(); OpenDialog(DialogEnum.UnitSelection); } //_model = new Singleton(_preference.MeasureUnit); } catch (Exception exception) { throw new Exception("MainViewModel.MainViewModel.( load data stage)"); } Singleton.CreateNewModelClass(preference.DefaultMeasureUnit); Mvm = new ClassModelViewModel(_modalDialogService, _messageBoxService, Singleton.Instance); //ResetGui(Singleton.Instance); }
public ModalDialogInstance(string title, RenderFragment body, ModalDialogSize modalDialogSize, IModalDialogService modalDialogService) { _modalDialogService = modalDialogService; _resultCompletion = new TaskCompletionSource <ModalResult>(); Body = body; Title = title; Id = Guid.NewGuid().ToString(); switch (modalDialogSize) { case ModalDialogSize.Default: ModalDialogSizeClass = "modal-fullscreen-sm-down"; break; case ModalDialogSize.Small: ModalDialogSizeClass = "modal-sm modal-fullscreen-sm-down"; break; case ModalDialogSize.Large: ModalDialogSizeClass = "modal-lg modal-fullscreen-sm-down"; break; case ModalDialogSize.ExtraLarge: ModalDialogSizeClass = "modal-xl modal-fullscreen-sm-down"; break; } }
public ProjectIssuesViewModel(IUnityContainer container) { HeaderTitle = "Issues"; _container = container; _context = _container.Resolve<TeamManagerDomainContext>("TM_DB"); _modalDialogService = _container.Resolve<IModalDialogService>(); _messageBoxService = _container.Resolve<IMessageBoxService>(); Messanger.Get<ProjectSelectionMessage>().Subscribe(OnSelectedProjectChanged); GroupCriteria = new ObservableCollection<GroupItem>(new List<GroupItem> { new GroupItem("Tracker", "Tracker.Name"), new GroupItem("Priority", "Priority.Name"), new GroupItem("Creator", "Creator.UserName"), new GroupItem("Assigned member", "AssignedUser.UserName"), }); EditIssueCommand = new DelegateCommand<Issue>(ExecuteEditIssue, issue => true); CreateIssueCommand = new DelegateCommand(ExecuteCreateIssue, CanExecuteCreateIssue); DeleteIssueCommand = new DelegateCommand<Issue>(ExecuteDeleteIssue, issue => true); OpenIssueCommand = new DelegateCommand<Issue>(ExecuteIssueNavigate, issue => true); GroupChangedCommand = new DelegateCommand<SelectionChangedEventArgs>(GroupChangedHandler, e => true); ClearGroupingCommand = new DelegateCommand(ClearGroupingExecute, () => true); }
private void LoadReportQueriesCompleted(LoadOperation <ReportCategory> lo) { var ReportCategories = new ObservableCollection <ReportCategory>(lo.Entities); var dialog = SimpleServiceLocator.Instance.Get <IModalWindow>("PublishToUcbDialog"); this.modalDialogService = SimpleServiceLocator.Instance.Get <IModalDialogService>(); this.modalDialogService.ShowDialog(dialog, new PublishToUcbViewModel(ReportCategories, SelectedReport != null ? SelectedReport.Name : null, SelectedReport != null ? SelectedReport.Description : null), returnedViewModelInstance => { if (dialog.DialogResult.HasValue && dialog.DialogResult.Value) { StandardReport spToPublish = new StandardReport(); spToPublish.IsExportable = returnedViewModelInstance.IsExportAllowed; spToPublish.IsPrintable = returnedViewModelInstance.IsPrintAllowed; spToPublish.ReportCategoryCode = returnedViewModelInstance.SelectedCategory.Code; spToPublish.ReportToPublishCode = selectedReport.Code; spToPublish.ReportName = returnedViewModelInstance.Name; spToPublish.ReportDescription = returnedViewModelInstance.Description; spToPublish.Code = Guid.NewGuid(); IsPublishing = true; IsSubmittingContext = true; myContext.StandardReports.Add(spToPublish); myContext.SubmitChanges(ReportPublishedCallback, spToPublish); } }); }
/// <summary> /// Initializes a new instance of the <see cref="ManageDeliveryNotesViewModel"/> class. /// </summary> /// <param name="modalDialogService">The modal dialog service.</param> /// <param name="serviceFactory">The service factory.</param> public ManageDeliveryNotesViewModel(IModalDialogService modalDialogService, IServiceFactory serviceFactory) : base(modalDialogService, serviceFactory) { SelectableDeliveryNote = new SelectableViewModelBase<DeliveryNotePackage>(); ShowCanceledDeliveryNotes = true; LoadDeliveryNotes(string.Empty, ShowCanceledDeliveryNotes); }
/// <summary> /// Initializes a new instance of the <see cref="ManageOrdersViewModel"/> class. /// </summary> /// <param name="modalDialogService">The modal dialog service.</param> /// <param name="serviceFactory">The service factory.</param> public ManageOrdersViewModel(IModalDialogService modalDialogService, IServiceFactory serviceFactory) : base(modalDialogService, serviceFactory) { SelectableOrder = new SelectableViewModelBase<OrderPackage>(); ShowCanceledOrders = true; LoadOrders(string.Empty, ShowCanceledOrders); }
partial void OnInitialize() { dialogService = this.GetDependency<IModalDialogService>(); Description = "Settings"; #if SILVERLIGHT Icon = new SettingsIcon(ItemName); #endif this.PropertyChanged += WidgetDockBarItem_PropertyChanged; }
public CodeBrowserFeature(IServiceProvider serviceProvider, ILog log, IOptionsService optionsService, IShellSelectionService shellSelectionService, IModalDialogService dialogService, IFileProcessor fileProcessor, ILanguageService languageService, IMessageService messageService) : base(serviceProvider, log, optionsService) { _shellSelectionService = shellSelectionService; _dialogService = dialogService; _fileProcessor = fileProcessor; _languageService = languageService; _messageService = messageService; }
public SDKConfigurationViewModel(MonoberryProjectObject model) : base(model) { _messageBoxService = new ModalDialogService(); this.ManageSDKCommand = new DelegateCommand(this.ManageSDK_Execute, this.ManageSDK_CanExecute); this.SDKs = new ObservableCollection <SDK>(); _sdks = new List <SDK>(); this.LoadSDKs(); this.UpdateSDKs(); }
/// <summary> /// Initializes a new instance of the <see cref="MessageBoxViewModel"/> class. /// </summary> /// <param name="modalDialogService">The modal dialog service.</param> /// <param name="serviceFactory">The service factory.</param> /// <param name="icon">The icon.</param> /// <param name="caption">The caption.</param> /// <param name="message">The message.</param> /// <param name="button">The button.</param> /// <param name="info">The info.</param> public MessageBoxViewModel(IModalDialogService modalDialogService, IServiceFactory serviceFactory, MessageBoxImage icon, string caption, string message, MessageBoxButton button, string info) : base(modalDialogService, serviceFactory) { Icon = icon; Caption = caption; Message = message; Button = button; Info = info; Result = MessageBoxResult.Cancel; }
public ClientPrimitive CreateClient(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new UpdateClientViewModel(modalDialogService, serviceFactory); viewModel.Client = new ClientPrimitive(); viewModel.DialogMode = DialogMode.Create; ModalDialogHelper<UpdateClient>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.Client; } return null; }
public ContractorPrimitive CreateContractor(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new UpdateContractorViewModel(modalDialogService, serviceFactory); viewModel.Contractor = new ContractorPrimitive(); viewModel.DialogMode = DialogMode.Create; ModalDialogHelper<UpdateContractor>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.Contractor; } return null; }
public async Task InitializeAsync(Func <DataLoadingOptions <TFilter>, Task <List <TItem> > > getEntities, Func <DataLoadingOptions <TFilter>, Task <int> > getEntitiesCount, IModalDialogService modalDialogService, Action stateHasChanged, string sortedColumn, ListSortDirection sortDirection = ListSortDirection.Ascending, string syncPropName = "Id", string entityId = null) { _stateHasChanged = stateHasChanged; _getEntities = getEntities; _getEntitiesCount = getEntitiesCount; _modalDialogService = modalDialogService; _modalDialogService.OnClose += LoadTableDataAsync; DataLoadingOptions.SortedColumn = sortedColumn; DataLoadingOptions.SortDirection = sortDirection; DataLoadingOptions.EntityId = entityId; SyncPropName = syncPropName; await LoadTableDataAsync(); }
public ProjectListViewModel(IUnityContainer container) { HeaderTitle = "Project List"; _container = container; _context = _container.Resolve<TeamManagerDomainContext>("TM_DB"); _modalDialogService = _container.Resolve<IModalDialogService>(); _messageBoxService = _container.Resolve<IMessageBoxService>(); CreateProjectCommand = new DelegateCommand(CreateProjectExecute, () => true); EditProjectCommand = new DelegateCommand<Project>(EditProjectExecute, project => true); DeleteProjectCommand = new DelegateCommand<Project>(DeleteProjectExecute, project => true); ViewProjectCommand = new DelegateCommand<Project>(ViewProjectExecute, project => true); UserRoleService.GetInstance().PropertyChanged += UserRolesChanged; LoadData(); }
/// <summary> /// Shows the Data Input Form in a modal dialog container. /// </summary> /// <param name="modalDialogService">The Modal Dialog Service</param> /// <param name="options">options that affect how the dialog behaves (can be null)</param> /// <returns> /// false if the user cancelled for form. /// true if the user completed the form (including any validation) /// The values the user entered are in the <see cref="Fields"/> that were created with the AddXXField methods /// </returns> public async Task <bool> ShowAsync(IModalDialogService modalDialogService, ModalDialogOptions options = null) { if (modalDialogService == null) { throw new ArgumentNullException(nameof(modalDialogService)); } ModalDialogParameters mParams = new ModalDialogParameters(); mParams.Add("Form", this); var result = await modalDialogService.ShowDialogAsync <Components.DataInputForm>(this.Title, options, mParams); return(result.Success); }
public ClientBuildingAndBuildingPackage CreateBuilding(IModalDialogService modalDialogService, IServiceFactory serviceFactory, ClientPrimitive client) { var viewModel = new UpdateBuildingViewModel(modalDialogService, serviceFactory); //viewModel.Contractor = contractor; viewModel.BuildingAndClient = new ClientBuildingAndBuildingPackage(); viewModel.BuildingAndClient.Building = new BuildingPrimitive(); viewModel.BuildingAndClient.Client = client; viewModel.DialogMode = DialogMode.Create; ModalDialogHelper<UpdateBuilding>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.BuildingAndClient; } return null; }
/// <summary> /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class. /// </summary> /// <param name="bot">The bot.</param> /// <param name="settings">Bot settings.</param> /// <param name="dialogs">Dialog service.</param> /// <param name="messageBox">MessageBox service.</param> /// <param name="chatrooms">The chatroom container.</param> /// <param name="chatRoomViewModels">Chatroom view models.</param> /// <param name="dispatcher">The dispatcher.</param> public MainWindowViewModel(Bot bot, IBotSettings settings, IModalDialogService dialogs, IMessageBoxService messageBox, IChatRoomContainer chatrooms, IChatViewModelFactory chatRoomViewModels, IDispatcherHelper dispatcher) { this.bot = bot; this.settings = settings; this.dialogs = dialogs; this.messageBox = messageBox; this.chatRoomViewModels = chatRoomViewModels; this.dispatcher = dispatcher; // set up commands LoadedCommand = new RelayCommand(() => OnLoaded()); // subscribe to events MessengerInstance.Register<LoginSettingsRequested>(this, OnSettingsRequested); chatrooms.CollectionChanged += OnChatRoomsChanged; }
public CsvConfigFileManager(IModalDialogService <GenerateConfigSettings> dialogService, string configFileDirectory = null) { _dialogService = dialogService; var appData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Assembly.GetEntryAssembly().GetName().Name); if (string.IsNullOrWhiteSpace(configFileDirectory)) { ConfigFileDirectory = Path.Combine(appData, "Config"); } else { ConfigFileDirectory = configFileDirectory; } GetConfigFiles(); }
public HomeViewModel() { this.Autors = new ObservableCollection<AutorReference.Autor>(); this.CreateAutorCommand = new DelegateCommand(AddAutor_Execute, AddAutor_CanExecute); this.EditAutorCommand = new DelegateCommand(EditAutor_Execute, EditAutor_CanExecute); this.DeleteAutorCommand = new DelegateCommand(DeleteAutor_Execute, DeleteAutor_CanExecute); _autorClient = new AutorReference.AutorServiceClient(); _autorClient.CreateAutorCompleted += CreateAutorComplete; _autorClient.DisplayAutorsCompleted += DisplayListAutorComplete; _autorClient.EditAutorCompleted += EditAutorComplete; _autorClient.DeleteAutorCompleted += DeleteAutorComplete; _autorClient.DisplayAutorsAsync(); _messageBoxService = new MessageBoxService(); _modalDialogService = new ModalDialogService(); _informationDialogService = new ModalDialogService(); }
//public ReportListViewModel(ReportWizardContext context, IMessageBoxService messageBoxServiceItem, IModalDialogService modalDialogServiceItem) : // this(context, messageBoxServiceItem, modalDialogServiceItem) //{ } public ReportListViewModel(ReportWizardContext context, IMessageBoxService messageBoxServiceItem, IModalDialogService modalDialogServiceItem) { messageBoxService = messageBoxServiceItem; modalDialogService = modalDialogServiceItem; //set the internal reference to the context myContext = context; //myPublishContext = publishContext; //initialize the root report group collection rootGroups = new ObservableCollection <ReportGroupFolder>(); //Set up the Relay commands InitializeCommand = new RelayCommand(cmd => Initialize(cmd)); ViewReportCommand = new RelayCommand(cmd => ViewReport(cmd), exe => CanViewReport(exe)); EditReportCommand = new RelayCommand(cmd => EditReport(cmd), exe => CanEditReport(exe)); DeleteReportCommand = new RelayCommand(cmd => { var result = this.messageBoxService.Show("Are you sure you want to delete this report?", "Please confirm", GenericMessageBoxButton.OkCancel); if (result == GenericMessageBoxResult.Ok) { DeleteReport(cmd); } }, exe => CanDeleteReport(exe)); PublishReportCommand = new RelayCommand(cmd => PublishReport(cmd), exe => CanPublishReport(exe)); RenameFolderCommand = new RelayCommand(cmd => RenameFolder(cmd), exe => CanRenameFolder(exe)); RenamingCompleteCommand = new RelayCommand(cmd => RenamingComplete(cmd), exe => CanRenamingComplete(exe)); DeleteFolderCommand = new RelayCommand(cmd => { var result = this.messageBoxService.Show("Are you sure you want to delete this folder?", "Please confirm", GenericMessageBoxButton.OkCancel); if (result == GenericMessageBoxResult.Ok) { DeleteFolder(cmd); } }, exe => CanDeleteFolder(exe)); ChangeFolderPermissionsCommand = new RelayCommand(cmd => ChangeFolderPermissions(cmd), exe => CanChangeFolderPermissions(exe)); NewFolderCommand = new RelayCommand(cmd => NewFolder(cmd), exe => CanAddChildFolder(exe)); //Listener required for property changed PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(SelectReportGroupViewModel_PropertyChanged); }
public HomeViewModel() { this.Origins = new ObservableCollection<OriginReference.Origin>() { }; this.CurrentLanguageId = -1; this.CreateOriginCommand = new DelegateCommand(AddContact_Execute, AddContact_CanExecute); this.EditOriginCommand = new DelegateCommand(EditContact_Execute, EditContact_CanExecute); this.DeleteOriginCommand = new DelegateCommand(DeleteContact_Execute, DeleteContact_CanExecute); _originClient = new OriginReference.OriginServiceClient(); _originClient.CreateOriginCompleted += CreateLanguageComplete; _originClient.DisplayOriginsCompleted += DisplayListLanguageComplete; _originClient.EditOriginCompleted += EditLanguageComplete; _originClient.DeleteOriginCompleted += DeleteLanguageComplete; _originClient.DisplayOriginsAsync(); _messageBoxService = new MessageBoxService(); _modalDialogService = new ModalDialogService(); _informationDialogService = new ModalDialogService(); }
public HomeViewModel() { this.Phrases = new List<PhraseReference.Phrase>() { }; this.Phrases2 = new ObservableCollection<CompletePhrase>(); this.Translations = new ObservableCollection<TranslationReference.Translation>(); this.TranslationsComplete = new ObservableCollection<CompleteTranslation>(); this.CreatePhraseCommand = new DelegateCommand(AddPhrase_Execute, AddPhrase_CanExecute); this.EditPhraseCommand = new DelegateCommand(EditPhrase_Execute, EditPhrase_CanExecute); this.DeletePhraseCommand = new DelegateCommand(DeletePhrase_Execute, DeletePhrase_CanExecute); this.CreateTranslationCommand = new DelegateCommand(AddTranslation_Execute, AddTranslation_CanExecute); this.EditTranslationCommand = new DelegateCommand(EditTranslation_Execute, EditTranslation_CanExecute); this.DeleteTranslationCommand = new DelegateCommand(DeleteTranslation_Execute, DeleteTranslation_CanExecute); _phraseClient = new PhraseReference.PhraseServiceClient(); _phraseClient.CreatePhraseCompleted += CreatePhraseComplete; _phraseClient.DisplayPhrasesCompleted += DisplayListPhrasesComplete; _phraseClient.EditPhraseCompleted += EditPhraseComplete; _phraseClient.DeletePhraseCompleted += DeletePhraseComplete; _translationClient = new TranslationReference.TranslationServiceClient(); _translationClient.CreateTranslationCompleted += CreateTranslationComplete; _translationClient.DisplayTranslationsCompleted += DisplayListTranslationComplete; _translationClient.DisplayTranslationsByPhraseIdCompleted += DisplayTranslationsByPhraseIdCompleted; _translationClient.EditTranslationCompleted += EditTranslationComplete; _translationClient.DeleteTranslationCompleted += DeleteTranslationComplete; _languageClient = new LanguageReference.LanguageServiceClient(); _languageClient.DisplayLanguagesCompleted += DisplayListLanguageComplete; _phraseClient.DisplayPhrasesAsync(); _messageBoxService = new MessageBoxService(); _modalDialogService = new ModalDialogService(); _informationDialogService = new ModalDialogService(); _translationModalDialogService = new ModalDialogService(); _temporalPhraseTranslation = new TranslationReference.Translation(); }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IProjectRepository projectRepository, IModalDialogService modalDialogService, IAppSettingsRepository appSettingsRepository) { timer = new TimerManager(); timer.Stopped += TimerStopped; this.projectRepository = projectRepository; this.appSettingsRepository = appSettingsRepository; this.modalDialogService = modalDialogService; if (IsInDesignMode) { Projects = GetDesignData(); } else { appSettings = this.appSettingsRepository.Get(); ReadSettings(appSettings); } StartTimer = new RelayCommand <Project>(OnStartTimer); Exit = new RelayCommand(AppExit); Options = new RelayCommand(OpenSettings); }
partial void OnInitialize() { SelectWidgetsDialog = new SelectWidgetsDialog(); moduleLoader = this.GetDependency<IModuleLoader>(); log = this.GetDependency<ILog>(); ErrorInfo = new ErrorInfo(); Slides = new ObservableCollection<Slide>(); Slides.CollectionChanged += Slides_CollectionChanged; TryLoadSlides(); SetSlideshowInfo(); timer = this.GetDependency<ITimer>(); timer.Elapsed += timer_Elapsed; modalDialogService = this.GetDependency<IModalDialogService>(); if (Slides.Count > 0) { cursor = 0; ChangeSlide(); } }
public ProgramDevelopViewModel(IModalDialogService modalDialogService, IMessageBoxService messageBoxService) { _modalDialogService = modalDialogService; _messageBoxService = messageBoxService; }
/// <summary> /// Opens dialog for editing the recipe component. /// </summary> /// <param name="modalDialogService">The modal dialog service.</param> /// <param name="serviceFactory">The service factory.</param> /// <param name="recipeComponentAndMaterialPackage">The selected recipe component.</param> /// <returns></returns> public RecipeComponentPrimitive EditRecipeComponent(IModalDialogService modalDialogService, IServiceFactory serviceFactory, RecipeComponentAndMaterialPackage recipeComponentAndMaterialPackage) { var viewModel = new UpdateRecipeComponentViewModel(modalDialogService, serviceFactory); viewModel.RecipeComponent = recipeComponentAndMaterialPackage.RecipeComponent; viewModel.MaterialAndContractors = recipeComponentAndMaterialPackage.MaterialAndContractors; viewModel.DialogMode = DialogMode.Update; ModalDialogHelper<UpdateRecipeComponent>.ShowDialog(viewModel); return viewModel.RecipeComponent; }
public RecipePrimitive SelectRecipe(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new ManageRecipesViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.Chose; ModalDialogHelper<ManageRecipes>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.SelectableRecipe.SelectedItem.Recipe; } return null; }
/// <summary> /// Shows the message box. /// </summary> /// <param name="modalDialogService">The modal dialog service.</param> /// <param name="serviceFactory">The service factory.</param> /// <param name="icon">The icon.</param> /// <param name="caption">The caption.</param> /// <param name="message">The message.</param> /// <param name="button">The button.</param> /// <param name="info">The info.</param> /// <returns>Result depends button which was pressed.</returns> public MessageBoxResult ShowMessageBox(IModalDialogService modalDialogService, IServiceFactory serviceFactory, MessageBoxImage icon, string caption, string message, MessageBoxButton button, string info) { var viewModel = new MessageBoxViewModel(modalDialogService, serviceFactory, icon, caption, message, button, info); return MessageBoxHelper<MessageBox>.ShowDialog(viewModel); }
public CarAndDriverPackage SelectDriver(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new ManageDriversViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.Chose; ModalDialogHelper<ManageDrivers>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.SelectableDriver.SelectedItem; } return null; }
public MaterialAndContractorsPackage SelectMaterial(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new ManageMaterialsViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.Chose; ModalDialogHelper<ManageMaterials>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.SelectableMaterial.SelectedItem; } return null; }
public ProgramDevelopViewModel(IModalDialogService modalDialogService) { this._modalDialogService = modalDialogService; }
public ContractorPrimitive SelectContractor(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new ManageContractorsViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.Chose; ModalDialogHelper<ManageContractors>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.SelectableContractor.SelectedItem; } return null; }
public FileBrowserFeature(IServiceProvider serviceProvider, ILog log, IOptionsService optionsService, IShellSelectionService shellSelectionService, IModalDialogService dialogService) : base(serviceProvider, log, optionsService) { _shellSelectionService = shellSelectionService; _dialogService = dialogService; }
/// <summary> /// Initializes a new instance of the <see cref="UpdateMaterialViewModel"/> class. /// </summary> /// <param name="modalDialogService">The modal dialog service.</param> /// <param name="serviceFactory">The service factory.</param> public UpdateMaterialViewModel(IModalDialogService modalDialogService, IServiceFactory serviceFactory) : base(modalDialogService, serviceFactory) { }
public DeliveryNotePackage CreateDeliveryNote(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new UpdateDeliveryNoteViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.Create; viewModel.DeliveryNotePackage = new DeliveryNotePackage(); viewModel.DeliveryNotePackage.DeliveryNote = new DeliveryNotePrimitive(); viewModel.DeliveryNotePackage.DeliveryNote.DateDrawing = DateTime.Now; viewModel.DeliveryNotePackage.DeliveryNote.DateOfArrival = DateTime.Now; ModalDialogHelper<UpdateDeliveryNote>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.DeliveryNotePackage; } return null; }
public RecipePackage EditRecipe(IModalDialogService modalDialogService, IServiceFactory serviceFactory, RecipePackage recipePackage) { var viewModel = new UpdateRecipeViewModel(modalDialogService, serviceFactory); viewModel.RecipePackage = recipePackage; viewModel.DialogMode = DialogMode.Update; ModalDialogHelper<UpdateRecipe>.ShowDialog(viewModel); return viewModel.RecipePackage; }
public MaterialAndContractorsPackage EditMaterial(IModalDialogService modalDialogService, IServiceFactory serviceFactory, MaterialAndContractorsPackage selectedMaterial) { var viewModel = new UpdateMaterialViewModel(modalDialogService, serviceFactory); viewModel.MaterialAndContractors = selectedMaterial; viewModel.DialogMode = DialogMode.Update; ModalDialogHelper<UpdateMaterial>.ShowDialog(viewModel); return viewModel.MaterialAndContractors; }
public CarAndDriverPackage EditDriver(IModalDialogService modalDialogService, IServiceFactory serviceFactory, CarAndDriverPackage selectedCarAndDriver) { var viewModel = new UpdateDriverViewModel(modalDialogService, serviceFactory); viewModel.CarAndDriver = selectedCarAndDriver; viewModel.DialogMode = DialogMode.Update; ModalDialogHelper<UpdateDriver>.ShowDialog(viewModel); return viewModel.CarAndDriver; }
public ContractorPrimitive EditContractor(IModalDialogService modalDialogService, IServiceFactory serviceFactory, ContractorPrimitive contractorToEdit) { var viewModel = new UpdateContractorViewModel(modalDialogService, serviceFactory); viewModel.Contractor = contractorToEdit; viewModel.DialogMode = DialogMode.Update; ModalDialogHelper<UpdateContractor>.ShowDialog(viewModel); return viewModel.Contractor; }
public GamePlayerViewModel(IDataService dataService, INavigationService navigationService, IModalDialogService dialogService) : base(dataService, navigationService) { _dialogService = dialogService; PropertyChanged += GamePlayerViewModel_PropertyChanged; }
public void ManageRecipes(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new ManageRecipesViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.Manage; ModalDialogHelper<ManageRecipes>.ShowDialog(viewModel); }
public static void InitializeDefault(IModalDialogService <GenerateConfigSettings> dialogService, string configFileDirectory = null) { Default = new CsvConfigFileManager(dialogService, configFileDirectory); }
public ClientBuildingAndBuildingPackage SelectBuildingAndContractorPackage(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new ManageClientsViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.ChoseSubItem; ModalDialogHelper<ManageClients>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { var result = new ClientBuildingAndBuildingPackage(); result.Building = viewModel.SelectedBuilding; result.Client = viewModel.SelectableClient.SelectedItem.Client; return result; } return null; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IDataService dataService, IModalDialogService dialogService) { _DataService = dataService; _DialogService = dialogService; }
public VenueViewModel(IDataService dataService, INavigationService navigationService, IModalDialogService dialogService) : base(dataService, navigationService) { _dialogService = dialogService; }
public WindowViewModelBase(IModalDialogService modalDialogService, IServiceFactory serviceFactory) : base(modalDialogService, serviceFactory) { }
public ClientPrimitive EditClient(IModalDialogService modalDialogService, IServiceFactory serviceFactory, ClientPrimitive client) { var viewModel = new UpdateClientViewModel(modalDialogService, serviceFactory); viewModel.Client = client; viewModel.DialogMode = DialogMode.Update; ModalDialogHelper<UpdateClient>.ShowDialog(viewModel); return viewModel.Client; }