Exemplo n.º 1
0
        //public TestPointTreeModel(string name, string sn, Guid id)
        //    : base(name)
        //{
        //    TestPointId = id;
        //    IsExpanded = false;
        //    MSSN = new BindableValue<string>(sn);
        //    InitializeLocation();
        //}

        //public TestPointTreeModel(string name, string sn)
        //    : this(name, sn, Guid.NewGuid())
        //{

        //}

        public TestPointTreeModel(TestPoint tp)
            : base(tp.Name)
        {
            TestPoint  = tp;
            IsExpanded = false;
            MSSN       = new BindableValue <string>(TestPoint.MSSN);
            if (!string.IsNullOrEmpty(TestPoint.IP) && !string.IsNullOrEmpty(TestPoint.CardNum) && !string.IsNullOrEmpty(TestPoint.ChannelNum))
            {
                ChannelId = ChannelIdentity.Create(TestPoint.IP, TestPoint.CardNum, TestPoint.ChannelNum).Value;
            }
            InitializeLocation();
        }
Exemplo n.º 2
0
 public ChannelTreeModel(ChannelIdentity channelId) : base("Channel")
 {
     IsExpanded = true;
     ChannelId = channelId;
 }
Exemplo n.º 3
0
 public void Bind(ChannelIdentity id)
 {
     ChannelId = id;
     OnPropertyChanged(nameof(IsPaired));
 }