Exemplo n.º 1
0
        private void MenuSetting_Click(object sender, EventArgs e)
        {
            FrmSetting frmSetting = new FrmSetting();

            frmSetting.StartPosition = FormStartPosition.CenterParent;
            if (frmSetting.ShowDialog() == DialogResult.OK)
            {
                string   connstr = ParamSetting.GetConfigValue(Global.config_file, "ConnectionString");
                string[] config  = connstr.Split(';');
                if (config.Length > 1)
                {
                    GetTableList();
                    this.txtServer.Text   = config[0].Substring(config[0].IndexOf("=") + 1);
                    this.cbxDatabase.Text = config[1].Substring(config[1].IndexOf("=") + 1);
                }
            }
        }
Exemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            InitEvent();

            string connstr = ParamSetting.GetConfigValue(Global.config_file, "ConnectionString");

            string[] config     = connstr.Split(';');
            string   outputPath = ParamSetting.GetConfigValue(Global.config_file, "OutputPath");

            txtDir.Text = outputPath;

            this.txtServer.Text   = config[0].Substring(config[0].IndexOf("=") + 1);
            this.cbxDatabase.Text = config[1].Substring(config[1].IndexOf("=") + 1);

            GetTableList();
        }
Exemplo n.º 3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            string connstr = ParamSetting.GetConfigValue(Global.config_file, "ConnectionString");

            string[] config = connstr.Split(';');


            InitDatabaseList(connstr);

            this.txtServer.Text            = config[0].Substring(config[0].IndexOf("=") + 1);
            this.cbxDatabase.SelectedValue = config[1].Substring(config[1].IndexOf("=") + 1);
            this.txtUserName.Text          = config[2].Substring(config[2].IndexOf("=") + 1);
            this.txtPassword.Text          = config[3].Substring(config[3].IndexOf("=") + 1);

            btnCancel.Click += BtnCancel_Click;
            btnOK.Click     += BtnOK_Click;
            //txtPassword.TextChanged += TxtPassword_TextChanged;
            txtPassword.KeyDown += TxtPassword_KeyDown;
        }
Exemplo n.º 4
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            InitEvent();
            try
            {
                string outputPath = ParamSetting.GetConfigValue(Global.config_file, "OutputPath");
                txtDir.Text = outputPath;

                string   connstr = ParamSetting.GetConfigValue(Global.config_file, "ConnectionString");
                string[] config  = connstr.Split(';');
                if (config.Length > 1)
                {
                    GetTableList();
                    this.txtServer.Text   = config[0].Substring(config[0].IndexOf("=") + 1);
                    this.cbxDatabase.Text = config[1].Substring(config[1].IndexOf("=") + 1);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 5
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            try
            {
                string   connstr = ParamSetting.GetConfigValue(Global.config_file, "ConnectionString");
                string[] config  = connstr.Split(';');

                if (config.Length > 1)
                {
                    InitDatabaseList(connstr);
                    this.txtServer.Text            = config[0].Substring(config[0].IndexOf("=") + 1);
                    this.cbxDatabase.SelectedValue = config[1].Substring(config[1].IndexOf("=") + 1);
                    this.txtUserName.Text          = config[2].Substring(config[2].IndexOf("=") + 1);
                    this.txtPassword.Text          = config[3].Substring(config[3].IndexOf("=") + 1);
                }
            }
            catch { }
            btnCancel.Click       += BtnCancel_Click;
            btnOK.Click           += BtnOK_Click;
            txtPassword.LostFocus += (s, evn) => { TxtPassword_TextChanged(null, null); };
            txtPassword.KeyDown   += TxtPassword_KeyDown;
        }