Example #1
1
 public void AfterInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableShown)
 {
     var content = anchorableShown.Content as PaneViewModel;
     if(content != null && content.DoFloating)
     {
         anchorableShown.Float();
     }
 }
Example #2
0
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {
            if (destinationContainer != null &&
                destinationContainer.FindParent<LayoutFloatingWindow>() != null)
            {
                return false;
            }

            foreach (var viewModelPane in ViewModelPanes)
            {
                if (viewModelPane.Item1.IsInstanceOfType(anchorableToShow.Content))
                {
                    var pane = layout
                        .Descendents()
                        .OfType<LayoutAnchorablePane>()
                        .SingleOrDefault(p => p.Name == viewModelPane.Item2);

                    if (pane != null)
                    {
                        pane.Children.Add(anchorableToShow);

                        if (viewModelPane.Item3)
                        {
                            anchorableToShow.ToggleAutoHide();
                        }

                        return true;
                    }
                }
            }

            return false;
        }
Example #3
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable d = new Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable();
     // Check the menu item.
     foreach (MenuItem item in ((sender as MenuItem).Parent as MenuItem).Items)
     {
         item.IsChecked = (item == (sender as MenuItem));
         if (item.IsChecked)
         {
             if (item.Name == "aero")
             {
                 SelectedTheme = 1;
             }
             else if (item.Name == "metro")
             {
                 SelectedTheme = 2;
             }
             else if (item.Name == "vs2010")
             {
                 SelectedTheme = 3;
             }
             else
             {
                 SelectedTheme = 0;
             }
         }
     }
 }
        internal override void Attach(LayoutContent model)
        {
            _anchorable = model as LayoutAnchorable;
            _anchorable.IsVisibleChanged += new EventHandler(_anchorable_IsVisibleChanged);

            base.Attach(model);
        }
Example #5
0
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {
            var tool = anchorableToShow.Content as ITool;
            if (tool != null)
            {
                var preferredLocation = tool.PreferredLocation;
                string paneName = GetPaneName(preferredLocation);
                var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == paneName);
                if (toolsPane == null)
                {
                    switch (preferredLocation)
                    {
                        case PaneLocation.Left:
                            toolsPane = CreateAnchorablePane(layout, Orientation.Horizontal, paneName, InsertPosition.Start);
                            break;
                        case PaneLocation.Right:
                            toolsPane = CreateAnchorablePane(layout, Orientation.Horizontal, paneName, InsertPosition.End);
                            break;
                        case PaneLocation.Bottom:
                            toolsPane = CreateAnchorablePane(layout, Orientation.Vertical, paneName, InsertPosition.End);
                            break;
                        default:
                            throw new ArgumentOutOfRangeException();
                    }
                }
                toolsPane.Children.Add(anchorableToShow);
                return true;
            }

            return false;
        }
Example #6
0
 public void AddPanel(LayoutAnchorable panel)
 {
     if (!_Panels.Contains(panel))
     {
         _Panels.Add(panel);
     }
 }
Example #7
0
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {           
            //Determine panel name for given view model type
            string destPaneName = string.Empty;
            if (anchorableToShow.Content is JadeControls.Workspace.ViewModel.WorkspaceViewModel ||
                anchorableToShow.Content is JadeControls.SymbolInspector.SymbolInspectorPaneViewModel ||
                anchorableToShow.Content is JadeControls.CursorInspector.CursorInspectorPaneViewModel)
            {
                destPaneName = "LeftToolPanel";
            }
            else if (anchorableToShow.Content is JadeControls.OutputControl.ViewModel.OutputViewModel ||
                    anchorableToShow.Content is JadeControls.SearchResultsControl.ViewModel.SearchResultsPaneViewModel)
            {
                destPaneName = "LowerToolPanel";
            }
            else if (anchorableToShow.Content is JadeControls.ContextTool.ContextPaneViewModel)
            {
                destPaneName = "RightToolPanel";
            }
            else
            {
                return false;
            }

            //Find pane
            var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == destPaneName);
            if (toolsPane != null)
            {
                //Add
                toolsPane.Children.Add(anchorableToShow);
                return true;
            } 
            return false;
        }
Example #8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.docking_In_Sight = ((Xceed.Wpf.AvalonDock.DockingManager)(target));
                return;

            case 2:
                this.File = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 3:
                this.Network = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 4:
                this.Step = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 5:
                this.Palette = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;
            }
            this._contentLoaded = true;
        }
        internal LayoutAnchorControl(LayoutAnchorable model)
        {
            _model = model;
            _model.IsActiveChanged += new EventHandler(_model_IsActiveChanged);
            _model.IsSelectedChanged += new EventHandler(_model_IsSelectedChanged);

            SetSide(_model.FindParent<LayoutAnchorSide>().Side);
        }
