Exemple #1
0
        private void ListForm_KeyDown(object sender, KeyEventArgs e)
        {
            Keys keys1 = e.KeyCode;

            if (keys1 != Keys.Escape)
            {
                switch (keys1)
                {
                case Keys.Add:
                {
                    if (this.dgList.Font.Size < 15f)
                    {
                        this.dgList.Font = new Font(this.dgList.Font.FontFamily, this.dgList.Font.Size + 1f);
                    }
                    return;
                }

                case Keys.Separator:
                {
                    return;
                }

                case Keys.Subtract:
                {
                    if (this.dgList.Font.Size > 7f)
                    {
                        this.dgList.Font = new Font(this.dgList.Font.FontFamily, this.dgList.Font.Size - 1f);
                    }
                    return;
                }
                }
            }
            else if (this.FolderId != 0)
            {
                this.FolderId   = 0;
                this.FolderName = StockDB.LookupFolderName(this.FolderId);
            }
        }