public object Clone()
 {
     CheckUseablePeripheral location = new CheckUseablePeripheral();
     if (this.CopyTo(location))
     {
         return location;
     }
     return null;
 }
Пример #2
0
        public object Clone()
        {
            CheckUseablePeripheral location = new CheckUseablePeripheral();

            if (this.CopyTo(location))
            {
                return(location);
            }
            return(null);
        }
Пример #3
0
        public bool CopyTo(object obj)
        {
            if (!(obj is CheckUseablePeripheral))
            {
                return(false);
            }
            CheckUseablePeripheral location = obj as CheckUseablePeripheral;

            location.IsChecked  = this.IsChecked;
            location.UseablePer = (UseablePeripheral)this.UseablePer.Clone();
            return(true);
        }
Пример #4
0
 private void OnCmdInitialize(string sn)
 {
     _sn = sn;
     _checkUseable.Clear();
     if (MonitorAllConfig.Instance().AllOpticalProbeInfo == null ||
         MonitorAllConfig.Instance().AllOpticalProbeInfo.UseablePeripheralList == null)
     {
         return;
     }
     foreach (UseablePeripheral useable in MonitorAllConfig.Instance().AllOpticalProbeInfo.UseablePeripheralList)
     {
         CheckUseablePeripheral checkuseable = new CheckUseablePeripheral();
         checkuseable.UseablePer = useable;
         if (sn == MonitorAllConfig.Instance().ALLScreenName)
         {
             checkuseable.IsChecked = false;
         }
         else
         {
             OpticalProbeConfig optical = MonitorAllConfig.Instance().LedOpticalProbeConfigs.Find(a => a.SN == sn);
             checkuseable.IsChecked = false;
             if (optical == null || optical.ConfigInfo == null || optical.ConfigInfo.Count == 0)
             {
                 checkuseable.IsChecked = false;
             }
             else
             {
                 if (optical.ConfigInfo.FindIndex(a => a.Equals(useable)) >= 0)
                 {
                     checkuseable.IsChecked = true;
                 }
             }
         }
         _checkUseable.Add(checkuseable);
     }
 }
 private void OnCmdInitialize(string sn)
 {
     _sn = sn;
     _checkUseable.Clear();
     if(MonitorAllConfig.Instance().AllOpticalProbeInfo==null
         || MonitorAllConfig.Instance().AllOpticalProbeInfo.UseablePeripheralList==null)
     {
         return;
     }
     foreach(UseablePeripheral useable in MonitorAllConfig.Instance().AllOpticalProbeInfo.UseablePeripheralList)
     {
         CheckUseablePeripheral checkuseable=new CheckUseablePeripheral();
         checkuseable.UseablePer = useable;
         if (sn == MonitorAllConfig.Instance().ALLScreenName)
         {
             checkuseable.IsChecked = false;
         }
         else
         {
             OpticalProbeConfig optical = MonitorAllConfig.Instance().LedOpticalProbeConfigs.Find(a => a.SN == sn);
             checkuseable.IsChecked = false;
             if (optical == null || optical.ConfigInfo == null || optical.ConfigInfo.Count == 0)
             {
                 checkuseable.IsChecked = false;
             }
             else
             {
                 if (optical.ConfigInfo.FindIndex(a => a.Equals(useable)) >= 0)
                 {
                     checkuseable.IsChecked = true;
                 }
             }
         }
         _checkUseable.Add(checkuseable);
     }
 }