示例#1
0
        public ParamWindow(Form1.QueryStressSettings settings, string outerQuery)
        {
            InitializeComponent();

            _settings = settings;

            _outerQuery = outerQuery;

            var sqlControl = elementHost1.Child as SqlControl;

            if (sqlControl != null)
            {
                sqlControl.Text = (string)settings.ParamQuery.Clone();
            }

            columnMapGrid.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
            columnMapGrid.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable;
            columnMapGrid.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable;

            //TODO: Which event to handle?!?!
            columnMapGrid.CellEndEdit += columnMapGrid_CellValueChanged;

            if (sqlControl != null && ((outerQuery.Length > 0) && (sqlControl.Text.Length > 0)))
            {
                getColumnsButton_Click("constructor", null);
            }
        }
示例#2
0
 public ConnectionInfo(Form1.QueryStressSettings settings)
 {
     Server         = "";
     IntegratedAuth = true;
     Login          = "";
     Password       = "";
     Database       = "";
     Settings       = settings;
 }
示例#3
0
        public Options(Form1.QueryStressSettings settings)
        {
            _settings = settings;

            InitializeComponent();

            connectionTimeout_numericUpDown.Value = settings.ConnectionTimeout;
            commandTimeout_numericUpDown.Value    = settings.CommandTimeout;
            connectionPooling_checkBox.Checked    = settings.EnableConnectionPooling;
            IOStatistics_checkBox.Checked         = settings.CollectIoStats;
            timeStatistics_checkBox.Checked       = settings.CollectTimeStats;
            clientDataRetrieval_checkBox.Checked  = settings.ForceDataRetrieval;
        }
示例#4
0
        public Options(Form1.QueryStressSettings settings)
        {
            this.settings = settings;

            InitializeComponent();

            connectionTimeout_numericUpDown.Value = settings.connectionTimeout;
            commandTimeout_numericUpDown.Value = settings.commandTimeout;
            connectionPooling_checkBox.Checked = settings.enableConnectionPooling;
            IOStatistics_checkBox.Checked = settings.collectIOStats;
            timeStatistics_checkBox.Checked = settings.collectTimeStats;
            clientDataRetrieval_checkBox.Checked = settings.forceDataRetrieval;
        }
示例#5
0
        public ParamWindow(Form1.QueryStressSettings settings, string outerQuery)
        {
            InitializeComponent();

            _settings = settings;

            _outerQuery = outerQuery;

            paramQueryTextBox.Text = (string) settings.ParamQuery.Clone();

            columnMapGrid.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
            columnMapGrid.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable;
            columnMapGrid.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable;

            //TODO: Which event to handle?!?!
            columnMapGrid.CellEndEdit += columnMapGrid_CellValueChanged;

            if ((outerQuery.Length > 0) && (paramQueryTextBox.Text.Length > 0))
            {
                getColumnsButton_Click("constructor", null);
            }
        }
示例#6
0
        public ParamWindow(Form1.QueryStressSettings settings,
                           string outerQuery)
        {
            InitializeComponent();

            this.settings = settings;

            this.outerQuery = outerQuery;

            this.paramQueryTextBox.Text = (string)settings.paramQuery.Clone();

            columnMapGrid.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
            columnMapGrid.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable;
            columnMapGrid.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable;

            //TODO: Which event to handle?!?!
            columnMapGrid.CellEndEdit += new DataGridViewCellEventHandler(columnMapGrid_CellValueChanged);

            if ((outerQuery.Length > 0) && (paramQueryTextBox.Text.Length > 0))
            {
                this.getColumnsButton_Click("constructor", null);
            }
        }
