Exemplo n.º 1
0
        public Prefecture(string id, string name, string redirectURL, IPrefectureRequestor requestor)
        {
            _id              = id;
            _name            = name;
            _redirectURL     = redirectURL;
            _requestor       = requestor;
            _requestor.Owner = this;

            _enabled = RegistryUtility.GetPrefectureQueryEnabled(_id);

            _queryTime         = PrefectureConfiguration.GetPrefectureQueryTime(_id);
            _secondsUntilQuery = 0;
        }
Exemplo n.º 2
0
        public MainViewModel()
        {
            AllocConsole();

            PrefectureConfiguration.LoadConfiguration();

            _statusText = "Logiciel pret.";

            PopulatePrefectures();

            if (!DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                _prefectureQueryRoutine = new Thread(new ThreadStart(() =>
                {
                    Thread.Sleep(2500);
                    PrefectureQueryRoutine();
                }));

                _prefectureQueryRoutine.Start();
            }

            ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(ValidateServerCertificate);
            //ServicePointManager.SecurityProtocol =
        }