Ejemplo n.º 1
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            // need to handle undo here because
            // this is a modal dialog.
            Keys undoKey = Keys.Control | Keys.Z;

            if (keyData == undoKey)
            {
                if (m_numOfOperation > 0)
                {
                    m_numOfOperation--;
                    HistoryContext hc = m_mgr.Cast <HistoryContext>();
                    if (hc.CanUndo)
                    {
                        hc.Undo();
                    }
                }
                UpdateActiveTabPage();
                return(true);
            }
            return(base.ProcessCmdKey(ref msg, keyData));
        }