Esempio n. 1
0
        /// <summary>
        /// Загрузить насройки панелей
        /// </summary>
        /// <param name="root">Корневой узел настроек всех панелей</param>
        protected void LoadPanels(XmlNode root)
        {
            try
            {
                if (root != null)
                {
                    if (root.HasChildNodes)
                    {
                        foreach (XmlNode child in root.ChildNodes)
                        {
                            switch (child.Name)
                            {
                            case "DrillingPanel":

                                DrillingPanel.Load(child);
                                break;

                            case "SolutionPanel":

                                SolutionPanel.Load(child);
                                break;

                            case "SpoPanel":

                                SpoPanel.Load(child);
                                break;

                            case "numericPanel":

                                try
                                {
                                    NumericPanel n_panel = new NumericPanel(this);
                                    n_panel.Load(child);

                                    panels.Add(n_panel);
                                }
                                catch { }
                                break;

                            case "fullPanel":

                                try
                                {
                                    FullPanel fullPanel = new FullPanel();
                                    fullPanel.Load(child);

                                    panels.Add(fullPanel);
                                }
                                catch { }
                                break;

                            default:
                                break;
                            }
                        }
                    }
                }
            }
            catch { }
        }
Esempio n. 2
0
        /// <summary>
        /// добавить общую панель
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            FullPanelForm frm = new FullPanelForm(null);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                FullPanel n_panel = frm.FullPanel;
                if (n_panel != null)
                {
                    _app.InsertPanel(n_panel);
                    InsertPanel(n_panel);

                    n_panel.Actualize();
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// сохранем и принимаем
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void accept_Click(object sender, EventArgs e)
        {
            if (fullPanel == null)
            {
                fullPanel = new FullPanel();
            }

            if (fullPanel != null)
            {
                CopyTo(area.GraphicsGroup_1[0], fullPanel.GPanel_1.Graphic_1);
                CopyTo(area.GraphicsGroup_1[1], fullPanel.GPanel_1.Graphic_2);
                CopyTo(area.GraphicsGroup_1[2], fullPanel.GPanel_1.Graphic_3);
                CopyTo(area.GraphicsGroup_1[3], fullPanel.GPanel_1.Graphic_4);
                CopyTo(area.GraphicsGroup_1[4], fullPanel.GPanel_1.Graphic_5);

                CopyTo(area.GraphicsGroup_2[0], fullPanel.GPanel_2.Graphic_1);
                CopyTo(area.GraphicsGroup_2[1], fullPanel.GPanel_2.Graphic_2);
                CopyTo(area.GraphicsGroup_2[2], fullPanel.GPanel_2.Graphic_3);
                CopyTo(area.GraphicsGroup_2[3], fullPanel.GPanel_2.Graphic_4);
                CopyTo(area.GraphicsGroup_2[4], fullPanel.GPanel_2.Graphic_5);

                CopyTo(area.GraphicsGroup_3[0], fullPanel.GPanel_3.Graphic_1);
                CopyTo(area.GraphicsGroup_3[1], fullPanel.GPanel_3.Graphic_2);
                CopyTo(area.GraphicsGroup_3[2], fullPanel.GPanel_3.Graphic_3);
                CopyTo(area.GraphicsGroup_3[3], fullPanel.GPanel_3.Graphic_4);
                CopyTo(area.GraphicsGroup_3[4], fullPanel.GPanel_3.Graphic_5);

                if (area.Items != null && area.Items.Count > 0)
                {
                    fullPanel.Items.Clear();
                    foreach (VPanelParameter item in area.Items)
                    {
                        if (item != null)
                        {
                            VPanelParameter n_item = new VPanelParameter();

                            n_item.Color = item.Color;
                            n_item.Font = item.Font;

                            n_item.Identifier = item.Identifier;
                            n_item.PNumber = item.PNumber;

                            n_item.Tag = item.Tag;

                            fullPanel.Items.Add(n_item);
                        }
                    }
                }

                fullPanel.VPanelName = textBox31.Text;

                fullPanel.Show_gr1 = area.Show_gr1 = checkBox1.Checked;
                fullPanel.Show_gr2 = area.Show_gr2 = checkBox2.Checked;
                fullPanel.Show_gr3 = area.Show_gr3 = checkBox3.Checked;
            }
        }
Esempio n. 4
0
        public FullPanelForm(FullPanel _panel)
        {
            InitializeComponent();

            area = new bufferArea();
            _app = SgtApplication.CreateInstance();

            if (_panel == null)
            {
            }
            else
            {
                fullPanel = _panel;
                fullPanel.UpdateNumeric();

                CopyTo(fullPanel.GPanel_1.Graphic_1, area.GraphicsGroup_1[0]);
                CopyTo(fullPanel.GPanel_1.Graphic_2, area.GraphicsGroup_1[1]);
                CopyTo(fullPanel.GPanel_1.Graphic_3, area.GraphicsGroup_1[2]);
                CopyTo(fullPanel.GPanel_1.Graphic_4, area.GraphicsGroup_1[3]);
                CopyTo(fullPanel.GPanel_1.Graphic_5, area.GraphicsGroup_1[4]);

                CopyTo(fullPanel.GPanel_2.Graphic_1, area.GraphicsGroup_2[0]);
                CopyTo(fullPanel.GPanel_2.Graphic_2, area.GraphicsGroup_2[1]);
                CopyTo(fullPanel.GPanel_2.Graphic_3, area.GraphicsGroup_2[2]);
                CopyTo(fullPanel.GPanel_2.Graphic_4, area.GraphicsGroup_2[3]);
                CopyTo(fullPanel.GPanel_2.Graphic_5, area.GraphicsGroup_2[4]);

                CopyTo(fullPanel.GPanel_3.Graphic_1, area.GraphicsGroup_3[0]);
                CopyTo(fullPanel.GPanel_3.Graphic_2, area.GraphicsGroup_3[1]);
                CopyTo(fullPanel.GPanel_3.Graphic_3, area.GraphicsGroup_3[2]);
                CopyTo(fullPanel.GPanel_3.Graphic_4, area.GraphicsGroup_3[3]);
                CopyTo(fullPanel.GPanel_3.Graphic_5, area.GraphicsGroup_3[4]);

                area.Items.Clear();
                if (fullPanel.Items != null && fullPanel.Items.Count > 0)
                {
                    foreach (VPanelParameter item in fullPanel.Items)
                    {
                        if (item != null)
                        {
                            VPanelParameter n_item = new VPanelParameter();

                            n_item.Color = item.Color;
                            n_item.Font = item.Font;

                            n_item.Identifier = item.Identifier;
                            n_item.PNumber = item.PNumber;

                            n_item.Tag = item.Tag;

                            area.Items.Add(n_item);
                        }
                    }
                }

                checkBox1.Checked = area.Show_gr1 = fullPanel.Show_gr1;
                checkBox2.Checked = area.Show_gr2 = fullPanel.Show_gr2;
                checkBox3.Checked = area.Show_gr3 = fullPanel.Show_gr3;

                numericUpDown1.Value = area.GraphicsGroup_1[0].Width;
                numericUpDown2.Value = area.GraphicsGroup_1[1].Width;
                numericUpDown4.Value = area.GraphicsGroup_1[2].Width;
                numericUpDown3.Value = area.GraphicsGroup_1[3].Width;
                numericUpDown5.Value = area.GraphicsGroup_1[4].Width;

                numericUpDown15.Value = area.GraphicsGroup_2[0].Width;
                numericUpDown14.Value = area.GraphicsGroup_2[1].Width;
                numericUpDown13.Value = area.GraphicsGroup_2[2].Width;
                numericUpDown12.Value = area.GraphicsGroup_2[3].Width;
                numericUpDown11.Value = area.GraphicsGroup_2[4].Width;

                numericUpDown10.Value = area.GraphicsGroup_3[0].Width;
                numericUpDown9.Value = area.GraphicsGroup_3[1].Width;
                numericUpDown8.Value = area.GraphicsGroup_3[2].Width;
                numericUpDown7.Value = area.GraphicsGroup_3[3].Width;
                numericUpDown6.Value = area.GraphicsGroup_3[4].Width;

                textBox31.Text = fullPanel.VPanelName;
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Загрузить насройки панелей
        /// </summary>
        /// <param name="root">Корневой узел настроек всех панелей</param>
        protected void LoadPanels(XmlNode root)
        {
            try
            {
                if (root != null)
                {
                    if (root.HasChildNodes)
                    {
                        foreach (XmlNode child in root.ChildNodes)
                        {
                            switch (child.Name)
                            {
                                case "DrillingPanel":

                                    DrillingPanel.Load(child);
                                    break;

                                case "SolutionPanel":

                                    SolutionPanel.Load(child);
                                    break;

                                case "SpoPanel":

                                    SpoPanel.Load(child);
                                    break;

                                case "numericPanel":

                                    try
                                    {
                                        NumericPanel n_panel = new NumericPanel(this);
                                        n_panel.Load(child);

                                        panels.Add(n_panel);
                                    }
                                    catch { }
                                    break;

                                case "fullPanel":

                                    try
                                    {
                                        FullPanel fullPanel = new FullPanel();
                                        fullPanel.Load(child);

                                        panels.Add(fullPanel);
                                    }
                                    catch { }
                                    break;

                                default:
                                    break;
                            }
                        }
                    }
                }
            }
            catch { }
        }