private void pictureBox1_Click(object sender, EventArgs e) { var settings = DependencyInjector.Retrieve <ProjectSettingsForm>(); settings.ShowDialog(); }
private void btnVisualNavigation_Click(object sender, EventArgs e) { var visNavForm = DependencyInjector.Resolve <VisualNavigationForm>(new { test = test }); visNavForm.ShowDialog(); }
private void cmbCommandType_SelectedIndexChanged(object sender, EventArgs e) { panel1.Controls.Clear(); if (cmbCommandType.Text == "Take Screenshot") { if (command == null || command.OrderIndex == 0) { command = new TakeScreenshotCommand(); } var cmd = DependencyInjector.Resolve <TakeScreenshotCommandUC>(new { command = command, test = test, parentForm = parentForm, mainCommandForm = this, projectManager = projectManager }); if (cmd != null) { panel1.Controls.Add(cmd); cmd.Dock = DockStyle.Fill; } } else if (cmbCommandType.Text == "Navigate to URL") { if (command == null || command.OrderIndex == 0) { command = new NavigateToUrlCommand(); } var cmd = DependencyInjector.Resolve <NavigateToUrlCommandUC>(new { command = command, test = test, parentForm = parentForm, mainCommandForm = this, projectManager = projectManager }); if (cmd != null) { panel1.Controls.Add(cmd); cmd.Dock = DockStyle.Fill; } } else if (cmbCommandType.Text == "Fill Input") { if (command == null || command.OrderIndex == 0) { command = new FillTextboxCommand(); } var cmd = DependencyInjector.Resolve <FillTextboxCommandUC>(new { command = command, test = test, parentForm = parentForm, mainCommandForm = this, projectManager = projectManager }); if (cmd != null) { panel1.Controls.Add(cmd); cmd.Dock = DockStyle.Fill; } } else if (cmbCommandType.Text == "Click element") { if (command == null || command.OrderIndex == 0) { command = new ClickButtonCommand(); } var cmd = DependencyInjector.Resolve <ClickButtonCommandUC>(new { command = command, test = test, parentForm = parentForm, mainCommandForm = this, projectManager = projectManager }); if (cmd != null) { panel1.Controls.Add(cmd); cmd.Dock = DockStyle.Fill; } } else if (cmbCommandType.Text == "If contains string") { if (command == null || command.OrderIndex == 0) { command = new IfContainsStringCommand(); } var cmd = DependencyInjector.Resolve <IfContainsStringCommandUC>(new { command = command, test = test, parentForm = parentForm, mainCommandForm = this, projectManager = projectManager }); if (cmd != null) { panel1.Controls.Add(cmd); cmd.Dock = DockStyle.Fill; } } else if (cmbCommandType.Text == "Select option") { if (command == null || command.OrderIndex == 0) { command = new SelectFromDropdownCommand(); } var cmd = DependencyInjector.Resolve <SelectFromDropdownCommandUC>(new { command = command, test = test, parentForm = parentForm, mainCommandForm = this, projectManager = projectManager }); if (cmd != null) { panel1.Controls.Add(cmd); cmd.Dock = DockStyle.Fill; } } else if (cmbCommandType.Text == "Scroll to element") { if (command == null || command.OrderIndex == 0) { command = new ScrollToElementCommand(); } var cmd = DependencyInjector.Resolve <ScrollToElementCommandUC>(new { command = command, test = test, parentForm = parentForm, mainCommandForm = this, projectManager = projectManager }); if (cmd != null) { panel1.Controls.Add(cmd); cmd.Dock = DockStyle.Fill; } } }