Ejemplo n.º 1
0
        /// <summary>
        /// Инициализировать графическую панель
        /// </summary>
        protected void InitializeGraphicPanel()
        {
            manager.StartTime   = DateTime.Now;
            manager.Orientation = GraphicComponent.Orientation.Vertical;

            Graphic gr_1 = manager.InstanceGraphic();
            Graphic gr_2 = manager.InstanceGraphic();
            Graphic gr_3 = manager.InstanceGraphic();
            Graphic gr_4 = manager.InstanceGraphic();
            Graphic gr_5 = manager.InstanceGraphic();

            gr_1.Color = graphic_1.Color;
            gr_2.Color = graphic_2.Color;
            gr_3.Color = graphic_3.Color;
            gr_4.Color = graphic_4.Color;
            gr_5.Color = graphic_5.Color;

            gr_1.Description = graphic_1.Description;
            gr_2.Description = graphic_2.Description;
            gr_3.Description = graphic_3.Description;
            gr_4.Description = graphic_4.Description;
            gr_5.Description = graphic_5.Description;

            gr_1.Units = graphic_1.Units;
            gr_2.Units = graphic_2.Units;
            gr_3.Units = graphic_3.Units;
            gr_4.Units = graphic_4.Units;
            gr_5.Units = graphic_5.Units;

            gr_1.Range.Min = graphic_1.Min;
            gr_1.Range.Max = graphic_1.Max;

            gr_2.Range.Min = graphic_2.Min;
            gr_2.Range.Max = graphic_2.Max;

            gr_3.Range.Min = graphic_3.Min;
            gr_3.Range.Max = graphic_3.Max;

            gr_4.Range.Min = graphic_4.Min;
            gr_4.Range.Max = graphic_4.Max;

            gr_5.Range.Min = graphic_5.Min;
            gr_5.Range.Max = graphic_5.Max;

            graphic_1.Tag = gr_1;
            graphic_2.Tag = gr_2;
            graphic_3.Tag = gr_3;
            graphic_4.Tag = gr_4;
            graphic_5.Tag = gr_5;

            manager.OnDataNeed += new EventHandler(manager_OnDataNeed);
        }
Ejemplo n.º 2
0
        private ParametersViewPanel panelView;              // отображаемая панель

        public KRSForm(DateTime _now)
        {
            InitializeComponent();

            _app = Application.CreateInstance();

            manager           = graphicsSheet1.InstanceManager();
            manager.StartTime = _app.Commutator.MinTimeParameter();

/*
 *          if (manager.StartTime == DateTime.MinValue)
 *          {
 *              manager.StartTime = DateTime.Now;
 *          }
 */
            manager.OnDataNeed += new EventHandler(manager_OnDataNeed);
            manager.Orientation = GraphicComponent.Orientation.Horizontal;

            graphics = new Graphic[5];
            for (int index = 0; index < graphics.Length; index++)
            {
                graphics[index] = manager.InstanceGraphic();

                graphics[index].Range.Min = 0;
                graphics[index].Range.Max = 65535;
            }

            manager.UpdatePeriod = 500;
            numericUpDown1.Value = 500;
        }
