void OpenFile_ExecuteTargets(object obj) { IEditableData data = obj as IEditableData; if (data != null) { foreach (EditorWindow w in mOpendDocuments) { if (w.FileName.ToLower() == data.FileName.ToLower()) { if (!w.IsVisible) { w.Show(); } w.Activate(); return; } } EditorWindow editor = EditorManager.Instance.GetEditorForTag(data.EditorTag); if (editor == null) { MessageBox.Show("There is no editor for this typeof content", "Warning", MessageBoxButton.OK); } else { editor.Load(data); editor.FileName = data.FileName; AddEditorWindow(editor); } } }
public override void Load(IEditableData data) { }
public virtual void Load(IEditableData data) { FileName = data.FileName; }