예제 #1
0
        private void openConfigFile(string FileName)
        {
            System.IO.FileStream fs = null;

            try
            {
                fs = new System.IO.FileStream(FileName, System.IO.FileMode.Open);
                System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();

                this.settings = (QueryStressSettings)bf.Deserialize(fs);
            }
            catch
            {
                MessageBox.Show("Error loading settings.");
            }
            finally
            {
                if (fs != null)
                    fs.Dispose();
            }

            query_textBox.Text = settings.mainQuery;
            threads_numericUpDown.Value = settings.numThreads;
            iterations_numericUpDown.Value = settings.numIterations;
        }
예제 #2
0
        private void OpenConfigFile(string fileName)
        {
            FileStream fs = null;

            try
            {
                fs = new FileStream(fileName, FileMode.Open);
                var bf = new BinaryFormatter();

                _settings = (QueryStressSettings) bf.Deserialize(fs);
            }
            catch
            {
                MessageBox.Show(Resources.ErrLoadingSettings);
            }
            finally
            {
                if (fs != null)
                    fs.Dispose();
            }

            query_textBox.Text = _settings.MainQuery;
            threads_numericUpDown.Value = _settings.NumThreads;
            iterations_numericUpDown.Value = _settings.NumIterations;
        }
예제 #3
0
 public LoadRunner(QueryStressSettings settings, CommandLineOptions options)
 {
     _settings      = settings;
     _runParameters = options;
 }