本文整理汇总了C#中WeifenLuo.WinFormsUI.Docking.DockContent.AddHelp方法的典型用法代码示例。如果您正苦于以下问题:C# DockContent.AddHelp方法的具体用法?C# DockContent.AddHelp怎么用?C# DockContent.AddHelp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WeifenLuo.WinFormsUI.Docking.DockContent
的用法示例。
在下文中一共展示了DockContent.AddHelp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterControl
/// <summary>
/// Registers a control so it becomes visible as part of the main form</summary>
/// <param name="control">Control</param>
/// <param name="info">Control display information</param>
/// <param name="client">Client that owns the control and receives notifications
/// about its status, or null if no notifications are needed</param>
/// <remarks>If IControlHostClient.Close() has been called, the IControlHostService
/// also calls UnregisterControl. Call RegisterControl again to re-register the Control.</remarks>
public void RegisterControl(Control control, ControlInfo info, IControlHostClient client)
{
if (control == null)
throw new ArgumentNullException("control");
if (info == null)
throw new ArgumentNullException("info");
if (FindControlInfo(control) != null)
throw new ArgumentException("Control already registered");
// allow null client
if (client == null)
client = Global<DefaultClient>.Instance;
info.Client = client;
info.Control = control;
info.Changed += info_Changed;
var dockContent = new DockContent(this);
if (!string.IsNullOrEmpty(info.HelpUrl))
dockContent.AddHelp(info.HelpUrl);
// set persistence id one time only.
// do not update dockContent.Name
// dockContent.Text is used for titlebar.
dockContent.Name = GetPersistenceId(info);
UpdateDockContent(dockContent, info);
m_dockContent.Add(info, dockContent);
m_controls.ActiveItem = info;
info.HostControl = dockContent;
// Any property we set on this Control needs to be restored in UnregisterControl.
// For example, QuadPanelControl was broken by setting Dock property but not restoring it.
info.OriginalDock = control.Dock;
control.Dock = DockStyle.Fill;
dockContent.Controls.Add(control);
dockContent.FormClosing += dockContent_FormClosing;
ShowDockContent(dockContent, info);
if (info.ShowInMenu)
{
if (info.IsDocument.HasValue && info.IsDocument.Value)
{
// description( and the tooltip) for a document control by convention is the full path of the document
RegisterMenuCommand(info, "@" + info.Description);
}
else
RegisterMenuCommand(info, "@" + dockContent.Text); // tells m_commandService not to interpret slashes as submenus
}
// Bring all the Controls for this client to the front.
BringClientToFront(client);
// Call the IControlHostClient's Activate method. Seems to be required when driving
// the app from a script and if the user clicks on another app at the wrong moment.
ActivateClient(control);
}