Ejemplo n.º 1
0
        private double ConvertTempFromCtoTarget(double temp, string target)
        {
            //supported values need to be listed.
            switch (target)
            {
            case "Farenheit":
                return(GeneralFunctions.ConvCtF(temp));

            case "Kelvin":
                return(GeneralFunctions.ConvCtK(temp));

            case "Rankine":
                return(GeneralFunctions.ConvCtRa(temp));

            case "Delisle":
                return(GeneralFunctions.ConvCtD(temp));

            case "Romer":
                return(GeneralFunctions.ConvCtRo(temp));

            case "Reaumur":
                return(GeneralFunctions.ConvCtRe(temp));

            case "Celsius":
            case "Kraggs":
            default:
                return(temp);
            }
        }
Ejemplo n.º 2
0
 private string GetTemperatureString(double temp)
 {
     if (ModConfig.ShowBothScales)
     {
         return($"{temp.ToString("N1")} Kraggs ({GeneralFunctions.ConvCtF(temp).ToString("N1")} F)");
     }
     else
     {
         return($"{temp.ToString("N1")} Kraggs");
     }
 }
Ejemplo n.º 3
0
 private string GetTemperatureString(double temp)
 {
     if (ModConfig.ShowBothScales)
     {
         //Temp =  "34 C (100 F)"
         return($"{temp.ToString("N1")} C ({GeneralFunctions.ConvCtF(temp).ToString("N1")} F)");
     }
     else
     {
         return($"{temp.ToString("N1")} C");
     }
 }