Esempio n. 1
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSettings formSetting = new frmSettings(reader, settings);

            formSetting.ShowDialog();

            frmWelcome formWelcome = new frmWelcome();

            formWelcome.Show();
            formWelcome.message = "Loading user settings ...";
            Application.DoEvents();
            loadUserSettings();

            formWelcome.message = String.Format("Setup reader settings ({0}) ...", reader.getURI());
            Application.DoEvents();

            if (reader.connect())
            {
                if (setupReader() == true)
                {
                    tsslStatus.Text = "Connected to reader";
                }
                else
                {
                    tsslStatus.Text = "Cannot connect to reader";
                }
            }
            else
            {
                tsslStatus.Text = "Cannot connect to reader";
            }

            formWelcome.Close();
        }
Esempio n. 2
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            Application.CurrentCulture = new System.Globalization.CultureInfo("en-us");

            this.Text            = String.Format("CS461 Access Control (High Level API) - {0}", Application.ProductVersion);
            tsslClock.Text       = String.Format("{0} {1}", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());
            reader.api_log_level = LOG_LEVEL.Info;
            reader.saveToLogInfo(String.Format("{0} ({1}) starting up ...", this.Text, Application.ProductVersion));
            reader.api_log_level = LOG_LEVEL.Disabled;

            frmWelcome formWelcome = new frmWelcome();

            formWelcome.Show();
            formWelcome.message = "Loading user settings ...";
            Application.DoEvents();
            loadUserSettings();
            loadUserInfo();

            tmrClock.Enabled = true;

            formWelcome.message = String.Format("Setup reader settings ({0}) ...", reader.getURI());
            Application.DoEvents();

            if (reader.connect())
            {
                setupReader();
                btnRead.PerformClick();
            }
            else
            {
                tsslStatus.Text = "Cannot connect to reader";
            }
            Application.DoEvents();

            server.TagReceiveEvent += new TagReceiveEventHandler(this.AccessControl_TagReceiveEvent);

            formWelcome.Close();
        }
Esempio n. 3
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            Application.CurrentCulture = new System.Globalization.CultureInfo("en-us");

            this.Text = String.Format("CS461 Access Control (High Level API) - {0}", Application.ProductVersion);
            tsslClock.Text = String.Format("{0} {1}", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());
            reader.api_log_level = LOG_LEVEL.Info;
            reader.saveToLogInfo(String.Format("{0} ({1}) starting up ...", this.Text, Application.ProductVersion));
            reader.api_log_level = LOG_LEVEL.Disabled;

            frmWelcome formWelcome = new frmWelcome();
            formWelcome.Show();
            formWelcome.message = "Loading user settings ...";
            Application.DoEvents();
            loadUserSettings();
            loadUserInfo();

            tmrClock.Enabled = true;

            formWelcome.message = String.Format("Setup reader settings ({0}) ...", reader.getURI());
            Application.DoEvents();

            if (reader.connect())
            {
                setupReader();
                btnRead.PerformClick();
            }
            else
            {
                tsslStatus.Text = "Cannot connect to reader";
            }
            Application.DoEvents();

            server.TagReceiveEvent += new TagReceiveEventHandler(this.AccessControl_TagReceiveEvent);

            formWelcome.Close();
        }
Esempio n. 4
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSettings formSetting = new frmSettings(reader, settings);
            formSetting.ShowDialog();

            frmWelcome formWelcome = new frmWelcome();
            formWelcome.Show();
            formWelcome.message = "Loading user settings ...";
            Application.DoEvents();
            loadUserSettings();

            formWelcome.message = String.Format("Setup reader settings ({0}) ...", reader.getURI());
            Application.DoEvents();

            if (reader.connect())
            {
                if (setupReader() == true)
                {
                    tsslStatus.Text = "Connected to reader";
                }
                else
                {
                    tsslStatus.Text = "Cannot connect to reader";
                }
            }
            else
            {
                tsslStatus.Text = "Cannot connect to reader";
            }

            formWelcome.Close();
        }