public KeyPictureBox(int scanCode, int extended, BlankButton button, float scale, int horizontalStretch, int verticalStretch) { this.scanCode = scanCode; this.extended = extended; this.button = button; this.scale = scale; this.horizontalStretch = horizontalStretch; this.verticalStretch = verticalStretch; dragIconScale = 0.75F; dragbox = Rectangle.Empty; Map = MappingsManager.GetKeyMapping(scanCode, extended); mapped = (Map.To.ScanCode != -1); AllowDrop = true; // Box controls itself. DragOver += KeyPictureBoxDragOver; DragDrop += KeyPictureBoxDragDrop; DragLeave += KeyPictureBoxDragLeave; GiveFeedback += KeyPictureBoxGiveFeedback; MouseDown += KeyPictureBoxMouseDown; MouseMove += KeyPictureBoxMouseMove; MouseUp += KeyPictureBoxMouseUp; QueryContinueDrag += KeyPictureBoxQueryContinueDrag; DrawKey(); Width = Image.Width; Height = Image.Height; }
public KeyPictureBox(int scancode, int extended, BlankButton button, float scale, int horizontalStretch, int verticalStretch) { _scancode = scancode; _extended = extended; _button = button; _scale = scale; _horizontalStretch = horizontalStretch; _verticalStretch = verticalStretch; _dragIconScale = 0.75F; _dragbox = Rectangle.Empty; Map = MappingsManager.GetKeyMapping(_scancode, _extended); _mapped = (Map.To.Scancode != -1); this.AllowDrop = true; // Box controls itself. this.DragOver += KeyPictureBoxDragOver; this.DragDrop += KeyPictureBoxDragDrop; this.DragLeave += KeyPictureBoxDragLeave; this.GiveFeedback += KeyPictureBoxGiveFeedback; this.MouseDown += KeyPictureBoxMouseDown; this.MouseMove += KeyPictureBoxMouseMove; this.MouseUp += KeyPictureBoxMouseUp; this.QueryContinueDrag += KeyPictureBoxQueryContinueDrag; DrawKey(); this.Width = this.Image.Width; this.Height = this.Image.Height; }