示例#1
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);
            TestSuitePresenter = new TestSuitePresenter(new TestSuiteManager(), State.Tests, State.Settings);
            MacroPresenter = new MacroPresenter();

            InitializeComponent();
            DeclareBindings();
            BindPresenter();
        }
示例#2
0
 public FilterCommand(TestCasesPresenter presenter, FilterWindow window)
 {
     this.presenter = presenter;
     this.window = window;
 }
示例#3
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; };
            }
        }
 public AddConnectionStringCommand(TestCasesPresenter presenter, ConnectionStringWindow window)
 {
     this.presenter = presenter;
     this.window = window;
 }
 public OpenTestCasesQueryCommand(TestCasesPresenter presenter)
     : base(presenter)
 {
 }
 protected MoveVariableCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
 public MoveRightVariableCommand(TestCasesPresenter presenter)
     : base(presenter)
 {
 }
 public OpenTestCasesCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
 public RemoveConnectionStringCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
示例#10
0
 public RunQueryCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
 public RemoveVariableCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
 public FilterDistinctCommand(TestCasesPresenter presenter)
 {
     this.presenter = presenter;
 }
 public RenameVariableCommand(TestCasesPresenter presenter, RenameVariableWindow window)
 {
     this.presenter = presenter;
     this.window = window;
 }