Exemplo n.º 1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            TrayHelper trayHelper = new TrayHelper(this);

            WebOcxAccess.init(this.axCryptCtl1);

            if (ConfigManager.Instance.Config.license == null)
            {
                ConfigManager.Instance.Config.license = Guid.NewGuid().ToString("B");
            }



            String sh       = ConfigManager.Instance.Config.sh;
            String password = ConfigManager.Instance.Config.password;
            String license  = ConfigManager.Instance.Config.license;
            String PT_PWD   = ConfigManager.Instance.Config.PT_PWD;

            if (sh != null)
            {
                usedShLabel.Text = sh;
                shBox.Text       = sh;
            }

            if (password != null)
            {
                passwordBox.Text  = password;
                passwordBox2.Text = password;
            }

            if (PT_PWD != null)
            {
                PT_PWD_textBox.Text  = PT_PWD;
                PT_PWD_textBox2.Text = PT_PWD;
            }


            if (ConfigManager.Instance.Config.taskServerIP != null)
            {
                taskServerIPBox.Text = ConfigManager.Instance.Config.taskServerIP;
            }

            if (ConfigManager.Instance.Config.taskServerPort != null)
            {
                taskServerPortBox.Text = ConfigManager.Instance.Config.taskServerPort;
            }

            if (ConfigManager.Instance.Config.sh != null &&
                ConfigManager.Instance.Config.PT_PWD != null &&
                ConfigManager.Instance.Config.password != null &&
                ConfigManager.Instance.Config.taskServerIP != null &&
                ConfigManager.Instance.Config.taskServerPort != null)
            {
                TokenTask.tockenTaskRequestThreadInit();
            }
        }
Exemplo n.º 2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            //TypeSelect form = new TypeSelect();
            //DialogResult result = form.ShowDialog();
            //if(result == DialogResult.OK)
            //{
            //    ConfigManager.Instance.Config.clientType = "USB";
            //}else
            //{
            //    ConfigManager.Instance.Config.clientType = "PC";
            //}

            TrayHelper trayHelper = new TrayHelper(this);

            WebOcxAccess.init(this.axCryptCtl1);

            if (ConfigManager.Instance.Config.license == null)
            {
                ConfigManager.Instance.Config.license = Guid.NewGuid().ToString("B");
            }
            String taskServerIP = ConfigManager.Instance.Config.taskServerIP;

            String taskServerPort = ConfigManager.Instance.Config.taskServerPort;

            if (taskServerIP != null)
            {
                taskServerIPBox.Text = taskServerIP;
            }

            if (taskServerPort != null)
            {
                taskServerPortBox.Text = taskServerPort;
            }

            String controlVersion = ConfigManager.Instance.Config.controlVersion;

            if ("baiwang".Equals(controlVersion))
            {
                baiwangRadioButton.Checked = true;
            }
            if (taskServerIP != null && taskServerPort != null)
            {
                TokenTask.tockenTaskRequestThreadInit();
            }
        }