示例#1
0
 public void AddShaftComponent(ShaftComponent child)
 {
     if (!Shafts.Contains(child))
     {
         child.Component.Parent = this;
         Shafts.Add(child);
     }
 }
示例#2
0
 public void RemoveShaftComponent(ShaftComponent child)
 {
     if (Shafts.Contains(child))
     {
         child.Component.Parent = null;
         Shafts.Remove(child);
     }
 }
示例#3
0
 public void InsertShaftComponent(int index, ShaftComponent child)
 {
     if (!Shafts.Contains(child))
     {
         child.Component.Parent = this;
         Shafts.Insert(index, child);
     }
 }
        public DeviceDiagnoseComponent(IList <ItemInfo> items, Guid deviceguid, string devicename = "新建设备")
        {
            var shaftComponent = new ShaftComponent()
            {
                Component = new ShaftClass()
            };

            shaftComponent.Component.AddBearingComponent(new BearingComponent());
            Component.UnAllotItems = new ObservableCollection <ItemInfo>(items);
            Component.AddShaftComponent(shaftComponent);
            Guid = deviceguid;
            Name = devicename;
        }