public IMyGenDocument Open(IMyGenerationMDI mdi, FileInfo file, params string[] args) { SampleEditor edit = null; if (file.Exists) { bool isopen = mdi.IsDocumentOpen(file.FullName); if (!isopen) { edit = new SampleEditor(mdi); edit.LoadImage(file.FullName); } else { edit = mdi.FindDocument(file.FullName) as SampleEditor; if (edit != null) { edit.Activate(); } } } return edit; }
public IMyGenDocument Open(IMyGenerationMDI mdi, FileInfo file, params string[] args) { SampleEditor edit = null; if (file.Exists) { bool isopen = mdi.IsDocumentOpen(file.FullName); if (!isopen) { edit = new SampleEditor(mdi); edit.LoadImage(file.FullName); } else { edit = mdi.FindDocument(file.FullName) as SampleEditor; if (edit != null) { edit.Activate(); } } } return(edit); }
public IMyGenDocument Create(IMyGenerationMDI mdi, params string[] args) { SampleEditor edit = new SampleEditor(mdi); switch (args[0]) { case SampleEditorManager.SAMPLE_IMAGE: default: edit.CreateNewImage(); break; } return(edit); }
public IMyGenDocument Create(IMyGenerationMDI mdi, params string[] args) { SampleEditor edit = new SampleEditor(mdi); switch (args[0]) { case SampleEditorManager.SAMPLE_IMAGE: default: edit.CreateNewImage(); break; } return edit; }