protected void SpeechRecognised(object sender, SpeechRecognizedEventArgs e) { AnimaControlEventArgs ACE = new AnimaControlEventArgs(e.Result.Text); FireEvent(ACE, PassCode); }
private void UpdateForm(object sender, AnimaControlEventArgs e) { if (e.Position != new Anima.Point() && e.Position != null && e.Position != AC.Location) { SetPosition(e.Position); } while (MouseOver) { System.Windows.Forms.Application.DoEvents(); } }
public void DetermineMouseOverMovement() { var ACE = new AnimaControlEventArgs("Move"); ACE.Position = this.Location; if (Location.Left < Screen.GetWorkingArea(new System.Drawing.Point((int)Location.Left, (int)Location.Top)).Width / 2 + WindowSize.Width) { ACE.Position.Left += 1; } else { ACE.Position.Left -= 1; } FireEvent(ACE, PassCode); }
public void FireEvent(AnimaControlEventArgs ACE, EventHandler <AnimaControlEventArgs> _Handler) { EventHandler <AnimaControlEventArgs> handler = _Handler; if (handler != null) { ISynchronizeInvoke target = handler.Target as ISynchronizeInvoke; if (target != null && target.InvokeRequired) { target.Invoke(handler, new object[] { this, ACE }); } else { handler(this, ACE); } } }