Example #10
0
 /// <summary>
 /// Method that adds to the GraphicsContainer a LayoutAnchorable that contains a Data visualizer user control
 /// </summary>
 /// <param name="objectToAdd"></param>
 public void addToAnchorablePane(UserControl objectToAdd, string Title)
 {
     LayoutAnchorable doc = new LayoutAnchorable();
     doc.Hiding += doc_Hiding;
     doc.CanHide = true;
     doc.CanClose = true;
     doc.Title = Title;
     doc.Content = objectToAdd;
     doc.AddToLayout(containersManager, AnchorableShowStrategy.Right);
 }
Example #11
0
        //http://avalondock.codeplex.com/wikipage?title=AvalonDock%202.0%20Getting%20Start%20Guide&referringTitle=Documentation
		public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
		{
            if (anchorableToShow.Content is ITool)
            {
                var preferredLocation = ((ITool) anchorableToShow.Content).PreferredLocation;
                string paneName = GetPaneName(preferredLocation);
                var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == paneName);
                if (toolsPane == null)
                {
                    switch (preferredLocation)
                    {
                        case PaneLocation.Left:
                        {
                            //TODO: this should use two steps: first, try to add to existing "LayoutAnchorablePane" if not create layoutAnchorGroup like below
                            var layoutAnchorSide = layout.Descendents().OfType<LayoutAnchorSide>().First(side => side.Side == AnchorSide.Left);
                            var layoutAnchorGroup = new LayoutAnchorGroup();
                            layoutAnchorGroup.InsertChildAt(0, anchorableToShow);
                            layoutAnchorSide.InsertChildAt(0, layoutAnchorGroup);
                            anchorableToShow.AutoHideWidth = 200;

                            //var parent = layout.Descendents().OfType<LayoutPanel>().First(d => d.Orientation == Orientation.Horizontal);
                            //toolsPane = new LayoutAnchorablePane { DockWidth = new GridLength(200, GridUnitType.Pixel) };
                        }
                            break;
                        case PaneLocation.Right:
                        {
                            var parent = layout.Descendents().OfType<LayoutPanel>().First(d => d.Orientation == Orientation.Horizontal);
                            toolsPane = new LayoutAnchorablePane { DockWidth = new GridLength(200, GridUnitType.Pixel) };
                            parent.Children.Add(toolsPane);
                        }
                            break;
                        case PaneLocation.Bottom:
                        {
                            var ds = layout.Descendents().ToList();
                            var items = layout.Descendents().OfType<LayoutPanel>().ToList();
                            var items2 = layout.Descendents().OfType<LayoutAnchorGroup>().ToList();
                            //var parent = items2.First();
                            var parent = layout.Descendents().OfType<LayoutPanel>().First(d => d.Orientation == Orientation.Vertical);
                            toolsPane = new LayoutAnchorablePane { DockHeight = new GridLength(300, GridUnitType.Pixel) };
                            parent.Children.Add(toolsPane);
                        }
                            break;
                        default:
                            throw new ArgumentOutOfRangeException();
                    }
                }
                if(toolsPane != null)
                    toolsPane.Children.Add(anchorableToShow);
                return true;
            }

			return false;
		}
Example #12
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     IDockingViewManager dockingViewManager = _container.Resolve<DockingViewManager>(); // ServiceLocator.Current.GetInstance<DockingViewManager>();
     string viewType = (sender as Button).Content as string;
     UserControl view = new UserControl();
     if (viewType == "Dur") view = dockingViewManager.GetDockingView(WellknowViewName.DurationTraderView);
     if (viewType == "5-10YR") view = dockingViewManager.GetDockingView(WellknowViewName._5_10Yr);
     
     LayoutAnchorable a1 = new LayoutAnchorable() {Content=view, Title="Floating", FloatingWidth = 600, FloatingHeight = 400, FloatingLeft=50, FloatingTop=50 };
     a1.AddToLayout(dockingManager, AnchorableShowStrategy.Most);
     a1.Float();
   
 }
