using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Control.HostSetting;
using DbModel.DB.Model;
using ImageProcessing;
using log4net;
using Microsoft.Owin.Hosting;
using OpenCvSharp;
using OpenCvSharp.CPlusPlus;

[assembly: log4net.Config.XmlConfigurator]
namespace Control
{
    public static class RqaImProc
    {
        public struct Values
        {
            public Point2f[] Points;
            public int Mfd;
        }
        private static readonly ILog Logger = LogManager.GetLogger(typeof(RqaImProc));
        public static Dictionary<string, Values> CalibrationPoints;

        public static void Main()
        {
            WebApp.Start<Startup>("http://*:50400");
            Logger.Info("REST server successfuly started");
            CalibrationPoints = new Dictionary<string, Values>();/*
            IpMethods ip = new IpMethods() {PrinterId = 3};
            ip._fnc = new Functions() {FlannToken = new CancellationTokenSource(), PrinterId = 3};
            ip.OcrEvaluation(Cv2.ImRead(@"C:\RQA\imgs\Xerox\7120\Main Menu.png"), "Main Menu");*/
            Task.Delay(-1).Wait();
        }
    }
}
