public ComponentController(Startup.DeleteByIdResolver deleteAccesor, IComponentReadOnlyRepository readComponent, ICreate <Component> createComponent, IUpdate <Component> updateComponent) { delete = new DeleteComponent(deleteAccesor(WebApi.DeletesID.Component), readComponent); create = new CreateComponent(createComponent, readComponent); update = new UpdateComponent(updateComponent, readComponent); read = new ReadComponent(readComponent); }
static void CreateWindow() { DeleteComponent window = EditorWindow.GetWindow(typeof(DeleteComponent), true, "Deletar Reagente") as DeleteComponent; window.minSize = new Vector2(300f, 500f); window.maxSize = new Vector2(300f, 500f); }
private void RemoveComponents(IEnumerable <NodeComponent> components) { using (Document.Current.History.BeginTransaction()) { foreach (var c in components) { if (c.Owner != null) { DeleteComponent.Perform(c.Owner, c); } OnComponentRemove?.Invoke(c); } Document.Current.History.CommitTransaction(); } }
private async Task DeleteClick(int id) { await DeleteComponent.Open(id); }
private void deleteToolStripMenuItem_Click(object sender, EventArgs e) { DeleteComponent.RaiseEventEx(this); }