Ejemplo n.º 1
0
 private void DeUpdateLabelText(en_LabelText lbl, string strText)
 {
     try
     {
         if (this.InvokeRequired)
         {
             DelegateShowText dgateMsg = new DelegateShowText(ShowLableText);
             this.Invoke(dgateMsg, new object[] { lbl, strText });
         }
         else
         {
             ShowLableText(lbl, strText);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
        private void ShowLableText(en_LabelText lbl, string strText)
        {
            switch (lbl)
            {
            case en_LabelText.EN_EvaluatePercent:
                lbl_EvaluatePercent.Text = strText;
                break;

            case en_LabelText.EN_Consumption:
                lbl_Consumption.Text = strText;
                break;

            case en_LabelText.EN_Saving:
                lbl_Saving.Text = strText;
                break;

            case en_LabelText.EN_Time:
                lbl_Time.Text = strText;
                break;

            default:
                break;
            }
        }