Esempio n. 1
0
        void ProcessPoint(IniFile.Section section)
        {
            var type         = section.ReadInt("Type");
            var parentFigure = section["ParentFigure"];

            if (!parentFigure.IsEmpty())
            {
                EnsureSectionProcessed("Figure" + parentFigure);
                return;
            }

            if (type == 8)
            {
                FindAndProcessArcWithPoint(section.GetTitleNumber("Point"));
                return;
            }

            if (type == 9)
            {
                FindAndProcessMidPoint(section.GetTitleNumber("Point"));
                return;
            }

            var x     = section.ReadDouble("X");
            var y     = section.ReadDouble("Y");
            var point = Factory.CreateFreePoint(drawing, new Point(x, y));

            point.Name = section["Name"];
            SetPointStyle(section, point);
            Actions.Actions.Add(drawing, point);
            var pointIndex = section.GetTitleNumber("Point");

            points[pointIndex] = point;
        }
Esempio n. 2
0
        void ProcessButton(IniFile.Section section)
        {
            var type = section.ReadInt("Type");

            if (type != 0)
            {
                return;
            }

            var button = new ShowHideControl();

            button.Drawing            = drawing;
            button.Checkbox.IsChecked = section.ReadBool("InitiallyVisible", false);
            button.AddDependencies(GetPointList(section));
            button.MoveTo(section.ReadDouble("X"), section.ReadDouble("Y"));
            SetButtonStyle(section, button);
            Actions.Actions.Add(drawing, button);

            var text = section["Caption"].Replace("~~", Environment.NewLine);

            if (section["Charset"] == "0")
            {
                text = text.Replace('I', '²');
            }

            button.Checkbox.Content = text;

            ReadButtonDependencies(section, button);

            button.UpdateFigureVisibility();
            buttons[section.GetTitleNumber("Button")] = button;
        }
Esempio n. 3
0
        void ReadPolygon(IniFile.Section section)
        {
            var polygon = Factory.CreatePolygon(
                drawing, GetPointList(section));

            Actions.Actions.Add(drawing, polygon);
            SetFigureStyle(section, polygon);
            staticGraphics[section.GetTitleNumber("SG")] = polygon;
        }
Esempio n. 4
0
        void ReadBezier(IniFile.Section section)
        {
            var bezier = Factory.CreateBezier(
                drawing, GetPointList(section));

            Actions.Actions.Add(drawing, bezier);
            SetFigureStyle(section, bezier);
            staticGraphics[section.GetTitleNumber("SG")] = bezier;
        }
Esempio n. 5
0
        void ReadVector(IniFile.Section section)
        {
            var vector = Factory.CreateVector(
                drawing, GetPointList(section));

            Actions.Actions.Add(drawing, vector);
            SetFigureStyle(section, vector);
            staticGraphics[section.GetTitleNumber("SG")] = vector;
        }
Esempio n. 6
0
        void ProcessLabel(IniFile.Section section)
        {
            var label = Factory.CreateLabel(drawing);

            label.MoveTo(section.ReadDouble("X"), section.ReadDouble("Y"));
            SetLabelStyle(section, label);
            Actions.Actions.Add(drawing, label);
            labels[section.GetTitleNumber("Label")] = label;
            var text = section["Caption"].Replace("~~", Environment.NewLine);

            if (section["Charset"] == "0")
            {
                text = text.Replace('І', '²');
            }
#if !PLAYER
            drawing.ActionManager.SetProperty(label, "Text", text);
#else
            label.Text = text;
#endif
        }
Esempio n. 7
0
 void AddLabelFigure(IniFile.Section section, IFigure figure)
 {
     //SetLabelStyle(section, figure);
     Actions.Actions.Add(drawing, figure);
     figures[section.GetTitleNumber("Figure")] = figure;
 }
Esempio n. 8
0
 void AddFigure(IniFile.Section section, IFigure figure)
 {
     Actions.Actions.Add(drawing, figure);
     figures[section.GetTitleNumber("Figure")] = figure;
 }