示例#7
0
        public DatabaseSelect(Form1.QueryStressSettings settings)
        {
            _settings = settings;
            _localMainConnectionInfo = (ConnectionInfo)settings.MainDbConnectionInfo.Clone();

            if (settings.ShareDbSettings)
            {
                _localParamConnectionInfo = (ConnectionInfo)settings.MainDbConnectionInfo.Clone();
            }
            else
            {
                _localParamConnectionInfo = (ConnectionInfo)settings.ParamDbConnectionInfo.Clone();
            }

            InitializeComponent();

            server_textBox.Text = _localMainConnectionInfo.Server;

            if (_localMainConnectionInfo.IntegratedAuth)
            {
                authentication_comboBox.SelectedIndex = 0;
                login_textBox.Enabled    = false;
                password_textBox.Enabled = false;
            }
            else
            {
                authentication_comboBox.SelectedIndex = 1;
                login_textBox.Text    = _localMainConnectionInfo.Login;
                password_textBox.Text = _localMainConnectionInfo.Password;
            }

            if (_localMainConnectionInfo.Database.Length > 0)
            {
                db_comboBox.Items.Add(_localMainConnectionInfo.Database);
                db_comboBox.SelectedIndex = 0;
            }

            if (_localMainConnectionInfo.ApplicationIntent > 0)
            {
                appintent_check.Checked      = true;
                appintent_combo.SelectedItem = _localMainConnectionInfo.ApplicationIntent;
            }

            if (!settings.ShareDbSettings)
            {
                pm_server_textBox.Text = _localParamConnectionInfo.Server;

                if (_localParamConnectionInfo.IntegratedAuth)
                {
                    pm_authentication_comboBox.SelectedIndex = 0;
                    pm_login_textBox.Enabled    = false;
                    pm_password_textBox.Enabled = false;
                }
                else
                {
                    pm_authentication_comboBox.SelectedIndex = 1;
                    pm_login_textBox.Text    = _localParamConnectionInfo.Login;
                    pm_password_textBox.Text = _localParamConnectionInfo.Password;
                }

                if (_localParamConnectionInfo.Database.Length > 0)
                {
                    pm_db_comboBox.Items.Add(_localParamConnectionInfo.Database);
                    pm_db_comboBox.SelectedIndex = 0;
                }
                if (_localParamConnectionInfo.ApplicationIntent > 0)
                {
                    pm_appintent_check.Checked      = true;
                    pm_appintent_combo.SelectedItem = _localParamConnectionInfo.ApplicationIntent;
                }
            }
            else
            {
                pm_authentication_comboBox.SelectedIndex = 0;
            }

            shareSettings_checkBox.Checked = settings.ShareDbSettings;

            authentication_comboBox.SelectedIndexChanged    += authentication_comboBox_SelectedIndexChanged;
            pm_authentication_comboBox.SelectedIndexChanged += pm_authentication_comboBox_SelectedIndexChanged;

            db_comboBox.Enter += Db_comboBox_Enter;
            db_comboBox.Leave += Db_comboBox_Leave;

            pm_db_comboBox.Enter += Db_comboBox_Enter;
            pm_db_comboBox.Leave += Db_comboBox_Leave;

            server_textBox.KeyDown     += Server_textBox_KeyDown;
            server_textBox.TextChanged += Server_textBox_TextChanged;

            Server_textBox_TextChanged(null, null);
        }
