Esempio n. 1
0
        static void Main(string[] argv)
        {
            faceSearch = new FaceSearchWrapper.FaceSearch();
            motionDetector = new MotionDetectWrapper.MotionDetector();
            ImageSampleCount = System.IO.Directory.GetFiles(Properties.Settings.Default.FaceSampleLib, "*.jpg").Length;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            #if !DEBUG

            if (!Util.VerifyKey())
            {
                RegisterForm form = new RegisterForm();
                DialogResult res = form.ShowDialog();
                if (res == DialogResult.OK)
                {
                    Application.Restart();
                }

                return;
            }
            #endif

            if (argv.Length > 0)
            {
                directory = argv[0];
            }

            Application.Run(new MainForm());
        }
Esempio n. 2
0
        static void Main(string[] argv)
        {
            faceSearch       = new FaceSearchWrapper.FaceSearch();
            motionDetector   = new MotionDetectWrapper.MotionDetector();
            ImageSampleCount = System.IO.Directory.GetFiles(Properties.Settings.Default.FaceSampleLib, "*.jpg").Length;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

#if !DEBUG
            if (!Util.VerifyKey())
            {
                RegisterForm form = new RegisterForm();
                DialogResult res  = form.ShowDialog();
                if (res == DialogResult.OK)
                {
                    Application.Restart();
                }

                return;
            }
#endif

            if (argv.Length > 0)
            {
                directory = argv[0];
            }

            Application.Run(new MainForm());
        }
Esempio n. 3
0
        static void Main(string[] argv)
        {
            faceSearch = new FaceSearchWrapper.FaceSearch();
            motionDetector = new MotionDetectWrapper.MotionDetector();
            ImageSampleCount = System.IO.Directory.GetFiles(Properties.Settings.Default.FaceSampleLib, "*.jpg").Length;

            SVMWrapper.InitSvmData(0, ImageLen, EigenNum);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            #if !DEBUG

            if (!Util.VerifyKey())
            {
                RegisterForm form = new RegisterForm();
                DialogResult res = form.ShowDialog();
                if (res == DialogResult.OK)
                {
                    Application.Restart();
                }

                return;
            }
            #endif

            if (argv.Length > 0)
            {
                directory = argv[0];
            }

            string baseAddress = string.Format("net.tcp://{0}:8000", System.Net.IPAddress.Any);

            Uri netTcpBaseAddress = new Uri(baseAddress);
            ServiceHost host = new ServiceHost(typeof(Service.Service), netTcpBaseAddress);

            NetTcpBinding tcpBinding = BindingFactory.CreateNetTcpBinding();

            host.AddServiceEndpoint(typeof(RemoteControlService.IServiceFacade),
                tcpBinding, "TcpService");

            host.Open();

            Application.Run(new MainForm());
        }
Esempio n. 4
0
        static void Main(string[] argv)
        {
            faceSearch       = new FaceSearchWrapper.FaceSearch();
            motionDetector   = new MotionDetectWrapper.MotionDetector();
            ImageSampleCount = System.IO.Directory.GetFiles(Properties.Settings.Default.FaceSampleLib, "*.jpg").Length;

            SVMWrapper.InitSvmData(0, ImageLen, EigenNum);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

#if !DEBUG
            if (!Util.VerifyKey())
            {
                RegisterForm form = new RegisterForm();
                DialogResult res  = form.ShowDialog();
                if (res == DialogResult.OK)
                {
                    Application.Restart();
                }

                return;
            }
#endif

            if (argv.Length > 0)
            {
                directory = argv[0];
            }

            string baseAddress = string.Format("net.tcp://{0}:8000", System.Net.IPAddress.Any);

            Uri         netTcpBaseAddress = new Uri(baseAddress);
            ServiceHost host = new ServiceHost(typeof(Service.Service), netTcpBaseAddress);

            NetTcpBinding tcpBinding = BindingFactory.CreateNetTcpBinding();

            host.AddServiceEndpoint(typeof(RemoteControlService.IServiceFacade),
                                    tcpBinding, "TcpService");

            host.Open();

            Application.Run(new MainForm());
        }