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(); } }
private void Main_KeyUp(object sender, KeyEventArgs e) { if (this.ActiveMdiChild != null) { TranForm currentForm = (TranForm)this.ActiveMdiChild; currentForm.TextEditor_KeyUp(sender, e); } }
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()); } }
private void Save() { if (this.ActiveMdiChild == null) { throw new ApplicationException("No child form is active to save"); } TranForm currentForm = (TranForm)this.ActiveMdiChild; currentForm.Save(); }
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(); }