コード例 #1
0
        /// <summary>
        /// Load tool panel button according to the registered objects
        /// </summary>
        public void LoadObjectTool()
        {
            if (tbToolPanel.Buttons.Count == 0)
            {
                //SuspendLayout();
                //try
                //{
                ddlStyle.Items.AddRange(Enum.GetNames(typeof(DashStyle)));
                ddlStyle.SelectedIndex = 0;
                AddObject(null);

                ObjectManager.SortCategory();
                foreach (ObjectCategory oc in ObjectManager.alCategory)
                {
                    foreach (ObjectInit oi in oc.ObjectList)
                    {
                        AddObject(oi);
                    }
                    AddSeparator();
                }
                //}
                //finally
                //{
                //	ResumeLayout();
                //}
            }
        }
コード例 #2
0
 public void LoadObjectTool()
 {
     if (this.tbToolPanel.Buttons.Count == 0)
     {
         this.ddlStyle.Items.AddRange(Enum.GetNames(typeof(DashStyle)));
         this.ddlStyle.SelectedIndex = 0;
         this.AddObject(null);
         ObjectManager.SortCategory();
         foreach (ObjectCategory category in ObjectManager.alCategory)
         {
             foreach (ObjectInit init in category.ObjectList)
             {
                 this.AddObject(init);
             }
             this.AddSeparator();
         }
     }
 }