Наследование: System.ComponentModel.PropertyChangedBase
        public SymbolAttributeSet()
        {
            DisplayAttributes = new DisplayAttributes();
            DisplayAttributes.PropertyChanged += Attributes_PropertyChanged;

            LabelAttributes = new LabelAttributes();
        }
Пример #2
0
 public override int GetHashCode()
 {
     if ((DisplayAttributes == null) || (LabelAttributes == null))
     {
         return(0);
     }
     else
     {
         return(DisplayAttributes.GetHashCode() ^ LabelAttributes.GetHashCode());
     }
 }
Пример #3
0
        private void Initialize()
        {
            //Used to make a SymbolAttributeSet from field data in a feature
            DisplayAttributes = new DisplayAttributes();
            DisplayAttributes.PropertyChanged += Attributes_PropertyChanged;

            LabelAttributes = new LabelAttributes();
            LabelAttributes.PropertyChanged += LabelAttributes_PropertyChanged;

            StandardVersion = ProSymbolUtilities.StandardString;
        }
        public string GetFeatureClassFromMapping(DisplayAttributes displayAttributes, GeometryType geometryType)
        {
            if (displayAttributes == null)
            {
                return(string.Empty);
            }

            if (ProSymbolUtilities.IsLegacyStandard())
            {
                return(GetFeatureClassFromExtendedFunctionCode(displayAttributes.ExtendedFunctionCode, geometryType));
            }
            else // 2525D or APPD
            {
                return(GetFeatureClassFromSymbolSet(displayAttributes.SymbolSet, geometryType));
            }
        }
Пример #5
0
        public string GetFeatureClassFromMapping(DisplayAttributes displayAttributes, GeometryType geometryType)
        {
            if (displayAttributes == null)
            {
                return(string.Empty);
            }

            if (ProSymbolUtilities.Standard == ProSymbolUtilities.SupportedStandardsType.mil2525c_b2)
            {
                return(GetFeatureClassFromExtendedFunctionCode(displayAttributes.ExtendedFunctionCode, geometryType));
            }
            else // 2525D
            {
                return(GetFeatureClassFromSymbolSet(displayAttributes.SymbolSet, geometryType));
            }
        }
Пример #6
0
        public override bool Equals(object obj)
        {
            if ((obj == null) || (GetType() != obj.GetType()))
            {
                return(false);
            }

            SymbolAttributeSet compareObj = obj as SymbolAttributeSet;

            if ((compareObj == null) || (DisplayAttributes == null) || (LabelAttributes == null))
            {
                return(false);
            }

            return(DisplayAttributes.Equals(compareObj.DisplayAttributes) &&
                   LabelAttributes.Equals(compareObj.LabelAttributes));
        }
        public SymbolAttributeSet(Dictionary<string, string> fieldValues)
        {
            //Used to make a SymbolAttributeSet from field data in a feature
            DisplayAttributes = new DisplayAttributes();
            DisplayAttributes.PropertyChanged += Attributes_PropertyChanged;

            LabelAttributes = new LabelAttributes();

            if (fieldValues.ContainsKey("identity"))
            {
                DisplayAttributes.Identity = fieldValues["identity"];
            }

            if (fieldValues.ContainsKey("symbolset"))
            {
                DisplayAttributes.SymbolSet = fieldValues["symbolset"];
            }

            if (fieldValues.ContainsKey("symbolentity"))
            {
                DisplayAttributes.SymbolEntity = fieldValues["symbolentity"];
            }

            if (fieldValues.ContainsKey("indicator"))
            {
                DisplayAttributes.Indicator = fieldValues["indicator"];
            }

            if (fieldValues.ContainsKey("echelon"))
            {
                DisplayAttributes.Echelon = fieldValues["echelon"];
            }

            if (fieldValues.ContainsKey("mobility"))
            {
                DisplayAttributes.Mobility = fieldValues["mobility"];
            }

            if (fieldValues.ContainsKey("operationalcondition"))
            {
                DisplayAttributes.OperationalCondition = fieldValues["operationalcondition"];
            }

            if (fieldValues.ContainsKey("status"))
            {
                DisplayAttributes.Status = fieldValues["status"];
            }

            if (fieldValues.ContainsKey("context"))
            {
                DisplayAttributes.Context = fieldValues["context"];
            }

            if (fieldValues.ContainsKey("modifier1"))
            {
                DisplayAttributes.Modifier1 = fieldValues["modifier1"];
            }

            if (fieldValues.ContainsKey("modifier2"))
            {
                DisplayAttributes.Modifier2 = fieldValues["modifier2"];
            }

            //LABELS
            if (fieldValues.ContainsKey("datetimevalid"))
            {
                LabelAttributes.DateTimeValid = DateTime.Parse(fieldValues["datetimevalid"]);
            }

            if (fieldValues.ContainsKey("datetimeexpired"))
            {
                LabelAttributes.DateTimeExpired = DateTime.Parse(fieldValues["datetimeexpired"]);
            }

            if (fieldValues.ContainsKey("uniquedesignation"))
            {
                LabelAttributes.UniqueDesignation = fieldValues["uniquedesignation"];
            }

            if (fieldValues.ContainsKey("staffcomment"))
            {
                LabelAttributes.StaffComments = fieldValues["staffcomment"];
            }

            if (fieldValues.ContainsKey("additionalinformation"))
            {
                LabelAttributes.AdditionalInformation = fieldValues["additionalinformation"];
            }

            if (fieldValues.ContainsKey("type"))
            {
                LabelAttributes.Type = fieldValues["type"];
            }

            if (fieldValues.ContainsKey("commonidentifier"))
            {
                LabelAttributes.CommonIdentifier = fieldValues["commonidentifier"];
            }

            if (fieldValues.ContainsKey("speed"))
            {
                LabelAttributes.Speed = short.Parse(fieldValues["speed"]);
            }

            if (fieldValues.ContainsKey("higherFormation"))
            {
                LabelAttributes.HigherFormation = fieldValues["higherFormation"];
            }

            if (fieldValues.ContainsKey("reinforced"))
            {
                LabelAttributes.Reinforced = fieldValues["reinforced"];
            }

            if (fieldValues.ContainsKey("credibility"))
            {
                LabelAttributes.Credibility = fieldValues["credibility"];
            }

            if (fieldValues.ContainsKey("reliability"))
            {
                LabelAttributes.Reliability = fieldValues["reliability"];
            }

            if (fieldValues.ContainsKey("countrycode"))
            {
                LabelAttributes.CountryCode = fieldValues["countrycode"];
            }
        }