Example #13
0
        /// <summary>
        /// 加入新的Window到文档口(WPF Only)
        /// </summary>
        /// <param name="wd">WPF窗口</param>
        /// <param name="title">标题</param>
        public void AddDocWpf(Object wd, String title)
        {
            var docPane = _dManager.Layout.Descendents().OfType<LayoutDocumentPane>().First();
            var doc = new LayoutAnchorable
            {
                Title = title,
                Content = wd,
                IsSelected = true,
                CanAutoHide = true
            };

            if (docPane != null) docPane.Children.Add(doc);
        }
Example #14
0
        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.modeBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 3:
                this.beginBtn = ((System.Windows.Controls.Primitives.ToggleButton)(target));
                return;

            case 4:
                this.dockmanager = ((Xceed.Wpf.AvalonDock.DockingManager)(target));
                return;

            case 5:
                this.manager = ((ElectricAnalysis.View.ResourceManager)(target));
                return;

            case 6:
                this.middlePanel = ((Xceed.Wpf.AvalonDock.Layout.LayoutPanel)(target));
                return;

            case 7:
                this.ShowPanel = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target));
                return;

            case 8:
                this.msglist = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 9:
                this.msgbox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 10:
                this.branchView = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 11:
                this.branchPanel = ((System.Windows.Controls.StackPanel)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #15
0
        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;
        }
Example #16
0
        /// <summary>
        /// 加入新的WinForm到文档口(WPF Only)
        /// </summary>
        public void AddDocForm(UserControl uc, String title)
        {
            var docPane = _dManager.Layout.Descendents().OfType<LayoutDocumentPane>().First();

            var doc = new LayoutAnchorable
            {
                Title = title,
                Content = new WindowsFormsHost { Child = uc },
                IsSelected = true,
                CanAutoHide = true
            };

            docPane.Children.Add(doc);
        }
Example #17
0
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {
            if (destinationContainer != null &&
                destinationContainer.FindParent<LayoutFloatingWindow>() != null)
                return false;

            var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == "ToolsPane");
            if (toolsPane != null)
            {
                toolsPane.Children.Add(anchorableToShow);
                return true;
            }

            return false;
        }
Example #18
0
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorable, ILayoutContainer destination)
        {
            LayoutAnchorablePane pane = destination as LayoutAnchorablePane;
            if (destination != null && destination.FindParent<LayoutFloatingWindow>() != null)
            {
                return false;
            }

            LayoutAnchorablePane files = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == "pnFiles");
            if (files != null)
            {
                files.Children.Add(anchorable);
                return true;
            }
            return false;
        }
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {
            var myViewModel = anchorableToShow.Content as IToolWindow;
            if (myViewModel != null)
            {
                var lap = layout.Descendents();
                var pane = lap.OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == myViewModel.DefaultDockingPane);
                if (pane != null)
                {
                    pane.Children.Add(anchorableToShow);
                    return true;
                }
            }

            return false;
        }
Example #20
0
        /// <summary>
        /// 左侧载入新的WinForm
        /// </summary>
        public void AddFormLeft(UserControl uc, String title, String to = "图像加载信息")
        {
            var leftPane = _dManager.Layout.Descendents().OfType<LayoutAnchorablePane>().First();
            if (leftPane == null) return;

            var doc = new LayoutAnchorable
            {
                CanClose = false,
                CanHide = false,
                Title = title,
                ToolTip = to,
                Content = new WindowsFormsHost {Child = uc},
                IsSelected = true,
                CanAutoHide = true
            };

            leftPane.Children.Add(doc);
        }
Example #21
0
        public void addToAnchorablePane(UserControl objectToAdd, string Title)
        {
            if (mainPanelVideoContainer != null)
            {
                LayoutAnchorable doc = new LayoutAnchorable();
                doc.Hiding += doc_Hiding;
                doc.CanHide = true;
                doc.CanClose = true;
                doc.Title = Title;
                doc.Content = objectToAdd;
                mainPanelVideoContainer.Children.Add(doc);

            }
            else
            {
                throw new NotImplementedException();
            }
        }
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {
            //AD wants to add the anchorable into destinationContainer
            //just for test provide a new anchorablepane
            //if the pane is floating let the manager go ahead
            LayoutAnchorablePane destPane = destinationContainer as LayoutAnchorablePane;
            if (destinationContainer != null &&
                destinationContainer.FindParent<LayoutFloatingWindow>() != null)
                return false;

            if (anchorableToShow.Content is SectionBrowserViewModel)
            {
                var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == "SectionBrowserPane");
                if (toolsPane != null)
                {
                   // anchorableToShow.CanHide = false;
                    toolsPane.Children.Add(anchorableToShow);
                    return true;
                }
            }

            if (anchorableToShow.Content is BlockGroupBrowserViewModel)
            {
                var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == "BlockGroupBrowserPane");
                if (toolsPane != null)
                {
                   // anchorableToShow.CanHide = false;
                    toolsPane.Children.Add(anchorableToShow);
                    return true;
                }
            }

            if (anchorableToShow.Content is BlockOutputPreviewViewModel)
            {
                var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == "BlockOutputPreviewPane");
                if (toolsPane != null)
                {
                    toolsPane.Children.Add(anchorableToShow);
                    return true;
                }
            }

            return false;
        }
