void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 2: this.DockingManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; case 3: this._layoutRoot = ((Xceed.Wpf.AvalonDock.Layout.LayoutRoot)(target)); return; case 4: this.AMLDocumentTree = ((Aml.Toolkit.View.AMLTreeView)(target)); return; case 5: this.DocumentPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 6: this.Floating = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorableFloatingWindow)(target)); return; case 7: this.FloatingPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 8: this.LeftTabSide = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 9: this.RightTabSide = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 10: this.TopTabSide = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 11: this.BottomTabSide = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 12: this.statusLabel = ((System.Windows.Controls.TextBlock)(target)); return; case 13: this.LayoutTransformSlider = ((System.Windows.Controls.Slider)(target)); return; } this._contentLoaded = true; }
protected override void InternalDock() { LayoutRoot root = base.Root as LayoutRoot; LayoutAnchorablePane parent = null; if (root.ActiveContent != null && root.ActiveContent != this) { parent = root.ActiveContent.Parent as LayoutAnchorablePane; } if (parent == null) { parent = root.Descendents().OfType <LayoutAnchorablePane>().Where <LayoutAnchorablePane>((LayoutAnchorablePane pane) => { if (pane.IsHostedInFloatingWindow) { return(false); } return(pane.GetSide() == AnchorSide.Right); }).FirstOrDefault <LayoutAnchorablePane>(); } if (parent == null) { parent = root.Descendents().OfType <LayoutAnchorablePane>().FirstOrDefault <LayoutAnchorablePane>(); } bool flag = false; if (root.Manager.LayoutUpdateStrategy != null) { flag = root.Manager.LayoutUpdateStrategy.BeforeInsertAnchorable(root, this, parent); } if (!flag) { if (parent == null) { LayoutPanel layoutPanel = new LayoutPanel() { Orientation = Orientation.Horizontal }; if (root.RootPanel != null) { layoutPanel.Children.Add(root.RootPanel); } root.RootPanel = layoutPanel; parent = new LayoutAnchorablePane() { DockWidth = new GridLength(200, GridUnitType.Pixel) }; layoutPanel.Children.Add(parent); } parent.Children.Add(this); flag = true; } if (root.Manager.LayoutUpdateStrategy != null) { root.Manager.LayoutUpdateStrategy.AfterInsertAnchorable(root, this); } base.InternalDock(); }
protected override void InternalDock() { var root = Root as LayoutRoot; LayoutAnchorablePane anchorablePane = null; if( root.ActiveContent != null && root.ActiveContent != this ) { //look for active content parent pane anchorablePane = root.ActiveContent.Parent as LayoutAnchorablePane; } if( anchorablePane == null ) { //look for a pane on the right side anchorablePane = root.Descendents().OfType<LayoutAnchorablePane>().Where( pane => !pane.IsHostedInFloatingWindow && pane.GetSide() == AnchorSide.Right ).FirstOrDefault(); } if( anchorablePane == null ) { //look for an available pane anchorablePane = root.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(); } bool added = false; if( root.Manager.LayoutUpdateStrategy != null ) { added = root.Manager.LayoutUpdateStrategy.BeforeInsertAnchorable( root, this, anchorablePane ); } if( !added ) { if( anchorablePane == null ) { var mainLayoutPanel = new LayoutPanel() { Orientation = Orientation.Horizontal }; if( root.RootPanel != null ) { mainLayoutPanel.Children.Add( root.RootPanel ); } root.RootPanel = mainLayoutPanel; anchorablePane = new LayoutAnchorablePane() { DockWidth = new GridLength( 200.0, GridUnitType.Pixel ) }; mainLayoutPanel.Children.Add( anchorablePane ); } anchorablePane.Children.Add( this ); added = true; } if( root.Manager.LayoutUpdateStrategy != null ) { root.Manager.LayoutUpdateStrategy.AfterInsertAnchorable( root, this ); } base.InternalDock(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.m_leftLayoutAnchorablePane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MainGrid = ((System.Windows.Controls.Grid)(target)); return; case 2: this.Panel = ((Xceed.Wpf.AvalonDock.Layout.LayoutPanel)(target)); return; case 3: this.Paneleft = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 4: this.Solution1 = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 5: this.PaneCenter = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 6: this.Solution2 = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 7: this.Solution3 = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 8: this.Button1 = ((System.Windows.Controls.Button)(target)); return; case 9: this.PaneRight = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 10: this.Solution4 = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 11: this.Solution5 = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; } this._contentLoaded = true; }
public void ToggleAutoHide() { #region Anchorable is already auto hidden if (IsAutoHidden) { var parentGroup = Parent as LayoutAnchorGroup; var parentSide = parentGroup.Parent as LayoutAnchorSide; var previousContainer = (( ILayoutPreviousContainer )parentGroup).PreviousContainer as LayoutAnchorablePane; var root = parentGroup.Root as LayoutRoot; if (previousContainer == null) { AnchorSide side = (parentGroup.Parent as LayoutAnchorSide).Side; switch (side) { case AnchorSide.Right: if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); previousContainer.DockMinWidth = this.AutoHideMinWidth; parentGroup.Root.RootPanel.Children.Add(previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Horizontal }; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(oldRootPanel); panel.Children.Add(previousContainer); } break; case AnchorSide.Left: if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); previousContainer.DockMinWidth = this.AutoHideMinWidth; parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Horizontal }; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(previousContainer); panel.Children.Add(oldRootPanel); } break; case AnchorSide.Top: if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); previousContainer.DockMinHeight = this.AutoHideMinHeight; parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Vertical }; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(previousContainer); panel.Children.Add(oldRootPanel); } break; case AnchorSide.Bottom: if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); previousContainer.DockMinHeight = this.AutoHideMinHeight; parentGroup.Root.RootPanel.Children.Add(previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Vertical }; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(oldRootPanel); panel.Children.Add(previousContainer); } break; } } //I'm about to remove parentGroup, redirect any content (ie hidden contents) that point to it //to previousContainer foreach (var cnt in root.Descendents().OfType <ILayoutPreviousContainer>().Where(c => c.PreviousContainer == parentGroup)) { cnt.PreviousContainer = previousContainer; } foreach (var anchorableToToggle in parentGroup.Children.ToArray()) { previousContainer.Children.Add(anchorableToToggle); } if (previousContainer.Children.Count > 0) { // Select the LayoutContent where the Toggle pin button was pressed. previousContainer.SelectedContentIndex = previousContainer.Children.IndexOf(this); } parentSide.Children.Remove(parentGroup); var parent = previousContainer.Parent as LayoutGroupBase; while ((parent != null)) { if (parent is LayoutGroup <ILayoutPanelElement> ) { ((LayoutGroup <ILayoutPanelElement>)parent).ComputeVisibility(); } parent = parent.Parent as LayoutGroupBase; } } #endregion #region Anchorable is docked else if (Parent is LayoutAnchorablePane) { var root = Root; var parentPane = Parent as LayoutAnchorablePane; var newAnchorGroup = new LayoutAnchorGroup(); (( ILayoutPreviousContainer )newAnchorGroup).PreviousContainer = parentPane; foreach (var anchorableToImport in parentPane.Children.ToArray()) { newAnchorGroup.Children.Add(anchorableToImport); } //detect anchor side for the pane var anchorSide = parentPane.GetSide(); switch (anchorSide) { case AnchorSide.Right: if (root.RightSide != null) { root.RightSide.Children.Add(newAnchorGroup); } break; case AnchorSide.Left: if (root.LeftSide != null) { root.LeftSide.Children.Add(newAnchorGroup); } break; case AnchorSide.Top: if (root.TopSide != null) { root.TopSide.Children.Add(newAnchorGroup); } break; case AnchorSide.Bottom: if (root.BottomSide != null) { root.BottomSide.Children.Add(newAnchorGroup); } break; } } #endregion }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.LayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 2: this.RootVisual = ((System.Windows.Controls.Grid)(target)); return; case 3: this.TopMenuGrid = ((System.Windows.Controls.Grid)(target)); return; case 4: this.PlatformTitle = ((iS3.Client.Controls.RaisedText)(target)); return; case 5: this.DocMan = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; case 6: this._layoutRoot = ((Xceed.Wpf.AvalonDock.Layout.LayoutRoot)(target)); return; case 7: this.ProjectPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 8: this.projectBox = ((System.Windows.Controls.ListBox)(target)); #line 81 "..\..\..\ProjectListPage\ProjectListNormal.xaml" this.projectBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.projectBox_SelectionChanged); #line default #line hidden return; case 9: this.MapPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 10: this.MyMapView = ((Esri.ArcGISRuntime.Controls.MapView)(target)); return; case 11: this.Map = ((Esri.ArcGISRuntime.Controls.Map)(target)); return; case 12: this.ProjectGraphicsLayer = ((Esri.ArcGISRuntime.Layers.GraphicsLayer)(target)); return; case 13: this.mapTip = ((System.Windows.Controls.Border)(target)); return; case 14: this.ProjectTitle = ((iS3.Client.Controls.RaisedText)(target)); return; case 15: this.MapCoordsTB = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
public void ToggleAutoHide() { #region Anchorable is already auto hidden if (IsAutoHidden) { var parentGroup = Parent as LayoutAnchorGroup; var parentSide = parentGroup.Parent as LayoutAnchorSide; var previousContainer = ((ILayoutPreviousContainer)parentGroup).PreviousContainer as LayoutAnchorablePane; if (previousContainer == null) { AnchorSide side = (parentGroup.Parent as LayoutAnchorSide).Side; switch (side) { case AnchorSide.Right: if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); parentGroup.Root.RootPanel.Children.Add(previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Horizontal }; LayoutRoot root = parentGroup.Root as LayoutRoot; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(oldRootPanel); panel.Children.Add(previousContainer); } break; case AnchorSide.Left: if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Horizontal }; LayoutRoot root = parentGroup.Root as LayoutRoot; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(previousContainer); panel.Children.Add(oldRootPanel); } break; case AnchorSide.Top: if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Vertical }; LayoutRoot root = parentGroup.Root as LayoutRoot; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(previousContainer); panel.Children.Add(oldRootPanel); } break; case AnchorSide.Bottom: if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); parentGroup.Root.RootPanel.Children.Add(previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Vertical }; LayoutRoot root = parentGroup.Root as LayoutRoot; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(oldRootPanel); panel.Children.Add(previousContainer); } break; } // Do something about initializing the docks of previousContainer GridLength[] defaultdock = LayoutSetting.GetDefaultDockAnchorable(Title); previousContainer.DockWidth = defaultdock[0]; previousContainer.DockHeight = defaultdock[1]; } else { //I'm about to remove parentGroup, redirect any content (ie hidden contents) that point to it //to previousContainer LayoutRoot root = parentGroup.Root as LayoutRoot; foreach (var cnt in root.Descendents().OfType <ILayoutPreviousContainer>().Where(c => c.PreviousContainer == parentGroup)) { cnt.PreviousContainer = previousContainer; } } foreach (var anchorableToToggle in parentGroup.Children.ToArray()) { previousContainer.Children.Add(anchorableToToggle); } parentSide.Children.Remove(parentGroup); IsDock = true; } #endregion #region Anchorable is docked else if (Parent is LayoutAnchorablePane) { IsActive = false; IsDock = false; IsFloat = false; var root = Root; var parentPane = Parent as LayoutAnchorablePane; var newAnchorGroup = new LayoutAnchorGroup(); ((ILayoutPreviousContainer)newAnchorGroup).PreviousContainer = parentPane; foreach (var anchorableToImport in parentPane.Children.ToArray()) { newAnchorGroup.Children.Add(anchorableToImport); } //detect anchor side for the pane var anchorSide = parentPane.GetSide(); switch (anchorSide) { case AnchorSide.Right: root.RightSide.Children.Add(newAnchorGroup); LayoutSetting.AddDefaultSideAnchorable(Title, "RIGHT"); break; case AnchorSide.Left: root.LeftSide.Children.Add(newAnchorGroup); LayoutSetting.AddDefaultSideAnchorable(Title, "LEFT"); break; case AnchorSide.Top: root.TopSide.Children.Add(newAnchorGroup); LayoutSetting.AddDefaultSideAnchorable(Title, "TOP"); break; case AnchorSide.Bottom: root.BottomSide.Children.Add(newAnchorGroup); LayoutSetting.AddDefaultSideAnchorable(Title, "BOTTOM"); break; } } #endregion }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.RootVisual = ((System.Windows.Controls.Grid)(target)); return; case 2: this.TopMenuGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.ProjectTitle = ((IS3.Desktop.UserControls.RaisedText)(target)); return; case 4: #line 79 "..\..\MainFrame.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Home_Click); #line default #line hidden return; case 5: #line 87 "..\..\MainFrame.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Python_Click); #line default #line hidden return; case 6: this.DocMan = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; case 7: this._layoutRoot = ((Xceed.Wpf.AvalonDock.Layout.LayoutRoot)(target)); return; case 8: this.ProjectPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 9: this.ViewPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 10: this.DataPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 11: this.ipcHost = ((IS3.Python.IronPythonControl)(target)); return; case 12: this.MyDataGrid = ((IS3.Desktop.IS3DataGrid)(target)); return; case 13: this.DomainTreeHolder = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 14: this.ToolsPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 15: this.objViewHolder = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 16: this.objectView = ((IS3.Desktop.ObjectView)(target)); return; case 17: this.Tools = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 18: this.ToolsPanel = ((IS3.Desktop.ToolsPanel)(target)); return; } this._contentLoaded = true; }
public void ToggleAutoHide() { #region Anchorable is already auto hidden if (IsAutoHidden) { var parentGroup = Parent as LayoutAnchorGroup; var parentSide = parentGroup.Parent as LayoutAnchorSide; var previousContainer = ((ILayoutPreviousContainer)parentGroup).PreviousContainer as LayoutAnchorablePane; if (previousContainer == null) { AnchorSide side = (parentGroup.Parent as LayoutAnchorSide).Side; switch (side) { case AnchorSide.Right: if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); parentGroup.Root.RootPanel.Children.Add(previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Horizontal }; LayoutRoot root = parentGroup.Root as LayoutRoot; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(oldRootPanel); panel.Children.Add(previousContainer); } break; case AnchorSide.Left: if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Horizontal }; LayoutRoot root = parentGroup.Root as LayoutRoot; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(previousContainer); panel.Children.Add(oldRootPanel); } break; case AnchorSide.Top: if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Vertical }; LayoutRoot root = parentGroup.Root as LayoutRoot; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(previousContainer); panel.Children.Add(oldRootPanel); } break; case AnchorSide.Bottom: if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); parentGroup.Root.RootPanel.Children.Add(previousContainer); } else { previousContainer = new LayoutAnchorablePane(); LayoutPanel panel = new LayoutPanel() { Orientation = Orientation.Vertical }; LayoutRoot root = parentGroup.Root as LayoutRoot; LayoutPanel oldRootPanel = parentGroup.Root.RootPanel as LayoutPanel; root.RootPanel = panel; panel.Children.Add(oldRootPanel); panel.Children.Add(previousContainer); } break; } } else { //I'm about to remove parentGroup, redirect any content (ie hidden contents) that point to it //to previousContainer LayoutRoot root = parentGroup.Root as LayoutRoot; foreach (var cnt in root.Descendents().OfType <ILayoutPreviousContainer>().Where(c => c.PreviousContainer == parentGroup)) { cnt.PreviousContainer = previousContainer; } } foreach (var anchorableToToggle in parentGroup.Children.ToArray()) { previousContainer.Children.Add(anchorableToToggle); } parentSide.Children.Remove(parentGroup); } #endregion #region Anchorable is docked else if (Parent is LayoutAnchorablePane) { var root = Root; var parentPane = Parent as LayoutAnchorablePane; var newAnchorGroup = new LayoutAnchorGroup(); ((ILayoutPreviousContainer)newAnchorGroup).PreviousContainer = parentPane; foreach (var anchorableToImport in parentPane.Children.ToArray()) { newAnchorGroup.Children.Add(anchorableToImport); } //detect anchor side for the pane var anchorSide = parentPane.GetSide(); switch (anchorSide) { case AnchorSide.Right: root.RightSide.Children.Add(newAnchorGroup); break; case AnchorSide.Left: root.LeftSide.Children.Add(newAnchorGroup); break; case AnchorSide.Top: root.TopSide.Children.Add(newAnchorGroup); break; case AnchorSide.Bottom: root.BottomSide.Children.Add(newAnchorGroup); break; } } #endregion }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.panelLeftU = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 2: this.SceneViewDock = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 3: this.panelLeftD = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 4: this.DetailsDock = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 5: this.panelTop = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 6: this.viewportHost = ((System.Windows.Forms.Integration.WindowsFormsHost)(target)); return; case 7: this.panelBottom = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 8: this.ContentDock = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 9: this.TitleBar = ((System.Windows.Controls.Grid)(target)); return; case 10: this.TitleText = ((System.Windows.Controls.TextBlock)(target)); return; case 11: this.ExitButton = ((System.Windows.Controls.Button)(target)); return; case 12: this.MaxButton = ((System.Windows.Controls.Button)(target)); return; case 13: this.MinButton = ((System.Windows.Controls.Button)(target)); return; case 14: this.File = ((System.Windows.Controls.Menu)(target)); return; case 15: #line 94 "..\..\..\UserControls\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click); #line default #line hidden return; case 16: this.Edit = ((System.Windows.Controls.Menu)(target)); return; case 17: this.cursor = ((System.Windows.Controls.Button)(target)); return; case 18: this.move = ((System.Windows.Controls.Button)(target)); return; case 19: this.rotate = ((System.Windows.Controls.Button)(target)); return; case 20: this.scale = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 7 "..\..\MainWindow.xaml" ((SpectrumScanner.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.mainDockingManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; case 3: this.layoutRoot = ((Xceed.Wpf.AvalonDock.Layout.LayoutRoot)(target)); return; case 4: this.layoutPanel = ((Xceed.Wpf.AvalonDock.Layout.LayoutPanel)(target)); return; case 5: this.layoutAnchorableGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePaneGroup)(target)); return; case 6: this.leftPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 7: this.taskList = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 8: #line 67 "..\..\MainWindow.xaml" ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected_1); #line default #line hidden return; case 9: #line 68 "..\..\MainWindow.xaml" ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected_2); #line default #line hidden return; case 10: #line 69 "..\..\MainWindow.xaml" ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected_3); #line default #line hidden return; case 11: #line 70 "..\..\MainWindow.xaml" ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected_4); #line default #line hidden return; case 12: this.DocumentGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPaneGroup)(target)); return; case 13: this.DocumentPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 14: this.layoutDocument = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocument)(target)); return; case 15: this.myGrid = ((System.Windows.Controls.Grid)(target)); return; case 16: this.border1 = ((System.Windows.Controls.Border)(target)); return; case 17: this.border2 = ((System.Windows.Controls.Border)(target)); return; case 18: this.border3 = ((System.Windows.Controls.Border)(target)); return; case 19: this.border4 = ((System.Windows.Controls.Border)(target)); return; case 20: this.RightAnchorableGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePaneGroup)(target)); return; case 21: this.RightPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 22: this.leftGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 23: this.rightGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 24: this.topGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 25: this.bottomGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; } this._contentLoaded = true; }
public void ToggleAutoHide() { LayoutAnchorable[] array; int i; Func <ILayoutPreviousContainer, bool> func = null; if (!this.IsAutoHidden) { if (base.Parent is LayoutAnchorablePane) { ILayoutRoot root = base.Root; LayoutAnchorablePane parent = base.Parent as LayoutAnchorablePane; LayoutAnchorGroup layoutAnchorGroup = new LayoutAnchorGroup(); ((ILayoutPreviousContainer)layoutAnchorGroup).PreviousContainer = parent; array = parent.Children.ToArray <LayoutAnchorable>(); for (i = 0; i < (int)array.Length; i++) { LayoutAnchorable layoutAnchorable = array[i]; layoutAnchorGroup.Children.Add(layoutAnchorable); } switch (parent.GetSide()) { case AnchorSide.Left: { root.LeftSide.Children.Add(layoutAnchorGroup); return; } case AnchorSide.Top: { root.TopSide.Children.Add(layoutAnchorGroup); return; } case AnchorSide.Right: { root.RightSide.Children.Add(layoutAnchorGroup); return; } case AnchorSide.Bottom: { root.BottomSide.Children.Add(layoutAnchorGroup); break; } default: { return; } } } return; } LayoutAnchorGroup parent1 = base.Parent as LayoutAnchorGroup; LayoutAnchorSide layoutAnchorSide = parent1.Parent as LayoutAnchorSide; LayoutAnchorablePane previousContainer = ((ILayoutPreviousContainer)parent1).PreviousContainer as LayoutAnchorablePane; if (previousContainer != null) { IEnumerable <ILayoutPreviousContainer> layoutPreviousContainers = (parent1.Root as LayoutRoot).Descendents().OfType <ILayoutPreviousContainer>(); Func <ILayoutPreviousContainer, bool> func1 = func; if (func1 == null) { Func <ILayoutPreviousContainer, bool> previousContainer1 = (ILayoutPreviousContainer c) => c.PreviousContainer == parent1; Func <ILayoutPreviousContainer, bool> func2 = previousContainer1; func = previousContainer1; func1 = func2; } foreach (ILayoutPreviousContainer layoutPreviousContainer in layoutPreviousContainers.Where <ILayoutPreviousContainer>(func1)) { layoutPreviousContainer.PreviousContainer = previousContainer; } } else { switch ((parent1.Parent as LayoutAnchorSide).Side) { case AnchorSide.Left: { if (parent1.Root.RootPanel.Orientation != Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); LayoutPanel layoutPanel = new LayoutPanel() { Orientation = Orientation.Horizontal }; LayoutRoot layoutRoot = parent1.Root as LayoutRoot; LayoutPanel rootPanel = parent1.Root.RootPanel; layoutRoot.RootPanel = layoutPanel; layoutPanel.Children.Add(previousContainer); layoutPanel.Children.Add(rootPanel); break; } else { previousContainer = new LayoutAnchorablePane() { DockMinWidth = this.AutoHideMinWidth }; parent1.Root.RootPanel.Children.Insert(0, previousContainer); break; } } case AnchorSide.Top: { if (parent1.Root.RootPanel.Orientation != Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); LayoutPanel layoutPanel1 = new LayoutPanel() { Orientation = Orientation.Vertical }; LayoutRoot root1 = parent1.Root as LayoutRoot; LayoutPanel rootPanel1 = parent1.Root.RootPanel; root1.RootPanel = layoutPanel1; layoutPanel1.Children.Add(previousContainer); layoutPanel1.Children.Add(rootPanel1); break; } else { previousContainer = new LayoutAnchorablePane() { DockMinHeight = this.AutoHideMinHeight }; parent1.Root.RootPanel.Children.Insert(0, previousContainer); break; } } case AnchorSide.Right: { if (parent1.Root.RootPanel.Orientation != Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); LayoutPanel layoutPanel2 = new LayoutPanel() { Orientation = Orientation.Horizontal }; LayoutRoot layoutRoot1 = parent1.Root as LayoutRoot; LayoutPanel rootPanel2 = parent1.Root.RootPanel; layoutRoot1.RootPanel = layoutPanel2; layoutPanel2.Children.Add(rootPanel2); layoutPanel2.Children.Add(previousContainer); break; } else { previousContainer = new LayoutAnchorablePane() { DockMinWidth = this.AutoHideMinWidth }; parent1.Root.RootPanel.Children.Add(previousContainer); break; } } case AnchorSide.Bottom: { if (parent1.Root.RootPanel.Orientation != Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); LayoutPanel layoutPanel3 = new LayoutPanel() { Orientation = Orientation.Vertical }; LayoutRoot root2 = parent1.Root as LayoutRoot; LayoutPanel rootPanel3 = parent1.Root.RootPanel; root2.RootPanel = layoutPanel3; layoutPanel3.Children.Add(rootPanel3); layoutPanel3.Children.Add(previousContainer); break; } else { previousContainer = new LayoutAnchorablePane() { DockMinHeight = this.AutoHideMinHeight }; parent1.Root.RootPanel.Children.Add(previousContainer); break; } } } } array = parent1.Children.ToArray <LayoutAnchorable>(); for (i = 0; i < (int)array.Length; i++) { LayoutAnchorable layoutAnchorable1 = array[i]; previousContainer.Children.Add(layoutAnchorable1); } layoutAnchorSide.Children.Remove(parent1); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MainAppWindow = ((DEA3.MainWindow)(target)); #line 10 "..\..\..\MainWindow.xaml" this.MainAppWindow.Loaded += new System.Windows.RoutedEventHandler(this.MainAppWindow_Loaded); #line default #line hidden #line 12 "..\..\..\MainWindow.xaml" this.MainAppWindow.Unloaded += new System.Windows.RoutedEventHandler(this.MainAppWindow_Unloaded); #line default #line hidden return; case 2: this.Dp_Main = ((System.Windows.Controls.DockPanel)(target)); return; case 3: this.Menu_file = ((System.Windows.Controls.MenuItem)(target)); return; case 4: this.Menu_file_create = ((System.Windows.Controls.MenuItem)(target)); return; case 5: this.Menu_file_open = ((System.Windows.Controls.MenuItem)(target)); return; case 6: this.Menu_file_save = ((System.Windows.Controls.MenuItem)(target)); return; case 7: this.Menu_Sys_exit = ((System.Windows.Controls.MenuItem)(target)); #line 121 "..\..\..\MainWindow.xaml" this.Menu_Sys_exit.Click += new System.Windows.RoutedEventHandler(this.Menu_Sys_exit_Click); #line default #line hidden return; case 8: this.Menu_file_AddNew = ((System.Windows.Controls.MenuItem)(target)); #line 122 "..\..\..\MainWindow.xaml" this.Menu_file_AddNew.Click += new System.Windows.RoutedEventHandler(this.item_AddNew_Click); #line default #line hidden return; case 9: this.Menu_Test = ((System.Windows.Controls.MenuItem)(target)); #line 123 "..\..\..\MainWindow.xaml" this.Menu_Test.Click += new System.Windows.RoutedEventHandler(this.Menu_Test_Click); #line default #line hidden return; case 10: this.Menu_Sys = ((System.Windows.Controls.MenuItem)(target)); return; case 11: this.Menu_Sys_con = ((System.Windows.Controls.MenuItem)(target)); return; case 12: this.Menu_exterior = ((System.Windows.Controls.MenuItem)(target)); return; case 13: this.miGeneric = ((System.Windows.Controls.MenuItem)(target)); #line 129 "..\..\..\MainWindow.xaml" this.miGeneric.Click += new System.Windows.RoutedEventHandler(this.miGeneric_Click_1); #line default #line hidden return; case 14: this.miDark = ((System.Windows.Controls.MenuItem)(target)); #line 130 "..\..\..\MainWindow.xaml" this.miDark.Click += new System.Windows.RoutedEventHandler(this.miDark_Click_1); #line default #line hidden return; case 15: this.miLight = ((System.Windows.Controls.MenuItem)(target)); #line 131 "..\..\..\MainWindow.xaml" this.miLight.Click += new System.Windows.RoutedEventHandler(this.miLight_Click_1); #line default #line hidden return; case 16: this.miMetro = ((System.Windows.Controls.MenuItem)(target)); #line 132 "..\..\..\MainWindow.xaml" this.miMetro.Click += new System.Windows.RoutedEventHandler(this.miMetro_Click_1); #line default #line hidden return; case 17: this.miVS = ((System.Windows.Controls.MenuItem)(target)); #line 133 "..\..\..\MainWindow.xaml" this.miVS.Click += new System.Windows.RoutedEventHandler(this.miVS_Click_1); #line default #line hidden return; case 18: this.Menu_help = ((System.Windows.Controls.MenuItem)(target)); return; case 19: this.Tool_But_Project = ((System.Windows.Controls.Button)(target)); #line 153 "..\..\..\MainWindow.xaml" this.Tool_But_Project.Click += new System.Windows.RoutedEventHandler(this.Tool_But_Project_Click); #line default #line hidden return; case 20: this.Tool_But_Exit = ((System.Windows.Controls.Button)(target)); #line 158 "..\..\..\MainWindow.xaml" this.Tool_But_Exit.Click += new System.Windows.RoutedEventHandler(this.Tool_But_Exit_Click); #line default #line hidden return; case 21: this.statusBar_1 = ((System.Windows.Controls.Primitives.StatusBar)(target)); return; case 22: this.statusBar_CapsLock = ((System.Windows.Controls.TextBlock)(target)); return; case 23: this.statusBar_NumLock = ((System.Windows.Controls.TextBlock)(target)); return; case 24: this.statusBar_InsertLock = ((System.Windows.Controls.TextBlock)(target)); return; case 25: this.dockingManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; case 26: this.layOutPaneTree = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 27: this.TreeView_Project = ((System.Windows.Controls.TreeView)(target)); #line 194 "..\..\..\MainWindow.xaml" this.TreeView_Project.Loaded += new System.Windows.RoutedEventHandler(this.TreeView_Project_Loaded); #line default #line hidden return; case 28: this.layOutPaneContent = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.munMenu = ((System.Windows.Controls.Menu)(target)); return; case 2: this.fileSave = ((System.Windows.Controls.MenuItem)(target)); #line 18 "..\..\MainWindow.xaml" this.fileSave.Click += new System.Windows.RoutedEventHandler(this.fileSave_Click); #line default #line hidden return; case 3: this.fileLoad = ((System.Windows.Controls.MenuItem)(target)); #line 19 "..\..\MainWindow.xaml" this.fileLoad.Click += new System.Windows.RoutedEventHandler(this.fileLoad_Click); #line default #line hidden return; case 4: this.programExit = ((System.Windows.Controls.MenuItem)(target)); #line 21 "..\..\MainWindow.xaml" this.programExit.Click += new System.Windows.RoutedEventHandler(this.programExit_Click); #line default #line hidden return; case 5: this.miLeft = ((System.Windows.Controls.MenuItem)(target)); #line 25 "..\..\MainWindow.xaml" this.miLeft.Click += new System.Windows.RoutedEventHandler(this.imageLoad_Click); #line default #line hidden return; case 6: this.miRight = ((System.Windows.Controls.MenuItem)(target)); return; case 7: this.miTop = ((System.Windows.Controls.MenuItem)(target)); return; case 8: this.miBottom = ((System.Windows.Controls.MenuItem)(target)); return; case 9: this.miAnchorPane = ((System.Windows.Controls.MenuItem)(target)); return; case 10: this.miAnchorVerticalPane = ((System.Windows.Controls.MenuItem)(target)); return; case 11: this.miDocumentPane = ((System.Windows.Controls.MenuItem)(target)); return; case 12: this.priorityPane = ((System.Windows.Controls.MenuItem)(target)); return; case 13: this.miAddAnchroable = ((System.Windows.Controls.MenuItem)(target)); return; case 14: this.miAddDocument = ((System.Windows.Controls.MenuItem)(target)); return; case 15: this.miOutPutWnd = ((System.Windows.Controls.MenuItem)(target)); return; case 16: this.miAutoHide = ((System.Windows.Controls.MenuItem)(target)); return; case 17: this.miGeneric = ((System.Windows.Controls.MenuItem)(target)); #line 46 "..\..\MainWindow.xaml" this.miGeneric.Click += new System.Windows.RoutedEventHandler(this.themeGeneric_Click); #line default #line hidden return; case 18: this.miAero = ((System.Windows.Controls.MenuItem)(target)); #line 47 "..\..\MainWindow.xaml" this.miAero.Click += new System.Windows.RoutedEventHandler(this.themeAero_Click); #line default #line hidden return; case 19: this.miDark = ((System.Windows.Controls.MenuItem)(target)); #line 48 "..\..\MainWindow.xaml" this.miDark.Click += new System.Windows.RoutedEventHandler(this.themeDark_Click); #line default #line hidden return; case 20: this.miLight = ((System.Windows.Controls.MenuItem)(target)); #line 49 "..\..\MainWindow.xaml" this.miLight.Click += new System.Windows.RoutedEventHandler(this.themeLight_Click); #line default #line hidden return; case 21: this.miMetro = ((System.Windows.Controls.MenuItem)(target)); #line 50 "..\..\MainWindow.xaml" this.miMetro.Click += new System.Windows.RoutedEventHandler(this.themeMetro_Click); #line default #line hidden return; case 22: this.miVS = ((System.Windows.Controls.MenuItem)(target)); #line 51 "..\..\MainWindow.xaml" this.miVS.Click += new System.Windows.RoutedEventHandler(this.themeVS_Click); #line default #line hidden return; case 23: this.DockManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; case 24: this.Root = ((Xceed.Wpf.AvalonDock.Layout.LayoutRoot)(target)); return; case 25: this.Panel = ((Xceed.Wpf.AvalonDock.Layout.LayoutPanel)(target)); return; case 26: this.LeftAnchorableGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePaneGroup)(target)); return; case 27: this.LeftPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 28: this.Solution = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 29: this.mToolBox = ((System.Windows.Controls.ListBox)(target)); return; case 30: this.TemperaPanel = ((System.Windows.Controls.ListBoxItem)(target)); return; case 31: this.MonitorControl = ((System.Windows.Controls.ListBoxItem)(target)); return; case 32: this.MotionSensor = ((System.Windows.Controls.ListBoxItem)(target)); return; case 33: this.WindowMagnet = ((System.Windows.Controls.ListBoxItem)(target)); return; case 34: this.DocumentGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPaneGroup)(target)); return; case 35: this.DocumentPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 36: this.mEidtor = ((System.Windows.Controls.Canvas)(target)); #line 83 "..\..\MainWindow.xaml" this.mEidtor.DragOver += new System.Windows.DragEventHandler(this.OnDragOver); #line default #line hidden #line 83 "..\..\MainWindow.xaml" this.mEidtor.Drop += new System.Windows.DragEventHandler(this.OnDrop); #line default #line hidden return; case 37: this.backgroundImage = ((System.Windows.Media.ImageBrush)(target)); return; case 38: this.RightAnchorableGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePaneGroup)(target)); return; case 39: this.RightPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 40: this.mEditSize = ((System.Windows.Controls.ListBoxItem)(target)); return; case 41: this.mPosition = ((System.Windows.Controls.ListBoxItem)(target)); return; case 42: this.LeftGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 43: this.RightGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 44: this.TopGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 45: this.BottomGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 6 "..\..\MainWindow.xaml" ((HerbalAnalysis.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 6 "..\..\MainWindow.xaml" ((HerbalAnalysis.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden #line 6 "..\..\MainWindow.xaml" ((HerbalAnalysis.MainWindow)(target)).Activated += new System.EventHandler(this.Window_Activated); #line default #line hidden return; case 2: #line 8 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.NewPqxProjCommand); #line default #line hidden return; case 3: #line 9 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OpenPqxProjCommand); #line default #line hidden return; case 4: this.mainMenu = ((System.Windows.Controls.Menu)(target)); return; case 5: this.menuItemFile = ((System.Windows.Controls.MenuItem)(target)); #line 17 "..\..\MainWindow.xaml" this.menuItemFile.MouseEnter += new System.Windows.Input.MouseEventHandler(this.menuItemFile_MouseEnter); #line default #line hidden return; case 6: this.menuItemNew = ((System.Windows.Controls.MenuItem)(target)); return; case 7: this.menuItemOpen = ((System.Windows.Controls.MenuItem)(target)); return; case 8: this.menuItemAdd = ((System.Windows.Controls.MenuItem)(target)); return; case 9: this.menuItemClose = ((System.Windows.Controls.MenuItem)(target)); return; case 10: this.menuItemRecentProject = ((System.Windows.Controls.MenuItem)(target)); return; case 12: this.menuItemExit = ((System.Windows.Controls.MenuItem)(target)); return; case 13: this.menuItemEdit = ((System.Windows.Controls.MenuItem)(target)); return; case 14: this.menuItemUndo = ((System.Windows.Controls.MenuItem)(target)); return; case 15: this.menuItemCut = ((System.Windows.Controls.MenuItem)(target)); return; case 16: this.menuItemCopy = ((System.Windows.Controls.MenuItem)(target)); return; case 17: this.menuItemPaste = ((System.Windows.Controls.MenuItem)(target)); return; case 18: this.menuItemDelete = ((System.Windows.Controls.MenuItem)(target)); return; case 19: this.menuItemView = ((System.Windows.Controls.MenuItem)(target)); return; case 20: this.menuItemProjResManager = ((System.Windows.Controls.MenuItem)(target)); return; case 21: this.menuItemProjAttrPage = ((System.Windows.Controls.MenuItem)(target)); return; case 22: this.menuItemTools = ((System.Windows.Controls.MenuItem)(target)); return; case 23: this.menuItemAbout = ((System.Windows.Controls.MenuItem)(target)); #line 50 "..\..\MainWindow.xaml" this.menuItemAbout.Click += new System.Windows.RoutedEventHandler(this.menuItemHelp_Click); #line default #line hidden return; case 24: this.Panel = ((Xceed.Wpf.AvalonDock.Layout.LayoutPanel)(target)); return; case 25: this.RightAnchorableGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePaneGroup)(target)); return; case 26: this.RightPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 27: this.NodeNameTextBox = ((System.Windows.Controls.TextBox)(target)); #line 77 "..\..\MainWindow.xaml" this.NodeNameTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.NodeNameTextBox_TextChanged); #line default #line hidden return; case 28: this.WaveLengthStartTB = ((System.Windows.Controls.TextBox)(target)); #line 80 "..\..\MainWindow.xaml" this.WaveLengthStartTB.AddHandler(System.Windows.DataObject.PastingEvent, new System.Windows.DataObjectPastingEventHandler(this.WaveLengthTB_Pasting)); #line default #line hidden #line 80 "..\..\MainWindow.xaml" this.WaveLengthStartTB.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.WaveLengthTB_PreviewKeyDown); #line default #line hidden return; case 29: this.WaveLengthSpaceTB = ((System.Windows.Controls.TextBox)(target)); #line 82 "..\..\MainWindow.xaml" this.WaveLengthSpaceTB.AddHandler(System.Windows.DataObject.PastingEvent, new System.Windows.DataObjectPastingEventHandler(this.WaveLengthTB_Pasting)); #line default #line hidden #line 82 "..\..\MainWindow.xaml" this.WaveLengthSpaceTB.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.WaveLengthTB_PreviewKeyDown); #line default #line hidden return; case 30: this.AppendButton = ((System.Windows.Controls.Button)(target)); #line 85 "..\..\MainWindow.xaml" this.AppendButton.Click += new System.Windows.RoutedEventHandler(this.AppendButton_Click); #line default #line hidden return; case 31: this.TipsTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 32: this.IsSortTimeCheckBox = ((System.Windows.Controls.CheckBox)(target)); return; case 33: this.IsReverseCheckBox = ((System.Windows.Controls.CheckBox)(target)); return; case 34: this.DirTreeView = ((System.Windows.Controls.TreeView)(target)); return; case 35: this.LeftGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 36: this.RightGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 37: this.TopGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 38: this.BottomGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; } this._contentLoaded = true; }
protected override void InternalDock() { var root = Root as LayoutRoot; LayoutAnchorablePane anchorablePane = null; //if (root.ActiveContent != null && // root.ActiveContent != this) //{ // //look for active content parent pane // anchorablePane = root.ActiveContent.Parent as LayoutAnchorablePane; //} if (anchorablePane == null) { //look for panes the same DockSide. IEnumerable <LayoutAnchorablePane> panes = root.Descendents().OfType <LayoutAnchorablePane>().Where(pane => !pane.IsHostedInFloatingWindow && pane.GetSide() == this.DockSide); foreach (var item in panes) { if (item.Name == this.ContentId) { anchorablePane = item; } } //look for LayoutAnchorablePane whose name the same as current LayoutAnchorable's ContentId LayoutAnchorablePane oriPane = panes.Where(pane => pane.Name == this.ContentId).FirstOrDefault(); anchorablePane = oriPane != null ? oriPane : panes.FirstOrDefault(); } if (anchorablePane == null) { //look for an available pane anchorablePane = root.Descendents().OfType <LayoutAnchorablePane>().FirstOrDefault(); } bool added = false; if (root.Manager.LayoutUpdateStrategy != null) { added = root.Manager.LayoutUpdateStrategy.BeforeInsertAnchorable(root, this, anchorablePane); } if (!added) { if (anchorablePane == null) { var mainLayoutPanel = new LayoutPanel() { Orientation = Orientation.Horizontal }; if (root.RootPanel != null) { mainLayoutPanel.Children.Add(root.RootPanel); } root.RootPanel = mainLayoutPanel; anchorablePane = new LayoutAnchorablePane() { DockWidth = new GridLength(200.0, GridUnitType.Pixel) }; mainLayoutPanel.Children.Add(anchorablePane); } anchorablePane.Children.Add(this); added = true; } if (root.Manager.LayoutUpdateStrategy != null) { root.Manager.LayoutUpdateStrategy.AfterInsertAnchorable(root, this); } base.InternalDock(); }
public LayoutAnchorablePaneGroup(LayoutAnchorablePane firstChild) { Children.Add(firstChild); }
public void AddToLayout(DockingManager manager, AnchorableShowStrategy strategy) { if (this.IsVisible || this.IsHidden) { throw new InvalidOperationException(); } bool flag = (strategy & AnchorableShowStrategy.Most) == AnchorableShowStrategy.Most; bool flag1 = (strategy & AnchorableShowStrategy.Left) == AnchorableShowStrategy.Left; bool flag2 = (strategy & AnchorableShowStrategy.Right) == AnchorableShowStrategy.Right; bool flag3 = (strategy & AnchorableShowStrategy.Top) == AnchorableShowStrategy.Top; bool flag4 = (strategy & AnchorableShowStrategy.Bottom) == AnchorableShowStrategy.Bottom; if (!flag) { AnchorSide anchorSide = AnchorSide.Left; if (flag1) { anchorSide = AnchorSide.Left; } if (flag2) { anchorSide = AnchorSide.Right; } if (flag3) { anchorSide = AnchorSide.Top; } if (flag4) { anchorSide = AnchorSide.Bottom; } LayoutAnchorablePane layoutAnchorablePane = manager.Layout.Descendents().OfType <LayoutAnchorablePane>().FirstOrDefault <LayoutAnchorablePane>((LayoutAnchorablePane p) => p.GetSide() == anchorSide); if (layoutAnchorablePane == null) { flag = true; } else { layoutAnchorablePane.Children.Add(this); } } if (flag) { if (manager.Layout.RootPanel == null) { manager.Layout.RootPanel = new LayoutPanel() { Orientation = (flag1 | flag2 ? Orientation.Horizontal : Orientation.Vertical) }; } if (flag1 | flag2) { if (manager.Layout.RootPanel.Orientation == Orientation.Vertical && manager.Layout.RootPanel.ChildrenCount > 1) { manager.Layout.RootPanel = new LayoutPanel(manager.Layout.RootPanel); } manager.Layout.RootPanel.Orientation = Orientation.Horizontal; if (!flag1) { manager.Layout.RootPanel.Children.Add(new LayoutAnchorablePane(this)); return; } manager.Layout.RootPanel.Children.Insert(0, new LayoutAnchorablePane(this)); return; } if (manager.Layout.RootPanel.Orientation == Orientation.Horizontal && manager.Layout.RootPanel.ChildrenCount > 1) { manager.Layout.RootPanel = new LayoutPanel(manager.Layout.RootPanel); } manager.Layout.RootPanel.Orientation = Orientation.Vertical; if (flag3) { manager.Layout.RootPanel.Children.Insert(0, new LayoutAnchorablePane(this)); return; } manager.Layout.RootPanel.Children.Add(new LayoutAnchorablePane(this)); } }