/// <summary> /// When called without a fileName, /// we provide a SaveFileDialog, then pass along to the version that takes a fileName /// </summary> private void SaveImageFile() { using (var dlg = new SaveFileDialog()) { dlg.Filter = WinDemoHelperMethods.CreateDialogFilter(false); if (dlg.ShowDialog() == DialogResult.OK) { // slight change from the video... SaveImageFile(dlg.FileName); _currentFile = dlg.FileName; UpdateStatusBar(); } } }
private void OpenImageFile() { using (var dlg = new OpenFileDialog()) { dlg.Filter = WinDemoHelperMethods.CreateDialogFilter(true); if (dlg.ShowDialog(this) == DialogResult.OK) { annotationViewer.Open(dlg.FileName, -1); _currentFile = dlg.FileName; } } if (annotationViewer.Count > 0) { UpdateStatusBar(); } EnableDisableMenuAndToolbarItems(); }