public static void OpenFile(string path) { var file = GetTextFileType(path); AddToHistory(file); Registrator.AddForm(file, MainForm); }
public static void OpenFile(OpenFileDialog fileDialog) { if (fileDialog.ShowDialog() == DialogResult.Cancel) { return; } var file = GetTextFileType(fileDialog.FileName); AddToHistory(file); Registrator.AddForm(file, MainForm); }