示例#8
0
        public DatabaseSelect(Form1.QueryStressSettings settings)
        {
            _settings = settings;
            _localMainConnectionInfo = (ConnectionInfo)settings.MainDbConnectionInfo.Clone();

            if (settings.ShareDbSettings)
            {
                _localParamConnectionInfo = (ConnectionInfo)settings.MainDbConnectionInfo.Clone();
            }
            else
            {
                _localParamConnectionInfo = (ConnectionInfo)settings.ParamDbConnectionInfo.Clone();
            }

            InitializeComponent();

            server_textBox.Text = _localMainConnectionInfo.Server;

            if (_localMainConnectionInfo.IntegratedAuth)
            {
                authentication_comboBox.SelectedIndex = 0;
                login_textBox.Enabled    = false;
                password_textBox.Enabled = false;
            }
            else
            {
                authentication_comboBox.SelectedIndex = 1;
                login_textBox.Text    = _localMainConnectionInfo.Login;
                password_textBox.Text = _localMainConnectionInfo.Password;
            }

            if (_localMainConnectionInfo.Database.Length > 0)
            {
                db_comboBox.Items.Add(_localMainConnectionInfo.Database);
                db_comboBox.SelectedIndex = 0;
            }

            if (!settings.ShareDbSettings)
            {
                pm_server_textBox.Text = _localParamConnectionInfo.Server;

                if (_localParamConnectionInfo.IntegratedAuth)
                {
                    pm_authentication_comboBox.SelectedIndex = 0;
                    pm_login_textBox.Enabled    = false;
                    pm_password_textBox.Enabled = false;
                }
                else
                {
                    pm_authentication_comboBox.SelectedIndex = 1;
                    pm_login_textBox.Text    = _localParamConnectionInfo.Login;
                    pm_password_textBox.Text = _localParamConnectionInfo.Password;
                }

                if (_localParamConnectionInfo.Database.Length > 0)
                {
                    pm_db_comboBox.Items.Add(_localParamConnectionInfo.Database);
                    pm_db_comboBox.SelectedIndex = 0;
                }
            }
            else
            {
                pm_authentication_comboBox.SelectedIndex = 0;
            }

            shareSettings_checkBox.Checked = settings.ShareDbSettings;

            authentication_comboBox.SelectedIndexChanged    += authentication_comboBox_SelectedIndexChanged;
            pm_authentication_comboBox.SelectedIndexChanged += pm_authentication_comboBox_SelectedIndexChanged;

            db_comboBox.Click    += db_comboBox_Click;
            pm_db_comboBox.Click += pm_db_comboBox_Click;
        }
        public DatabaseSelect(Form1.QueryStressSettings settings)
        {
            this.settings = settings;
            this.localMainConnectionInfo = (ConnectionInfo)settings.mainDBConnectionInfo.Clone();

            if (settings.shareDBSettings)
            {
                this.localParamConnectionInfo = (ConnectionInfo)settings.mainDBConnectionInfo.Clone();
            }
            else
            {
                this.localParamConnectionInfo = (ConnectionInfo)settings.paramDBConnectionInfo.Clone();
            }

            InitializeComponent();

            this.server_textBox.Text = localMainConnectionInfo.Server;
            
            if (localMainConnectionInfo.IntegratedAuth)
            {
                this.authentication_comboBox.SelectedIndex = 0;
                this.login_textBox.Enabled = false;
                this.password_textBox.Enabled = false;
            }
            else
            {
                this.authentication_comboBox.SelectedIndex = 1;
                this.login_textBox.Text = localMainConnectionInfo.Login;
                this.password_textBox.Text = localMainConnectionInfo.Password;
            }

            if (localMainConnectionInfo.Database.Length > 0)
            {
                this.db_comboBox.Items.Add(localMainConnectionInfo.Database);
                this.db_comboBox.SelectedIndex = 0;
            }

            if (!settings.shareDBSettings)
            {
                this.pm_server_textBox.Text = localParamConnectionInfo.Server;

                if (localParamConnectionInfo.IntegratedAuth)
                {
                    this.pm_authentication_comboBox.SelectedIndex = 0;
                    this.pm_login_textBox.Enabled = false;
                    this.pm_password_textBox.Enabled = false;
                }
                else
                {
                    this.pm_authentication_comboBox.SelectedIndex = 1;
                    this.pm_login_textBox.Text = localParamConnectionInfo.Login;
                    this.pm_password_textBox.Text = localParamConnectionInfo.Password;
                }

                if (localParamConnectionInfo.Database.Length > 0)
                {
                    this.pm_db_comboBox.Items.Add(localParamConnectionInfo.Database);
                    this.pm_db_comboBox.SelectedIndex = 0;
                }
            }
            else
                this.pm_authentication_comboBox.SelectedIndex = 0;

            this.shareSettings_checkBox.Checked = settings.shareDBSettings;

            this.authentication_comboBox.SelectedIndexChanged += new EventHandler(authentication_comboBox_SelectedIndexChanged);
            this.pm_authentication_comboBox.SelectedIndexChanged += new EventHandler(pm_authentication_comboBox_SelectedIndexChanged);

            this.db_comboBox.Click += new EventHandler(db_comboBox_Click);
            this.pm_db_comboBox.Click += new EventHandler(pm_db_comboBox_Click);
        }
示例#10
0
 public ConnectionInfo(Form1.QueryStressSettings settings)
 {
     Server = "";
     IntegratedAuth = true;
     Login = "";
     Password = "";
     Database = "";
     Settings = settings;
 }
