예제 #1
0
 private string speedstr(double sp)
 {
     switch (WF_Config.Units) {
         case (int)WF_UNITS.SI: return WeatherFlow_UDP.MS2KPH(sp).ToString("0.#");
         case (int)WF_UNITS.US: return WeatherFlow_UDP.MS2MPH(sp).ToString("0.#");
         case (int)WF_UNITS.UK: return WeatherFlow_UDP.MS2MPH(sp).ToString("0.#");
         default: return WeatherFlow_UDP.MS2KPH(sp).ToString("0.#");
     }
 }
예제 #2
0
 internal string TemperatureValue(double t)
 {
     switch (WF_Config.Units) {
         case (int)WF_UNITS.SI: return t.ToString("0.##");
         case (int)WF_UNITS.US: return WeatherFlow_UDP.TempF(t).ToString("0.##");
         case (int)WF_UNITS.UK: return t.ToString("0.##");
         default: return t.ToString("0.##");
     }
 }