Example #1
0
 public KeyCodeMonitor(KeyBoardInputType type, KeyCode[] code, Run begin, Run process, Run end)
 {
     m_IsPrecessing       = false;
     m_InputType          = type;
     m_Codes              = code;
     m_BeginDelegate      = begin;
     m_PrecessingDelegate = process;
     m_EndDelegate        = end;
 }
Example #2
0
        public static KeyBoardHelper MakeKeyBoardHelper(KeyBoardInputType type)
        {
            switch (type)
            {
            case KeyBoardInputType.Password: return(PwdHelper());

            //case KeyBoardInputType.Mac: return MacHelper();
            //case KeyBoardInputType.CarNo: return CarNoHelper();
            case KeyBoardInputType.TicketNo: return(TicketNoHelper());

            case KeyBoardInputType.CarNoWithOutCheck: return(CarNoWithOutCheckHelper());

            default: return(PwdHelper());
            }
        }
Example #3
0
        public static string GetStringByKeyBoard(string strStart, KeyBoardInputType type, char c, out bool bIsCancel)
        {
            bIsCancel = true;


            using (FrmKeyBoard frm = new FrmKeyBoard(KeyBoardHelperFactory.MakeKeyBoardHelper(type), strStart, c))
            {
                if (type == KeyBoardInputType.Password)
                {
                    frm.isPwd = true;
                }

                frm.ShowDialog();

                bIsCancel = frm.DialogResult == DialogResult.Cancel;
                return(frm.strInput);
            }
        }
Example #4
0
        private void AddKeyCodeMonitor(KeyBoardInputType type, KeyCode[] code, Run begin, Run process, Run end)
        {
            KeyCodeMonitor monitor = null;

            if (type == KeyBoardInputType.Click)
            {
                monitor = new KeyCodeMonitor_Click(code, begin, process, end);
            }
            else if (type == KeyBoardInputType.Shortcuts)
            {
                monitor = new KeyCodeMonitor_Shortcut(code, end);
            }
            else if (type == KeyBoardInputType.Sequeue)
            {
                monitor = new KeyCodeMonitor_Sequeue(code, end);
            }

            if (m_MonitorList == null)
            {
                m_MonitorList = new List <KeyCodeMonitor>();
            }
            m_MonitorList.Add(monitor);
        }
Example #5
0
        public static string GetStringByKeyBoard(string strStart, KeyBoardInputType type, char c)
        {
            bool bTmp;

            return(GetStringByKeyBoard(strStart, type, c, out bTmp));
        }
Example #6
0
 public static string GetStringByKeyBoard(string strStart, KeyBoardInputType type, out bool bIsCancel)
 {
     return(GetStringByKeyBoard(strStart, type, ' ', out bIsCancel));
 }