示例#11
0
        public DatabaseSelect(Form1.QueryStressSettings settings)
        {
            _settings = settings;
            _localMainConnectionInfo = (ConnectionInfo) settings.MainDbConnectionInfo.Clone();

            if (settings.ShareDbSettings)
            {
                _localParamConnectionInfo = (ConnectionInfo) settings.MainDbConnectionInfo.Clone();
            }
            else
            {
                _localParamConnectionInfo = (ConnectionInfo) settings.ParamDbConnectionInfo.Clone();
            }

            InitializeComponent();

            server_textBox.Text = _localMainConnectionInfo.Server;

            if (_localMainConnectionInfo.IntegratedAuth)
            {
                authentication_comboBox.SelectedIndex = 0;
                login_textBox.Enabled = false;
                password_textBox.Enabled = false;
            }
            else
            {
                authentication_comboBox.SelectedIndex = 1;
                login_textBox.Text = _localMainConnectionInfo.Login;
                password_textBox.Text = _localMainConnectionInfo.Password;
            }

            if (_localMainConnectionInfo.Database.Length > 0)
            {
                db_comboBox.Items.Add(_localMainConnectionInfo.Database);
                db_comboBox.SelectedIndex = 0;
            }

            if (!settings.ShareDbSettings)
            {
                pm_server_textBox.Text = _localParamConnectionInfo.Server;

                if (_localParamConnectionInfo.IntegratedAuth)
                {
                    pm_authentication_comboBox.SelectedIndex = 0;
                    pm_login_textBox.Enabled = false;
                    pm_password_textBox.Enabled = false;
                }
                else
                {
                    pm_authentication_comboBox.SelectedIndex = 1;
                    pm_login_textBox.Text = _localParamConnectionInfo.Login;
                    pm_password_textBox.Text = _localParamConnectionInfo.Password;
                }

                if (_localParamConnectionInfo.Database.Length > 0)
                {
                    pm_db_comboBox.Items.Add(_localParamConnectionInfo.Database);
                    pm_db_comboBox.SelectedIndex = 0;
                }
            }
            else
                pm_authentication_comboBox.SelectedIndex = 0;

            shareSettings_checkBox.Checked = settings.ShareDbSettings;

            authentication_comboBox.SelectedIndexChanged += authentication_comboBox_SelectedIndexChanged;
            pm_authentication_comboBox.SelectedIndexChanged += pm_authentication_comboBox_SelectedIndexChanged;

            db_comboBox.Click += db_comboBox_Click;
            pm_db_comboBox.Click += pm_db_comboBox_Click;
        }
示例#12
0
        public DatabaseSelect(Form1.QueryStressSettings settings)
        {
            this.settings = settings;
            this.localMainConnectionInfo = (ConnectionInfo)settings.mainDBConnectionInfo.Clone();

            if (settings.shareDBSettings)
            {
                this.localParamConnectionInfo = (ConnectionInfo)settings.mainDBConnectionInfo.Clone();
            }
            else
            {
                this.localParamConnectionInfo = (ConnectionInfo)settings.paramDBConnectionInfo.Clone();
            }

            InitializeComponent();

            this.server_textBox.Text = localMainConnectionInfo.Server;

            if (localMainConnectionInfo.IntegratedAuth)
            {
                this.authentication_comboBox.SelectedIndex = 0;
                this.login_textBox.Enabled    = false;
                this.password_textBox.Enabled = false;
            }
            else
            {
                this.authentication_comboBox.SelectedIndex = 1;
                this.login_textBox.Text    = localMainConnectionInfo.Login;
                this.password_textBox.Text = localMainConnectionInfo.Password;
            }

            if (localMainConnectionInfo.Database.Length > 0)
            {
                this.db_comboBox.Items.Add(localMainConnectionInfo.Database);
                this.db_comboBox.SelectedIndex = 0;
            }

            if (!settings.shareDBSettings)
            {
                this.pm_server_textBox.Text = localParamConnectionInfo.Server;

                if (localParamConnectionInfo.IntegratedAuth)
                {
                    this.pm_authentication_comboBox.SelectedIndex = 0;
                    this.pm_login_textBox.Enabled    = false;
                    this.pm_password_textBox.Enabled = false;
                }
                else
                {
                    this.pm_authentication_comboBox.SelectedIndex = 1;
                    this.pm_login_textBox.Text    = localParamConnectionInfo.Login;
                    this.pm_password_textBox.Text = localParamConnectionInfo.Password;
                }

                if (localParamConnectionInfo.Database.Length > 0)
                {
                    this.pm_db_comboBox.Items.Add(localParamConnectionInfo.Database);
                    this.pm_db_comboBox.SelectedIndex = 0;
                }
            }
            else
            {
                this.pm_authentication_comboBox.SelectedIndex = 0;
            }

            this.shareSettings_checkBox.Checked = settings.shareDBSettings;

            this.authentication_comboBox.SelectedIndexChanged    += new EventHandler(authentication_comboBox_SelectedIndexChanged);
            this.pm_authentication_comboBox.SelectedIndexChanged += new EventHandler(pm_authentication_comboBox_SelectedIndexChanged);

            this.db_comboBox.Click    += new EventHandler(db_comboBox_Click);
            this.pm_db_comboBox.Click += new EventHandler(pm_db_comboBox_Click);
        }