Ejemplo n.º 1
0
        private void CreateBrushPanel(Brush brush)
        {
            Panel brushPanel = new  DCButton();

            toolTip1.SetToolTip(brushPanel, brush.getName() + " - " + brush.GetType().Name);
            brushPanel.BorderStyle           = System.Windows.Forms.BorderStyle.FixedSingle;
            brushPanel.Margin                = new System.Windows.Forms.Padding(1);
            brushPanel.BackgroundImageLayout = ImageLayout.Zoom;
            brushPanel.Name = brush.getName();
            //brushPanel.Tooltip
            brushPanel.Size = new System.Drawing.Size(34, 34);
            if (brush.getLookID() != 0)
            {
                int lookid = brush.getLookID();
                //     brushPanel.BackColor = Color.White;
                brushPanel.BackgroundImage = Global.gfx.spriteItems[Global.items.items[lookid].SpriteId].getBitmap();
            }
            else
            {
                brushPanel.BackColor = Color.Black;
            }

            brushPanel.MouseDown += new MouseEventHandler(brushClick);
            brushPanel.Tag        = brush;
            brushListItems.Controls.Add(brushPanel);

            if (selectedBrush == null)
            {
                brushClick(brushPanel, null);
            }
        }
Ejemplo n.º 2
0
 public void addBrush(Brush brush)
 {
     try
     {
         if (typeof(RAWBrush).Equals(brush.GetType()))
         {
             brushList["" + ((RAWBrush)brush).itemtype.Id] = brush;
         }
         else
         {
             brushList[brush.getName()] = brush;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("" + brush.getLookID());
         throw ex;
     }
 }