public QueryEditorViewModel(IMessenger messenger, IDocumentDbService dbService, IDialogService dialogService, IUIServices uiServices)
            : base(messenger, uiServices)
        {
            EditorViewModel            = SimpleIoc.Default.GetInstanceWithoutCaching <JsonViewerViewModel>();
            EditorViewModel.IsReadOnly = true;

            HeaderViewModel            = SimpleIoc.Default.GetInstanceWithoutCaching <HeaderEditorViewModel>();
            HeaderViewModel.IsReadOnly = true;

            _dbService     = dbService;
            _dialogService = dialogService;

            _requestChargeStatusBarItem = new StatusBarItem(new StatusBarItemContext {
                Value = RequestCharge, IsVisible = IsRunning
            }, StatusBarItemType.SimpleText, "Request Charge", System.Windows.Controls.Dock.Left);
            StatusBarItems.Add(_requestChargeStatusBarItem);
            _queryInformationStatusBarItem = new StatusBarItem(new StatusBarItemContext {
                Value = QueryInformation, IsVisible = IsRunning
            }, StatusBarItemType.SimpleText, "Information", System.Windows.Controls.Dock.Left);
            StatusBarItems.Add(_queryInformationStatusBarItem);
            _progessBarStatusBarItem = new StatusBarItem(new StatusBarItemContextCancellableCommand {
                Value = CancelCommand, IsVisible = IsRunning, IsCancellable = true
            }, StatusBarItemType.ProgessBar, "Progress", System.Windows.Controls.Dock.Left);
            StatusBarItems.Add(_progessBarStatusBarItem);
        }
예제 #2
0
 protected PaneWithZoomViewModel(IMessenger messenger, IUIServices uiServices)
     : base(messenger, uiServices)
 {
     StatusBarItems.Add(new StatusBarItem(new StatusBarItemContext {
         Value = this, IsVisible = true
     }, StatusBarItemType.Zoom, "Zoom", System.Windows.Controls.Dock.Right));
 }
예제 #3
0
 protected PaneViewModelBase(IMessenger messenger, IUIServices uiServices)
     : base(messenger, uiServices)
 {
     _pathStatusBarItem = new StatusBarItem(new StatusBarItemContext {
         Value = ToolTip, IsVisible = true
     }, StatusBarItemType.SimpleText, "Path", System.Windows.Controls.Dock.Left);
     StatusBarItems.Add(_pathStatusBarItem);
     _uiServices = uiServices;
 }
예제 #4
0
        public ImportDocumentViewModel(IMessenger messenger, IDialogService dialogService, IDocumentDbService dbService, IUIServices uiServices)
            : base(messenger, uiServices)
        {
            Content        = new TextDocument();
            _dialogService = dialogService;
            _dbService     = dbService;

            _progessBarStatusBarItem = new StatusBarItem(new StatusBarItemContextCancellableCommand {
                Value = CancelCommand, IsVisible = IsRunning, IsCancellable = false
            }, StatusBarItemType.ProgessBar, "Progress", System.Windows.Controls.Dock.Left);
            StatusBarItems.Add(_progessBarStatusBarItem);
        }
        protected override void LoadCore()
        {
            base.LoadCore();
            option = Singleton <ContentSetting> .Instance;

            if (!RibbonEntries.Contains(contentEntry))
            {
                RibbonEntries.Add(contentEntry);
            }
            if (!StatusBarItems.Contains(StatusBar.GetInstance()))
            {
                StatusBarItems.Add(StatusBar.GetInstance());
            }
            GisEditor.DockWindowManager.DocumentWindows.CollectionChanged -= DocumentWindows_CollectionChanged;
            GisEditor.DockWindowManager.DocumentWindows.CollectionChanged += DocumentWindows_CollectionChanged;
        }
        public StoredProcedureTabViewModel(IMessenger messenger, IDialogService dialogService, IDocumentDbService dbService, IUIServices uiServices)
            : base(messenger, dialogService, dbService, uiServices)
        {
            _dialogService = dialogService;
            _dbService     = dbService;

            ResultViewModel            = SimpleIoc.Default.GetInstanceWithoutCaching <JsonViewerViewModel>();
            ResultViewModel.IsReadOnly = true;

            HeaderViewModel            = SimpleIoc.Default.GetInstanceWithoutCaching <HeaderEditorViewModel>();
            HeaderViewModel.IsReadOnly = true;

            _requestChargeStatusBarItem = new StatusBarItem(new StatusBarItemContext {
                Value = RequestCharge, IsVisible = IsBusy
            }, StatusBarItemType.SimpleText, "Request Charge", System.Windows.Controls.Dock.Left);
            StatusBarItems.Add(_requestChargeStatusBarItem);
        }
