private static void repositionTextFile(List <TSD.TextFile> input, List <TSD.TextFile> output, __ViewBaseData inputData, __ViewBaseData outputData)
        {
            foreach (TSD.TextFile inputTextFile in input)
            {
                bool found = false;

                foreach (TSD.TextFile outputTextFile in output)
                {
                    if (inputTextFile.FileName == outputTextFile.FileName)
                    {
                        outputTextFile.InsertionPoint = inputTextFile.InsertionPoint;
                        outputTextFile.Attributes     = inputTextFile.Attributes;
                        outputTextFile.Size           = inputTextFile.Size;
                        outputTextFile.Modify();
                        Debuger.p("TextFile -> No Scaling");

                        found = true;
                        break;
                    }
                }

                if (found == false)
                {
                    TSD.TextFile outputTextFile = new TSD.TextFile(outputData.view, inputTextFile.InsertionPoint, inputTextFile.FileName);
                    outputTextFile.Attributes = inputTextFile.Attributes;
                    outputTextFile.FileName   = inputTextFile.FileName;
                    outputTextFile.Insert();
                }
            }
        }
Esempio n. 2
0
        public void addOneObject(TSD.DrawingObject dro)
        {
            if (dro is TSD.Mark)
            {
                TSD.Mark current = dro as TSD.Mark;
                markHandler(current);
            }

            else if (dro is TSD.StraightDimensionSet)
            {
                TSD.StraightDimensionSet current = dro as TSD.StraightDimensionSet;
                _StraightDimentionSet    temp    = new _StraightDimentionSet(current);
                straightDimSets.Add(temp);
            }

            else if (dro is TSD.SectionMark)
            {
                TSD.SectionMark current = dro as TSD.SectionMark;
                _SectionMark    temp    = new _SectionMark(current);
                sectionMarks.Add(temp);
            }

            else if (dro is TSD.DetailMark)
            {
                TSD.DetailMark current = dro as TSD.DetailMark;
                detailMarks.Add(current);
            }

            else if (dro is TSD.Text)
            {
                TSD.Text current = dro as TSD.Text;
                txt.Add(current);
            }

            else if (dro is TSD.Arc)
            {
                TSD.Arc current = dro as TSD.Arc;
                arcs.Add(current);
            }

            else if (dro is TSD.Line)
            {
                TSD.Line current = dro as TSD.Line;
                lines.Add(current);
            }

            else if (dro is TSD.Polyline)
            {
                TSD.Polyline current = dro as TSD.Polyline;
                polylines.Add(current);
            }

            else if (dro is TSD.Circle)
            {
                TSD.Circle current = dro as TSD.Circle;
                circles.Add(current);
            }

            else if (dro is TSD.Cloud)
            {
                TSD.Cloud current = dro as TSD.Cloud;
                clouds.Add(current);
            }

            else if (dro is TSD.Rectangle)
            {
                TSD.Rectangle current = dro as TSD.Rectangle;
                rectangles.Add(current);
            }

            else if (dro is TSD.Polygon)
            {
                TSD.Polygon current = dro as TSD.Polygon;
                polygons.Add(current);
            }

            else if (dro is TSD.TextFile)
            {
                TSD.TextFile current = dro as TSD.TextFile;
                txtFiles.Add(current);
            }

            else if (dro is TSD.DwgObject)
            {
                TSD.DwgObject current = dro as TSD.DwgObject;
                dwgRefs.Add(current);
            }
        }