Ejemplo n.º 1
0
 /// <summary>
 /// Invoked on a key down
 /// </summary>
 /// <param name="keyEventArgs">event args</param>
 public virtual void OnKeyDown(KeyEventArgs keyEventArgs)
 {
     if (AgentManager.Instance.CurrentEditingMode == EditingMode.TextEntry)
     {
         char ch = KeyToChar.GetChar(keyEventArgs.KeyCode);
         if (TextUtils.IsSentenceTerminator(ch))
         {
             Log.Debug("NARAM");
             OnSentenceTerminator();
         }
     }
 }
Ejemplo n.º 2
0
        public void SwipeDetect(object sender, KeyEventArgs e)
        {
            if (MainVM.Main.Content.SectionType == Model.SectionType.Payment)
            {
                if (e.Key != Key.Return)
                {
                    _trackdata += KeyToChar.GetCharFromKey(e.Key);
                }

                if (e.Key == Key.Return)
                {
                    _trackdata = _trackdata.Replace(" ", string.Empty);
                    Payment p = new Payment(GConfig.GCorder);
                    p.SwipeTransfer(_trackdata);
                    _trackdata = string.Empty;
                }
            }
        }