public FlowSettings(int userId, FlowState flowState, NavigationBar navigationBar, ScreenSettingsBase screenSettings)
 {
     UserId         = userId;
     FlowState      = flowState;
     NavigationBar  = navigationBar;
     ScreenSettings = screenSettings;
 }
        internal static Page CreatePage(this ScreenSettingsBase screenSettings)
        {
            return(CreatePage(Enum.GetName(typeof(ViewType), screenSettings.ViewType)));

            Page CreatePage(string viewName)
            {
                FlyoutDetailViewModelBase viewModel = (FlyoutDetailViewModelBase)App.ServiceProvider.GetRequiredService
                                                      (
                    typeof(FlyoutDetailViewModelBase).Assembly.GetType
                    (
                        $"Contoso.XPlatform.ViewModels.{viewName}ViewModel"
                    )
                                                      );

                viewModel.Initialize(screenSettings);

                return((Page)Activator.CreateInstance
                       (
                           typeof(MainPageView).Assembly.GetType
                           (
                               $"Contoso.XPlatform.Views.{viewName}ViewCS"
                           ),
                           viewModel
                       ));
            }
        }
示例#3
0
        public void DisplayInputQuestions(InputFormParameters form, ICollection <ConnectorParameters> connectors = null)
        {
            InputFormView formView = this.Mapper.Map <InputFormView>(form);

            this.screenData.ScreenSettings = new ScreenSettings <InputFormView>
                                             (
                formView,
                this.Mapper.Map <IEnumerable <ConnectorParameters>, IEnumerable <CommandButtonView> >(connectors),
                ViewType.InputForm,
                new MenuItem {
                Text = formView.Title, Icon = formView.Icon
            }
                                             );
        }
示例#4
0
        internal static Page CreatePage(this ScreenSettingsBase screenSettings)
        {
            return(CreatePage(Enum.GetName(typeof(ViewType), screenSettings.ViewType)));

            Page CreatePage(string viewName)
            => (Page)Activator.CreateInstance
            (
                typeof(MainPageView).Assembly.GetType
                (
                    $"Contoso.XPlatform.Views.{viewName}ViewCS"
                ),
                (ViewModelBase)Activator.CreateInstance
                (
                    typeof(ViewModelBase).Assembly.GetType
                    (
                        $"Contoso.XPlatform.ViewModels.{viewName}ViewModel"
                    ),
                    screenSettings
                )
            );
        }
        private UserControl GetNewUserControl(ScreenSettingsBase screenSettings, double transitionOffset)
        {
            switch (screenSettings.ViewType)
            {
            case ViewType.Exception:
                return(new Screens.Exception((ScreenSettings <ExceptionView>)screenSettings, transitionOffset));

            case ViewType.Message:
                return(new Message((ScreenSettings <MessageTemplateView>)screenSettings, UiNotificationService, transitionOffset));

            case ViewType.Select:
                return(new SelectButton((ScreenSettings <MessageTemplateView>)screenSettings, UiNotificationService, transitionOffset, svDialog));

            case ViewType.InputForm:
                return(new InputForm((ScreenSettings <InputFormView>)screenSettings, UiNotificationService, transitionOffset));

            case ViewType.FlowComplete:
                return(new FlowComplete((ScreenSettings <FlowCompleteView>)screenSettings, UiNotificationService, transitionOffset));

            default:
                throw new ArgumentException("{7D11F37A-6B5D-4063-A232-445DFD417B75}");
            }
        }
示例#6
0
 public override void Initialize(ScreenSettingsBase screenSettings)
 {
     ListPageCollectionViewModel = CreateSearchPageListViewModel((ScreenSettings <ListFormSettingsDescriptor>)screenSettings);
 }
 public abstract void Initialize(ScreenSettingsBase screenSettings);
 public FlowSettings(ScreenSettingsBase screenSettings)
 {
     ScreenSettings = screenSettings;
 }
 public override void Initialize(ScreenSettingsBase screenSettings)
 {
     DetailFormEntityViewModel = CreateDetailFormViewModel((ScreenSettings <DataFormSettingsDescriptor>)screenSettings);
 }
示例#10
0
 public FlowSettings(FlowState flowState, NavigationBar navigationBar, ScreenSettingsBase screenSettings)
 {
     FlowState      = flowState;
     NavigationBar  = navigationBar;
     ScreenSettings = screenSettings;
 }
 private void SetExceptionDialog(ScreenSettingsBase screenSettings)
 {
     ChangeDialog(GetNewUserControl(screenSettings, 0));
     ElementSoundPlayer.Play(ElementSoundKind.Invoke);
 }
 private void SetNextDialog(ScreenSettingsBase screenSettings)
 {
     ChangeDialog(GetNewUserControl(screenSettings, 300));
     ElementSoundPlayer.Play(ElementSoundKind.MoveNext);
 }
 private void SetPreviousDialog(ScreenSettingsBase screenSettings)
 {
     ChangeDialog(GetNewUserControl(screenSettings, -300));
     ElementSoundPlayer.Play(ElementSoundKind.MovePrevious);
 }
示例#14
0
 public override void Initialize(ScreenSettingsBase screenSettings)
 {
     SearchPageEntityViewModel = CreateSearchPageListViewModel((ScreenSettings <SearchFormSettingsDescriptor>)screenSettings);
 }
示例#15
0
 public FlowSettings(FlowDataCache flowDataCache, NavigationBarDescriptor navigationBar, ScreenSettingsBase screenSettings)
 {
     FlowDataCache  = flowDataCache;
     NavigationBar  = navigationBar;
     ScreenSettings = screenSettings;
 }
 public EditFormViewModel(ScreenSettingsBase screenSettings)
 {
     EditFormEntityViewModel = CreateEditFormViewModel((ScreenSettings <EditFormSettingsDescriptor>)screenSettings);
 }
示例#17
0
 public FlowSettings(FlowState flowState, FlowDataCache flowDataCache, ScreenSettingsBase screenSettings)
 {
     FlowState      = flowState;
     FlowDataCache  = flowDataCache;
     ScreenSettings = screenSettings;
 }
 public override void Initialize(ScreenSettingsBase screenSettings)
 {
     TextPageScreenViewModel = CreateTextPageScreenViewModel((ScreenSettings <TextFormSettingsDescriptor>)screenSettings);
 }
示例#19
0
 public void FlowComplete()
 {
     this.screenData.ScreenSettings = new ScreenSettings <ViewBase>(null, (IEnumerable <CommandButtonView>)null, ViewType.FlowComplete, new MenuItem {
     });
 }