protected override void OnEnter(EventArgs e) { base.OnEnter(e); TestEvent te = new TestEvent(Constants.Event.ControlActivated, Session.Instance.CurrentPhase, Session.Instance.CurrentSubPhase, string.Format("Text Box Got Focus : {0}", this.Id)); te.TargetString = this.TargetString; Session.Instance.AddEvent(te); }
private void HookManager_MouseDown(object sender, MouseEventArgs e) { if (InSession) { TestEvent te = new TestEvent(Constants.Event.MouseClick, CurrentPhase, CurrentSubPhase, string.Empty); te.X = e.X; te.Y = e.Y; te.Notes = string.Format("{0} button down {1} clicks, Delta {2}", e.Button, e.Clicks, e.Delta); AddEvent(te); } }
internal void AddEvent(TestEvent te) { if (this.InSession) { te.Interval = te.Time - this._sessionStart; Log(te.ToString()); } }
protected override void OnKeyDown(KeyEventArgs e) { base.OnKeyDown(e); TestEvent te = new TestEvent(Constants.Event.KeyDown, Session.Instance.CurrentPhase, Session.Instance.CurrentSubPhase, string.Format("Key Down")); KeysConverter kc = new KeysConverter(); te.TargetString = this.TargetString; te.Key = kc.ConvertToString(e.KeyCode); Session.Instance.AddEvent(te); }
protected override void OnKeyPress(KeyPressEventArgs e) { base.OnKeyPress(e); TestEvent te = new TestEvent(Constants.Event.KeyPress, Session.Instance.CurrentPhase, Session.Instance.CurrentSubPhase, string.Format("{0}", EscapeString(this.Text))); te.TargetString = this.TargetString; te.Key = this.EscapeString(e.KeyChar.ToString()); Session.Instance.AddEvent(te); }