Ejemplo n.º 3
0
        private ParametersViewPanel panelView;              // отображаемая панель

        /// <summary>
        /// инициализирует новый экземпляр класса
        /// </summary>
        public ParametersViewForm()
        {
            InitializeComponent();

            _app    = Application.CreateInstance();
            manager = graphicsSheet1.InstanceManager();

            manager.Mode        = GraphicComponent.DrawMode.PassivScroll;
            manager.Orientation = GraphicComponent.Orientation.Horizontal;

            manager.UpdatePeriod = 500;

            graphics = new Graphic[5];
            for (int index = 0; index < graphics.Length; index++)
            {
                graphics[index] = manager.InstanceGraphic();

                graphics[index].Range.Min = 0;
                graphics[index].Range.Max = 65535;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// выполнить инициализацию второй группы графиков
        /// </summary>
        protected void InitializeSGraphics()
        {
            graphic_gasnavihode = manager2.InstanceGraphic();
            if (loaded == false)
            {
                graphic_gasnavihode.Units       = "м";
                graphic_gasnavihode.Description = "Газ1";

                graphic_gasnavihode.Range.Min = 0;
                graphic_gasnavihode.Range.Max = 50;

                graphic_gasnavihode.Color = Color.Firebrick;
            }
            else
            if (gr_gasnavihode != null)
            {
                graphic_gasnavihode.Units       = gr_gasnavihode.Units;
                graphic_gasnavihode.Description = gr_gasnavihode.Description;

                graphic_gasnavihode.Range.Min = gr_gasnavihode.Range.Min;
                graphic_gasnavihode.Range.Max = gr_gasnavihode.Range.Max;

                graphic_gasnavihode.Color = gr_gasnavihode.Color;

                gr_gasnavihode.Font.Dispose();
                gr_gasnavihode.Brush.Dispose();

                gr_gasnavihode = null;
            }

            graphic_gasnaplosadke = manager2.InstanceGraphic();
            if (loaded == false)
            {
                graphic_gasnaplosadke.Units       = "м";
                graphic_gasnaplosadke.Description = "Газ2";

                graphic_gasnaplosadke.Range.Min = 0;
                graphic_gasnaplosadke.Range.Max = 50;

                graphic_gasnaplosadke.Color = Color.SeaGreen;
            }
            else
            if (gr_gasnaplosadke != null)
            {
                graphic_gasnaplosadke.Units       = gr_gasnaplosadke.Units;
                graphic_gasnaplosadke.Description = gr_gasnaplosadke.Description;

                graphic_gasnaplosadke.Range.Min = gr_gasnaplosadke.Range.Min;
                graphic_gasnaplosadke.Range.Max = gr_gasnaplosadke.Range.Max;

                graphic_gasnaplosadke.Color = gr_gasnaplosadke.Color;

                gr_gasnaplosadke.Font.Dispose();
                gr_gasnaplosadke.Brush.Dispose();

                gr_gasnaplosadke = null;
            }

            graphic_gaspodrotorom = manager2.InstanceGraphic();
            if (loaded == false)
            {
                graphic_gaspodrotorom.Units       = "м";
                graphic_gaspodrotorom.Description = "Газ3";

                graphic_gaspodrotorom.Range.Min = 0;
                graphic_gaspodrotorom.Range.Max = 50;

                graphic_gaspodrotorom.Color = Color.Blue;
            }
            else
            if (gr_gaspodrotorom != null)
            {
                graphic_gaspodrotorom.Units       = gr_gaspodrotorom.Units;
                graphic_gaspodrotorom.Description = gr_gaspodrotorom.Description;

                graphic_gaspodrotorom.Range.Min = gr_gaspodrotorom.Range.Min;
                graphic_gaspodrotorom.Range.Max = gr_gaspodrotorom.Range.Max;

                graphic_gaspodrotorom.Color = gr_gaspodrotorom.Color;

                gr_gaspodrotorom.Font.Dispose();
                gr_gaspodrotorom.Brush.Dispose();

                gr_gaspodrotorom = null;
            }

            graphic_gaspriemnaemk = manager2.InstanceGraphic();
            if (loaded == false)
            {
                graphic_gaspriemnaemk.Units       = "м";
                graphic_gaspriemnaemk.Description = "Газ4";

                graphic_gaspriemnaemk.Range.Min = 0;
                graphic_gaspriemnaemk.Range.Max = 50;

                graphic_gaspriemnaemk.Color = Color.SaddleBrown;
            }
            else
            if (gr_gaspriemnaemk != null)
            {
                graphic_gaspriemnaemk.Units       = gr_gaspriemnaemk.Units;
                graphic_gaspriemnaemk.Description = gr_gaspriemnaemk.Description;

                graphic_gaspriemnaemk.Range.Min = gr_gaspriemnaemk.Range.Min;
                graphic_gaspriemnaemk.Range.Max = gr_gaspriemnaemk.Range.Max;

                graphic_gaspriemnaemk.Color = gr_gaspriemnaemk.Color;

                gr_gaspriemnaemk.Font.Dispose();
                gr_gaspriemnaemk.Brush.Dispose();

                gr_gaspriemnaemk = null;
            }

            graphic_gasvibrosit = manager2.InstanceGraphic();
            if (loaded == false)
            {
                graphic_gasvibrosit.Units       = "м";
                graphic_gasvibrosit.Description = "Газ5";

                graphic_gasvibrosit.Range.Min = 0;
                graphic_gasvibrosit.Range.Max = 50;

                graphic_gasvibrosit.Color = Color.Black;
            }
            else
            if (gr_gasvibrosit != null)
            {
                graphic_gasvibrosit.Units       = gr_gasvibrosit.Units;
                graphic_gasvibrosit.Description = gr_gasvibrosit.Description;

                graphic_gasvibrosit.Range.Min = gr_gasvibrosit.Range.Min;
                graphic_gasvibrosit.Range.Max = gr_gasvibrosit.Range.Max;

                graphic_gasvibrosit.Color = gr_gasvibrosit.Color;

                gr_gasvibrosit.Font.Dispose();
                gr_gasvibrosit.Brush.Dispose();

                gr_gasvibrosit = null;
            }

            manager2.StartTime   = DateTime.Now;
            manager2.Orientation = GraphicComponent.Orientation.Vertical;

            manager2.Update();
            manager2.UpdatePeriod = 1000;
            manager2.Mode         = GraphicComponent.DrawMode.Activ;

            manager2.OnDataNeed += new EventHandler(manager2_OnData);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// выполнить инициализацию первой группы графиков
        /// </summary>
        protected void InitializeFGraphics()
        {
            if (manager1 != null)
            {
                graphic_talblok = manager1.InstanceGraphic();

                if (loaded == false)
                {
                    graphic_talblok.Units       = "м";
                    graphic_talblok.Description = "Т/блок";

                    graphic_talblok.Range.Min = 0;
                    graphic_talblok.Range.Max = 45;

                    graphic_talblok.Color = Color.Red;
                }
                else
                if (gr_talblok != null)
                {
                    graphic_talblok.Units       = gr_talblok.Units;
                    graphic_talblok.Description = gr_talblok.Description;

                    graphic_talblok.Range.Min = gr_talblok.Range.Min;
                    graphic_talblok.Range.Max = gr_talblok.Range.Max;

                    graphic_talblok.Color = gr_talblok.Color;

                    gr_talblok.Font.Dispose();
                    gr_talblok.Brush.Dispose();

                    gr_talblok = null;
                }

                graphic_glybina = manager1.InstanceGraphic();
                if (loaded == false)
                {
                    graphic_glybina.Units       = "м";
                    graphic_glybina.Description = "Гл.Инст";

                    graphic_glybina.Range.Min = 0;
                    graphic_glybina.Range.Max = 6500;

                    graphic_glybina.Color = Color.Green;
                }
                else
                if (gr_glybina != null)
                {
                    graphic_glybina.Units       = gr_glybina.Units;
                    graphic_glybina.Description = gr_glybina.Description;

                    graphic_glybina.Range.Min = gr_glybina.Range.Min;
                    graphic_glybina.Range.Max = gr_glybina.Range.Max;

                    graphic_glybina.Color = gr_glybina.Color;

                    gr_glybina.Font.Dispose();
                    gr_glybina.Brush.Dispose();

                    gr_glybina = null;
                }

                graphic_skorostSpo = manager1.InstanceGraphic();
                if (loaded == false)
                {
                    graphic_skorostSpo.Units       = "м/с";
                    graphic_skorostSpo.Description = "Ск.СПО";

                    graphic_skorostSpo.Range.Min = -2;
                    graphic_skorostSpo.Range.Max = 2;

                    graphic_skorostSpo.Color = Color.Blue;
                }
                else
                if (gr_skorostSpo != null)
                {
                    graphic_skorostSpo.Units       = gr_skorostSpo.Units;
                    graphic_skorostSpo.Description = gr_skorostSpo.Description;

                    graphic_skorostSpo.Range.Min = gr_skorostSpo.Range.Min;
                    graphic_skorostSpo.Range.Max = gr_skorostSpo.Range.Max;

                    graphic_skorostSpo.Color = gr_skorostSpo.Color;

                    gr_skorostSpo.Font.Dispose();
                    gr_skorostSpo.Brush.Dispose();

                    gr_skorostSpo = null;
                }

                manager1.StartTime   = DateTime.Now;
                manager1.Orientation = GraphicComponent.Orientation.Vertical;

                manager1.Update();
                manager1.UpdatePeriod = 1000;
                manager1.Mode         = GraphicComponent.DrawMode.Activ;

                manager1.OnDataNeed += new EventHandler(manager1_OnData);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Выполнить инициализацию панели
        /// </summary>
        public void InitializePanel()
        {
            Graphic gr_1 = manager.InstanceGraphic();
            Graphic gr_2 = manager.InstanceGraphic();
            Graphic gr_3 = manager.InstanceGraphic();
            Graphic gr_4 = manager.InstanceGraphic();
            Graphic gr_5 = manager.InstanceGraphic();

            gr_1.Color = graphic_1.Color;
            gr_2.Color = graphic_2.Color;
            gr_3.Color = graphic_3.Color;
            gr_4.Color = graphic_4.Color;
            gr_5.Color = graphic_5.Color;

            gr_1.Description = graphic_1.Description;
            gr_2.Description = graphic_2.Description;
            gr_3.Description = graphic_3.Description;
            gr_4.Description = graphic_4.Description;
            gr_5.Description = graphic_5.Description;

            gr_1.Units = graphic_1.Units;
            gr_2.Units = graphic_2.Units;
            gr_3.Units = graphic_3.Units;
            gr_4.Units = graphic_4.Units;
            gr_5.Units = graphic_5.Units;

            gr_1.Width = graphic_1.Width;
            gr_2.Width = graphic_2.Width;
            gr_3.Width = graphic_3.Width;
            gr_4.Width = graphic_4.Width;
            gr_5.Width = graphic_5.Width;

            gr_1.Range.Min = graphic_1.Min;
            gr_1.Range.Max = graphic_1.Max;

            gr_2.Range.Min = graphic_2.Min;
            gr_2.Range.Max = graphic_2.Max;

            gr_3.Range.Min = graphic_3.Min;
            gr_3.Range.Max = graphic_3.Max;

            gr_4.Range.Min = graphic_4.Min;
            gr_4.Range.Max = graphic_4.Max;

            gr_5.Range.Min = graphic_5.Min;
            gr_5.Range.Max = graphic_5.Max;

            graphic_1.Tag = gr_1;
            graphic_2.Tag = gr_2;
            graphic_3.Tag = gr_3;
            graphic_4.Tag = gr_4;
            graphic_5.Tag = gr_5;

            if (manager != null)
            {
                manager.IntervalInCell = span;
                manager.GrinCount      = count;
                manager.Orientation    = (Orientation)orientation;

                manager.StartTime = DateTime.Now;
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// выполнить инициализацию второй группы графиков
        /// </summary>
        protected void InitializeSGraphicPanel()
        {
            graphic_summObem = manager2.InstanceGraphic();         // график суммарный объем в емкостях
            if (loaded == false)
            {
                graphic_summObem.Units       = "м.куб";
                graphic_summObem.Description = "Об.Сумм";

                graphic_summObem.Range.Min = 0;
                graphic_summObem.Range.Max = 550;

                graphic_summObem.Color = Color.Red;
            }
            else
            if (gr_summObem != null)
            {
                graphic_summObem.Units       = gr_summObem.Units;
                graphic_summObem.Description = gr_summObem.Description;

                graphic_summObem.Range.Min = gr_summObem.Range.Min;
                graphic_summObem.Range.Max = gr_summObem.Range.Max;

                graphic_summObem.Color = gr_summObem.Color;

                gr_summObem.Font.Dispose();
                gr_summObem.Brush.Dispose();

                gr_summObem = null;
            }

            graphic_hodi1 = manager2.InstanceGraphic();            // график ходы насоса 1
            if (loaded == false)
            {
                graphic_hodi1.Units       = "ход/мин";
                graphic_hodi1.Description = "Ходы 1";

                graphic_hodi1.Range.Min = 0;
                graphic_hodi1.Range.Max = 130;

                graphic_hodi1.Color = Color.Green;
            }
            else
            if (gr_hodi1 != null)
            {
                graphic_hodi1.Units       = gr_hodi1.Units;
                graphic_hodi1.Description = gr_hodi1.Description;

                graphic_hodi1.Range.Min = gr_hodi1.Range.Min;
                graphic_hodi1.Range.Max = gr_hodi1.Range.Max;

                graphic_hodi1.Color = gr_hodi1.Color;

                gr_hodi1.Font.Dispose();
                gr_hodi1.Brush.Dispose();

                gr_hodi1 = null;
            }

            graphic_hodi2 = manager2.InstanceGraphic();            // график ходы насоса 2
            if (loaded == false)
            {
                graphic_hodi2.Units       = "ход/мин";
                graphic_hodi2.Description = "Ходы 2";

                graphic_hodi2.Range.Min = 0;
                graphic_hodi2.Range.Max = 130;

                graphic_hodi2.Color = Color.Blue;
            }
            else
            if (gr_hodi2 != null)
            {
                graphic_hodi2.Units       = gr_hodi2.Units;
                graphic_hodi2.Description = gr_hodi2.Description;

                graphic_hodi2.Range.Min = gr_hodi2.Range.Min;
                graphic_hodi2.Range.Max = gr_hodi2.Range.Max;

                graphic_hodi2.Color = gr_hodi2.Color;

                gr_hodi2.Font.Dispose();
                gr_hodi2.Brush.Dispose();

                gr_hodi2 = null;
            }

            graphic_potok = manager2.InstanceGraphic();            // график поток на выходе
            if (loaded == false)
            {
                graphic_potok.Units       = "%";
                graphic_potok.Description = "Поток";

                graphic_potok.Range.Min = 0;
                graphic_potok.Range.Max = 100;

                graphic_potok.Color = Color.Brown;
            }
            else
            if (gr_potok != null)
            {
                graphic_potok.Units       = gr_potok.Units;
                graphic_potok.Description = gr_potok.Description;

                graphic_potok.Range.Min = gr_potok.Range.Min;
                graphic_potok.Range.Max = gr_potok.Range.Max;

                graphic_potok.Color = gr_potok.Color;

                gr_potok.Font.Dispose();
                gr_potok.Brush.Dispose();

                gr_potok = null;
            }

            manager2.StartTime   = DateTime.Now;
            manager2.Orientation = GraphicComponent.Orientation.Vertical;

            manager2.Update();
            manager2.UpdatePeriod = 1000;
            manager2.Mode         = GraphicComponent.DrawMode.Activ;

            manager2.OnDataNeed += new EventHandler(manager2_OnData);
        }
Ejemplo n.º 8
0
        // ------------------------ вспомогательные функции ------------------------

        /// <summary>
        /// Инициализировать графическую панель
        /// </summary>
        protected void InitializeFGraphicPanel()
        {
            graphic_plPriemna = manager1.InstanceGraphic();        // график плотность приемная емкость
            if (loaded == false)
            {
                graphic_plPriemna.Units       = "г/см3";
                graphic_plPriemna.Description = "Плот1";

                graphic_plPriemna.Range.Min = 0.8f;
                graphic_plPriemna.Range.Max = 2.2f;

                graphic_plPriemna.Color = Color.Red;
            }
            else
            if (gr_plPriemna != null)
            {
                graphic_plPriemna.Units       = "г/см3";
                graphic_plPriemna.Description = "Плот1";

                graphic_plPriemna.Range.Min = gr_plPriemna.Range.Min;
                graphic_plPriemna.Range.Max = gr_plPriemna.Range.Max;

                graphic_plPriemna.Color = gr_plPriemna.Color;

                gr_plPriemna.Font.Dispose();
                gr_plPriemna.Brush.Dispose();

                gr_plPriemna = null;
            }

            graphic_plBlokaOchi = manager1.InstanceGraphic();      // график плотность блока очистки
            if (loaded == false)
            {
                graphic_plBlokaOchi.Units       = "г/см3";
                graphic_plBlokaOchi.Description = "Плот2";

                graphic_plBlokaOchi.Range.Min = 0.8f;
                graphic_plBlokaOchi.Range.Max = 2.2f;

                graphic_plBlokaOchi.Color = Color.Green;
            }
            else
            if (gr_plBlokaOchi != null)
            {
                graphic_plBlokaOchi.Units       = "г/см3";
                graphic_plBlokaOchi.Description = "Плот2";

                graphic_plBlokaOchi.Range.Min = gr_plBlokaOchi.Range.Min;
                graphic_plBlokaOchi.Range.Max = gr_plBlokaOchi.Range.Max;

                graphic_plBlokaOchi.Color = gr_plBlokaOchi.Color;

                gr_plBlokaOchi.Font.Dispose();
                gr_plBlokaOchi.Brush.Dispose();

                gr_plBlokaOchi = null;
            }

            graphic_plEmnsek2 = manager1.InstanceGraphic();        // график плотность емкости приготовления отсек2
            if (loaded == false)
            {
                graphic_plEmnsek2.Units       = "г/см3";
                graphic_plEmnsek2.Description = "Плот3";

                graphic_plEmnsek2.Range.Min = 0.8f;
                graphic_plEmnsek2.Range.Max = 2.2f;

                graphic_plEmnsek2.Color = Color.Blue;
            }
            else
            if (gr_plEmnsek2 != null)
            {
                graphic_plEmnsek2.Units       = "г/см3";
                graphic_plEmnsek2.Description = "Плот3";

                graphic_plEmnsek2.Range.Min = gr_plEmnsek2.Range.Min;
                graphic_plEmnsek2.Range.Max = gr_plEmnsek2.Range.Max;

                graphic_plEmnsek2.Color = gr_plEmnsek2.Color;

                gr_plEmnsek2.Font.Dispose();
                gr_plEmnsek2.Brush.Dispose();

                gr_plEmnsek2 = null;
            }

            manager1.StartTime   = DateTime.Now;
            manager1.Orientation = GraphicComponent.Orientation.Vertical;

            manager1.Update();
            manager1.UpdatePeriod = 1000;
            manager1.Mode         = GraphicComponent.DrawMode.Activ;

            manager1.OnDataNeed += new EventHandler(manager1_OnData);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Инициализировать графическую панель
        /// </summary>
        protected void InitializeGraphicPanel()
        {
            manager.StartTime = DateTime.Now;

            manager.OnData     += new OnDataEventHander(manager_OnData);
            manager.OnDataNeed += new EventHandler(manager_OnDataNeed);

            manager.Orientation = GraphicComponent.Orientation.Vertical;

            graphic_glybina = manager.InstanceGraphic();          // отображаемый график Глубина скважины
            if (loaded == false)
            {
                graphic_glybina.Description = "Забой";

                graphic_glybina.Range.Min = 0;
                graphic_glybina.Range.Max = 6500;

                graphic_glybina.Units = "м";

                graphic_glybina.Color = Color.Red;
            }
            else
            {
                if (gr_glybina != null)
                {
                    graphic_glybina.Description = gr_glybina.Description;

                    graphic_glybina.Range.Min = gr_glybina.Range.Min;
                    graphic_glybina.Range.Max = gr_glybina.Range.Max;

                    graphic_glybina.Units = gr_glybina.Units;
                    graphic_glybina.Color = gr_glybina.Color;

                    gr_glybina.Font.Dispose();
                    gr_glybina.Brush.Dispose();

                    gr_glybina = null;
                }
            }

            graphic_mehskorost = manager.InstanceGraphic();       // отображаемый график Мех.скорость проходки
            if (loaded == false)
            {
                graphic_mehskorost.Range.Min = 0;
                graphic_mehskorost.Range.Max = 200;

                graphic_mehskorost.Units       = "м/ч";
                graphic_mehskorost.Description = "СК.Мех";

                graphic_mehskorost.Color = Color.Green;
            }
            else
            if (gr_mehskorost != null)
            {
                graphic_mehskorost.Description = gr_mehskorost.Description;

                graphic_mehskorost.Range.Min = gr_mehskorost.Range.Min;
                graphic_mehskorost.Range.Max = gr_mehskorost.Range.Max;

                graphic_mehskorost.Units = gr_mehskorost.Units;
                graphic_mehskorost.Color = gr_mehskorost.Color;

                gr_mehskorost.Font.Dispose();
                gr_mehskorost.Brush.Dispose();

                gr_mehskorost = null;
            }

            graphic_vesnakruke = manager.InstanceGraphic();       // отображаемый график вес на крюке
            if (loaded == false)
            {
                graphic_vesnakruke.Range.Min = 0;
                graphic_vesnakruke.Range.Max = 450;

                graphic_vesnakruke.Units       = "тс";
                graphic_vesnakruke.Description = "Вес";

                graphic_vesnakruke.Color = Color.Blue;
            }
            else
            if (gr_vesnakruke != null)
            {
                graphic_vesnakruke.Description = gr_vesnakruke.Description;

                graphic_vesnakruke.Range.Min = gr_vesnakruke.Range.Min;
                graphic_vesnakruke.Range.Max = gr_vesnakruke.Range.Max;

                graphic_vesnakruke.Units = gr_vesnakruke.Units;
                graphic_vesnakruke.Color = gr_vesnakruke.Color;

                gr_vesnakruke.Font.Dispose();
                gr_vesnakruke.Brush.Dispose();

                gr_vesnakruke = null;
            }

            graphic_davlenienaman = manager.InstanceGraphic();    // отображаемый график давления на манифольде
            if (loaded == false)
            {
                graphic_davlenienaman.Range.Min = 0;
                graphic_davlenienaman.Range.Max = 400;

                graphic_davlenienaman.Units       = "кг/см2";
                graphic_davlenienaman.Description = "Давление";

                graphic_davlenienaman.Color = Color.Brown;
            }
            else
            if (gr_davlenienaman != null)
            {
                graphic_davlenienaman.Description = gr_davlenienaman.Description;

                graphic_davlenienaman.Range.Min = gr_davlenienaman.Range.Min;
                graphic_davlenienaman.Range.Max = gr_davlenienaman.Range.Max;

                graphic_davlenienaman.Units = gr_davlenienaman.Units;
                graphic_davlenienaman.Color = gr_davlenienaman.Color;

                gr_davlenienaman.Font.Dispose();
                gr_davlenienaman.Brush.Dispose();

                gr_davlenienaman = null;
            }

            graphic_rashodnavhode = manager.InstanceGraphic();    // отображаемый график расход на входе
            if (loaded == false)
            {
                graphic_rashodnavhode.Range.Min = 0;
                graphic_rashodnavhode.Range.Max = 100;

                graphic_rashodnavhode.Units       = "л/с";
                graphic_rashodnavhode.Description = "Расход";

                graphic_rashodnavhode.Color = Color.DarkOrange;
            }
            else
            if (gr_rashodnavhode != null)
            {
                graphic_rashodnavhode.Description = gr_rashodnavhode.Description;

                graphic_rashodnavhode.Range.Min = gr_rashodnavhode.Range.Min;
                graphic_rashodnavhode.Range.Max = gr_rashodnavhode.Range.Max;

                graphic_rashodnavhode.Units = gr_rashodnavhode.Units;
                graphic_rashodnavhode.Color = gr_rashodnavhode.Color;

                gr_rashodnavhode.Font.Dispose();
                gr_rashodnavhode.Brush.Dispose();

                gr_rashodnavhode = null;
            }
        }
Ejemplo n.º 10
0
        public StageViewForm(int s_index)
        {
            stage_index = s_index;
            InitializeComponent();

            _app = Application.CreateInstance();
            if (_app != null)
            {
                Project prj = _app.CurrentProject;
                if (prj != null)
                {
                    if (stage_index > -1 && stage_index < prj.Stages.Count)
                    {
                        sel_stage = prj.Stages[stage_index];
                        if (sel_stage != null)
                        {
                            manager      = graphicsSheet1.InstanceManager();
                            manager.Mode = GraphicComponent.DrawMode.PassivScroll;

                            manager.HardTime      = true;
                            manager.HardStartTime = sel_stage.StartTime;

                            manager.StartTime   = sel_stage.StartTime;
                            manager.Orientation = GraphicComponent.Orientation.Horizontal;

                            graphics = new Graphic[5];
                            for (int index = 0; index < 5; index++)
                            {
                                graphics[index] = manager.InstanceGraphic();
                                switch (index)
                                {
                                case 0:

                                    graphics[index].Color       = _app.Graphic_consumption.Color;
                                    graphics[index].Description = _app.Graphic_consumption.Description;

                                    graphics[index].Range.Min = _app.Graphic_consumption.Range.Min;
                                    graphics[index].Range.Max = _app.Graphic_consumption.Range.Max;

                                    graphics[index].Units = _app.Graphic_consumption.Units;
                                    break;

                                case 1:

                                    graphics[index].Color       = _app.Graphic_volume.Color;
                                    graphics[index].Description = _app.Graphic_volume.Description;

                                    graphics[index].Range.Min = _app.Graphic_volume.Range.Min;
                                    graphics[index].Range.Max = _app.Graphic_volume.Range.Max;

                                    graphics[index].Units = _app.Graphic_volume.Units;
                                    break;

                                case 2:

                                    graphics[index].Color       = _app.Graphic_density.Color;
                                    graphics[index].Description = _app.Graphic_density.Description;

                                    graphics[index].Range.Min = _app.Graphic_density.Range.Min;
                                    graphics[index].Range.Max = _app.Graphic_density.Range.Max;

                                    graphics[index].Units = _app.Graphic_density.Units;
                                    break;

                                case 3:

                                    graphics[index].Color       = _app.Graphic_pressure.Color;
                                    graphics[index].Description = _app.Graphic_pressure.Description;

                                    graphics[index].Range.Min = _app.Graphic_pressure.Range.Min;
                                    graphics[index].Range.Max = _app.Graphic_pressure.Range.Max;

                                    graphics[index].Units = _app.Graphic_pressure.Units;
                                    break;

                                case 4:

                                    graphics[index].Color       = _app.Graphic_temperature.Color;
                                    graphics[index].Description = _app.Graphic_temperature.Description;

                                    graphics[index].Range.Min = _app.Graphic_temperature.Range.Min;
                                    graphics[index].Range.Max = _app.Graphic_temperature.Range.Max;

                                    graphics[index].Units = _app.Graphic_temperature.Units;
                                    break;

                                default:
                                    break;
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                MessageBox.Show(this, "", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                Close();
            }
        }