public ModuleEditorControl CreateNewEditor(IList <Module> modules) { var editor = new EngineEditor(); editor.SaveCommand = new AddNewModuleCommand(modules, editor.ModifiedEngine); return(editor); }
public ModuleEditorControl CreateEditor(Module module) { if (!IsValidModule(module)) { throw new ArgumentException("Invalid module"); } var editor = new EngineEditor(); Engine targetEngine = module as Engine; editor.Engine = targetEngine; editor.SaveCommand = new SaveEdittedModuleCommand <Engine>(targetEngine, editor.ModifiedEngine); return(editor); }
private void engine_Click(object sender, EventArgs e) { EngineEditor ee = new EngineEditor(); ee.Load(tabs); }