本文整理汇总了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;
}
示例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();
}
示例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); }));
}
示例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;
}
示例5: IsDockStateDocked
public static bool IsDockStateDocked(DockState dockState)
{
return (dockState == DockState.DockLeft ||
dockState == DockState.DockRight ||
dockState == DockState.DockTop ||
dockState == DockState.DockBottom);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例11: IsDockStateAutoHide
private bool IsDockStateAutoHide(DockState dockState)
{
if (((dockState != DockState.DockLeftAutoHide) && (dockState != DockState.DockRightAutoHide)) && ((dockState != DockState.DockTopAutoHide) && (dockState != DockState.DockBottomAutoHide)))
{
return false;
}
return true;
}
示例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);
}
示例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;
}
示例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);
}
示例15: IsDockRight
public static bool IsDockRight(DockState dockState)
{
if (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide)
{
return true;
}
else
{
return false;
}
}