Beispiel #1
0
        internal static DimensionStyleList GetDefault()
        {
            DimensionStyleList res = new DimensionStyleList();
            DimensionStyle     ds  = DimensionStyle.GetDefault();

            res.Add(ds);
            return(res);
        }
Beispiel #2
0
        public DimensionStyleSelectionProperty(string resourceId, DimensionStyleList list, IDimensionStyle dimensionStyle, Dimension.EDimType dimType, bool includeUndefined) : base()
        {
            base.resourceId     = resourceId;
            this.dimensionStyle = dimensionStyle;
            List <DimensionStyle> al = new List <DimensionStyle>();

            for (int i = 0; i < list.Count; ++i)
            {
                if (dimType == Dimension.EDimType.DimAll || (((int)(list[i].Types)) & (1 << (int)dimType)) != 0)
                {
                    al.Add(list[i]);
                }
            }
            DimensionStyle nd = new DimensionStyle();

            if (al.Count == 0)
            {
                al.Add(DimensionStyle.GetDefault());
            }
            selectableStyles = al.ToArray();
            if (includeUndefined)
            {
                base.choices = new string[selectableStyles.Length + 1];
                for (int i = 0; i < selectableStyles.Length; ++i)
                {
                    base.choices[i + 1] = selectableStyles[i].Name;
                }
                string undef = StringTable.GetString("DimensionStyle.Undefined");
                // sollte es den Namen schon geben, werden solange - davor und dahintergemacht, bis es den Namen mehr gibt
                // while (Find(undef)!=null) undef = "-" + undef +"-";
                choices[0] = undef;
                if (dimensionStyle.DimensionStyle != null)
                {
                    selectedText = dimensionStyle.DimensionStyle.Name;
                }
                else
                {
                    selectedText = undef;
                }
            }
            else
            {
                base.choices = new string[selectableStyles.Length];
                for (int i = 0; i < selectableStyles.Length; ++i)
                {
                    base.choices[i] = selectableStyles[i].Name;
                }
                if (dimensionStyle.DimensionStyle != null)
                {
                    base.selectedText = dimensionStyle.DimensionStyle.Name;
                }
            }
            toWatch = dimensionStyle as IGeoObject;
        }
Beispiel #3
0
 void IAttributeList.Initialize()
 {
     entries.Clear();
     current = DimensionStyle.GetDefault();
     Add(current);
 }