Ejemplo n.º 1
0
		protected override void OnClick(EventArgs e) {
			MouseEventArgs ex = (e is MouseEventArgs) ? (MouseEventArgs)e : new MouseEventArgs();

			if (ex.Button == EMouseButton.Left || ex.Button == EMouseButton.None) {
				if (mode == ERadioButtonMode.Auto) {
					if (Parent != null) {
						ControlsList lst = Parent.Controls as ControlsList;
						for (int i = 0; i < lst.Count; i++) {
							if (lst[i] is RadioButton) {
								(lst[i] as RadioButton).Checked = false;
							}
						}
					} else if (Parent == null && Manager != null) {
						ControlsList lst = Manager.Controls as ControlsList;

						for (int i = 0; i < lst.Count; i++) {
							if (lst[i] is RadioButton) {
								(lst[i] as RadioButton).Checked = false;
							}
						}
					}
				}
			}
			base.OnClick(e);
		}
Ejemplo n.º 2
0
		protected override void OnClick(EventArgs e) {
			MouseEventArgs ex = (e is MouseEventArgs) ? (MouseEventArgs)e : new MouseEventArgs();

			if (ex.Button == EMouseButton.Left || ex.Button == EMouseButton.None) {
				Checked = !Checked;
			}
			base.OnClick(e);
		}
Ejemplo n.º 3
0
		protected override void OnDoubleClick(EventArgs e) {
			base.OnDoubleClick(e);

			MouseEventArgs ex = (e is MouseEventArgs) ? (MouseEventArgs)e : new MouseEventArgs();

			if (IconVisible && ex.Button == EMouseButton.Left) {
				Rectangle r = GetIconRect();
				r.Offset(AbsoluteLeft, AbsoluteTop);
				if (r.Contains(ex.Position)) {
					Close();
				}
			}
		}
Ejemplo n.º 4
0
		protected override void OnMoveEnd(EventArgs e) {
			base.OnMoveEnd(e);
			try {
				Alpha = oldAlpha;
			} catch {
			}
		}
Ejemplo n.º 5
0
		protected override void OnMoveBegin(EventArgs e) {
			base.OnMoveBegin(e);

			try {
				oldAlpha = Alpha;
				Alpha = dragAlpha;
			} catch {
			}
		}
Ejemplo n.º 6
0
		void btnClose_Click(object sender, EventArgs e) {
			Close(ModalResult = EModalResult.Cancel);
		}
Ejemplo n.º 7
0
		void btnClose_SkinChanged(object sender, EventArgs e) {
			btnClose.Skin = new SkinControl(Manager.Skin.Controls[skButton]);
		}
Ejemplo n.º 8
0
		protected override void OnClick(EventArgs e) {
			MouseEventArgs ex = e as MouseEventArgs;
			ex.Position = new Point(ex.Position.X + sbHorz.Value, ex.Position.Y + sbVert.Value);

			base.OnClick(e);
		}
Ejemplo n.º 9
0
		void ScrollBarValueChanged(object sender, EventArgs e) {
			CalcScrolling();
		}
Ejemplo n.º 10
0
		protected internal override void OnSkinChanged(EventArgs e) {
			base.OnSkinChanged(e);
			if (sbVert != null && sbHorz != null) {
				sbVert.Visible = false;
				sbHorz.Visible = false;
				CalcScrolling();
			}
		}
Ejemplo n.º 11
0
		protected virtual void OnBevelMarginChanged(EventArgs e) {
			if (BevelMarginChanged != null)
				BevelMarginChanged.Invoke(this, e);
		}
Ejemplo n.º 12
0
		protected override void OnClick(EventArgs e) {
			MouseEventArgs ex = (e is MouseEventArgs) ? (MouseEventArgs)e : new MouseEventArgs();

			if (ex.Button == EMouseButton.Left || ex.Button == EMouseButton.None) {
				pushed = !pushed;
			}

			base.OnClick(e);

			if ((ex.Button == EMouseButton.Left || ex.Button == EMouseButton.None) && Root != null) {
				if (Root is Window) {
					Window wnd = (Window)Root;
					if (ModalResult != EModalResult.None) {
						wnd.Close(ModalResult);
					}
				}
			}
		}
Ejemplo n.º 13
0
		private void OnGlyphChanged(EventArgs e) {
			if (GlyphChanged != null)
				GlyphChanged.Invoke(this, e);
		}
Ejemplo n.º 14
0
		protected virtual void OnStyleChanged(EventArgs e) {
			if (StyleChanged != null)
				StyleChanged.Invoke(this, e);
		}
Ejemplo n.º 15
0
		protected virtual void OnBorderChanged(EventArgs e) {
			if (BorderChanged != null)
				BorderChanged.Invoke(this, e);
		}
Ejemplo n.º 16
0
		protected virtual void OnCheckedChanged(EventArgs e) {
			if (CheckedChanged != null)
				CheckedChanged.Invoke(this, e);
		}