Example #23
0
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {
            //AD wants to add the anchorable into destinationContainer
            //just for test provide a new anchorablepane
            //if the pane is floating let the manager go ahead
            //LayoutAnchorablePane destPane = destinationContainer as LayoutAnchorablePane;
            //if (destinationContainer != null &&
            //    destinationContainer.FindParent<LayoutFloatingWindow>() != null)
            //    return false;

            //var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == "ToolsPane");
            //if (toolsPane != null)
            //{
            //    toolsPane.Children.Add(anchorableToShow);
            //    return true;
            //}

            return false;
        }
 private static bool GetContentAnchorableIsHidden(LayoutAnchorable anchorable)
 {
     if (anchorable == null)
     {
         return false;
     }
     if (anchorable.IsAnchorable())
     {
         return anchorable.GetAnchorableIsHidden();
     }
     else if (anchorable.Content.IsAnchorable())
     {
         return anchorable.Content.GetAnchorableIsHidden();
     }
     else
     {
         throw new InvalidOperationException();
     }
 }
Example #25
0
 public void AfterInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableShown)
 {
     //   var toolViewModel = anchorableShown.Content as ToolViewModel;
     //   if (toolViewModel != null)
     //   {
     //       switch (toolViewModel.DefaultPane)
     //       {
     //           case DefaultToolPane.Left:
     //           case DefaultToolPane.Right:
     //               anchorableShown.AutoHideMinWidth = (double)toolViewModel.Width;
     //               anchorableShown.AutoHideWidth = (double)toolViewModel.Width;
     //               break;
     //           case DefaultToolPane.Bottom:
     //               anchorableShown.AutoHideMinHeight = (double)toolViewModel.Height;
     //               anchorableShown.AutoHideHeight = 100.0;
     //               break;
     //       }
     //   }
 }
Example #26
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.image = ((System.Windows.Controls.Image)(target));
                return;

            case 2:
                this.checkMe = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 3:
                this.textBoxSearch = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.textBoxPeopleSearch = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.tabs = ((System.Windows.Controls.TabControl)(target));
                return;

            case 6:
                this.dataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 7:
                this.DetailsPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 8:
                this.editPanel = ((EMS2.Views.ProjectView)(target));
                return;

            case 9:
                this.butAddProject = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #27
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Instance = ((ISC.View.Views.EasyBuild.EasybuildView)(target));
                return;

            case 2:
                this.docking_In_Sight = ((Xceed.Wpf.AvalonDock.DockingManager)(target));
                return;

            case 3:
                this.InSight_File = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 4:
                this.Network = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #28
0
 /// <summary>
 /// Method that adds to the GraphicsContainer a LayoutAnchorable that contains a Data visualizer user control
 /// </summary>
 /// <param name="objectToAdd"></param>
 public void addToAnchorablePane(UserControl objectToAdd, string Title)
 {
     if (mainPanelChartContainer != null)
     {
         UC_DataVisualizer datav = (UC_DataVisualizer)objectToAdd;
         if(datavisualizers.Add(datav))
         {
             datav.PropertyChanged += datav_PropertyChanged;
             LayoutAnchorable doc = new LayoutAnchorable();
             doc.Hiding += doc_Hiding;
             doc.CanHide = true;
             doc.CanClose = true;
             doc.Title = Title;
             doc.Content = datav;
             mainPanelChartContainer.Children.Add(doc);
         }
     }
     else
     {
         throw new NotImplementedException();
     }
 }
 public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
 {
     bool result = false;
     if (layout != null
        && anchorableToShow != null)
     {
         var destPane = destinationContainer as LayoutAnchorablePane;
         if (anchorableToShow.Root == null)
         {
             anchorableToShow.AddToLayout(layout.Manager, GetContentAnchorableStrategy(anchorableToShow));
             bool isHidden = GetContentAnchorableIsHidden(anchorableToShow);
             if (isHidden)
             {
                 anchorableToShow.CanHide = true;
                 anchorableToShow.Hide();
             }
             result = true;
         }
         else if (destPane != null && anchorableToShow.IsHidden)
         {
             // Show a hidden Anchorable.
             if (anchorableToShow.PreviousContainerIndex < 0)
             {
                 destPane.Children.Add(anchorableToShow);
             }
             else
             {
                 int insertIndex = anchorableToShow.PreviousContainerIndex;
                 if (insertIndex > destPane.ChildrenCount)
                 {
                     insertIndex = destPane.ChildrenCount;
                 }
                 destPane.Children.Insert(insertIndex, anchorableToShow);
             }
             result = true;
         }
     }
     return result || m_WrappedStrategy.BeforeInsertAnchorable(layout, anchorableToShow, destinationContainer);
 }
