Пример #1
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if ((destinationType == typeof(System.String)) &&
                (value is Flywheel))
            {
                Flywheel _flywheel = (Flywheel)value;
                return(_flywheel.ToString());
            }

            return(base.ConvertTo(context, culture, value, destinationType));
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            if (obj is Flywheel)
            {
                Flywheel _flywheel = (Flywheel)obj;

                if (this.guid.ToString() == _flywheel.guid.ToString())
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            return(base.Equals(obj));
        }