Ejemplo n.º 1
0
 /// <summary>
 /// 윈폼의 마우스와 키보드 인풋에 이 클래스들 연결
 /// </summary>
 /// <param name="form">연결할 윈폼 지정</param>
 public void binding(Form form)
 {
     if (bind)
     {
         throw new Exception("이미 바인딩되었습니다.");
     }
     else
     {
         Mouse_input          = new Mouse_input(form);
         Key_input            = new Key_input();
         form.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(Key_input.Key_Preview);
         form.KeyDown        += new System.Windows.Forms.KeyEventHandler(Key_input.Key_down);
         form.KeyUp          += new System.Windows.Forms.KeyEventHandler(Key_input.Key_up);
         form.MouseDown      += new System.Windows.Forms.MouseEventHandler(Mouse_input.Mouse_down);
         form.MouseMove      += new System.Windows.Forms.MouseEventHandler(Mouse_input.Mouse_move);
         form.MouseUp        += new System.Windows.Forms.MouseEventHandler(Mouse_input.Mouse_up);
     }
     bind = true;
 }
Ejemplo n.º 2
0
 internal Key_input()
 {
     oInstance = this;
 }