Example #30
0
 /// <summary>
 /// アンカー挿入後の処理です。
 /// </summary>
 /// <param name="layout">レイアウトです。</param>
 /// <param name="anchorableShown">アンカーの表示状態です。</param>
 public void AfterInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableShown)
 {
     var tool = anchorableShown.Content as IToolable;
     if (tool != null)
     {
         var anchorablePane = anchorableShown.Parent as LayoutAnchorablePane;
         if (anchorablePane != null && anchorablePane.ChildrenCount == 1)
         {
             switch (tool.Location)
             {
                 case PanelLocation.Left:
                 case PanelLocation.Right:
                     anchorablePane.DockWidth = new GridLength(tool.Width, GridUnitType.Pixel);
                     break;
                 case PanelLocation.Bottom:
                     anchorablePane.DockHeight = new GridLength(tool.Height, GridUnitType.Pixel);
                     break;
                 default:
                     anchorablePane.DockWidth = new GridLength(tool.Width, GridUnitType.Pixel);
                     break;
             }
         }
     }
 }
Example #31
0
 public void AfterInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableShown)
 {
     // If this is the first anchorable added to this pane, then use the preferred size.
     var tool = anchorableShown.Content as ITool;
     if (tool != null)
     {
         var anchorablePane = anchorableShown.Parent as LayoutAnchorablePane;
         if (anchorablePane != null && anchorablePane.ChildrenCount == 1)
         {
             switch (tool.PreferredLocation)
             {
                 case PaneLocation.Left:
                 case PaneLocation.Right:
                     anchorablePane.DockWidth = new GridLength(tool.PreferredWidth, GridUnitType.Pixel);
                     break;
                 case PaneLocation.Bottom:
                     anchorablePane.DockHeight = new GridLength(tool.PreferredHeight, GridUnitType.Pixel);
                     break;
                 default:
                     throw new ArgumentOutOfRangeException();
             }
         }
     }
 }
Example #32
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Ribbon1 = ((Microsoft.Windows.Controls.Ribbon.Ribbon)(target));
                return;

            case 2:

            #line 20 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonApplicationMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_NewProject);

            #line default
            #line hidden
                return;

            case 3:

            #line 21 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonApplicationMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_OpenProject);

            #line default
            #line hidden
                return;

            case 4:

            #line 22 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonApplicationMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_CloseProject);

            #line default
            #line hidden
                return;

            case 5:

            #line 27 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonApplicationMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_Close);

            #line default
            #line hidden
                return;

            case 6:

            #line 33 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonSplitButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_NewSequence);

            #line default
            #line hidden
                return;

            case 7:

            #line 34 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_NewSequence);

            #line default
            #line hidden
                return;

            case 8:

            #line 35 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_NewFlowchart);

            #line default
            #line hidden
                return;

            case 9:

            #line 36 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_NewStateMachine);

            #line default
            #line hidden
                return;

            case 10:

            #line 39 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_Open);

            #line default
            #line hidden
                return;

            case 11:

            #line 40 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_Run);

            #line default
            #line hidden
                return;

            case 12:

            #line 41 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonSplitButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_Save);

            #line default
            #line hidden
                return;

            case 13:

            #line 42 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonMenuItem_SaveAs);

            #line default
            #line hidden
                return;

            case 14:

            #line 43 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonMenuItem_SaveAll);

            #line default
            #line hidden
                return;

            case 15:

            #line 52 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_Run);

            #line default
            #line hidden
                return;

            case 16:

            #line 53 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_Stop);

            #line default
            #line hidden
                return;

            case 17:

            #line 54 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_Debug);

            #line default
            #line hidden
                return;

            case 18:

            #line 55 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButton_Continue);

            #line default
            #line hidden
                return;

            case 19:

            #line 59 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonSplitButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonMenuItem_ClickToggle);

            #line default
            #line hidden
                return;

            case 20:

            #line 60 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonMenuItem_ClickToggle);

            #line default
            #line hidden
                return;

            case 21:

            #line 61 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonMenuItem_ClickRemove);

            #line default
            #line hidden
                return;

            case 22:

            #line 67 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)).Click += new System.Windows.RoutedEventHandler(this.RibbonButtonAddActivity_Click);

            #line default
            #line hidden
                return;

            case 23:
                this.m_grid_toolbox = ((System.Windows.Controls.Grid)(target));
                return;

            case 24:
                this.m_documentpane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target));
                return;

            case 25:
                this.m_propertiespane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 26:
                this.m_outlinepane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 27:
                this.m_textbox_projectfolder = ((System.Windows.Controls.TextBox)(target));
                return;

            case 28:
                this.m_treeview_projectfolder = ((System.Windows.Controls.TreeView)(target));
                return;

            case 29:
                this.m_console_searchbox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 30:
                this.m_console_textbox = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #33
