Пример #1
0
        //更新其他实时数据的显示
        public void UpdateThreePhaseRateInfoView(Signal_Info.BasicInfo basic)
        {
            string TextBoxName = "textBox";
            string FullTextBoxName;

            string ControlItemName = "layoutControlItem";
            string FullControlItemName;

            int  index;
            bool flage = false;

            for (int i = 0; i < UPSRateInfoArray.Length; i++)
            {
                index               = i + 1;
                flage               = false;
                FullTextBoxName     = TextBoxName + index;
                FullControlItemName = ControlItemName + index;
                foreach (var UserControl in layoutControl1.Controls)
                {
                    if (UserControl is TextBox)
                    {
                        TextBox textBox = (TextBox)UserControl;
                        if (textBox.Name == FullTextBoxName)
                        {
                            textBox.Text = UPSRateInfoArray[i].Value;
                            break;
                        }
                    }
                }
                foreach (var LayoutControlItem in layoutControlGroup2.Items)
                {
                    if (LayoutControlItem is LayoutItem)
                    {
                        LayoutItem layoutItem = (LayoutItem)LayoutControlItem;
                        if (layoutItem.Name == FullControlItemName)
                        {
                            layoutItem.Text = UPSRateInfoArray[i].Name;
                            flage           = true;
                            break;
                        }
                    }
                }
                if (!flage)
                {
                    foreach (var LayoutControlItem in layoutControlGroup3.Items)
                    {
                        if (LayoutControlItem is LayoutItem)
                        {
                            LayoutItem layoutItem = (LayoutItem)LayoutControlItem;
                            if (layoutItem.Name == FullControlItemName)
                            {
                                layoutItem.Text = UPSRateInfoArray[i].Name;
                                break;
                            }
                        }
                    }
                }
            }
        }
Пример #2
0
 public void UpdateThreePhaseInfoView(Signal_Info.BasicInfo basic)
 {
     GrideUserControl1.SetUserControlInfo(UPSThreePhaseInfoArray[0], basic);
     GrideUserControl2.SetUserControlInfo(UPSThreePhaseInfoArray[1], basic);
     GrideUserControl3.SetUserControlInfo(UPSThreePhaseInfoArray[2], basic);
     GrideUserControl4.SetUserControlInfo(UPSThreePhaseInfoArray[3], basic);
     GrideUserControl5.SetUserControlInfo(UPSThreePhaseInfoArray[4], basic);
     GrideUserControl6.SetUserControlInfo(UPSThreePhaseInfoArray[5], basic);
     GrideUserControl7.SetUserControlInfo(UPSThreePhaseInfoArray[6], basic);
     GrideUserControl8.SetUserControlInfo(UPSThreePhaseInfoArray[7], basic);
     GrideUserControl9.SetUserControlInfo(UPSThreePhaseInfoArray[8], basic);
     GrideUserControl10.SetUserControlInfo(UPSThreePhaseInfoArray[9], basic);
     GrideUserControl11.SetUserControlInfo(UPSThreePhaseInfoArray[10], basic);
     GrideUserControl12.SetUserControlInfo(UPSThreePhaseInfoArray[11], basic);
 }
Пример #3
0
        //更新其他实时数据的显示
        public void UpdateThreePhaseOtherRtInfoView(Signal_Info.BasicInfo basic)
        {
            CircularUserControl1.SetUserControlInfo(CircularArray[0], basic);
            CircularUserControl2.SetUserControlInfo(CircularArray[1], basic);
            CircularUserControl3.SetUserControlInfo(CircularArray[2], basic);
            CircularUserControl4.SetUserControlInfo(CircularArray[3], basic);
            CircularUserControl5.SetUserControlInfo(CircularArray[4], basic);
            CircularUserControl6.SetUserControlInfo(CircularArray[5], basic);

            label_Name1.Text      = LineArray[0].Name;
            LineArray[0].Name     = "";
            label_Value1.Text     = LineArray[0].Value.ToString() + LineArray[0].UnitName;
            LineArray[0].UnitName = "";
            ShowCurrentCapacity(Convert.ToSingle(LineArray[0].Value));
            linearControl1.SetUserControlInfo(LineArray[0], basic);

            label_Name2.Text             = TemperatureArray[0].Name;
            TemperatureArray[0].Name     = "";
            label_Value2.Text            = TemperatureArray[0].Value.ToString() + TemperatureArray[0].UnitName;
            TemperatureArray[0].UnitName = "";
            Temperature_SetUp2.SetUserControlInfo(TemperatureArray[0], basic);
        }