Beispiel #1
0
 private void RefreshMessageWorker(InstantMessage im)
 {
     try
     {
         IMSetting ims = new IMSetting(im);
         refreshSignal = false;
         // retrieve value from ifix EDA
         float f;
         short nErr = Eda.GetOneFloat(ims.node, ims.tag, ims.field, out f);
         // set message
         if (nErr != FixError.FE_OK)
         {
             RefreshMessage(ims.getVal("????"), Color.FromArgb(ims.color));
         }
         else
         {
             RefreshMessage(ims.getVal(f), Color.FromArgb(ims.color));
         }
     }
     // Eda.dll not found if ifix haven't intalled
     catch (DllNotFoundException)
     {
         RefreshMessage("ifix連接失敗", Color.Red);
         LED.settingForm.RefreshStatus("請確認是否安裝ifix");
     }
 }
Beispiel #2
0
        private void addIM(string str, string tag, string format, string unit, int color)
        {
            // add im into list
            IMSetting ims = new IMSetting(str, tag, format, unit, color);

            IMList.Add(ims);
            // add im information to datagridview
            addRow(str, tag, format, unit, Color.FromArgb(color));
        }
Beispiel #3
0
 private void RefreshMessageWorker(InstantMessage im)
 {
     try
     {
         IMSetting ims = new IMSetting(im);
         refreshSignal = false;
         // retrieve value from ifix EDA
         float f;
         short nErr = Eda.GetOneFloat(ims.node, ims.tag, ims.field, out f);
         // set message
         if (nErr != FixError.FE_OK)
         {
             RefreshMessage(ims.getVal("????"), Color.FromArgb(ims.color));
         }
         else
         {
             RefreshMessage(ims.getVal(f), Color.FromArgb(ims.color));
         }
     }
     // Eda.dll not found if ifix haven't intalled
     catch (DllNotFoundException)
     {
         RefreshMessage("ifix連接失敗", Color.Red);
         LED.settingForm.RefreshStatus("請確認是否安裝ifix");
     }
 }
Beispiel #4
0
 private void addIM(string str, string tag, string format, string unit, int color)
 {
     // add im into list
     IMSetting ims = new IMSetting(str, tag, format, unit, color);
     IMList.Add(ims);
     // add im information to datagridview
     addRow(str, tag, format, unit, Color.FromArgb(color));
 }