예제 #1
0
 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);
 }
예제 #2
0
    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);
    }
예제 #3
0
 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();
     }
 }
예제 #4
0
 private async Task DeleteClick(int id)
 {
     await DeleteComponent.Open(id);
 }
예제 #5
0
 private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DeleteComponent.RaiseEventEx(this);
 }