static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); UsersRepository userRepo = new UsersRepository(); CoursesRepository courseRepo = new CoursesRepository(); UserCoursesEnrollmentRepository ucer = new UserCoursesEnrollmentRepository(); TeacherCourseEnrollmentRepository tcer = new TeacherCourseEnrollmentRepository(); // oded tests string filePath = "C:/123.txt"; string fileName = "lecture9"; ClientActions ca = new ClientActions(); courseRepo.DeleteCourse(Guid.Parse("024a1b90-24ac-493a-be70-f5fe6a5c0bf4")); // Create new user //userRepo.AddUser("yair7", false); var user = userRepo.GetUsers("yair4"); MessageBox.Show(user.First().UserName); // Create new course var courseId = Guid.NewGuid(); courseRepo.AddCourse(courseId, "somenewname"); var course = courseRepo.GetCourse(courseId); MessageBox.Show(course.Count().ToString()); // User course enrollment ucer.AddCourseToUser("yair4", courseId); var courseForUser = ucer.GetCoursesForUser("yair4"); MessageBox.Show(courseForUser.Count().ToString()); // Teacher course enrollment tcer.AddCourseToTeacher("yair4", courseId); var courseForTeacher = tcer.GetCoursesForTeacher("yair4"); MessageBox.Show(courseForTeacher.Count().ToString()); Application.Run(new Form2()); }
private void ControllerButtonsChanged(object sender, Faz.SideWinderSC.Logic.ButtonStateEventArgs e) { // Orbit Lines Toggle Off if (ButtonBoxController.TestButtonPressed( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button8)) { // Orbit Lines Toggle if (ButtonBoxController.SharedState.OrbitLines) { ButtonBoxController.CallActivateButton(vJoyTypes.Virtual, MappedButtons.OrbitLinesToggle, 150); } ButtonBoxController.SharedState.OrbitLines = false; } // Orbit Lines Toggle On if (ButtonBoxController.TestButtonPressed( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button9)) { // Orbit Lines Toggle if (false == ButtonBoxController.SharedState.OrbitLines) { ButtonBoxController.CallActivateButton(vJoyTypes.Virtual, MappedButtons.OrbitLinesToggle, 150); } ButtonBoxController.SharedState.OrbitLines = true; } // HUD Toggle Off if (ButtonBoxController.TestButtonPressed( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button10)) { // HUD off CRTL+ALT+G if (ButtonBoxController.SharedState.HeadsUpDisplay) { buttonBoxController.SendKeyCombo(new byte[] { 0x80, 0x82 }, 0x47); } ButtonBoxController.SharedState.HeadsUpDisplay = false; } // HUD Toggle On if (ButtonBoxController.TestButtonPressed( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button11)) { // HUD off CRTL+ALT+G if (false == ButtonBoxController.SharedState.HeadsUpDisplay) { buttonBoxController.SendKeyCombo(new byte[] { 0x80, 0x82 }, 0x47); } ButtonBoxController.SharedState.HeadsUpDisplay = true; } //if (ButtonBoxController.TestButtonPressed(e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button17)) //{ // // Oculus ASW off CRTL+KP1 // buttonBoxController.SendKeyCombo(new byte[] { 0x80 }, 0x31); //} if (ButtonBoxController.TestButtonPressed( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button7)) { // Take Picture ALT-F10 buttonBoxController.SendKeyCombo(new byte[] { 0x82 }, 0xCB); } // Camera On/Off if (ButtonBoxController.TestButtonPressedOrReleased( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button12)) { if (buttonBoxController.SharedState.CameraActive) { // Quit Camera ButtonBoxController.CallActivateButton(vJoyTypes.Virtual, MappedButtons.CameraDisabled, 150); } else { // Start Camera ButtonBoxController.CallActivateButton(vJoyTypes.Virtual, MappedButtons.CameraEnabled, 150); } buttonBoxController.SharedState.CameraActive = !buttonBoxController.SharedState.CameraActive; } // Free Camera On/Off if (ButtonBoxController.TestButtonPressedOrReleased( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button12)) { ButtonBoxController.CallActivateButton(vJoyTypes.Virtual, MappedButtons.FreeCameraToggle, 150); } // ToggleAdvanceMode if (ButtonBoxController.TestButtonPressedOrReleased( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button4)) { ButtonBoxController.CallActivateButton(vJoyTypes.Virtual, MappedButtons.CameraAdvanceModeToggle, 150); } // Kill process if (ButtonBoxController.TestButtonPressed( e.PreviousButtonsState, e.ButtonsState, (UInt32)Faz.SideWinderSC.Logic.BBI32Button.Button2)) { ClientActions.KillProcess(this); } }