Example #1
0
            public override void FillListKeyTECComponentDetail(int id)
            {
                TEC tec = null;

                lock (m_lockSuccessGetData) {
                    // очистить суммарные значения
                    m_SumRDGValues_PBR_0 = 0F;
                    m_arSumRDGValues     = null;

                    m_listKeyTECComponentDetail.Clear();
                    // найти ТЭЦ по 'id'
                    tec = m_list_tec.Find(t => { return(t.m_id == id); });

                    if (!(tec == null))
                    {
                        //ВСЕ компоненты
                        foreach (TECComponent v in tec.list_TECComponents)
                        {
                            if (v.IsParamVyvod == true)
                            {
                                // параметры выводов
                                foreach (Vyvod.ParamVyvod pv in v.ListLowPointDev)
                                {
                                    if (pv.m_id_param == Vyvod.ID_PARAM.T_PV) // является параметром - температура прямая (для которого есть плановые значения)
                                                                              //m_listTECComponentIndexDetail.Add(pv.m_id);
                                    {
                                        m_listKeyTECComponentDetail.Add(new FormChangeMode.KeyDevice()
                                        {
                                            Id = v.m_id, Mode = FormChangeMode.MODE_TECCOMPONENT.TG
                                        });
                                    }
                                    else
                                    {
                                        ;
                                    }
                                }
                            }
                            else
                            {
                                ; // не ВЫВОД
                            }
                        }
                    }
                    else
                    {
                        Logging.Logg().Error(string.Format(@"Admin_TS_Vyvod::FillListIndexTECComponent (id={0}) - не найдена ТЭЦ...", id), Logging.INDEX_MESSAGE.NOT_SET);
                    }

                    ClearListRDGValues();
                }
            }
Example #2
0
 private void admin_onEventUnitTestSetValuesRequest(TEC t, TECComponent comp, DateTime date, CONN_SETT_TYPE type, string[] queries, IEnumerable <int> listIdRec)
 {
     _eventUnitTestNextIndexSetValuesRequest?.Invoke(comboBoxTecComponent.SelectedIndex + 1 < comboBoxTecComponent.Items.Count ? comboBoxTecComponent.SelectedIndex + 1 : -1, t, comp, date, type, listIdRec, queries);
 }
Example #3
0
 protected override void GetPPBRValuesRequest(TEC t, TECComponent comp, DateTime date)
 {
     throw new NotImplementedException();
 }
Example #4
0
 public PanelTecViewStandard(TEC tec, int indx_tec, int indx_comp)
     : base(TecView.TYPE_PANEL.VIEW, tec, indx_tec, indx_comp)
 {
     m_arPercRows = new int [] { 5, 71 };
 }
Example #5
0
        private void timer_Tick(object sender, EventArgs e)
        {
            if (firstStart)
            {
                adminPanel.StartDbInterface();

                // отображаем вкладки ТЭЦ
                int index;
                for (int i = 0; i < changeMode.tec_index.Count; i++)
                {
                    TEC t = tec[changeMode.tec_index[i]];

                    if ((index = changeMode.was_checked.IndexOf(i)) >= 0)
                    {
                        if (changeMode.gtp_index[changeMode.was_checked[index]] == -1)
                        {
                            tclTecViews.TabPages.Add(t.name);
                        }
                        else
                        {
                            tclTecViews.TabPages.Add(t.name + " - " + t.GTP[changeMode.gtp_index[changeMode.was_checked[index]]].name);
                        }
                        tclTecViews.TabPages[tclTecViews.TabPages.Count - 1].Controls.Add(tecViews[i]);
                        selectedTecViews.Add(tecViews[i]);

                        t.StartDbInterface();
                        tecViews[i].Activate(false);
                        tecViews[i].Start();
                    }
                }

                if (selectedTecViews.Count > 0)
                {
                    oldSelectedIndex = 0;
                    selectedTecViews[oldSelectedIndex].Activate(true);
                }

                if (changeMode.admin_was_checked)
                {
                    //if (passwordForm.ShowDialog() == DialogResult.Yes)
                    {
                        tclTecViews.TabPages.Add("Редактирование ПБР");

                        tclTecViews.TabPages[tclTecViews.TabPages.Count - 1].Controls.Add(adminPanel);

                        adminPanel.Start();
                    }
                }

                firstStart = false;
            }

            lock (lockEvent)
            {
                bool have_eror = UpdateStatusString();

                if (have_eror)
                {
                    lblMainState.Text = "ОШИБКА";
                }

                if (!have_eror || !show_error_alert)
                {
                    lblMainState.Text = "";
                }

                show_error_alert = !show_error_alert;
                lblError.Invalidate();
                lblDateError.Invalidate();
            }
        }
Example #6
0
 public GTP(TEC tec)
 {
     this.tec = tec;
     TG       = new List <TG>();
 }