Esempio n. 1
0
        internal void DataBind(TestCasesPresenter presenter)
        {
            if (presenter != null)
            {
                testCasesBindingSource            = new BindingSource();
                testCasesBindingSource.DataSource = presenter.TestCases;
                csvContent.DataSource             = testCasesBindingSource;

                variablesBindingSource            = new BindingSource();
                variablesBindingSource.DataSource = presenter.Variables;
                variables.DataSource = variablesBindingSource;

                variables.DataBindings.Add("SelectedIndex", presenter, "VariableSelectedIndex", true, DataSourceUpdateMode.OnValidation);
                variables.SelectedIndexChanged += (s, args) => variables.DataBindings["SelectedIndex"].WriteValue();

                connectionStringNamesBindingSource            = new BindingSource();
                connectionStringNamesBindingSource.DataSource = presenter.ConnectionStringNames;
                connectionStringNames.DataSource = connectionStringNamesBindingSource;

                connectionStringNames.DataBindings.Add("SelectedIndex", presenter, "ConnectionStringSelectedIndex", true, DataSourceUpdateMode.OnValidation);
                connectionStringNames.SelectedIndexChanged += (s, args) => connectionStringNames.DataBindings["SelectedIndex"].WriteValue();

                sqlEditor.DataBindings.Add("Text", presenter, "Query", true, DataSourceUpdateMode.OnPropertyChanged);
                presenter.PropertyChanged += (sender, e) => { sqlEditor.Text = presenter.Query; };
            }
        }
Esempio n. 2
0
        public TestSuiteView()
        {
            State = new TestSuiteState();
            TestCasesPresenter = new TestCasesPresenter(new RenameVariableWindow(), new FilterWindow(), new ConnectionStringWindow(), new TestCaseCollectionManager(), State.TestCases, State.Variables, State.ConnectionStringNames);
            TemplatePresenter  = new TemplatePresenter(new TemplateManager(), State.Template);
            SettingsPresenter  = new SettingsPresenter(new SettingsManager(), State.Settings);
            TestListPresenter  = new TestListPresenter(new TestListManager(), State.Tests, State.TestCases, State.Variables, State.Template, State.GlobalVariables);
            TestSuitePresenter = new TestSuitePresenter(new TestSuiteManager(), State.Tests, State.Settings);
            MacroPresenter     = new MacroPresenter();

            InitializeComponent();
            DeclareBindings();
            BindPresenter();
        }
Esempio n. 3
0
 public RenameVariableCommand(TestCasesPresenter presenter, RenameVariableWindow window)
 {
     this.presenter = presenter;
     this.window    = window;
 }
Esempio n. 4
0
 public EditConnectionStringCommand(TestCasesPresenter presenter, ConnectionStringWindow window)
 {
     this.presenter = presenter;
     this.window    = window;
 }
Esempio n. 5
0
 public OpenTestCasesQueryCommand(TestCasesPresenter presenter)
     : base(presenter)
 {
 }
Esempio n. 6
0
 public RemoveVariableCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
Esempio n. 7
0
 public FilterCommand(TestCasesPresenter presenter, FilterWindow window)
 {
     this.presenter = presenter;
     this.window    = window;
 }
Esempio n. 8
0
 public OpenTestCasesCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
Esempio n. 9
0
 public FilterDistinctCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
Esempio n. 10
0
 public RemoveConnectionStringCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
Esempio n. 11
0
 public RunQueryCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
Esempio n. 12
0
 public MoveRightVariableCommand(TestCasesPresenter presenter) : base(presenter)
 {
 }
Esempio n. 13
0
 protected MoveVariableCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }