Esempio n. 1
0
        /// <summary>
        /// メソッド(画面を作成する)
        /// </summary>
        private void MakeScreen()
        {
            this.MakeBtnExecutions();
            var connectionStringFetcher = new ConnectionStringFetcher();

            connectionStringFetcher.FetchConnectionString();
            lblDataSource.Text     = connectionStringFetcher.DataSource;
            lblIntialCatalog.Text  = connectionStringFetcher.InitialCatalog;
            lblConnectTimeout.Text = Convert.ToString(connectionStringFetcher.ConnectTimeout);

            this.DataSource     = connectionStringFetcher.DataSource;
            this.IntialCatalog  = connectionStringFetcher.InitialCatalog;
            this.ConnectTimeout = connectionStringFetcher.ConnectTimeout;
            this.UserID         = connectionStringFetcher.UserID;
            this.Password       = connectionStringFetcher.Password;
        }
        /// <summary>
        /// メソッド(接続情報を取得する)
        /// </summary>
        private void FetchConnectionString()
        {
            var connectionStringFetcher = new ConnectionStringFetcher();

            connectionStringFetcher.FetchConnectionString();
            this.txtDataSource.Text     = connectionStringFetcher.DataSource;
            this.txtIntialCatalog.Text  = connectionStringFetcher.InitialCatalog;
            this.txtConnectTimeout.Text = Convert.ToString(connectionStringFetcher.ConnectTimeout);
            this.txtUserID.Text         = connectionStringFetcher.UserID;
            this.txtPassword.Text       = connectionStringFetcher.Password;

            this.txtDataSource.Tag     = this.lblDataSource.Text;
            this.txtIntialCatalog.Tag  = this.lblIntialCatalog.Text;
            this.txtConnectTimeout.Tag = this.lblConnectTimeout.Text;
            this.txtUserID.Tag         = this.lblUserID.Text;
            this.txtPassword.Tag       = this.lblPassword.Text;
        }