示例#1
0
        // -------------------------------------------------------
        // PRIVATE MEMBERS
        // -------------------------------------------------------

        /// <summary>
        /// Load the data
        /// </summary>
        private void _LoadData()
        {
            this._cfg = UdlParser.ParseConnectionString(
                Configuration.ConnectionString
                );

            if (this._cfg.IsWindowsAuthentication)
            {
                this.rbWindows.Checked = true;
                this.rbSQL.Checked     = false;

                this.txtServer.Enabled   = true;
                this.txtDatabase.Enabled = true;
                this.txtUsername.Enabled = false;
                this.txtPassword.Enabled = false;

                this.txtServer.Text   = this._cfg.Server;
                this.txtDatabase.Text = this._cfg.Database;
            }
            else
            {
                this.rbWindows.Checked = false;
                this.rbSQL.Checked     = true;

                this.txtServer.Enabled   = true;
                this.txtDatabase.Enabled = true;
                this.txtUsername.Enabled = true;
                this.txtPassword.Enabled = true;

                this.txtServer.Text   = this._cfg.Server;
                this.txtDatabase.Text = this._cfg.Database;
                this.txtUsername.Text = this._cfg.User;
                this.txtPassword.Text = this._cfg.Password;
            }
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WikipediaParser"/> class.
        /// </summary>
        /// <param name="connectionString">The connection string.</param>
        public WikipediaParser(string connectionString)
        {
            if (connectionString == null ||
                connectionString.Trim() == "")
            {
                throw new ArgumentNullException(
                          "connectionString",
                          "The connectionString parameter cannot be null."
                          );
            }

            this._cfg = UdlParser.ParseConnectionString(connectionString);
            this._db  = new DAL(this._cfg);
            this._dh  = new DataHandler(connectionString);
            this._sh  = new StaticHandler(connectionString);
        }
示例#3
0
        // -------------------------------------------------------
        // CONSTRUCTORS
        // -------------------------------------------------------

        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="connectionString"></param>
        public StaticHandler(string connectionString)
        {
            this._cfg = UdlParser.ParseConnectionString(connectionString);
            this._db  = new DAL(this._cfg);
        }