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; }
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()); } }
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); } }
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); }
public static string GetStringByKeyBoard(string strStart, KeyBoardInputType type, char c) { bool bTmp; return(GetStringByKeyBoard(strStart, type, c, out bTmp)); }
public static string GetStringByKeyBoard(string strStart, KeyBoardInputType type, out bool bIsCancel) { return(GetStringByKeyBoard(strStart, type, ' ', out bIsCancel)); }