Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     while (true)
     {
         Console.WriteLine("Please input height.");
         string sHeight = Console.ReadLine();
         while (sHeight == "")
         {
             sHeight = Console.ReadLine();
         }
         MappingCalculator calculator = new MappingCalculator(Utility.GetExeFolder() + Settings.stringRes.calibFileName);
         double            h          = double.Parse(sHeight);
         //var tipVol = calculator.GetTipVolumeFromHeight(h);
         var vol = calculator.GetVolumeFromHeight(h);
         Console.WriteLine(string.Format("volume is:{1}", vol));
         Console.WriteLine("Press x to exit!");
         if (Console.ReadKey().Key == ConsoleKey.X)
         {
             Console.WriteLine();
             break;
         }
     }
 }
Ejemplo n.º 2
0
 static void Main(string[] args)
 {
     while(true)
     {
         Console.WriteLine("Please input height.");
         string sHeight = Console.ReadLine();
         while (sHeight == "")
             sHeight = Console.ReadLine();
         MappingCalculator calculator = new MappingCalculator(Utility.GetExeFolder() + Settings.stringRes.calibFileName);
         double h = double.Parse(sHeight);
         //var tipVol = calculator.GetTipVolumeFromHeight(h);
         var vol = calculator.GetVolumeFromHeight(h);
         Console.WriteLine(string.Format("volume is:{1}",vol));
         Console.WriteLine("Press x to exit!");
         if (Console.ReadKey().Key == ConsoleKey.X)
         {
             Console.WriteLine();
             break;
         }
     }
 }