def onAddAssociation(self,evt): dlg = ConcernAssociationDialog(self,self.dbProxy,self.theCurrentEnvironment) if (dlg.ShowModal() == CONCERNASSOCIATION_BUTTONCOMMIT_ID): self.theSelectedIdx = self.GetItemCount() self.InsertStringItem(self.theSelectedIdx,dlg.source()) self.SetStringItem(self.theSelectedIdx,1,dlg.sourceMultiplicity()) self.SetStringItem(self.theSelectedIdx,2,dlg.link()) self.SetStringItem(self.theSelectedIdx,3,dlg.targetMultiplicity()) self.SetStringItem(self.theSelectedIdx,4,dlg.target())
def onAddAssociation(self, evt): dlg = ConcernAssociationDialog(self, self.dbProxy, self.theCurrentEnvironment) if (dlg.ShowModal() == CONCERNASSOCIATION_BUTTONCOMMIT_ID): self.theSelectedIdx = self.GetItemCount() self.InsertStringItem(self.theSelectedIdx, dlg.source()) self.SetStringItem(self.theSelectedIdx, 1, dlg.sourceMultiplicity()) self.SetStringItem(self.theSelectedIdx, 2, dlg.link()) self.SetStringItem(self.theSelectedIdx, 3, dlg.targetMultiplicity()) self.SetStringItem(self.theSelectedIdx, 4, dlg.target())
def onAssociationActivated(self,evt): self.theSelectedIdx = evt.GetIndex() source = self.GetItemText(self.theSelectedIdx) sourceMultiplicity = self.GetItem(self.theSelectedIdx,1) link = self.GetItem(self.theSelectedIdx,2) targetMultiplicity = self.GetItem(self.theSelectedIdx,3) target = self.GetItem(self.theSelectedIdx,4) dlg = ConcernAssociationDialog(self,self.dbProxy,self.theCurrentEnvironment,source,sourceMultiplicity.GetText(),link.GetText(),target.GetText(),targetMultiplicity.GetText()) if (dlg.ShowModal() == CONCERNASSOCIATION_BUTTONCOMMIT_ID): self.SetStringItem(self.theSelectedIdx,0,dlg.source()) self.SetStringItem(self.theSelectedIdx,1,dlg.sourceMultiplicity()) self.SetStringItem(self.theSelectedIdx,2,dlg.link()) self.SetStringItem(self.theSelectedIdx,3,dlg.targetMultiplicity()) self.SetStringItem(self.theSelectedIdx,4,dlg.target())
def onAssociationActivated(self, evt): self.theSelectedIdx = evt.GetIndex() source = self.GetItemText(self.theSelectedIdx) sourceMultiplicity = self.GetItem(self.theSelectedIdx, 1) link = self.GetItem(self.theSelectedIdx, 2) targetMultiplicity = self.GetItem(self.theSelectedIdx, 3) target = self.GetItem(self.theSelectedIdx, 4) dlg = ConcernAssociationDialog(self, self.dbProxy, self.theCurrentEnvironment, source, sourceMultiplicity.GetText(), link.GetText(), target.GetText(), targetMultiplicity.GetText()) if (dlg.ShowModal() == CONCERNASSOCIATION_BUTTONCOMMIT_ID): self.SetStringItem(self.theSelectedIdx, 0, dlg.source()) self.SetStringItem(self.theSelectedIdx, 1, dlg.sourceMultiplicity()) self.SetStringItem(self.theSelectedIdx, 2, dlg.link()) self.SetStringItem(self.theSelectedIdx, 3, dlg.targetMultiplicity()) self.SetStringItem(self.theSelectedIdx, 4, dlg.target())