Esempio n. 1
0
        public userAdmin2(winforms.MDIParent3 ic2, bool screenlocked)
        {
            InitializeComponent();
            ic = ic2;
            //this.TitleBar.TitleBarCaption = "Login Screen";
            //this.Text = "Login Screen";



            //this.TitleBar
        }
        public SelectDeviceWindow_new(DeviceIdentity selectedDeviceIdentity, winforms.MDIParent3 owner)
        {
            _selectedDeviceIdentity = selectedDeviceIdentity;
            //this.pa = owner;

            InitializeComponent();

            this.Closing += SelectDeviceWindow_Closing;

            displayMessage("Loading Devices");
            xamlButtonOK.Enabled = false;

            _thread = new Thread(() =>
            {
                try
                {
                    DeviceInformations[] dinfos = FPScanner.GetAttachedDevices(_selectedDeviceIdentity); //Get all Fingerprint Scanners

                    //Display all Fingerprint-Scanners in GUI
                    // Application.Current.Dispatcher.BeginInvoke((Action)(() =>
                    {
                        xamlProgressBar.Visible = false;
                        displayMessage("Select Fingerprint-Scanner");
                        foreach (DeviceInformations dinfo in dinfos)
                        {
                            DeviceInfos di = new DeviceInfos(dinfo.index, dinfo.name);
                            xamlListBoxDevices.Items.Add(di);
                        }
                        if (xamlListBoxDevices.Items.Count > 0)
                        {
                            xamlListBoxDevices.SelectedIndex = 0;
                        }

                        //Close();
                    }

                    //));
                    //NewMethodcaptureDevice_();
                }
                catch (Exception ex)
                {
                    //Application.Current.Dispatcher.BeginInvoke((Action)(() =>
                    {
                        rDialogResult = false;
                        MessageBox.Show(ex.Message, "ERROR");
                    }

                    //));
                }
            });
            _thread.Start();
            //Close();
        }
Esempio n. 3
0
        public SelectFGWindow_new(winforms.MDIParent3 owner)
        {
            this.Owner = owner;
            NewMethod_InitializeComponent();


            //InitializeComponent();

            //displayMessage("Select Frame-Grabber");
            //xamlButtonOK.Enabled = false;

            //DeviceIdentity[] dis = FPScanner.GetDevices();
            //xamlListBoxFG.DataSource = dis;
        }
Esempio n. 4
0
 public sideForm2(MDIParent3 md)
 {
     InitializeComponent();
     ic = md;
 }
Esempio n. 5
0
 public sideForm1(MDIParent3 md)
 {
     InitializeComponent();
     //ic = md;
     connect_Device();
 }
Esempio n. 6
0
        public userAdmin2(winforms.MDIParent3 ic2)
        {
            //Thread tt = new Thread(new ThreadStart(mysplassh));
            //tt.Start();
            //Thread.Sleep(5000);

            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;


            ic = ic2;
            //this.TitleBar.TitleBarCaption = "Login Screen";
            //this.Text = "Login Screen";
            //this.Show();
            ic.WindowState = FormWindowState.Minimized;

            //tt.Abort();

            var    javaScriptSerializer = new JavaScriptSerializer();
            string json_request         = ""; // javaScriptSerializer.Serialize(tm);
            string json_request2        = ""; // javaScriptSerializer.Serialize(tm);
            string json_resp            = "";
            bool   json_resp2;
            string first_install = Properties.Settings.Default.NewInstall;

            btn_regiter.Visible = true;

            string serverFeedback = "";

            try
            {
                // json_resp2 = MISClass1.checkHTTPAPI("checkLoginMode", ref serverFeedback);
            }
            catch
            {
                btn_regiter.Visible = false;
                json_resp2          = true;

                if (first_install == "N")
                {
                    MessageBox.Show("Please check your Network OR Server Settings", "Server Unreachable");
                }
                else
                {
                    MessageBox.Show("New Installation Detected; Please Setup Server Connection Settings", "New Install Settings");
                    // Properties.Settings.Default.NewInstall = "N";
                }
            }


            /*
             * Henry: Obvious Bug
             * What happens for first timers b4 the URL is setup
             * I temporarily avert that scenario here
             * Please think of another method to control this.
             */

            // Capture Scenario

            /*  if (!json_resp2)
             * {
             *    btn_regiter.Visible = false;
             *    json_resp2 = true;
             * }
             */

            // if (!json_resp2)
            {
                btn_regiter.Visible = false;
            }
            // else
            {
                //It will return either of this
                //ACTIVEDIRECTORY
                //OPENACCESS
                //LOCAL

                string loggin;

                try
                {
                    //json_resp = MISClass1.callNIBSS_MISC("checkLoginMode", json_request);
                    dynamic resp1 = Newtonsoft.Json.JsonConvert.DeserializeObject(json_resp);
                    // dynamic df = Newtonsoft.Json.JsonConvert.DeserializeObject((string) resp1.record);
                    //dynamic df = new JArray(resp1.record);
                    bool sd = (bool)resp1.status;
                    loggin = resp1.loginmode;

                    if (loggin == "ACTIVEDIRECTORY")
                    {
                        btn_regiter.Visible = false;
                    }
                    // dynamic dj = JArray.Parse(json_resp);
                    //dynamic ddj = df[0];
                    //string resetStatus = (string)ddj.status;
                    //this.TitleBar
                }
                catch
                {
                    loggin = "ACTIVEDIRECTORY";
                    btn_regiter.Visible = false;
                    // MessageBox.Show("Please Setup Server Connections B4 Login", "New Installations");

                    if (first_install == "N")
                    {
                        MessageBox.Show("Please check your Network OR Server Settings", "Server Unreachable");
                    }
                    else
                    {
                        MessageBox.Show("New Installation Detected; Please Setup Server Connections B4 Login", "New Installations");
                        Properties.Settings.Default.NewInstall = "N";
                        // Save the New Settings
                        Properties.Settings.Default.Save();
                    }
                }
            }
        }