IsShiftPressed() public static method

public static IsShiftPressed ( ) : bool
return bool
コード例 #1
0
ファイル: PaletteEditor.cs プロジェクト: onitake/ags
        private void palettePanel_MouseDown(object sender, MouseEventArgs e)
        {
            if ((e.X > 30) && (e.X < 30 + 16 * 20) && (e.Y > 0) && (e.Y < 16 * 20))
            {
                int selectedIndex = (e.X - 30) / 20 + (e.Y / 20) * 16;

                if (e.Button == MouseButtons.Right)
                {
                    ShowContextMenu(selectedIndex, e.Location);
                }
                else if (Utilities.IsControlPressed())
                {
                    ToggleColourSelected(selectedIndex);
                }
                else if (Utilities.IsShiftPressed())
                {
                    AddRangeToSelection(selectedIndex);
                }
                else
                {
                    _selectedIndexes.Clear();
                    _selectedIndexes.Add(selectedIndex);
                }

                UpdatePropertyGrid();
                palettePanel.Invalidate();
            }
        }
コード例 #2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (Utilities.IsShiftPressed())
     {
         splashPage.ConstructSpecial("splash-mittens.bmp", ImageLayout.Zoom, "", Color.White);
         this.Text         = "The cast and crew of Mittens 2007 Canada";
         txtInfo.Text      = "Greetings from the cast of Mittens VI. One Fop to rule them all ... One Fop to find them, One Fop to come to them all and in darkness be drowned by them.";
         this.DialogResult = DialogResult.None;
     }
 }
コード例 #3
0
ファイル: AboutDialog.cs プロジェクト: Mailaender/KrusAGS
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (Utilities.IsShiftPressed())
     {
         pictureBox.Image  = Resources.ResourceManager.GetBitmap("splash-mittens.bmp");
         this.Text         = "The cast and crew of Mittens 2007 Canada";
         txtInfo.Text      = "Greetings from the cast of Mittens VI. One Fop to rule them all ... One Fop to find them, One Fop to come to them all and in darkness be drowned by them.";
         this.DialogResult = DialogResult.None;
     }
 }