예제 #1
0
        public override void WriteGroupCodes()
        {
            CGroupCode gc;
            int        flags;

            GroupCodeList.Clear();

            WriteGroupCodeValue(2, LineTypeName.Trim());
            WriteGroupCodeValue(3, Description.Trim());
            WriteGroupCodeValue(72, AlignmentCode.ToString().Trim());
            WriteGroupCodeValue(73, DashLengthItemCount.ToString().Trim());
            WriteGroupCodeValue(40, TotalPatternLength.ToString().Trim());

            foreach (int x in DashLengthList)
            {
                gc       = new CGroupCode();
                gc.Code  = 49;
                gc.Value = x.ToString().Trim();

                GroupCodeList.Add(gc);
            }

            flags = GetStandardFlags();

            WriteGroupCodeValue(70, flags.ToString().Trim());
        }
예제 #2
0
        protected void WriteGroupCodeValue(int code, string val)
        {
            bool       foundOne;
            CGroupCode gc;

            if (GroupCodeList == null)
            {
                GroupCodeList = new ArrayList();
            }

            foundOne = false;
            foreach (CGroupCode tmp in GroupCodeList)
            {
                if (tmp.Code == code)
                {
                    tmp.Value = val;
                    foundOne  = true;
                    break;
                }
            }

            if (!foundOne)
            {
                gc       = new CGroupCode();
                gc.Code  = code;
                gc.Value = val;

                GroupCodeList.Add(gc);
            }

            return;
        }
예제 #3
0
        public object Clone()
        {
            CGroupCode gc;

            gc = new CGroupCode();

            gc.Code  = Code;
            gc.Value = Value;

            return(gc);
        }
예제 #4
0
        public override ArrayList GetGroupCodes()
        {
            ArrayList  list;
            CGroupCode gc;

            list = new ArrayList();

            foreach (CGroupCode tmp in GroupCodeList)
            {
                list.Add(tmp);
            }

            foreach (CEntityVertex vertex in VertexList)
            {
                gc       = new CGroupCode();
                gc.Code  = 0;
                gc.Value = "VERTEX";
                list.Add(gc);

                gc       = new CGroupCode();
                gc.Code  = 5;
                gc.Value = vertex.Handle.Trim();
                list.Add(gc);

                gc       = new CGroupCode();
                gc.Code  = 6;
                gc.Value = vertex.LineType.Trim();
                list.Add(gc);

                gc       = new CGroupCode();
                gc.Code  = 8;
                gc.Value = vertex.LayerName.Trim();
                list.Add(gc);

                foreach (CGroupCode tmp in vertex.GroupCodeList)
                {
                    list.Add(tmp);
                }
            }

            #region SEQEND

            gc       = new CGroupCode();
            gc.Code  = 0;
            gc.Value = "SEQEND";
            list.Add(gc);

            gc       = new CGroupCode();
            gc.Code  = 8;
            gc.Value = LayerName.Trim();
            list.Add(gc);

            gc       = new CGroupCode();
            gc.Code  = 5;
            gc.Value = SeqEndHandle.Trim();
            list.Add(gc);

            #endregion

            return(list);
        }