示例#1
0
 /// <summary>
 /// If your form needs this kind of input focus, be sure to say so.
 /// Really, this only makes sense for mouse, but I've started building it out for other things
 /// Why is this receiving a control, but actually using it as a Form (where the WantingMouseFocus is checked?)
 /// Because later we might change it to work off the control, specifically, if a control is supplied (normally actually a Form will be supplied)
 /// </summary>
 public void ControlInputFocus(System.Windows.Forms.Control c, InputFocus types, bool wants)
 {
     if (types.HasFlag(InputFocus.Mouse) && wants)
     {
         WantingMouseFocus.Add(c);
     }
     if (types.HasFlag(InputFocus.Mouse) && !wants)
     {
         WantingMouseFocus.Remove(c);
     }
 }
示例#2
0
 /// <summary>
 /// If your form needs this kind of input focus, be sure to say so.
 /// Really, this only makes sense for mouse, but I've started building it out for other things
 /// Why is this receiving a control, but actually using it as a Form (where the WantingMouseFocus is checked?)
 /// Because later we might change it to work off the control, specifically, if a control is supplied (normally actually a Form will be supplied)
 /// </summary>
 public void ControlInputFocus(Control c, InputFocus types, bool wants)
 {
     if (types.HasFlag(InputFocus.Mouse) && wants)
     {
         _wantingMouseFocus.Add(c);
     }
     if (types.HasFlag(InputFocus.Mouse) && !wants)
     {
         _wantingMouseFocus.Remove(c);
     }
 }
示例#3
0
文件: Input.cs 项目: ddugovic/RASuite
		/// <summary>
		/// If your form needs this kind of input focus, be sure to say so.
		/// Really, this only makes sense for mouse, but I've started building it out for other things
		/// Why is this receiving a control, but actually using it as a Form (where the WantingMouseFocus is checked?)
		/// Because later we might change it to work off the control, specifically, if a control is supplied (normally actually a Form will be supplied)
		/// </summary>
		public void ControlInputFocus(System.Windows.Forms.Control c, InputFocus types, bool wants)
		{
			if (types.HasFlag(InputFocus.Mouse) && wants) WantingMouseFocus.Add(c);
			if (types.HasFlag(InputFocus.Mouse) && !wants) WantingMouseFocus.Remove(c);
		}