示例#1
0
        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
0
 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);
     }
 }