diff --git a/Develop/DbManager.Desktop/ViewModel/Tag/TagViewModel.cs b/Develop/DbManager.Desktop/ViewModel/Tag/TagViewModel.cs index a8c20bcd1406ec290207b9160a08bad7515c7737..4cecc55f0e02ef99f7a8a4dddd76ab0e58552380 100644 --- a/Develop/DbManager.Desktop/ViewModel/Tag/TagViewModel.cs +++ b/Develop/DbManager.Desktop/ViewModel/Tag/TagViewModel.cs @@ -1084,6 +1084,62 @@ namespace DBInStudio.Desktop case Cdy.Tag.TagType.UShort: ntag = new Cdy.Tag.UShortTag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group, Conveter = mRealTagMode.Conveter != null ? mRealTagMode.Conveter.Clone() : null }; + break; + case Cdy.Tag.TagType.IntPoint: + ntag = new Cdy.Tag.IntPointTag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group }; + if (mHisTagMode != null) + { + mHisTagMode.TagType = Cdy.Tag.TagType.IntPoint; + } + break; + case Cdy.Tag.TagType.IntPoint3: + ntag = new Cdy.Tag.IntPoint3Tag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group }; + if (mHisTagMode != null) + { + mHisTagMode.TagType = Cdy.Tag.TagType.IntPoint3; + } + break; + case Cdy.Tag.TagType.UIntPoint: + ntag = new Cdy.Tag.UIntPointTag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group }; + if (mHisTagMode != null) + { + mHisTagMode.TagType = Cdy.Tag.TagType.UIntPoint; + } + break; + case Cdy.Tag.TagType.UIntPoint3: + ntag = new Cdy.Tag.UIntPoint3Tag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group }; + if (mHisTagMode != null) + { + mHisTagMode.TagType = Cdy.Tag.TagType.UIntPoint3; + } + break; + case Cdy.Tag.TagType.LongPoint: + ntag = new Cdy.Tag.LongPointTag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group }; + if (mHisTagMode != null) + { + mHisTagMode.TagType = Cdy.Tag.TagType.LongPoint; + } + break; + case Cdy.Tag.TagType.LongPoint3: + ntag = new Cdy.Tag.LongPoint3Tag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group }; + if (mHisTagMode != null) + { + mHisTagMode.TagType = Cdy.Tag.TagType.LongPoint3; + } + break; + case Cdy.Tag.TagType.ULongPoint: + ntag = new Cdy.Tag.ULongPointTag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group }; + if (mHisTagMode != null) + { + mHisTagMode.TagType = Cdy.Tag.TagType.ULongPoint; + } + break; + case Cdy.Tag.TagType.ULongPoint3: + ntag = new Cdy.Tag.ULongPoint3Tag() { Id = this.mRealTagMode.Id, Name = mRealTagMode.Name, Desc = mRealTagMode.Desc, LinkAddress = mRealTagMode.LinkAddress, Group = mRealTagMode.Group }; + if (mHisTagMode != null) + { + mHisTagMode.TagType = Cdy.Tag.TagType.ULongPoint3; + } break; default: break;