public MpeControlMask(MpeResourceDesigner designer) { this.designer = designer; // Initialize Nodes nodeSize = 6; nodePen = new Pen(Color.Black, -1.0f); nodeBrush = new SolidBrush(Color.FromArgb(0, 255, 0)); //disabledNodeBrush = new SolidBrush(Color.FromArgb(128,32,32,32)); disabledNodeBrush = new SolidBrush(Color.FromKnownColor(KnownColor.Control)); // Initialize Bars barBrush = new SolidBrush(Color.FromArgb(96, 255, 255, 255)); //barBrush = new SolidBrush(Color.FromKnownColor(KnownColor.Control)); // Initialize Mask Components components = new MaskComponent[4]; components[0] = new MaskTop(this); components[1] = new MaskRight(this); components[2] = new MaskBottom(this); components[3] = new MaskLeft(this); for (int i = 0; i < components.Length; i++) { components[i].MouseMove += new MouseEventHandler(designer.OnMouseMove); components[i].MouseDown += new MouseEventHandler(designer.OnMouseDown); components[i].MouseDown += new MouseEventHandler(designer.OnControlMouseDown); components[i].Click += new EventHandler(designer.OnControlClick); components[i].MouseUp += new MouseEventHandler(designer.OnMouseUp); } visible = true; Hide(); defaultGridSize = new Size(8, 8); defaultMinControlSize = new Size(16, 16); Ghost = new Rectangle(0, 0, 0, 0); MoveDrag = false; MoveDragStart = false; ResizeDrag = false; ResizeNodeIndex = 0; DragPoint = new Point(0, 0); }