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());
        }
Exemple #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;
        }