Пример #1
0
        // 2013/4/10
        // 比较两个设备列表是否一致
        public bool IsEqual(CameraDevices other)
        {
            if (this == other)
            {
                return(true);
            }
            if (this.Devices == null && other.Devices == null)
            {
                return(true);
            }
            if (this.Devices == null || other.Devices == null)
            {
                return(false);
            }

            if (this.Devices.Count != other.Devices.Count)
            {
                return(false);
            }

            for (int i = 0; i < this.Devices.Count; i++)
            {
                FilterInfo info       = this.Devices[i];
                FilterInfo other_info = other.Devices[i];
                if (info.CompareTo(other_info) != 0)
                {
                    return(false);
                }
            }

            return(true);
        }