예제 #7
0
        public CollectionMetricsTabViewModel(IMessenger messenger, IUIServices uiServices,
                                             IDialogService dialogService,
                                             IDocumentDbService dbService)
            : base(messenger, uiServices)
        {
            _dbService     = dbService;
            _dialogService = dialogService;

            Title  = "Collection Metrics";
            Header = Title;

            _requestChargeStatusBarItem = new StatusBarItem(new StatusBarItemContext {
                Value = RequestCharge, IsVisible = IsBusy
            }, StatusBarItemType.SimpleText, "Request Charge", System.Windows.Controls.Dock.Left);
            StatusBarItems.Add(_requestChargeStatusBarItem);

            ChartConfiguration();
        }
예제 #8
0
        protected override void LoadCore()
        {
            base.LoadCore();

            if (!RibbonEntries.Contains(selectionAndQueryingEntry))
            {
                RibbonEntries.Add(selectionAndQueryingEntry);
            }
            if (!RibbonEntries.Contains(helpEntry))
            {
                RibbonEntries.Add(helpEntry);
            }
            if (!StatusBarItems.Contains(displayTextBlock))
            {
                StatusBarItems.Add(displayTextBlock);
            }
            if (!StatusBarItems.Contains(selectedTextBlock))
            {
                StatusBarItems.Add(selectedTextBlock);
            }
        }
        public DocumentsTabViewModel(IMessenger messenger, IDocumentDbService dbService, IDialogService dialogService, IUIServices uiServices)
            : base(messenger, uiServices)
        {
            Documents      = new ObservableCollection <DocumentDescription>();
            _dbService     = dbService;
            _dialogService = dialogService;

            EditorViewModel            = SimpleIoc.Default.GetInstanceWithoutCaching <DocumentEditorViewModel>();
            HeaderViewModel            = SimpleIoc.Default.GetInstanceWithoutCaching <HeaderEditorViewModel>();
            HeaderViewModel.IsReadOnly = true;

            Title  = "Documents";
            Header = Title;

            _requestChargeStatusBarItem = new StatusBarItem(new StatusBarItemContext {
                Value = RequestCharge
            }, StatusBarItemType.SimpleText, "Request Charge", System.Windows.Controls.Dock.Left);
            StatusBarItems.Add(_requestChargeStatusBarItem);
            _progessBarStatusBarItem = new StatusBarItem(new StatusBarItemContextCancellableCommand {
                Value = IsRunning, IsVisible = IsRunning, IsCancellable = false
            }, StatusBarItemType.ProgessBar, "Progress", System.Windows.Controls.Dock.Left);
            StatusBarItems.Add(_progessBarStatusBarItem);
        }
예제 #10
0
        private void PopulatePanels()
        {
            foreach (ContentInstance content in ContentInstances)
            {
                try
                {
                    foreach (LayoutInfo layoutInfo in content.Instance.UserControlDisplays)
                    {
                        TabControl tabControl;

                        switch (layoutInfo.Panel)
                        {
                        case PanelAssignment.MainPanel:
                            tabControl = m_PanelLayout.MainTabControl;
                            break;

                        case PanelAssignment.SubPanel:
                            tabControl = m_PanelLayout.SubTabControl;
                            break;

                        case PanelAssignment.InfoPanel:
                            tabControl = m_PanelLayout.InfoTabControl;
                            break;

                        case PanelAssignment.SecondaryPanel:
                            tabControl = m_SecTabControl;
                            break;

                        default:
                            tabControl = m_PanelLayout.MainTabControl;
                            break;
                        }

                        TabItem   displayTabItem = new TabItem();
                        DockPanel tabPanel       = new DockPanel();

                        // Bind the header text to the resource
                        var binding = new Binding(layoutInfo.Name);
                        binding.Source = CultureResources.getDataProvider();
                        BindingOperations.SetBinding(displayTabItem, TabItem.HeaderProperty, binding);

                        displayTabItem.Content = tabPanel;

                        tabPanel.Children.Insert(0, layoutInfo.Display);

                        if (!tabControl.Items.Contains(displayTabItem))
                        {
                            if (layoutInfo.BringToFront)
                            {
                                tabControl.Items.Insert(0, displayTabItem);
                            }
                            else
                            {
                                tabControl.Items.Add(displayTabItem);
                            }
                        }

                        if (layoutInfo.StatusItems != null)
                        {
                            foreach (StatusBarItem statusItem in layoutInfo.StatusItems)
                            {
                                if (!StatusBarItems.Contains(statusItem))
                                {
                                    StatusBarItems.Add(statusItem);
                                }
                            }
                        }
                    }
                    if (content.Instance.PrinterObject != null)
                    {
                        m_PrinterObjects.Add(content.Instance.PrinterObject);
                    }
                }
                catch (Exception ex)
                {
                    //TODO: Log Message here.
                    //MessageBox.Show(ex.ToString());
                }
            }
        }