private void AddPTPKoppelingCommand_Executed(object obj) { var inewname = 1; var ptp = new PTPKoppelingModel(); do { inewname++; ptp.TeKoppelenKruispunt = "ptpkruising" + (inewname < 10 ? "0" : "") + inewname; }while (!TLCGenModelManager.Default.IsElementIdentifierUnique(TLCGenObjectTypeEnum.PTPKruising, ptp.TeKoppelenKruispunt)); PTPKoppelingen.Add(new PTPKoppelingViewModel(ptp)); MessengerInstance.Send(new PTPKoppelingenChangedMessage()); }
private void AddPTPKoppelingCommand_Executed(object obj) { var inewname = 1; var ptp = new PTPKoppelingModel(); IsElementIdentifierUniqueRequest message; do { inewname++; ptp.TeKoppelenKruispunt = "ptpkruising" + (inewname < 10 ? "0" : "") + inewname; message = new IsElementIdentifierUniqueRequest(ptp.TeKoppelenKruispunt, ElementIdentifierType.Naam); Messenger.Default.Send(message); }while (!message.IsUnique); PTPKoppelingen.Add(new PTPKoppelingViewModel(ptp)); MessengerInstance.Send(new PTPKoppelingenChangedMessage()); }
public PTPKoppelingViewModel(PTPKoppelingModel kop) { _PTPKoppeling = kop; }