Beispiel #1
0
        private void DrawKey(int scancode, int extended, ref int left, int top, BlankButton button, int horizontalStretch, int verticalStretch)
        {
            KeyPictureBox box = new KeyPictureBox(scancode, extended, button, buttonScale, horizontalStretch, verticalStretch);

            box.Left = left;
            box.Top = top;

            KeyboardPanel.Controls.Add(box);

            box.DoubleClick += KeyDoubleClick;

            string toolTipText = box.Map.MappingDescription;

            if (string.IsNullOrEmpty(toolTipText) == false)
                FormToolTip.SetToolTip(box, toolTipText);

            // left is a ref parameter.
            left += box.Image.Width + paddingWidth; // Width varies eg for double-width blanks
        }
Beispiel #2
0
        void DrawKey(int scancode, int extended, ref int left, int top, BlankButton button, int horizontalStretch, int verticalStretch)
        {

            KeyPictureBox box = new KeyPictureBox(scancode, extended, button, this._buttonScale, horizontalStretch, verticalStretch);

            box.Left = left;
            box.Top = top;

            this.KeyboardPanel.Controls.Add(box);

            // Set the event handler unless filter is boot mappings and user can't write to boot mappings and this isn't Vista
            if (((MappingsManager.Filter == MappingFilter.Boot
                && !AppController.UserCanWriteBootMappings
                && !operatingSystemCapability.ImplementsUAC)) == false)
            {
                box.DoubleClick += KeyDoubleClick;
            }

            string toolTipText = box.Map.MappingDescription;

            if (String.IsNullOrEmpty(toolTipText) == false)
                FormToolTip.SetToolTip(box, toolTipText);

            // left is a ref parameter.
            left += box.Image.Width + _paddingWidth; // Width varies eg for double-width blanks

        }