using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;
using System.Drawing;
using Nfiq;
using CUDAFingerprinting.Common;
using MccSdk = BioLab.Biometrics.Mcc.Sdk;
using Obedience.Processing;
using System.Reflection;

namespace ResultsExtraction
{
  public class Program
  {
    private const int numberOfSame = 8;

    static void Main(string[] args)
    {
      int choiceFolder = -1;
      int choiceSelection = -1;

      Console.WriteLine("Let's go! You need choose folder number.\n");
      Console.WriteLine("1: for Db1_a_1_10, ... , 10: for Db1_a_91_100\n");

      while (!Int32.TryParse(Console.ReadLine(), out choiceFolder) || choiceFolder < 0 || choiceFolder > 10)
      {
        Console.WriteLine("Try again, please. Number from 1 to 10. Type any.\n");
      }

      Console.WriteLine("Thx.");

      Tuple<string, string> result = ParseInput(choiceFolder, choiceSelection);
      string resultFolder = "234";
      ROC.GetPositiveRates(result.Item1, Resources.ROC + resultFolder + result.Item2);
    }

    private static Tuple<string, string> ParseInput(int choiceFolder, int choiceSelection)
    {
      string folder = String.Empty;
      string selection = String.Empty;

      switch (choiceFolder)
      {
        case 1:
          {
            folder = Resources.Db1_a_1_10;
            selection = @"\1_10.txt";
            break;
          }
        case 2:
          {
            folder = Resources.Db1_a_11_20;
            selection = @"\11_20.txt";
            break;
          }
        case 3:
          {
            folder = Resources.Db1_a_21_30;
            selection = @"\21_30.txt";
            break;
          }
        case 4:
          {
            folder = Resources.Db1_a_31_40;
            selection = @"\31_40.txt";
            break;
          }
        case 5:
          {
            folder = Resources.Db1_a_41_50;
            selection = @"\41_50.txt";
            break;
          }
        case 6:
          {
            folder = Resources.Db1_a_51_60;
            selection = @"\51_60.txt";
            break;
          }
        case 7:
          {
            folder = Resources.Db1_a_61_70;
            selection = @"\61_70.txt";
            break;
          }
        case 8:
          {
            folder = Resources.Db1_a_71_80;
            selection = @"\71_80.txt";
            break;
          }
        case 9:
          {
            folder = Resources.Db1_a_81_90;
            selection = @"\81_90.txt";
            break;
          }
        case 10:
          {
            folder = Resources.Db1_a_91_100;
            selection = @"\91_100.txt";
            break;
          }
        default:
          {
            Console.WriteLine("Something wrong... I have strange number, but I can't.");
            throw new ArgumentException();
          }
      }

      return new Tuple<string, string>(folder, selection);
    }
  }
}


