예제 #1
0
        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
        {
            if (destinationType == typeof(string) && value is Hga)
            {
                Hga hga = (Hga)value;
                return(hga.ToString());
            }

            return(base.ConvertTo(context, culture, value, destinationType));
        }
예제 #2
0
        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            if (value is string)
            {
                try
                {
                    return(Hga.FromString((string)value));
                }
                catch
                {
                    throw new ArgumentException("Can not convert '" + (string)value + "' to HGA object");
                }
            }

            return(base.ConvertFrom(context, culture, value));
        }
예제 #3
0
        public BaseCarrier()
        {
            CarrierID     = CommonFunctions.UNKNOWN;
            ImageFileName = CommonFunctions.UNKNOWN;

            _hga1  = new Hga(1, HGAStatus.NoHGAPresent);
            _hga2  = new Hga(2, HGAStatus.NoHGAPresent);
            _hga3  = new Hga(3, HGAStatus.NoHGAPresent);
            _hga4  = new Hga(4, HGAStatus.NoHGAPresent);
            _hga5  = new Hga(5, HGAStatus.NoHGAPresent);
            _hga6  = new Hga(6, HGAStatus.NoHGAPresent);
            _hga7  = new Hga(7, HGAStatus.NoHGAPresent);
            _hga8  = new Hga(8, HGAStatus.NoHGAPresent);
            _hga9  = new Hga(9, HGAStatus.NoHGAPresent);
            _hga10 = new Hga(10, HGAStatus.NoHGAPresent);

            _precisorNestPosition[0] = 0.00;
            _precisorNestPosition[1] = 0.00;
            _precisorNestPosition[2] = 0.00;
            _precisorNestPosition[3] = 0.00;
        }