示例#1
0
        void ProcessButton(IniFile.Section section)
        {
            int type = section.ReadInt("Type");

            if (type != 0)
            {
                return;
            }

            ShowHideControl 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.Add(drawing, button);

            string 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;
        }
示例#2
0
        private void ReadButtonDependencies(IniFile.Section section, ShowHideControl button)
        {
            List <IFigure> dependencies = new List <IFigure>();

            AddButtonDependencies(section, dependencies, "Button", buttons);
            AddButtonDependencies(section, dependencies, "Figure", figures);
            AddButtonDependencies(section, dependencies, "Label", labels);
            AddButtonDependencies(section, dependencies, "Point", points);
            AddButtonDependencies(section, dependencies, "SG", staticGraphics);

            button.AddDependencies(dependencies);
        }
示例#3
0
        private void ReadButtonDependencies(IniFile.Section section, ShowHideControl button)
        {
            List<IFigure> dependencies = new List<IFigure>();

            AddButtonDependencies(section, dependencies, "Button", buttons);
            AddButtonDependencies(section, dependencies, "Figure", figures);
            AddButtonDependencies(section, dependencies, "Label", labels);
            AddButtonDependencies(section, dependencies, "Point", points);
            AddButtonDependencies(section, dependencies, "SG", staticGraphics);

            button.AddDependencies(dependencies);
        }
示例#4
0
        void ProcessButton(IniFile.Section section)
        {
            int type = section.ReadInt("Type");
            if (type != 0)
            {
                return;
            }

            ShowHideControl 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.Add(drawing, button);

            string 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;
        }