Ejemplo n.º 1
0
        public NumericPanelForm()
        {
            InitializeComponent();

            _app = SgtApplication.CreateInstance();
            n_panel = new NumericPanel(_app);
        }
Ejemplo n.º 2
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 { }
        }
Ejemplo n.º 3
0
        public EditNumericPanelForm(NumericPanel edited)
        {
            InitializeComponent();

            _app = SgtApplication.CreateInstance();
            if (edited != null)
            {
                n_panel = edited;

                copy_panelName = n_panel.VPanelName;
                copy_items     = new List <VPanelParameter>();

                foreach (VPanelParameter par in n_panel.Items)
                {
                    copy_items.Add(par);
                }

                copy_gr1 = new VPanelGraphic();
                copy_gr2 = new VPanelGraphic();
                copy_gr3 = new VPanelGraphic();
                copy_gr4 = new VPanelGraphic();
                copy_gr5 = new VPanelGraphic();

                copy_graphic(n_panel.Graphic_1, copy_gr1);
                copy_graphic(n_panel.Graphic_2, copy_gr2);
                copy_graphic(n_panel.Graphic_3, copy_gr3);
                copy_graphic(n_panel.Graphic_4, copy_gr4);
                copy_graphic(n_panel.Graphic_5, copy_gr5);
            }
            else
            {
                n_panel = new NumericPanel(_app);
            }
        }
Ejemplo n.º 4
0
        public EditNumericPanelForm(NumericPanel edited)
        {
            InitializeComponent();

            _app = SgtApplication.CreateInstance();
            if (edited != null)
            {
                n_panel = edited;

                copy_panelName = n_panel.VPanelName;
                copy_items = new List<VPanelParameter>();

                foreach (VPanelParameter par in n_panel.Items)
                {
                    copy_items.Add(par);
                }

                copy_gr1 = new VPanelGraphic();
                copy_gr2 = new VPanelGraphic();
                copy_gr3 = new VPanelGraphic();
                copy_gr4 = new VPanelGraphic();
                copy_gr5 = new VPanelGraphic();

                copy_graphic(n_panel.Graphic_1, copy_gr1);
                copy_graphic(n_panel.Graphic_2, copy_gr2);
                copy_graphic(n_panel.Graphic_3, copy_gr3);
                copy_graphic(n_panel.Graphic_4, copy_gr4);
                copy_graphic(n_panel.Graphic_5, copy_gr5);
            }
            else
                n_panel = new NumericPanel(_app);
        }
Ejemplo n.º 5
0
        public NumericPanelForm()
        {
            InitializeComponent();

            _app    = SgtApplication.CreateInstance();
            n_panel = new NumericPanel(_app);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// добавить цифровую панель
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonCreateNewNumericPanel_Click(object sender, EventArgs e)
        {
            NumericPanelForm frm = new NumericPanelForm();

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

                    n_panel.Actualize();
                }
            }
        }
Ejemplo n.º 7
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 { }
        }