0
        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 12 "..\..\..\MainWindow.xaml"
                ((JxSystem.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:

            #line 61 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed_About);

            #line default
            #line hidden
                return;

            case 3:

            #line 62 "..\..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed_ModifyPassword);

            #line default
            #line hidden
                return;

            case 4:
                this.SampleBrowserTranslateTransform = ((System.Windows.Media.TranslateTransform)(target));
                return;

            case 5:
                this.RenderScale = ((System.Windows.Media.ScaleTransform)(target));
                return;

            case 6:
                this.TvManager = ((Gss.ManagementMenu.ManagementMenu)(target));

            #line 161 "..\..\..\MainWindow.xaml"
                this.TvManager.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler <object>(this.TvManager_SelectedItemChanged);

            #line default
            #line hidden
                return;

            case 7:
                this.DocumentPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target));
                return;

            case 8:
                this.MainContainer = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 9:
                this.AccountInfoContainer = ((System.Windows.Controls.Border)(target));
                return;

            case 10:
                this.ArrowR1 = ((System.Windows.Shapes.Path)(target));
                return;

            case 11:
                this.ArrowR2 = ((System.Windows.Shapes.Path)(target));
                return;

            case 12:
                this.PBtn = ((Gss.ManagementMenu.CustomControl.PopupButton)(target));

            #line 207 "..\..\..\MainWindow.xaml"
                this.PBtn.Click += new System.Windows.RoutedEventHandler(this.PBtn_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.UC_Accountcement = ((System.Windows.Controls.UserControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.layoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:

            #line 40 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnSaveLayout);

            #line default
            #line hidden
                return;

            case 3:

            #line 41 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnSaveLayout);

            #line default
            #line hidden
                return;

            case 4:

            #line 42 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnSaveLayout);

            #line default
            #line hidden
                return;

            case 5:

            #line 43 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnSaveLayout);

            #line default
            #line hidden
                return;

            case 6:

            #line 46 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnLoadLayout);

            #line default
            #line hidden
                return;

            case 7:

            #line 47 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnLoadLayout);

            #line default
            #line hidden
                return;

            case 8:

            #line 48 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnLoadLayout);

            #line default
            #line hidden
                return;

            case 9:

            #line 49 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnLoadLayout);

            #line default
            #line hidden
                return;

            case 10:

            #line 51 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnDumpToConsole);

            #line default
            #line hidden
                return;

            case 11:

            #line 52 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnUnloadManager);

            #line default
            #line hidden
                return;

            case 12:

            #line 53 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnLoadManager);

            #line default
            #line hidden
                return;

            case 13:

            #line 56 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnShowWinformsWindow);

            #line default
            #line hidden
                return;

            case 14:

            #line 57 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnShowToolWindow1);

            #line default
            #line hidden
                return;

            case 15:
                this.dockManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target));

            #line 61 "..\..\..\MainWindow.xaml"
                this.dockManager.DocumentClosing += new System.EventHandler <Xceed.Wpf.AvalonDock.DocumentClosingEventArgs>(this.dockManager_DocumentClosing);

            #line default
            #line hidden
                return;

            case 16:

            #line 73 "..\..\..\MainWindow.xaml"
                ((Xceed.Wpf.AvalonDock.Layout.LayoutRoot)(target)).PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.OnLayoutRootPropertyChanged);

            #line default
            #line hidden
                return;

            case 17:
                this.WinFormsWindow = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
                return;

            case 18:
                this.winFormsHost = ((System.Windows.Forms.Integration.WindowsFormsHost)(target));
                return;

            case 19:

            #line 85 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AddTwoDocuments_click);

            #line default
            #line hidden
                return;

            case 20:

            #line 95 "..\..\..\MainWindow.xaml"
                ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)).Hiding += new System.EventHandler <System.ComponentModel.CancelEventArgs>(this.OnToolWindow1Hiding);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #36
