private void loginButton_Click(object sender, EventArgs e) { string username = this.usernameTextbox.Text; string password = this.passwordTextbox.Text; try { User user = loginCtrl.login(username, password); if (user != null) { if (user.position == "Programmer") { ProgrammerController progCtrl = new ProgrammerController(loginCtrl.service); loggedUsers.Add(username, progCtrl); ProgrammerForm progForm = new ProgrammerForm(progCtrl); progForm.loginWin = this; progForm.Show(); } else if (user.position == "Tester") { TesterController testerCtrl = new TesterController(loginCtrl.service, user.username); loggedUsers.Add(username, testerCtrl); TesterForm testerForm = new TesterForm(testerCtrl); testerForm.loginWin = this; testerForm.Show(); } } } catch (ServiceException exc) { MessageBox.Show(exc.Message); } }
// dotnet test --filter "FullyQualifiedName=damper_dan_client.tests.TesterTests.GetDampersTest" public async Task GetDampersTest() { var optionsBuilder = new DbContextOptionsBuilder <DamperContext>(); optionsBuilder.UseMySql("Server=localhost;Database=tstrat_damper;User=root;Password=;"); using (DamperContext ctx = new DamperContext(optionsBuilder.Options)) { Dampers jc = new TesterController(ctx); (await jc.GetDampers()).ForEach(s => Console.WriteLine(s.alias_id)); } }
public override void Display() { Console.Write("SLN File Path: "); string path = Console.ReadLine(); if (path.IsDirectory()) { var files = Directory.GetFiles(path, "*.sln"); if (files.Length == 0) { Console.WriteLine("The provided folder doesn't have any folder!", Color.Red); (Program as UpdatableProgram).NavigateBack(); return; } path = files[0]; } if (!File.Exists(path)) { Console.WriteLine("The file you provided doesn't exists!", Color.Red); (Program as UpdatableProgram).NavigateBack(); return; } ZTWPackage package = PackageController.Add(path); // Then check if we have located Tester project... To append a new item to its csproj if (!SetupController.CheckTesterPathDetermined()) { Console.Write("Couldn't determine the Tester csproj file, please, determine it.", Color.Yellow); Console.Read(); return; } TesterController.GenerateSetupInTester(package); Console.Write($"Added package '{package.Name}' succesfully! Press any key to go back...", Color.DarkGreen); Console.Read(); (Program as UpdatableProgram).NavigateBack(); }
// Use this for initialization void Start() { selectObject.selectedObject.AddListener(tellTesterOfSelection); controller = this.GetComponentInParent <TesterController>(); }
// Use this for initialization void Start() { originalParent = this.transform.parent.gameObject; selectObject.selectedObjectEvent.AddListener(tellTesterOfSelection); controller = this.GetComponentInParent <TesterController>(); }
private static void Main(string[] args) { TesterController.GenerateSetupInTester(null); Console.Read(); }
public TesterForm(TesterController testerController) { this.testerCtrl = testerController; InitializeComponent(); initBugList(); }