コード例 #1
0
        public NetWeight(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <WeightID>0</WeightID> 
            XPathNavigator navigatorWeightID = navigator.SelectSingleNode("WeightID");
            if (navigatorWeightID != null) {
                this._weightID = navigatorWeightID.ValueAsInt;
            }

            // <WeightName>MMElectricTraceWeight</WeightName> 
            XPathNavigator navigatorWeightName = navigator.SelectSingleNode("WeightName");
            if (navigatorWeightName != null) {
                this._weightName = navigatorWeightName.Value;
            }

            // <WeightType>esriWTInteger</WeightType> 
            XPathNavigator navigatorWeightType = navigator.SelectSingleNode("WeightType");
            if (navigatorWeightType != null) {
                this._weightType = (esriWeightType)Enum.Parse(typeof(esriWeightType), navigatorWeightType.Value, true);
            }

            // <BitGateSize>0</BitGateSize> 
            XPathNavigator navigatorBitGateSize = navigator.SelectSingleNode("BitGateSize");
            if (navigatorBitGateSize != null) {
                this._bitGateSize = navigatorBitGateSize.ValueAsInt;
            }
        }
コード例 #2
0
 public NetWeight(NetWeight prototype) : base(prototype)
 {
     this._weightID    = prototype.WeightID;
     this._weightName  = prototype.WeightName;
     this._weightType  = prototype.WeightType;
     this._bitGateSize = prototype.BitGateSize;
 }
コード例 #3
0
 public NetWeight(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     this._weightID    = info.GetInt32("weightID");
     this._weightName  = info.GetString("weightName");
     this._weightType  = (esriWeightType)Enum.Parse(typeof(esriWeightType), info.GetString("weightType"), true);
     this._bitGateSize = info.GetInt32("bitGateSize");
 }
コード例 #4
0
        public NetWeight(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <WeightID>0</WeightID>
            XPathNavigator navigatorWeightID = navigator.SelectSingleNode("WeightID");

            if (navigatorWeightID != null)
            {
                this._weightID = navigatorWeightID.ValueAsInt;
            }

            // <WeightName>MMElectricTraceWeight</WeightName>
            XPathNavigator navigatorWeightName = navigator.SelectSingleNode("WeightName");

            if (navigatorWeightName != null)
            {
                this._weightName = navigatorWeightName.Value;
            }

            // <WeightType>esriWTInteger</WeightType>
            XPathNavigator navigatorWeightType = navigator.SelectSingleNode("WeightType");

            if (navigatorWeightType != null)
            {
                this._weightType = (esriWeightType)Enum.Parse(typeof(esriWeightType), navigatorWeightType.Value, true);
            }

            // <BitGateSize>0</BitGateSize>
            XPathNavigator navigatorBitGateSize = navigator.SelectSingleNode("BitGateSize");

            if (navigatorBitGateSize != null)
            {
                this._bitGateSize = navigatorBitGateSize.ValueAsInt;
            }
        }
コード例 #5
0
ファイル: WeightPropertyPage.cs プロジェクト: secondii/Yutai
        private string method_0(esriWeightType esriWeightType_0)
        {
            switch (esriWeightType_0)
            {
            case esriWeightType.esriWTNull:
                return("空");

            case esriWeightType.esriWTBitGate:
                return("位门");

            case esriWeightType.esriWTInteger:
                return("长整型");

            case esriWeightType.esriWTSingle:
                return("单精度");

            case esriWeightType.esriWTDouble:
                return("双精度");

            case esriWeightType.esriWTBoolean:
                return("布尔型");
            }
            return("");
        }
コード例 #6
0
 public NetWeight(NetWeight prototype) : base(prototype) {
     this._weightID = prototype.WeightID;
     this._weightName = prototype.WeightName;
     this._weightType = prototype.WeightType;
     this._bitGateSize = prototype.BitGateSize;
 }
コード例 #7
0
 public NetWeight(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._weightID = info.GetInt32("weightID");
     this._weightName = info.GetString("weightName");
     this._weightType = (esriWeightType)Enum.Parse(typeof(esriWeightType), info.GetString("weightType"), true);
     this._bitGateSize = info.GetInt32("bitGateSize");
 }