0
        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;
        }
Example #37
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 8 "..\..\MainWindow.xaml"
     ((MapEditor.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.root = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.toolBar = ((System.Windows.Controls.ToolBar)(target));
     return;
     case 4:
     this.menu = ((System.Windows.Controls.Menu)(target));
     return;
     case 5:
     this.fileMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 6:
     this.newProjectMenuItem = ((System.Windows.Controls.MenuItem)(target));
     
     #line 25 "..\..\MainWindow.xaml"
     this.newProjectMenuItem.Click += new System.Windows.RoutedEventHandler(this.newProjectMenuItem_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.loadProjectMenuItem = ((System.Windows.Controls.MenuItem)(target));
     
     #line 26 "..\..\MainWindow.xaml"
     this.loadProjectMenuItem.Click += new System.Windows.RoutedEventHandler(this.loadProjectMenuItem_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.saveProjectMenuItem = ((System.Windows.Controls.MenuItem)(target));
     
     #line 27 "..\..\MainWindow.xaml"
     this.saveProjectMenuItem.Click += new System.Windows.RoutedEventHandler(this.saveProjectMenuItem_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.saveAsImageMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 10:
     this.exitProgramMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 11:
     this.viewMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 12:
     this.windowsMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 13:
     this.viewMapMenuItem = ((System.Windows.Controls.MenuItem)(target));
     
     #line 35 "..\..\MainWindow.xaml"
     this.viewMapMenuItem.Click += new System.Windows.RoutedEventHandler(this.viewMapMenuItem_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.viewPropertiesMenuItem = ((System.Windows.Controls.MenuItem)(target));
     
     #line 36 "..\..\MainWindow.xaml"
     this.viewPropertiesMenuItem.Click += new System.Windows.RoutedEventHandler(this.viewPropertiesMenuItem_Click);
     
     #line default
     #line hidden
     return;
     case 15:
     this.viewProjectExplorerMenuItem = ((System.Windows.Controls.MenuItem)(target));
     
     #line 37 "..\..\MainWindow.xaml"
     this.viewProjectExplorerMenuItem.Click += new System.Windows.RoutedEventHandler(this.viewProjectExplorerMenuItem_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.editMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 17:
     this.copyMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 18:
     this.pasteMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 19:
     this.cutMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 20:
     this.undoMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 21:
     this.redoMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 22:
     this.addMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 23:
     this.helpMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 24:
     this.dockingManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target));
     return;
     case 25:
     this.projectExplorerView = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
     
     #line 60 "..\..\MainWindow.xaml"
     this.projectExplorerView.Closing += new System.EventHandler<System.ComponentModel.CancelEventArgs>(this.view_Closing);
     
     #line default
     #line hidden
     return;
     case 26:
     this.projectExplorerRoot = ((System.Windows.Controls.Canvas)(target));
     return;
     case 27:
     this.mapView = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
     
     #line 66 "..\..\MainWindow.xaml"
     this.mapView.Closing += new System.EventHandler<System.ComponentModel.CancelEventArgs>(this.view_Closing);
     
     #line default
     #line hidden
     return;
     case 28:
     this.xnaControl = ((XNAControl.UserControl1)(target));
     
     #line 67 "..\..\MainWindow.xaml"
     this.xnaControl.SizeChanged += new System.Windows.SizeChangedEventHandler(this.xnaControl_SizeChanged);
     
     #line default
     #line hidden
     return;
     case 29:
     this.propertiesView = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
     
     #line 72 "..\..\MainWindow.xaml"
     this.propertiesView.Closing += new System.EventHandler<System.ComponentModel.CancelEventArgs>(this.view_Closing);
     
     #line default
     #line hidden
     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;
        }
Example #39
0
            public void Execute(object parameter)
            {
                UiMainDockableControl window = (UiMainDockableControl)parameter;
                window.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                window.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
                lock (window._lock)
                {
                    LayoutAnchorable layout = window.LayoutAnchorable ?? (window.LayoutAnchorable = window.DockingManager.Layout.Descendents().OfType<LayoutAnchorable>().FirstOrDefault(l => l.Title == window.Header));
                    if (layout == null)
                    {
                        layout = new LayoutAnchorable
                        {
                            Title = window.Header,
                            FloatingWidth = window.Width,
                            FloatingHeight = window.Height,
                            FloatingLeft = 200,
                            FloatingTop = 200,
                            Content = window
                        };

                        window.LayoutAnchorable = layout;
                        layout.AddToLayout(window.DockingManager, AnchorableShowStrategy.Most);
                        layout.Float();
                    }
                    else
                    {
                        if (layout.IsHidden)
                            layout.Show();
                        else
                            layout.Hide();
                    }
                }
            }
Example #40
-1
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {
            //AD wants to add the anchorable into destinationContainer
            //just for test provide a new anchorablepane
            //if the pane is floating let the manager go ahead
            //LayoutAnchorablePane destPane = destinationContainer as LayoutAnchorablePane;
            if (destinationContainer != null &&
                destinationContainer.FindParent<LayoutFloatingWindow>() != null)
                return false;

            var content = anchorableToShow.Content;
            string destPaneName = "";
            if(content is IdInfoTablePane2ViewModel)
            {
                destPaneName = "IdInfoTablePane";
                ////layout.BottomSide.InsertChildAt(0, anchorableToShow);
                //layout.BottomSide.Children[0].Children.Add(anchorableToShow);
                //return true;
            }
            else if(content is CategoryTreePaneViewModel)
            {
                destPaneName = "CategoryTreePane";
            }
            else if (content is WpfApplication1.Workspace.ParameterFileTreePaneViewModel)
            {
                destPaneName = "ParameterFileTreePane";
            }
            else if(content is FileSharePaneViewModel)
            {
                destPaneName = "FileSharePane";
            }
            else if(content is ParameterTab2ViewModel)
            {
                destPaneName = "ParameterTabPane";
            }
            else
            { return false; }

            foreach(var pane in layout.Descendents().OfType<LayoutAnchorablePane>().Where(p=>p.ChildrenCount  >= 1))
            {
                for (int i = 0; i < pane.ChildrenCount; ++i)
                {
                    var child = pane.Children[i];
                    if (child.Content == null)
                    {
                        child.IsVisible = false;
                        --i;
                    }
                }
            }

            var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == destPaneName);
            if (toolsPane != null)
            {
                toolsPane.Children.Add(anchorableToShow);
                return true;
            }

            return false;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 12 "..\..\..\MainWindow.xaml"
     ((JxSystem.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 61 "..\..\..\MainWindow.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed_About);
     
     #line default
     #line hidden
     return;
     case 3:
     
     #line 62 "..\..\..\MainWindow.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed_ModifyPassword);
     
     #line default
     #line hidden
     return;
     case 4:
     this.SampleBrowserTranslateTransform = ((System.Windows.Media.TranslateTransform)(target));
     return;
     case 5:
     this.RenderScale = ((System.Windows.Media.ScaleTransform)(target));
     return;
     case 6:
     this.TvManager = ((Gss.ManagementMenu.ManagementMenu)(target));
     
     #line 161 "..\..\..\MainWindow.xaml"
     this.TvManager.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler<object>(this.TvManager_SelectedItemChanged);
     
     #line default
     #line hidden
     return;
     case 7:
     this.DocumentPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target));
     return;
     case 8:
     this.MainContainer = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target));
     return;
     case 9:
     this.AccountInfoContainer = ((System.Windows.Controls.Border)(target));
     return;
     case 10:
     this.ArrowR1 = ((System.Windows.Shapes.Path)(target));
     return;
     case 11:
     this.ArrowR2 = ((System.Windows.Shapes.Path)(target));
     return;
     case 12:
     this.PBtn = ((Gss.ManagementMenu.CustomControl.PopupButton)(target));
     
     #line 207 "..\..\..\MainWindow.xaml"
     this.PBtn.Click += new System.Windows.RoutedEventHandler(this.PBtn_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     this.UC_Accountcement = ((System.Windows.Controls.UserControl)(target));
     return;
     }
     this._contentLoaded = true;
 }
 public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
 {
     throw new NotImplementedException();
 }
 public void AfterInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableShown)
 {
     throw new NotImplementedException();
 }