void OnActivated(MacButton b) { ApplicationContext.InvokeUserCode(delegate { EventSink.OnClicked(); CheckStateChanged(); }); }
public override void Initialize() { var button = new MacButton(); ViewObject = button; button.SetButtonType(NSButtonType.Switch); button.Title = ""; button.ActivatedInternal += OnActivated; }
public override void Initialize() { var mb = new MacButton(EventSink, ApplicationContext); lastState = mb.State = NSCellStateValue.On; mb.ActivatedInternal += HandleActivatedInternal; ViewObject = mb; Widget.SetButtonType(NSButtonType.Radio); Widget.Title = String.Empty; }
public void Activate(MacButton button) { if (button == null || button == lastActive) { return; } if (lastActive != null) { lastActive.State = NSCellStateValue.Off; ((RadioButtonBackend)lastActive.Backend).NotifyToggle(); } lastActive = button; }
void HandleActivatedInternal(MacButton button) { if (radioGroup == null) { return; } if (button == null || button.State != NSCellStateValue.On) { return; } radioGroup.Activate(button); NotifyToggle(); }
public void Add(MacButton button) { if (button == null) { return; } if (button.State == NSCellStateValue.On) { if (lastActive == null) { Activate(button); } else { button.State = NSCellStateValue.Off; ((RadioButtonBackend)button.Backend).NotifyToggle(); } } }
public override void Initialize() { ViewObject = new MacButton(EventSink, ApplicationContext); Widget.SetButtonType(NSButtonType.MomentaryPushIn); }
public override void Initialize() { ViewObject = new MacButton(EventSink, ApplicationContext); }
public override void Initialize() { ViewObject = new MacButton(EventSink); Widget.SetButtonType(NSButtonType.Switch); Widget.SizeToFit(); }
public override void Initialize() { ViewObject = new MacButton(EventSink); Widget.SizeToFit(); }
public override void Initialize() { ViewObject = new MacButton(EventSink, ApplicationContext); Widget.SetButtonType(NSButtonType.Switch); Widget.Title = ""; }