private void openFile() { var fileChooser = new FileChooserDialog( "Open File", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept ); fileChooser.Filter = new FileFilter(); fileChooser.Filter.AddPattern("*.clong"); if (fileChooser.Run() == (int)ResponseType.Accept) { newFile(); var fileTuple = FileManager.Open(fileChooser.Filename); docView.SetText(fileTuple.Item1); exView.UpdateExamples(fileTuple.Item2.Item1); dictView.UpdateWords(fileTuple.Item2.Item2); currentFile = fileChooser.Filename; Title = AppSettings.WindowTitle + " - " + currentFile; } fileChooser.Dispose(); }