当前位置: 首页>>代码示例>>C#>>正文


C# DockState类代码示例

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


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

示例1: this

        //public O2DockContent(Control controlToLoad, DockState controlDockState, string controlName)
        /*public O2DockContent(Control controlToLoad)
            : this(controlToLoad, DockState.Document)
        {
        }

        public O2DockContent(Control controlToLoad, DockState controlDockState)
            : this(controlToLoad, controlDockState, controlToLoad.Name)
        {
        }*/
        /// <summary>
        /// _note this will not create the Control, it expects a type and the control creation should be done by the form host 
        /// (this way we avoid the multi thread problems of this control being created on a diferent thread from the main hosting Form
        /// </summary>
        /// <param name="typeOfControlToLoad"></param>
        /// <param name="controlDockState"></param>
        /// <param name="controlName"></param>
        public O2DockContent(Type typeOfControlToLoad, DockState controlDockState, string controlName)
        {
            type = typeOfControlToLoad;
            dockContent = new GenericDockContent {Text = controlName};
            dockState = controlDockState;
            name = controlName;
        }
开发者ID:SergeTruth,项目名称:OxyChart,代码行数:24,代码来源:O2DockContent.cs

示例2: DockWindow

		internal DockWindow(DockPanel dockPanel, DockState dockState) {
			m_nestedPanes = new NestedPaneCollection(this);
			m_dockPanel = dockPanel;
			m_dockState = dockState;
			Visible = false;

			SuspendLayout();

			if (DockState == DockState.DockLeft || DockState == DockState.DockRight ||
				DockState == DockState.DockTop || DockState == DockState.DockBottom) {
				m_splitter = new SplitterControl();
				Controls.Add(m_splitter);
			}

			if (DockState == DockState.DockLeft) {
				Dock = DockStyle.Left;
				m_splitter.Dock = DockStyle.Right;
			} else if (DockState == DockState.DockRight) {
				Dock = DockStyle.Right;
				m_splitter.Dock = DockStyle.Left;
			} else if (DockState == DockState.DockTop) {
				Dock = DockStyle.Top;
				m_splitter.Dock = DockStyle.Bottom;
			} else if (DockState == DockState.DockBottom) {
				Dock = DockStyle.Bottom;
				m_splitter.Dock = DockStyle.Top;
			} else if (DockState == DockState.Document) {
				Dock = DockStyle.Fill;
			}

			ResumeLayout();
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:32,代码来源:DockWindow.cs

示例3: EditorContainer

 //private DockPanel _DockPanel;
 //private DockState _DockState;
 public EditorContainer(Editor editor, DockPanel dock, DockState dockState = DockState.Document)
 {
     Editor = editor;
     Editor.UndoRedoStateChanged += Editor_UndoRedoStateChanged;
     Editor.TextChangedDelayed += Editor_TextChangedDelayed;
     Splitter = new Splitter() { Dock = DockStyle.Right, BackColor = SystemColors.ControlDarkDark, Width = 4 };
     DocumentMap = new DocumentMap() {
         Target = editor,
         Dock = DockStyle.Right,
         Width = DocumentMapInitialWidth,
         MinimumSize = new Size(DocumentMapMinimumWidth, 0),
         Scale = DocumentMapInitialWidth * DocumentMapScaleFactor,
         BackColor = EditorSyntax.Styles.Background,
         ForeColor = Color.FromArgb(0, 122, 204)
     };
     DocumentMap.DoubleClick += DocumentMap_DoubleClick;
     DocumentMap.MouseWheel += DocumentMap_MouseWheel;
     Splitter.SplitterMoved += Splitter_SplitterMoved;
     Name = Editor.File.FileName;
     ToolTipText = Editor.File.Path;
     Controls.Add(Editor);
     Controls.Add(Splitter);
     Controls.Add(DocumentMap);
     UpdateText(true);
     FormClosing += EditorContainer_FormClosing;
     FormClosed += EditorContainer_FormClosed;
     System.Threading.Thread.Sleep(10);
     dock.Invoke(new Action(() => { Show(dock, dockState); }));
 }
开发者ID:rbrzezinski,项目名称:Trax,代码行数:31,代码来源:EditorContainer.cs

示例4: IsDockStateValid

        public static bool IsDockStateValid(DockState dockState, DockAreas dockableAreas)
        {
            if (((dockableAreas & DockAreas.Float) == 0) &&
                (dockState == DockState.Float))
            {
                return false;
            }
            if (((dockableAreas & DockAreas.Document) == 0) &&
                (dockState == DockState.Document))
            {
                return false;
            }
            if (((dockableAreas & DockAreas.DockLeft) == 0) &&
                (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide))
            {
                return false;
            }
            if (((dockableAreas & DockAreas.DockRight) == 0) &&
                (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide))
            {
                return false;
            }
            if (((dockableAreas & DockAreas.DockTop) == 0) &&
                (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide))
            {
                return false;
            }
            if (((dockableAreas & DockAreas.DockBottom) == 0) &&
                (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide))
            {
                return false;
            }

            return true;
        }
开发者ID:AlexGaidukov,项目名称:gipertest_streaming,代码行数:35,代码来源:DockHelper.cs

示例5: IsDockStateDocked

		public static bool IsDockStateDocked(DockState dockState)
		{
			return (dockState == DockState.DockLeft ||
				dockState == DockState.DockRight ||
				dockState == DockState.DockTop ||
				dockState == DockState.DockBottom);
		}
开发者ID:gpanayir,项目名称:sffwk,代码行数:7,代码来源:DockHelper.cs

示例6: IsDockWindowState

 public static bool IsDockWindowState(DockState state)
 {
     if (state == DockState.DockTop || state == DockState.DockBottom || state == DockState.DockLeft ||
         state == DockState.DockRight || state == DockState.Document)
         return true;
     return false;
 }
开发者ID:samarjeet27,项目名称:ynoteclassic,代码行数:7,代码来源:DockHelper.cs

示例7: IsValidRestoreState

		public static bool IsValidRestoreState( DockState state ) {
			if( state == DockState.DockLeft || state == DockState.DockRight || state == DockState.DockTop ||
				state == DockState.DockBottom || state == DockState.Document )
				return true;
			else
				return false;
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:7,代码来源:DockHelper.cs

示例8: WorkspaceWindowInfo

 /// <summary>
 /// Setup constructor with non-default default dock state (if that makes sense...)
 /// </summary>
 /// <param name="group">Window group</param>
 /// <param name="menuName">Window name, decorated with an ampersand to designate the menu shortcut key </param>
 /// <param name="create">Window creation function</param>
 /// <param name="defaultDockState">Default dock state</param>
 public WorkspaceWindowInfo( string group, string menuName, FunctionDelegates.Function<Control> create, DockState defaultDockState )
 {
     m_Group = group;
     m_Name = menuName;
     m_Create = create;
     m_DefaultDockState = defaultDockState;
 }
开发者ID:johann-gambolputty,项目名称:robotbastards,代码行数:14,代码来源:WorkspaceWindowInfo.cs

示例9: IsDockStateAutoHide

 public static bool IsDockStateAutoHide(DockState dockState)
 {
     if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide ||
         dockState == DockState.DockTopAutoHide || dockState == DockState.DockBottomAutoHide)
         return true;
     else
         return false;
 }
开发者ID:Vizzini,项目名称:netgore,代码行数:8,代码来源:DockHelper.cs

示例10: UIToolBarSettings

 public UIToolBarSettings(string name, int priority, Bitmap icon, DockState dockState = DockState.DockTopAutoHide, bool mainToolbar=false)
 {
     Name = name;
     Priority = priority;
     Icon = icon;
     DockState = dockState;
     MainToolbar = mainToolbar;
 }
开发者ID:fremag,项目名称:MemoScope.Net,代码行数:8,代码来源:UIToolBarSettings.cs

示例11: IsDockStateAutoHide

 private bool IsDockStateAutoHide(DockState dockState)
 {
     if (((dockState != DockState.DockLeftAutoHide) && (dockState != DockState.DockRightAutoHide)) && ((dockState != DockState.DockTopAutoHide) && (dockState != DockState.DockBottomAutoHide)))
     {
         return false;
     }
     return true;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:8,代码来源:ToolWindow.cs

示例12: AutoHidePaneCollection

		internal AutoHidePaneCollection(DockPanel panel, DockState dockState)
		{
			m_dockPanel = panel;
			m_states = new AutoHideStateCollection();
			States[DockState.DockTopAutoHide].Selected = (dockState==DockState.DockTopAutoHide);
			States[DockState.DockBottomAutoHide].Selected = (dockState==DockState.DockBottomAutoHide);
			States[DockState.DockLeftAutoHide].Selected = (dockState==DockState.DockLeftAutoHide);
			States[DockState.DockRightAutoHide].Selected = (dockState==DockState.DockRightAutoHide);
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:9,代码来源:AutoHidePaneCollection.cs

示例13: setDockState

 public static bool setDockState(string name, DockState state)
 {
     if (DI.dO2LoadedO2DockContent.ContainsKey(name))
     {
         DI.dO2LoadedO2DockContent[name].dockContent.DockState = state;
         return true;
     }
     return false;
 }
开发者ID:pusp,项目名称:o2platform,代码行数:9,代码来源:O2DockUtils.cs

示例14: AddForm

 public void AddForm(DockContent dc, DockState ds)
 {
     if (dc == null)
         return;
     //FIXME: set 'dc.ShowHint = ds' without failing from no active content
     dc.ShowHint = DockState.Document;
     dc.MdiParent = this;
     dc.Show(dockPanel1);
 }
开发者ID:mlnlover11,项目名称:Notepad-X,代码行数:9,代码来源:MainForm.cs

示例15: IsDockRight

 public static bool IsDockRight(DockState dockState)
 {
     if (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
开发者ID:okyereadugyamfi,项目名称:softlogik,代码行数:11,代码来源:DockHelper.cs


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