void Start() { sight = GetComponent <FieldOfView>(); reaction = GetComponent <ReactionLogic>(); sprite = GetComponent <tk2dSprite>(); transform.eulerAngles = new Vector3(0f, 0f, startRotation); turnOnTimerCount = turnOnTimer; panningRight = true; controllerButton = null; if (startRotation > endRotation) { float temp = startRotation; startRotation = endRotation; endRotation = temp; } //Check parent is not rotated if (transform.parent.eulerAngles.z != 0f) { Debug.LogError("Security camera's rotation is not set to 0, you can rotate the 'base' object that is a child of " + "the security camera object so that it lines up with the wall but the parent 'security camera' object must have" + "a rotation of 0 and is only used for positioning."); } }
public VolunteerController(QuestionLogic questionLogic, UserLogic userLogic, ReactionLogic reactionLogic, ChatLogic chatLogic, AppointmentLogic appointmentLogic) { _questionLogic = questionLogic; _userLogic = userLogic; _reactionLogic = reactionLogic; _chatLogic = chatLogic; _appointmentLogic = appointmentLogic; }
public CareRecipientController(QuestionLogic questionLogic, CategoryLogic categoryLogic, ReactionLogic reactionLogic, UserLogic userLogic, ChatLogic chatLogic, AppointmentLogic appointmentLogic) { _questionLogic = questionLogic; _categoryLogic = categoryLogic; _reactionLogic = reactionLogic; _userLogic = userLogic; _chatLogic = chatLogic; _appointmentLogic = appointmentLogic; }
public ReviewController(QuestionLogic questionLogic, CategoryLogic categoryLogic, ReactionLogic reactionLogic, UserLogic userLogic, ChatLogic chatLogic, ReviewLogic reviewLogic) { _questionLogic = questionLogic; _categoryLogic = categoryLogic; _reactionLogic = reactionLogic; _userLogic = userLogic; _chatLogic = chatLogic; _reviewLogic = reviewLogic; }
public AdminController(QuestionLogic questionLogic, CategoryLogic categoryLogic, ReactionLogic reactionLogic, UserLogic userLogic, ChatLogic chatLogic, LogLogic logLogic) { _questionLogic = questionLogic; _categoryLogic = categoryLogic; _reactionLogic = reactionLogic; _userLogic = userLogic; _chatLogic = chatLogic; _logLogic = logLogic; }
private void btnPostReaction_Click(object sender, EventArgs e) { Reaction newReaction = new Reaction(_question.QuestionId, FormLogin.currentUser.UserId, richtbReaction.Text, FormLogin.currentUser.FirstName + " " + FormLogin.currentUser.LastName); ReactionLogic.PostReaction(newReaction); MessageBox.Show("Reactie verstuurd"); Hide(); }
private void btnPostReaction_Click(object sender, EventArgs e) { ReactionLogic logic = new ReactionLogic(); Reaction newReaction = new Reaction(_question.QuestionId, LoginPrototype.currentUser.UserId, richtbReaction.Text); logic.PostReaction(newReaction); MessageBox.Show("Reactie verstuurd"); Hide(); }
public FormCareQuestionReaction(int questionID) { InitializeComponent(); _questionID = questionID; List <ListViewItem> items = ReactionLogic.LoadReactionsToList(ReactionLogic.GetAllCommentsWithQuestionID(_questionID)); foreach (ListViewItem item in items) { lvQuestionReaction.Items.Add(item); } }
// Use this for initialization void Start() { sight = GetComponent <FieldOfView>(); reaction = GetComponent <ReactionLogic>(); reactionMethod = GetComponent <ReactionMethod>(); isActive = true; movement = GetComponent <GuardMovement>(); animations = GetComponent <tk2dSpriteAnimator>(); effects = GetComponent <SpriteEffects>(); gunPosition = GetComponentInChildren <PositionMarker>().gameObject; stunSparks = GetComponentInChildren <ParticleSystem>(); stunSparks.enableEmission = false; }
public void PostReaction_IsValid() { Mock <IReactionContext> mockContext = new Mock <IReactionContext>(); Mock <Reaction> mockReaction = new Mock <Reaction>(1, 2, "foo"); mockContext.Setup(x => x.PostReaction(mockReaction.Object)); ReactionLogic reactionLogic = new ReactionLogic(mockContext.Object); reactionLogic.PostReaction(mockReaction.Object); mockContext.Verify(x => x.PostReaction(mockReaction.Object), Times.Exactly(1)); }
public void GetAllCommentsWithQuestionId() { Mock <IReactionContext> mockContext = new Mock <IReactionContext>(); Mock <Category> category = new Mock <Category>("Medisch"); Mock <Question> question = new Mock <Question>(1, "foo", "baa", Question.QuestionStatus.Open, DateTime.Today, true, category.Object, 12); List <Reaction> mockList = new List <Reaction>(); mockContext.Setup(x => x.GetAllReactions(question.Object.QuestionId)) .Returns(mockList); ReactionLogic reactionLogic = new ReactionLogic(mockContext.Object); List <Reaction> result = reactionLogic.GetAllCommentsWithQuestionId(question.Object.QuestionId); Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(List <Reaction>)); mockContext.Verify(x => x.GetAllReactions(1), Times.Exactly(1)); }