本文整理汇总了C#中System.Windows.Forms.Control.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# Control.Clear方法的具体用法?C# Control.Clear怎么用?C# Control.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Control
的用法示例。
在下文中一共展示了Control.Clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: refreshItems
private void refreshItems(Control suspend, Control.ControlCollection controls, List<TibiaObject> tibiaObjects, string sortedHeader, bool desc, EventHandler eventHandler, int maxItems = 20)
{
int maxWidth = 0;
this.SuspendLayout();
NotificationForm.SuspendDrawing(suspend);
foreach (Control c in controls) {
c.Dispose();
}
controls.Clear();
UIManager.DisplayCreatureAttributeList(controls, tibiaObjects, 0, 10, out maxWidth, null, null, 0, maxItems, null, null, null, eventHandler, sortedHeader, desc);
NotificationForm.ResumeDrawing(suspend);
this.ResumeLayout(false);
}
示例2: DisplayPropertyPanel
private void DisplayPropertyPanel(Control.ControlCollection controls, TmNode node)
{
controls.Clear();
if (node == null)
return;
if (propertiesForm == null)
propertiesForm = new PropertiesForm().CommonInit();
if (node is ThemeListNode)
{
AddPropertyPanelToForm(controls, propertiesForm.themelistPanel, node.IsReadOnly);
PopulateThemeListPropertyPanel(propertiesForm, (ThemeListNode)node);
}
if (node is CategoryNode)
{
AddPropertyPanelToForm(controls, propertiesForm.categoryPanel, node.IsReadOnly);
PopulateCategoryPropertyPanel(propertiesForm, (CategoryNode)node);
}
if (node is ThemeNode || node is SubThemeNode)
{
AddPropertyPanelToForm(controls, propertiesForm.themePanel, node.IsReadOnly);
PopulateThemePropertyPanel(propertiesForm, (ThemeNode)node);
}
}