本文整理汇总了C#中NestedPaneCollection类的典型用法代码示例。如果您正苦于以下问题:C# NestedPaneCollection类的具体用法?C# NestedPaneCollection怎么用?C# NestedPaneCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NestedPaneCollection类属于命名空间,在下文中一共展示了NestedPaneCollection类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetStatus
internal void SetStatus(NestedPaneCollection nestedPanes, DockPane previousPane, DockAlignment alignment, double proportion)
{
m_nestedPanes = nestedPanes;
m_previousPane = previousPane;
m_alignment = alignment;
m_proportion = proportion;
}
示例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: InternalConstruct
private void InternalConstruct(DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds)
{
if (dockPanel == null)
throw(new ArgumentNullException(Strings.FloatWindow_Constructor_NullDockPanel));
m_nestedPanes = new NestedPaneCollection(this);
FormBorderStyle = FormBorderStyle.SizableToolWindow;
ShowInTaskbar = false;
if (dockPanel.RightToLeft != RightToLeft)
RightToLeft = dockPanel.RightToLeft;
if (RightToLeftLayout != dockPanel.RightToLeftLayout)
RightToLeftLayout = dockPanel.RightToLeftLayout;
SuspendLayout();
if (boundsSpecified)
{
Bounds = bounds;
StartPosition = FormStartPosition.Manual;
}
else
{
StartPosition = FormStartPosition.WindowsDefaultLocation;
Size = dockPanel.DefaultFloatWindowSize;
}
m_dockPanel = dockPanel;
Owner = DockPanel.FindForm();
DockPanel.AddFloatWindow(this);
if (pane != null)
pane.FloatWindow = this;
ResumeLayout();
}
示例4: MergeNestedPanes
private static void MergeNestedPanes(VisibleNestedPaneCollection nestedPanesFrom, NestedPaneCollection nestedPanesTo, DockPane prevPane, DockAlignment alignment, double proportion)
{
if (nestedPanesFrom.Count == 0)
return;
int count = nestedPanesFrom.Count;
DockPane[] panes = new DockPane[count];
DockPane[] prevPanes = new DockPane[count];
DockAlignment[] alignments = new DockAlignment[count];
double[] proportions = new double[count];
for (int i = 0; i < count; i++)
{
panes[i] = nestedPanesFrom[i];
prevPanes[i] = nestedPanesFrom[i].NestedDockingStatus.PreviousPane;
alignments[i] = nestedPanesFrom[i].NestedDockingStatus.Alignment;
proportions[i] = nestedPanesFrom[i].NestedDockingStatus.Proportion;
}
DockPane pane = panes[0].DockTo(nestedPanesTo.Container, prevPane, alignment, proportion);
panes[0].DockState = nestedPanesTo.DockState;
for (int i = 1; i < count; i++)
{
for (int j = i; j < count; j++)
{
if (prevPanes[j] == panes[i - 1])
prevPanes[j] = pane;
}
pane = panes[i].DockTo(nestedPanesTo.Container, prevPanes[i], alignments[i], proportions[i]);
panes[i].DockState = nestedPanesTo.DockState;
}
}
示例5: InternalConstruct
private void InternalConstruct(DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds)
{
if (dockPanel == null)
throw (new ArgumentNullException(Strings.FloatWindow_Constructor_NullDockPanel));
this.m_nestedPanes = new NestedPaneCollection(this);
FormBorderStyle = FormBorderStyle.SizableToolWindow;
ShowInTaskbar = false;
if (dockPanel.RightToLeft != RightToLeft)
RightToLeft = dockPanel.RightToLeft;
if (RightToLeftLayout != dockPanel.RightToLeftLayout)
RightToLeftLayout = dockPanel.RightToLeftLayout;
SuspendLayout();
if (!boundsSpecified)
{
Bounds = bounds;
StartPosition = FormStartPosition.Manual;
}
else
{
StartPosition = FormStartPosition.WindowsDefaultLocation;
}
if (pane != null)
pane.FloatWindow = this;
this.m_dockPanel = dockPanel;
Owner = this.DockPanel.FindForm();
Size = bounds.Size;
// Suspend child controls from resizing every pixel
ResizeBegin += (s, e) => SuspendLayout();
ResizeEnd += (s, e) => ResumeLayout(true);
this.DockPanel.AddFloatWindow(this);
ResumeLayout();
}