本文整理汇总了C#中IDockContent类的典型用法代码示例。如果您正苦于以下问题:C# IDockContent类的具体用法?C# IDockContent怎么用?C# IDockContent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDockContent类属于命名空间,在下文中一共展示了IDockContent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BeginDragContent
public void BeginDragContent(IDockContent content)
{
if (!InitDrag(content as Control, DragSource.Content))
return;
Content_BeginDrag(content);
}
开发者ID:Pelsoft,项目名称:fwk_10.3,代码行数:7,代码来源:DragHandler.cs
示例2: FloatingWindow
/// <summary>
/// Constructor used when window is created as consequence to user interaction.
/// </summary>
/// <param name="root">Parent dock panel</param>
/// <param name="content">Content to host</param>
/// <param name="origin">Origin, position on screen</param>
/// <param name="size">Size of window</param>
public FloatingWindow(DockPanel root, IDockContent content, Point origin, Size size)
: this(root)
{
Left = origin.X;
Top = origin.Y;
Width = size.Width;
Height = size.Height;
if (content is TabLayout)
{
DockedContent = (TabLayout)content;
}
else
{
DockedContent = new TabLayout(Root);
DockedContent.Dock(null, content, DockTo.Center);
}
foreach (DockContent subContent in DockedContent.Children)
{
subContent.Settings.DockState = DockState.Floating;
}
Content = DockedContent;
Binding b = new Binding("Header");
b.Source = DockedContent;
SetBinding(Window.TitleProperty, b);
}
开发者ID:Joxx0r,项目名称:ATF,代码行数:33,代码来源:FloatingWindow.cs
示例3: DockPane
protected internal DockPane(IDockContent content, FloatWindow floatWindow, bool show)
{
if (floatWindow == null)
throw new ArgumentNullException("floatWindow");
InternalConstruct(content, DockState.Float, false, Rectangle.Empty, floatWindow.NestedPanes.GetDefaultPreviousPane(this), DockAlignment.Right, 0.5, show);
}
开发者ID:RasterCode,项目名称:OtterUI,代码行数:7,代码来源:DockPane.cs
示例4: DockPane
protected internal DockPane(IDockContent content, DockPane previousPane, DockAlignment alignment, double proportion,
bool show)
{
if (previousPane == null)
throw (new ArgumentNullException("previousPane"));
InternalConstruct(content, previousPane.DockState, false, Rectangle.Empty, previousPane, alignment, proportion, show);
}
开发者ID:Vizzini,项目名称:netgore,代码行数:7,代码来源:DockPane.cs
示例5: Add
internal int Add(IDockContent content)
{
#if DEBUG
if (DockPane != null)
throw new InvalidOperationException();
#endif
if (Contains(content))
return IndexOf(content);
return InnerList.Add(content);
}
开发者ID:Pelsoft,项目名称:fwk_10.3,代码行数:12,代码来源:DockContentCollection.cs
示例6: ControlInfo
public ControlInfo(string name, string description, string id, Sce.Atf.Applications.StandardControlGroup group, object imageKey, IDockContent dockContent, IControlHostClient client)
{
Requires.NotNullOrEmpty(id, "id");
Requires.NotNull(dockContent, "dockContent");
Requires.NotNull(client, "client");
DockContent = dockContent;
dockContent.PropertyChanged += DockContent_PropertyChanged;
Name = name;
Description = description;
Id = id;
Group = group;
ImageSourceKey = imageKey;
Client = client;
}
开发者ID:vincenthamm,项目名称:ATF,代码行数:15,代码来源:ControlInfo.cs
示例7: AddAt
internal void AddAt(IDockContent content, IDockContent before)
{
#if DEBUG
if (DockPane != null)
throw new InvalidOperationException();
#endif
if (!Contains(before))
return;
if (Contains(content))
return;
AddAt(content, IndexOf(before));
}
开发者ID:Pelsoft,项目名称:fwk_10.3,代码行数:15,代码来源:DockContentCollection.cs
示例8: InternalConstruct
private void InternalConstruct(IDockContent content, DockState dockState, bool flagBounds, Rectangle floatWindowBounds, DockPane prevPane, DockAlignment alignment, double proportion, bool show)
{
if (dockState == DockState.Hidden || dockState == DockState.Unknown)
throw new ArgumentException(Strings.DockPane_SetDockState_InvalidState);
if (content == null)
throw new ArgumentNullException(Strings.DockPane_Constructor_NullContent);
if (content.DockHandler.DockPanel == null)
throw new ArgumentException(Strings.DockPane_Constructor_NullDockPanel);
SuspendLayout();
SetStyle(ControlStyles.Selectable, false);
m_isFloat = (dockState == DockState.Float);
m_contents = new DockContentCollection();
m_displayingContents = new DockContentCollection(this);
m_dockPanel = content.DockHandler.DockPanel;
m_dockPanel.AddPane(this);
m_splitter = new SplitterControl(this);
m_nestedDockingStatus = new NestedDockingStatus(this);
m_captionControl = DockPanel.DockPaneCaptionFactory.CreateDockPaneCaption(this);
m_tabStripControl = DockPanel.DockPaneStripFactory.CreateDockPaneStrip(this);
Controls.AddRange(new Control[] { m_captionControl, m_tabStripControl });
DockPanel.SuspendLayout(true);
if (flagBounds)
FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds);
else if (prevPane != null)
DockTo(prevPane.NestedPanesContainer, prevPane, alignment, proportion);
SetDockState(dockState);
if (show)
content.DockHandler.Pane = this;
else if (this.IsFloat)
content.DockHandler.FloatPane = this;
else
content.DockHandler.PanelPane = this;
ResumeLayout();
DockPanel.ResumeLayout(true, true);
}
开发者ID:moljac,项目名称:MonoMobile.SharpSNMP,代码行数:47,代码来源:DockPane.cs
示例9: RemoveContent
internal void RemoveContent(IDockContent content)
{
if (content == null)
throw(new ArgumentNullException());
if (Contents.Contains(content))
{
Contents.Remove(content);
OnContentRemoved(new DockContentEventArgs(content));
}
}
开发者ID:koglth,项目名称:dockpanelsuite,代码行数:11,代码来源:DockPanel.cs
示例10: DocumentsToArray
public IDockContent[] DocumentsToArray()
{
int count = DocumentsCount;
IDockContent[] documents = new IDockContent[count];
int i = 0;
foreach (IDockContent content in Documents)
{
documents[i] = content;
i++;
}
return documents;
}
开发者ID:koglth,项目名称:dockpanelsuite,代码行数:13,代码来源:DockPanel.cs
示例11: CreateTab
protected override AutoHideStripBase.Tab CreateTab(IDockContent content)
{
return new TabVS2003(content);
}
开发者ID:JavierCabrera,项目名称:dockpanelsuite,代码行数:4,代码来源:VS2003AutoHideStrip.cs
示例12: CreateDockPane
public DockPane CreateDockPane(IDockContent content, DockPane prevPane, DockAlignment alignment,
double proportion, bool show)
{
return new DockPane(content, prevPane, alignment, proportion, show);
}
开发者ID:dockpanelsuite,项目名称:dockpanelsuite,代码行数:5,代码来源:DockPanelExtender.cs
示例13: return
/// <summary>
/// Return the content's parent as an IDockLayout</summary>
/// <param name="content">The docked content whose parent is requested</param>
/// <returns>The parent as IDockLayout</returns>
IDockLayout IDockLayout.FindParentLayout(IDockContent content)
{
return (content is DockContent && Children.Contains((DockContent)content)) ? this : null;
}
开发者ID:sbambach,项目名称:ATF,代码行数:8,代码来源:TabLayout.cs
示例14: Dock
/// <summary>
/// Dock the new content next to content</summary>
/// <param name="nextTo">Dock content to add new content next to</param>
/// <param name="newContent">New content to be docked</param>
/// <param name="dockTo">Side of nextTo content where new content should be docked</param>
public void Dock(IDockContent nextTo, IDockContent newContent, DockTo dockTo)
{
TabLayout tabLayout = newContent as TabLayout;
if (tabLayout != null)
{
IEnumerator<DockContent> contentEnumerator = tabLayout.Children.GetEnumerator();
while (contentEnumerator.MoveNext())
{
DockContent content = contentEnumerator.Current;
tabLayout.RemoveItem(content);
AddOneItem((DockContent)nextTo, content);
contentEnumerator = tabLayout.Children.GetEnumerator();
}
}
else
{
AddOneItem((DockContent)nextTo, newContent as DockContent);
}
Focus();
UpdateLayout();
}
开发者ID:sbambach,项目名称:ATF,代码行数:26,代码来源:TabLayout.cs
示例15: Undock
/// <summary>
/// Undock given content</summary>
/// <param name="content">Content to undock</param>
public void Undock(IDockContent content)
{
foreach (IDockContent contentItem in Children)
{
if (content == contentItem)
{
RemoveItem(content as DockContent);
if (Parent is IDockLayout && Children.Count == 0)
{
((IDockLayout)Parent).Undock((IDockLayout)this);
}
break;
}
}
}
开发者ID:sbambach,项目名称:ATF,代码行数:18,代码来源:TabLayout.cs
示例16: RemoveFromActiveList
private void RemoveFromActiveList(IDockContent content) {
if (LastActiveContent == content)
LastActiveContent = content.DockHandler.PreviousActive;
IDockContent prev = content.DockHandler.PreviousActive;
IDockContent next = content.DockHandler.NextActive;
if (prev != null)
prev.DockHandler.NextActive = next;
if (next != null)
next.DockHandler.PreviousActive = prev;
content.DockHandler.PreviousActive = null;
content.DockHandler.NextActive = null;
}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:14,代码来源:DockPanel.FocusManager.cs
示例17: Show
public void Show(DockPane pane, IDockContent beforeContent)
{
if (pane == null)
throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullPane));
if (beforeContent != null && pane.Contents.IndexOf(beforeContent) == -1)
throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidBeforeContent));
pane.DockPanel.SuspendLayout(true);
DockPanel = pane.DockPanel;
Pane = pane;
pane.SetContentIndex(Content, pane.Contents.IndexOf(beforeContent));
Show();
pane.DockPanel.ResumeLayout(true, true);
}
开发者ID:rbrzezinski,项目名称:Trax,代码行数:17,代码来源:DockContentHandler.cs
示例18: GiveUpFocus
public void GiveUpFocus(IDockContent content) {
DockContentHandler handler = content.DockHandler;
if (!handler.Form.ContainsFocus)
return;
if (IsFocusTrackingSuspended)
DockPanel.DummyControl.Focus();
if (LastActiveContent == content) {
IDockContent prev = handler.PreviousActive;
if (prev != null)
Activate(prev);
else if (ListContent.Count > 0)
Activate(ListContent[ListContent.Count - 1]);
} else if (LastActiveContent != null)
Activate(LastActiveContent);
else if (ListContent.Count > 0)
Activate(ListContent[ListContent.Count - 1]);
}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:19,代码来源:DockPanel.FocusManager.cs
示例19: ContentContains
private static bool ContentContains(IDockContent content, IntPtr hWnd) {
Control control = Control.FromChildHandle(hWnd);
for (Control parent = control; parent != null; parent = parent.Parent)
if (parent == content.DockHandler.Form)
return true;
return false;
}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:8,代码来源:DockPanel.FocusManager.cs
示例20: SetActiveContent
internal void SetActiveContent() {
IDockContent value = ActivePane == null ? null : ActivePane.ActiveContent;
if (m_activeContent == value)
return;
if (m_activeContent != null)
m_activeContent.DockHandler.IsActivated = false;
m_activeContent = value;
if (m_activeContent != null) {
m_activeContent.DockHandler.IsActivated = true;
if (!DockHelper.IsDockStateAutoHide((m_activeContent.DockHandler.DockState)))
AddLastToActiveList(m_activeContent);
}
}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:17,代码来源:DockPanel.FocusManager.cs
注:本文中的IDockContent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论