コード例 #1
0
        private ToolViewModel ReloadTool(Xceed.Wpf.AvalonDock.Layout.LayoutContent model)
        {
            string cId        = model.ContentId;
            var    anchorable = model as Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable;

            if (anchorable == null)
            {
                return(null);
            }

            if (cId == SearchViewModel.ToolContentId)
            {
                // нельзя делать после логина / убирать - в авалоне всегда должна быть модель
                searchPanel = new SearchViewModel()
                {
                    Title = "Поиск"
                };
                searchPanel.SetAnchorable(anchorable);
                searchPanel.IsVisible = switcher.WithSearch;
                Tools.Add(searchPanel);

                return(searchPanel);
            }
            return(null);
        }
コード例 #2
0
 public PaneViewModel(string windowID, string title, Xceed.Wpf.AvalonDock.Layout.LayoutContent layoutPane,
                      System.Windows.Controls.UserControl contentControl)
 {
     WindowID       = windowID;
     Title          = title;
     LayoutPane     = layoutPane;
     ContentControl = contentControl;
 }
コード例 #3
0
 public ToolViewModel(string windowID, string name, Xceed.Wpf.AvalonDock.Layout.LayoutContent layoutPane,
                      System.Windows.Controls.UserControl control,
                      SystemControllerEnums.DockPosition position) : base(windowID, name, layoutPane, control)
 {
     Name         = name;
     Title        = name;
     DockPosition = position;
 }
コード例 #4
0
 public DocumentViewModel(string windowID, string title, Xceed.Wpf.AvalonDock.Layout.LayoutContent layoutPane,
                          System.Windows.Controls.UserControl control)
     : base(windowID, title, layoutPane, control)
 {
     // Asigna las propiedades
     IsDirty = false;
     // Asigna el icono
     //IconSource = ISC.ConvertFromInvariantString(@"pack://application:,,/Images/document.png") as ImageSource;
 }
コード例 #5
0
        private ScreenBaseViewModel ReloadDocument(Xceed.Wpf.AvalonDock.Layout.LayoutContent model)
        {
            string cId = model.ContentId;

            if (cId == ScreenBaseViewModel.ScreenContentId)
            {
                return(CurrentView);
            }

            return(null);
        }