コード例 #1
0
        private void Main_KeyDown(object sender, KeyEventArgs e)
        {
            TranForm tranForm = (TranForm)this.ActiveMdiChild;

            if (e.Control && e.KeyCode == Keys.T)
            {
                Transform();
            }
            else if (e.Control && e.KeyCode == Keys.I)
            {
                tranForm.Indent();
            }
            else if (e.Control && e.KeyCode == Keys.S)
            {
                Save();
            }
            else if (e.Control && e.KeyCode == Keys.F)
            {
                tranForm.Find();
            }
            else if (e.KeyCode == Keys.F3)
            {
                tranForm.FindNext();
            }
        }
コード例 #2
0
 private void Main_KeyUp(object sender, KeyEventArgs e)
 {
     if (this.ActiveMdiChild != null)
     {
         TranForm currentForm = (TranForm)this.ActiveMdiChild;
         currentForm.TextEditor_KeyUp(sender, e);
     }
 }
コード例 #3
0
        private void Tooltip_HandleClick(object sender, EventArgs e)
        {
            TranForm tranForm = (TranForm)this.ActiveMdiChild;

            if (tranForm != null)
            {
                tranForm.TextEditor.ActiveTextAreaControl.TextArea.InsertString(((ToolStripItem)sender).Tag.ToString());
            }
        }
コード例 #4
0
        private void Save()
        {
            if (this.ActiveMdiChild == null)
            {
                throw new ApplicationException("No child form is active to save");
            }

            TranForm currentForm = (TranForm)this.ActiveMdiChild;

            currentForm.Save();
        }
コード例 #5
0
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild == null)
            {
                throw new ApplicationException("No child form is active to save");
            }

            TranForm currentForm = (TranForm)this.ActiveMdiChild;

            currentForm.SaveAs();
        }