• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Docking.Content类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Crownwood.Magic.Docking.Content的典型用法代码示例。如果您正苦于以下问题:C# Content类的具体用法?C# Content怎么用?C# Content使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Content类属于Crownwood.Magic.Docking命名空间,在下文中一共展示了Content类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Add

        public Content Add(Content value)
        {
            // Use base class to process actual collection operation
            base.List.Add(value as object);

            return value;
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:7,代码来源:ContentCollection.cs


示例2: ContentNamesInPriority

        public static StringCollection ContentNamesInPriority(Zone z, Content c)
        {
            // Container for returned group of found Content objects
            StringCollection sc = new StringCollection();

            // Process each Window in the Zone
            foreach(Window w in z.Windows)
            {
                WindowContent wc = w as WindowContent;

                // Is the Zone a Content derived variation?
                if (wc != null)
                {
                    // Does this contain the interesting Content?
                    if (wc.Contents.Contains(c))
                    {
                        // All Content of this Window are given priority and
                        // added into the start of the collection
                        foreach(Content content in wc.Contents)
                            sc.Insert(0, content.Title);
                    }
                    else
                    {
                        // Lower priority Window and so contents are always
                        // added to the end of the collection
                        foreach(Content content in wc.Contents)
                            sc.Add(content.Title);
                    }
                }
            }

            return sc;
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:33,代码来源:ZoneHelper.cs


示例3: InternalConstruct

        protected void InternalConstruct(Control callingControl, 
                                         Source source, 
                                         Content c, 
                                         WindowContent wc, 
                                         FloatingForm ff,
                                         DockingManager dm,
                                         Point offset)
        {
            // Store the starting state
            _callingControl = callingControl;
            _source = source;
            _content = c;
            _windowContent = wc;
            _dockingManager = dm;
            _container = _dockingManager.Container;
            _floatingForm = ff;
            _hotZones = null;
            _currentHotZone = null;
            _insideRect = new Rectangle();
            _outsideRect = new Rectangle();
            _offset = offset;

            // Begin tracking straight away
            EnterTrackingMode();
        }
开发者ID:nithinphilips,项目名称:SMOz,代码行数:25,代码来源:RedockerContent.cs


示例4: Add

        public Content Add()
        {
            Content c = new Content(_manager);

            // Use base class to process actual collection operation
            base.List.Add(c as object);

            return c;
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:9,代码来源:ManagerContentCollection.cs


示例5: Add

        public Content Add(Control control, string title, ImageList imageList, int imageIndex)
        {
            Content c = new Content(_manager, control, title, imageList, imageIndex);

            // Use base class to process actual collection operation
            base.List.Add(c as object);

            return c;
        }
开发者ID:nithinphilips,项目名称:SMOz,代码行数:9,代码来源:ManagerContentCollection.cs


示例6: GameClientForm

        public GameClientForm( )
        {
            InitializeComponent( );

            //	Write greeting
            AppLog.Info( "Beginning {0} at {1}", Assembly.GetCallingAssembly( ), DateTime.Now );
            AppLog.GetSource( Severity.Info ).WriteEnvironment( );

            //	Create the docking manager
            m_DockingManager = new DockingManager( this, VisualStyle.IDE );
            m_DockingManager.InnerControl = gameDisplay;
            m_DockingManager.OuterControl = this;

            ProfileViewer profileViewer1 = new ProfileViewer( );
            profileViewer1.RootSection = GameProfiles.Game;
            m_ProfileViewer1Content = m_DockingManager.Contents.Add( profileViewer1, "Profile Viewer 1" );
            m_DockingManager.AddContentWithState( m_ProfileViewer1Content, State.Floating );
            m_DockingManager.HideContent( m_ProfileViewer1Content );

            ProfileViewer profileViewer2 = new ProfileViewer( );
            profileViewer2.RootSection = GameProfiles.Game;
            m_ProfileViewer2Content = m_DockingManager.Contents.Add( profileViewer2, "Profile Viewer 2" );
            m_DockingManager.AddContentWithState( m_ProfileViewer2Content, State.Floating );
            m_DockingManager.HideContent( m_ProfileViewer2Content );

            PropertyGrid debugInfoProperties = CreateDebugInfoPropertyGrid( );
            m_DebugInfoContent = m_DockingManager.Contents.Add(debugInfoProperties, "Debug Info");
            m_DockingManager.AddContentWithState( m_DebugInfoContent, State.Floating );
            m_DockingManager.HideContent( m_DebugInfoContent );

            m_LogDisplayContent = m_DockingManager.Contents.Add( m_LogDisplay, "Log" );
            m_DockingManager.AddContentWithState( m_LogDisplayContent, State.DockBottom );

            if ( File.Exists( m_ClientSetupFile ) )
            {
                m_DockingManager.LoadConfigFromFile( m_ClientSetupFile );
            }
        }
开发者ID:johann-gambolputty,项目名称:robotbastards,代码行数:38,代码来源:GameClientForm.cs


示例7: MainForm

        public MainForm()
        {
            InitializeComponent();

            ////////////////////////////////////////////////////////////////////////////////////////////
            // Open File Data and Program Database
            ////////////////////////////////////////////////////////////////////////////////////////////
            dat_conn = DatabaseConnection.getInstance();

            /////////////////////////////////////////////////////////////////////////////////////////////
            // MainTree and Table Tabpage
            /////////////////////////////////////////////////////////////////////////////////////////////
            //docking
            _manager = new DockingManager(this, VisualStyle.IDE);
            // Create Content which contains a RichTextBox
            c = _manager.Contents.Add(new TreeForm(), "tree menu");
            _manager.AddContentWithState(c, State.DockLeft);

            ////////////////////////////////////////////////////////////////////////////////////////////
            // Main WorkSpace - Show main working window - display model graphics
            ////////////////////////////////////////////////////////////////////////////////////////////

            // ShowModelGraphicWindow();
        }
开发者ID:777ondro,项目名称:sw-en,代码行数:24,代码来源:MainForm.cs


示例8: CreateWindowForContent

 public virtual Window CreateWindowForContent(Content c)
 {
     return CreateWindowForContent(c, new EventHandler(OnContentClose),
                                      new EventHandler(OnRestore),
                                      new EventHandler(OnInvertAutoHide),
                                      new ContextHandler(OnShowContextMenu));
 }
开发者ID:uvbs,项目名称:Holodeck,代码行数:7,代码来源:DockingManager.cs


示例9: AddContentWithState

        public WindowContent AddContentWithState(Content c, State newState)
        {
            // Validate the incoming Content instance is a valid reference
            // and is a current instance within our internal collection
            if ((c == null) || !_contents.Contains(c))
                return null;

            // Do not generate hiding/hidden/shown events
            _surpressVisibleEvents++;

            // Manageing Zones should remove display AutoHide windows
            RemoveShowingAutoHideWindows();

            // Is the window already part of a WindowContent?
            if (c.ParentWindowContent != null)
            {
                // If it used to be in a floating mode, then record state change
                if (c.ParentWindowContent.ParentZone.State == State.Floating)
                    c.ContentLeavesFloating();

                // Remove the Content from its current WindowContent
                c.ParentWindowContent.Contents.Remove(c);
            }

            // Create a new Window instance appropriate for hosting a Content object
            Window w = CreateWindowForContent(c);

            ContainerControl destination = null;

            if (newState != State.Floating)
            {
                destination = _container;
                destination.SuspendLayout();
            }

            // Create a new Zone capable of hosting a WindowContent
            Zone z = CreateZoneForContent(newState, destination);

            if (newState == State.Floating)
            {
                // Content is not in the docked state
                c.Docked = false;

                // destination a new floating form
                destination = new FloatingForm(this, z, new ContextHandler(OnShowContextMenu));

                // Define its location
                destination.Location = c.DisplayLocation;

                // ...and its size, add the height of the caption bar to the requested content size
                destination.Size = new Size(c.FloatingSize.Width,
                                            c.FloatingSize.Height + SystemInformation.ToolWindowCaptionHeight);
            }

            // Add the Window to the Zone
            z.Windows.Add(w);

            if (newState != State.Floating)
            {
                // Set the Zone to be the least important of our Zones
                ReorderZoneToInnerMost(z);

                UpdateInsideFill();

                destination.ResumeLayout();
            }
            else
                destination.Show();

            // Enable generation hiding/hidden/shown events
            _surpressVisibleEvents--;

            // Generate event to indicate content is now visible
            OnContentShown(c);

            return w as WindowContent;
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:77,代码来源:DockingManager.cs


示例10: BringAutoHideIntoView

        public void BringAutoHideIntoView(Content c)
        {
            if (_ahpLeft.ContainsContent(c))
                _ahpLeft.BringContentIntoView(c);

            if (_ahpRight.ContainsContent(c))
                _ahpRight.BringContentIntoView(c);

            if (_ahpTop.ContainsContent(c))
                _ahpTop.BringContentIntoView(c);

            if (_ahpBottom.ContainsContent(c))
                _ahpBottom.BringContentIntoView(c);
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:14,代码来源:DockingManager.cs


示例11: AutoHidePanelForContent

        internal AutoHidePanel AutoHidePanelForContent(Content c)
        {
            if (_ahpLeft.ContainsContent(c))
                return _ahpLeft;

            if (_ahpRight.ContainsContent(c))
                return _ahpRight;

            if (_ahpTop.ContainsContent(c))
                return _ahpTop;

            if (_ahpBottom.ContainsContent(c))
                return _ahpBottom;

            return null;
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:16,代码来源:DockingManager.cs


示例12: AddContentToZone

        public Window AddContentToZone(Content c, Zone z, int index)
        {
            // Validate the incoming Content instance is a valid reference
            // and is a current instance within our internal collection
            if ((c == null) || !_contents.Contains(c))
                return null;

            // Validate the incoming Zone instance is a valid reference
            if (z == null)
                return null;

            // Do not generate hiding/hidden/shown events
            _surpressVisibleEvents++;

            // Manageing Zones should remove display AutoHide windows
            RemoveShowingAutoHideWindows();

            // Is the window already part of a WindowContent?
            if (c.ParentWindowContent != null)
            {
                // Is there a change in docking state?
                if (c.ParentWindowContent.ParentZone.State != z.State)
                {
                    // If it used to be in a floating mode, then record state change
                    if (c.ParentWindowContent.ParentZone.State == State.Floating)
                        c.ContentLeavesFloating();
                    else
                        c.ContentBecomesFloating();
                }

                // Remove the Content from its current WindowContent
                c.ParentWindowContent.Contents.Remove(c);
            }
            else
            {
                // If target zone is floating window then we are no longer docked
                if (z.State == State.Floating)
                    c.Docked = false;
            }

            // Create a new WindowContent instance according to our style
            Window w = CreateWindowForContent(c);

            // Add the Window to the Zone at given position
            z.Windows.Insert(index, w);

            // Enable generation hiding/hidden/shown events
            _surpressVisibleEvents--;

            // Generate event to indicate content is now visible
            OnContentShown(c);

            return w;
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:54,代码来源:DockingManager.cs


示例13: HideContent

        public virtual void HideContent(Content c, bool record, bool reorder)
        {
            // Remove it from view by removing from current WindowContent container
            if (c.Visible)
            {
                // Do not generate hiding/hidden/shown events
                _surpressVisibleEvents++;

                // Manageing Zones should remove display AutoHide windows
                RemoveShowingAutoHideWindows();

                if (record)
                {
                    // Tell the Content to create a new Restore object to record its current location
                    c.RecordRestore();
                }

                if (c.AutoHidden && (c.AutoHidePanel != null))
                {
                    // Remove it from its current AutoHidePanel
                    c.AutoHidePanel.RemoveContent(c);
                }
                else if ((c.ParentWindowContent != null) && (c.ParentWindowContent.Contents != null))
                {
                    // Remove the Content from its current WindowContent
                    c.ParentWindowContent.Contents.Remove(c);
                }

                if (reorder && (_contents != null))
                {
                    // Move the Content to the start of the list
                    _contents.SetIndex(0, c);
                }

                UpdateInsideFill();

                // Enable generation hiding/hidden/shown events
                _surpressVisibleEvents--;

                // Generate event
                OnContentHidden(c);
            }
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:43,代码来源:DockingManager.cs


示例14: Insert

 public void Insert(int index, Content value)
 {
     // Use base class to process actual collection operation
     base.List.Insert(index, value as object);
 }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:5,代码来源:ContentCollection.cs


示例15: InitializeDockingControls

        protected virtual void InitializeDockingControls( )
        {
            //	Create the docking manager
            m_DockingManager = new DockingManager( this, VisualStyle.IDE );
            m_DockingManager.InnerControl = display;
            m_DockingManager.OuterControl = statusStrip;

            //	Add log, property editor, and edit mode controls to the docking manager
            m_LogDisplayContent = m_DockingManager.Contents.Add( m_LogDisplay, "Log" );
            m_PropertyEditorContent = m_DockingManager.Contents.Add( new ObjectPropertyEditor( ), "Property Editor" );
            m_SelectionContent = m_DockingManager.Contents.Add( new SelectionControl( ), "Selection" );

            m_DockingManager.AddContentWithState( m_LogDisplayContent, State.DockBottom );
            m_DockingManager.AddContentWithState( m_SelectionContent, State.DockRight );
            m_DockingManager.AddContentWithState( m_PropertyEditorContent, State.DockLeft );

            m_EditModesContent = m_DockingManager.Contents.Add( new EditModesControl( ), Resources.EditModes );
            m_DockingManager.AddContentToZone( m_EditModesContent, m_SelectionContent.ParentWindowContent.ParentZone, 0 );
        }
开发者ID:johann-gambolputty,项目名称:robotbastards,代码行数:19,代码来源:EditorForm.cs


示例16: OnContentShown

 public virtual void OnContentShown(Content c)
 {
     if (_surpressVisibleEvents == 0)
     {
         // Notify operation has completed
         if (ContentShown != null)
             ContentShown(c, EventArgs.Empty);
     }
 }
开发者ID:uvbs,项目名称:Holodeck,代码行数:9,代码来源:DockingManager.cs


示例17: Contains

 public bool Contains(Content value)
 {
     // Use base class to process actual collection operation
     return base.List.Contains(value as object);
 }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:5,代码来源:ContentCollection.cs


示例18: BringContentToFront

 public virtual void BringContentToFront(Content c)
 {
 }
开发者ID:3ft9,项目名称:SalamanderControlSuite,代码行数:3,代码来源:WindowContent.cs


示例19: AddRange

 public void AddRange(Content[] values)
 {
     // Use existing method to add each array entry
     foreach(Content page in values)
         Add(page);
 }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:6,代码来源:ContentCollection.cs


示例20: OnContentChanged

 protected virtual void OnContentChanged(Content obj, Content.Property prop)
 {
 }
开发者ID:3ft9,项目名称:SalamanderControlSuite,代码行数:3,代码来源:WindowContent.cs



注:本文中的Crownwood.Magic.Docking.Content类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CryEngine.Vec3类代码示例发布时间:2022-05-24
下一篇:
C# Cream.Variable类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap