public Main() { InitializeComponent(); printCtrl = new RichTextBoxPrintCtrl(); BibliographyWizard = new BibliographyWizard(); HeaderWizard = new HeaderWizard(); spellChecker = new SpellChecker(); researchHelper = new ResearchHelper(); finder = new FindText(ref Editor); speechWizard = new SpeechWizard(); colorCoder = new ColorCoder(); merger = new Merger(); rephraser = new Rephraser(); this.WindowState = FormWindowState.Maximized; this.Text = "TextStudio -" + filepath; currentsyle = FontStyle.Regular; LoadFonts(); LoadBibliographyOptions(); LoadHeaderFormatOptions(); spellChecker.Load(); ZoomGroupBox.Hide(); HideCommandPalete(); foreach (string args in Environment.GetCommandLineArgs()) { try { Editor.LoadFile(args); filepath = args; } catch { } } }
private void KeyDown(object sender, KeyEventArgs e) { if (e.Control) { if (e.KeyCode == Keys.F) { FindButton_Click(null, null); } if (e.KeyCode == Keys.S) { SaveButton_Click(null, null); } if (e.KeyCode == Keys.O) { OpenButton_Click(null, null); } if (e.KeyCode == Keys.M) { MailToButton_Click(null, null); } if (e.KeyCode == Keys.OemQuestion || e.KeyCode == Keys.P) { if (CommandPaleteGroupBox.Visible == true) { HideCommandPalete(); } else { ShowCommandPalete(); } } } else if (e.Alt) { if (e.KeyCode == Keys.H) { AllTabs.SelectedIndex = 0; } if (e.KeyCode == Keys.T) { AllTabs.SelectedIndex = 1; } if (e.KeyCode == Keys.M) { AllTabs.SelectedIndex = 2; } if (e.KeyCode == Keys.C) { AllTabs.SelectedIndex = 3; } if (e.KeyCode == Keys.Z) { if (!ZoomGroupBox.Visible) { ZoomGroupBox.Show(); } else { ZoomGroupBox.Hide(); } } } }