本文整理汇总了C#中Crownwood.Magic.Docking.Content类的典型用法代码示例。如果您正苦于以下问题:C# Content类的具体用法?C# Content怎么用?C# Content使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Content类属于Crownwood.Magic.Docking命名空间,在下文中一共展示了Content类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
public Content Add(Content value)
{
// Use base class to process actual collection operation
base.List.Add(value as object);
return value;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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 );
}
}
示例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();
}
示例8: CreateWindowForContent
public virtual Window CreateWindowForContent(Content c)
{
return CreateWindowForContent(c, new EventHandler(OnContentClose),
new EventHandler(OnRestore),
new EventHandler(OnInvertAutoHide),
new ContextHandler(OnShowContextMenu));
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
}
示例14: Insert
public void Insert(int index, Content value)
{
// Use base class to process actual collection operation
base.List.Insert(index, value as object);
}
示例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 );
}