コード例 #1
0
        internal static DimensionStyleList GetDefault()
        {
            DimensionStyleList res = new DimensionStyleList();
            DimensionStyle     ds  = DimensionStyle.GetDefault();

            res.Add(ds);
            return(res);
        }
コード例 #2
0
        static public bool CloneAttributeList(IAttributeListContainer From, IAttributeListContainer To, string ListName, bool Initialize)
        {
            IAttributeList toAdd = null;

            if (From != null)
            {
                toAdd = From.GetList(ListName);
                if (toAdd != null)
                {
                    toAdd = toAdd.Clone();
                }
            }
            if (toAdd == null)
            {
                switch (ListName)
                {
                case "ColorList":
                    toAdd = new ColorList();
                    break;

                case "LayerList":
                    toAdd = new LayerList();
                    break;

                case "HatchStyleList":
                    toAdd = new HatchStyleList();
                    break;

                case "DimensionStyleList":
                    toAdd = new DimensionStyleList();
                    break;

                case "LineWidthList":
                    toAdd = new LineWidthList();
                    break;

                case "LinePatternList":
                    toAdd = new LinePatternList();
                    break;

                case "StyleList":
                    toAdd = new StyleList();
                    break;

                default:
                    return(false);
                }
                if (Initialize)
                {
                    toAdd.Initialize();
                }
            }
            To.Add(ListName, toAdd);
            return(true);
        }
コード例 #3
0
        internal DimensionStyleList Clone()
        {
            DimensionStyleList res = new DimensionStyleList();

            foreach (DictionaryEntry de in entries)
            {
                res.Add((de.Value as DimensionStyle).Clone());
            }
            if (current != null)
            {
                res.current = res.Find(current.Name);
            }
            if (res.current == null && res.Count > 0)
            {
                res.current = res[0];
            }
            return(res);
        }