From 8f110b08bf9094492e9b1d2378d84b4b7b97c7e1 Mon Sep 17 00:00:00 2001 From: Candy Date: Sun, 30 Aug 2020 20:42:46 +0800 Subject: [PATCH] =?UTF-8?q?Bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModel/Tag/TagViewModel.cs | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/Develop/DbManager.Desktop/ViewModel/Tag/TagViewModel.cs b/Develop/DbManager.Desktop/ViewModel/Tag/TagViewModel.cs index a8c20bc..4cecc55 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; -- GitLab