internal string Actual(SpeedParameter windParameter) { switch (windParameter) { case SpeedParameter.KMPH: return KMPH.ToString("0.#"); case SpeedParameter.MPS: return MPS.ToString("0.#"); case SpeedParameter.Knot: return Knot.ToString("0.#"); default: return KMPH.ToString("0.#"); } }
public static string GetSpeedFormat(SpeedParameter speedParameter) { switch (speedParameter) { case SpeedParameter.KMPH: return("km/h"); case SpeedParameter.MPS: return("m/s"); case SpeedParameter.Knot: return("kn"); default: return(""); } }
internal string Actual(SpeedParameter windParameter) { switch (windParameter) { case SpeedParameter.KMPH: return(KMPH.ToString("0.#")); case SpeedParameter.MPS: return(MPS.ToString("0.#")); case SpeedParameter.Knot: return(Knot.ToString("0.#")); default: return(KMPH.ToString("0.#")); } }
public double ActualDouble(SpeedParameter speedParameter) { switch (speedParameter) { case SpeedParameter.KMPH: return(KMPH); case SpeedParameter.MPS: return(MPS); case SpeedParameter.Knot: return(Knot); default: return(0); } }
internal string DanWei(SpeedParameter speedParameter) { switch (speedParameter) { case SpeedParameter.KMPH: return("km/h"); case SpeedParameter.MPS: return("m/s"); case SpeedParameter.Knot: return("knot"); default: return("km/h"); } }
/// <summary> /// Get parameters from string. /// </summary> /// <param name="args">Parameters from console</param> /// <returns>Collection of parameters</returns> public static List <Parameter> GetParameters(string[] args) { if (!VerifyArgumentString(args)) { throw new ArgumentException("Wrong parameters"); } var parameters = new List <Parameter>(); for (var i = 0; i < args.Length; i++) { Parameter parameter = null; if (args[i] == "-n") { parameter = new ThreadParameter(args[i], args[i + 1]); } else if (args[i] == "-l") { parameter = new SpeedParameter(args[i], args[i + 1]); } else if (args[i] == "-f") { parameter = new FilePathParameter(args[i], args[i + 1]); } else if (args[i] == "-o") { parameter = new OutputPathParameter(args[i], args[i + 1]); } if (parameter != null && parameter.Verify()) { parameters.Add(parameter); } } return(parameters); }
public void Set(SpeedParameter s) { SpeedParameter = s; }
public static void ChangeParameter(WindParameter windFormat, SpeedParameter speedFormat) { WindParameter = windFormat; SpeedParameter = speedFormat; }
internal string DanWei(SpeedParameter speedParameter) { switch (speedParameter) { case SpeedParameter.KMPH: return "km/h"; case SpeedParameter.MPS: return "m/s"; case SpeedParameter.Knot: return "knot"; default: return "km/h"; } }
public double ActualDouble(SpeedParameter speedParameter) { switch (speedParameter) { case SpeedParameter.KMPH: return KMPH; case SpeedParameter.MPS: return MPS; case SpeedParameter.Knot: return Knot; default: return 0; } }
public SpeedViewModel(SpeedParameter l) { this.Parameter = l; Title = l.GetDisplayName(); }
public static string GetSpeedFormat(SpeedParameter speedParameter) { switch (speedParameter) { case SpeedParameter.KMPH: return "km/h"; case SpeedParameter.MPS: return "m/s"; case SpeedParameter.Knot: return "kn"; default: return ""; } }