Esempio n. 1
0
        public override void Execute(CommandContext context)
        {
            var database    = Factory.GetDatabase("master");
            var contextItem = SitecoreCommandHelper.GetContextItem(context, database);

            ModalDialogHelper.ShowTestingModalDialog(contextItem.ID, contextItem.Language, PageMode.Preview);
        }
Esempio n. 2
0
        public override void Execute(CommandContext context)
        {
            var database    = Factory.GetDatabase("master");
            var contextItem = SitecoreCommandHelper.GetContextItem(context, database);

            ProgressBox.Execute("Running Tests", "Test Preview", new ProgressBoxMethod(RunTests), new object[] { database, contextItem });

            ModalDialogHelper.ShowTestingModalDialog(contextItem.ID, contextItem.Language, PageMode.Live);
        }
Esempio n. 3
0
        public MainViewModel(IRegionManager regionManager, IComponentContainer componentContainer, IEventAggregator eventAggregator, ModalDialogHelper modalDialogHelper)
        {
            ContenidoUsoHCE     = new Alemana.Nucleo.Estadisticas.Wpf.Views.UsoHCE(new UsoHCEViewModel(componentContainer, modalDialogHelper, eventAggregator));
            ContenidoPlantillas = new Alemana.Nucleo.Estadisticas.Wpf.Views.Plantilla(new PlantillaViewModel(componentContainer));

            this.regionManager      = regionManager;
            this.componentContainer = componentContainer;
            this.eventAggregator    = eventAggregator;
            this.modalDialogHelper  = modalDialogHelper;
        }
Esempio n. 4
0
        public static string GetFolderPath(string dialogDescription, string vistaDialogTitle, string initialDirectory)
        {
            string selectedPath;

            if (!ExpressionFileDialog.CanPickFolders)
            {
                using (ModalDialogHelper modalDialogHelper = new ModalDialogHelper())
                {
                    FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog()
                    {
                        Description  = dialogDescription,
                        SelectedPath = initialDirectory
                    };
                    if (folderBrowserDialog.ShowDialog() != DialogResult.OK)
                    {
                        return(null);
                    }
                    else
                    {
                        selectedPath = folderBrowserDialog.SelectedPath;
                    }
                }
                return(selectedPath);
            }
            else
            {
                ExpressionOpenFileDialog expressionOpenFileDialog = new ExpressionOpenFileDialog()
                {
                    Title            = vistaDialogTitle,
                    InitialDirectory = initialDirectory,
                    PickFolders      = true
                };
                bool?nullable = expressionOpenFileDialog.ShowDialog();
                if (nullable.HasValue && nullable.Value)
                {
                    return(expressionOpenFileDialog.FileName);
                }
            }
            return(null);
        }
Esempio n. 5
0
        public UsoHCEViewModel(IComponentContainer componentContainer, ModalDialogHelper modalDialogHelper, IEventAggregator eventAggregator)
        {
            this.eventAggregator = eventAggregator;

            this.filtroService      = componentContainer.Resolve <IFiltrosServices>();
            this.indicadoresService = componentContainer.Resolve <IIndicadoresServices>();

            this.modalDialogHelper = modalDialogHelper;

            this.AplicarFiltroCommand = new DelegateCommand(AplicarFiltro);
            this.RemoverFiltroCommand = new DelegateCommand(RemoverFiltro);
            this.MostrarListadoPacientesDiagnosticadosCommand = new DelegateCommand <decimal?>(MostrarListadoPacientesDiagnosticados);

            this.FiltroRangoFechas = new KeyValuePair <RangoFechasUtility.RangoFecha, string>(RangoFechasUtility.RangoFecha.Hoy,
                                                                                              RangoFechasUtility.RangoFechas[RangoFechasUtility.RangoFecha.Hoy]);

            CallAsynchronousLoadFilters();

            EstadisticaPacientesChangedEvent recargaPacientes = this.eventAggregator.GetEvent <EstadisticaPacientesChangedEvent>();
            EtiquetasChangedEvent            recargaEtiquetas = this.eventAggregator.GetEvent <EtiquetasChangedEvent>();

            recargaPacientes.Subscribe(OnIndicadorPacientes);
            recargaEtiquetas.Subscribe(OnIndicadorPacientes);
        }