コード例 #1
0
        /// <summary>
        /// formun hazılanması
        /// </summary>
        private void init()
        {
            lblAuth.Text     = getResString("auth");
            lblPass.Text     = getResString("password");
            lblServer.Text   = getResString("server");
            lblUser.Text     = getResString("username");
            btnCancel.Text   = getResString("cancel");
            btnOk.Text       = getResString("ok");
            lblFormName.Text = getResString("dbConnection");
            cmbAuth.Items.Add("Windows Authentication");
            cmbAuth.Items.Add("SQL Server Authentication");

            //defual değerlerin forma yerleştirilmesi
            dbparam        = dbparam.getParam();
            txtServar.Text = dbparam.dataSource;

            if (dbparam.IntegratedSecurity)
            {
                cmbAuth.SelectedIndex = 0;
            }
            else
            {
                cmbAuth.SelectedIndex = 1;
                txtUser.Text          = dbparam.dbUserId;
                txtPass.Text          = dbparam.dbPassword;
            }
            //eventların oluşturulması
            btnOk.Click     += btnOk_Click;
            btnCancel.Click += btnCancel_Click;
        }