private void CompressedTextOpenToolStripMenuItem_Click(object sender, EventArgs e) { using (var openme = FileHandling.GetOpenDialogForHandler(SupportedFileHandleFormats.CompressedTextFile)) { openme.ShowDialog(); } }
private void OpenZippedTrackerText_onClick(object sender, EventArgs e) { using (var openme = FileHandling.GetOpenDialogForHandler(SupportedFileHandleFormats.ZippedTrackPlain)) { openme.ShowDialog(); } }
private void OpenRTFUnicodeText_onClick(object sender, EventArgs e) { using (var openme = FileHandling.GetOpenDialogForHandler(SupportedFileHandleFormats.TextUnicodeRTF)) { openme.ShowDialog(); } }
private void OpenAnsiTextMenuItem_onClick(object sender, EventArgs e) { using (var openme = FileHandling.GetOpenDialogForHandler(SupportedFileHandleFormats.TextAnsiPlain)) { openme.ShowDialog(); } }
private void UnicodeRichTextToolStripMenuItem_Click(object sender, EventArgs e) { using (var openme = FileHandling.GetOpenDialogForHandler(SupportedFileHandleFormats.TextUnicodeRTF)) { openme.ShowDialog(); } }
private void NewToolStripMenuItem_Click(object sender, EventArgs e) { if (CurrentFile.HasChanged) { switch (MessageBox.Show(Path.GetFileName(CurrentFile.CurrentFile) + " has changed. Save Changes?", "Save Changes?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)) { case DialogResult.Cancel: { return; } case DialogResult.Yes: { if (CurrentFile.FileExists) { FileHandling.FileSave(FileHandling.GetHandlerClassInstance(CurrentFile.Format), CurrentFile.CurrentFile); } else { using (var SaveDialog = FileHandling.GetOpenDialogForHandler(CurrentFile.Format)) { } } } break; case DialogResult.No: break; default: throw new Exception("Someone forgot to add code for different DialogResult in File->New"); } } CurrentFile = new ContextFile(); CurrentFile.UpdateContextTitle(this); }