/// <summary> /// Adds the file. /// </summary> /// <param name="filePath">The file path.</param> void IFileTabControl.AddFile(string filePath) { var dummyDoc = new FileWindow { Text = Path.GetFileName(filePath) }; dummyDoc.Show(dockPanel); try { dummyDoc.FileName = filePath; } catch (Exception exception) { dummyDoc.Close(); MessageBoxEx.Show(this, "Error open file " + filePath, exception.Message); } }