예제 #1
0
 void rocInfoTest_updatedValue(ROCinfoConstants.hardwareInfoID ID, int val)
 {
     switch (ID){
         case ROCinfoConstants.hardwareInfoID.CPULoad:
             Dispatcher.Invoke(() => cpuLoadLabel.Content = "" + val);
             break;
         case ROCinfoConstants.hardwareInfoID.CPUTemp:
             Dispatcher.Invoke(() => cpuTempLabel.Content = "" + val);
             break;
         case ROCinfoConstants.hardwareInfoID.GPULoad:
             Dispatcher.Invoke(() => gpuLoadLabel.Content = "" + val);
             break;
         case ROCinfoConstants.hardwareInfoID.GPUTemp:
             Dispatcher.Invoke(() => gpuTempLabel.Content = "" + val);
             break;
         case ROCinfoConstants.hardwareInfoID.RAMLoad:
             Dispatcher.Invoke(() => ramLoadLabel.Content = "" + val);
             break;
     }
 }
예제 #2
0
 void hwMonitor_updatedValue(ROCinfoConstants.hardwareInfoID hardwareID, int val)
 {
     try
     {
         switch (hardwareID)
         {
             case ROCinfoConstants.hardwareInfoID.CPULoad:
                 NetMan.write(rocConstants.COMID.ENGCOM, "CPU_LOAD_" + val);
                 break;
             case ROCinfoConstants.hardwareInfoID.CPUTemp:
                 NetMan.write(rocConstants.COMID.ENGCOM, "CPU_TEMP_" + val);
                 break;
             case ROCinfoConstants.hardwareInfoID.GPULoad:
                 NetMan.write(rocConstants.COMID.ENGCOM, "GPU_LOAD_" + val);
                 break;
             case ROCinfoConstants.hardwareInfoID.GPUTemp:
                 NetMan.write(rocConstants.COMID.ENGCOM, "GPU_TEMP_" + val);
                 break;
             case ROCinfoConstants.hardwareInfoID.RAMLoad:
                 NetMan.write(rocConstants.COMID.ENGCOM, "RAM_LOAD_" + val);
                 break;
         }
     }
     catch
     {
         //do nothing
         return;
     }
 }