Esempio n. 1
0
 private void AddDockablePanel(IView view)
 {
     view.Initialize();
     view.Activate();
     App.DockManager.Add(new DockablePanel(view.Key, view.Caption, view.InnerControl, view.Dock)
     {
         SmallImage = view.SmallImage, DefaultSortOrder = view.DefaultSortOrder
     });
 }
Esempio n. 2
0
        private void CreateAndShowNewView()
        {
            var viewType   = _FrameController.GetNextViewType();
            var switchType = _FrameController.GetNextViewSwitchType();

            if (_CurrentView != null)
            {
                _CurrentView.Deactivate();
            }
            _CurrentView = _ViewManager.CreateView(viewType);
            _CurrentView.Activate(switchType);
        }
Esempio n. 3
0
 private void ActiveView(IView view)
 {
     activeView.Deactivate();
     activeView                 = view;
     EditControl.Visibility     = Visibility.Hidden;
     SimulateControl.Visibility = Visibility.Hidden;
     if (view == EditControl)
     {
         EditControl.Visibility = Visibility.Visible;
     }
     else
     {
         SimulateControl.Visibility = Visibility.Visible;
     }
     activeView.Activate();
     RefreshMenu();
 }
Esempio n. 4
0
        private void ShowSession(IView hostWindow)
        {
            if (hostWindow != null)
            {
                _views.MainWindow?.Hide();

                if (hostWindow.IsClosed)
                {
                    hostWindow.Show();
                }
                else
                {
                    hostWindow.MakeVisible();
                }
                hostWindow.Activate();
            }
        }
        private IView ShowView <TView>(Func <IView> viewFactory) where TView : IView
        {
            IView view = null;

            if (_views.TryGetValue(typeof(TView), out view))
            {
                if (!view.IsDisposed)
                {
                    view.Activate();
                    return(view);
                }
            }

            view = viewFactory();
            view.Show();
            _views[typeof(TView)] = view;

            return(view);
        }
 private void AddDockablePanel(IView view)
 {
     view.Initialize();
     view.Activate();
     App.DockManager.Add(new DockablePanel(view.Key, view.Caption, view.InnerControl, view.Dock) { SmallImage = view.SmallImage, DefaultSortOrder = view.DefaultSortOrder });
 }