internal void RaiseChecked(RoutedEventArgs args) { if ((ButtonType == ButtonTypes.Toggle) && !IsFullScreen) { Checked?.Invoke(this, args); } }
public override void OnMouseUp(MouseEventArgs e) { if (Enabled && Pressed) { if (InteractiveBounds.Contains(e.Position)) { Pressed = false; if (IsChecked) { IsChecked = false; UpdateStyle(); Unchecked?.Invoke(this, EventArgs.Empty); return; } if (!IsChecked) { IsChecked = true; UpdateStyle(); Checked?.Invoke(this, EventArgs.Empty); return; } } } }
private void ToggleButton_PropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e) { if (e.Property.Name == nameof(ToggleButton.IsChecked)) { if ((bool)e.NewValue) { var command = this.CheckedCommand; var commandParameter = this.CheckedCommandParameter ?? this; if (command != null && command.CanExecute(commandParameter)) { command.Execute(commandParameter); } Checked?.Invoke(this, new RoutedEventArgs()); } else { var command = this.UnCheckedCommand; var commandParameter = this.UnCheckedCommandParameter ?? this; if (command != null && command.CanExecute(commandParameter)) { command.Execute(commandParameter); } Unchecked?.Invoke(this, new RoutedEventArgs()); } } }
/*public void OnTextPropertyChanged( * SLDependencyPropertyChangedEventArgs e) * { * textBlockName.Text = Text; * } * * public void OnIsCheckedPropertyChanged( * SLDependencyPropertyChangedEventArgs e) * { * checkBox.IsChecked = IsChecked; * } * * public void OnLineColorPropertyChanged( * SLDependencyPropertyChangedEventArgs e) * { * lineColored.Stroke = new SolidColorBrush(LineColor); * }*/ private void CheckBoxChecked(object sender, RoutedEventArgs e) { if (Checked != null) { Checked.Invoke(DataContext, e); } }
protected virtual void OnChecked(bool e) { CheckedEventArgs args = new CheckedEventArgs { IsChecked = e }; Checked?.Invoke(this, args); }
protected override void OnApplyTemplate() { PART_BUTTON = GetTemplateChild <Button>(PART_BUTTON_NAME); PART_BUTTON.Click += (s, e) => Clicked?.Invoke(this, e); PART_CHECKBOX = GetTemplateChild <CheckBox>(PART_CHECKBOX_NAME); PART_CHECKBOX.Checked += (s, e) => Checked?.Invoke(this, e); }
private void RadioButton_CheckedChanged(object sender, EventArgs e) { var radioButton = sender as RadioButton; if (radioButton.Checked) { Checked?.Invoke(sender, e); } }
public void Dispose() { _stopwatch.Stop(); Checked?.Invoke(this, new SpeedCheckerArgs() { ElapsedMilliseconds = _stopwatch.ElapsedMilliseconds, Message = _message, }); }
private void CheckBox_Checked(object sender, RoutedEventArgs e) { if (sender is CheckBox chk && chk.Tag is TorrentFile trnt) { Set(trnt, chk.IsChecked); RecalParent(trnt); //tree.Items.Refresh(); Checked?.Invoke(); } }
protected virtual void OnToggle(EventArgs e) { if (IsChecked) { Checked?.Invoke(this, e); } else { UnChecked?.Invoke(this, e); } }
protected virtual void OnIsCheckedChanged(bool?oldValue, bool?newValue) { if (newValue.HasValue && newValue.Value) { Checked?.Invoke(this, new RoutedEventArgs()); } else { Unchecked?.Invoke(this, new RoutedEventArgs()); } }
private void CheckedHandler(object sender, RoutedEventArgs e) { var command = this.CheckedCommand; var commandParameter = this.CheckedCommandParameter ?? this; if (command != null && command.CanExecute(commandParameter)) { command.Execute(commandParameter); } Checked?.Invoke(this, e); }
private protected virtual void OnChecked() { UpdateVisualState(); // Create the args var args = new RoutedEventArgs(); args.OriginalSource = this; // Raise the event Checked?.Invoke(this, args); }
void Notify(bool val) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("IsChecked")); if (val) { Checked?.Invoke(); } else { Unchecked?.Invoke(); } }
protected override void OnTouch(SKTouchEventArgs e) { if (e.ActionType == SKTouchAction.Pressed && IsEnabled) { IsChecked = !IsChecked; Execute(Command); Checked?.Invoke(this, new ToggleButtonEventArgs(IsChecked)); InvalidateSurface(); e.Handled = true; } }
private void ToggleButton_OnClick(object sender, RoutedEventArgs e) { if (ToggleButton.IsChecked.Value) { AutoCloseNotificationBar.Show(CheckedMessage); Checked?.Invoke(this, null); ToggleButton.ToolTip = CheckedTooltip; } else { AutoCloseNotificationBar.Show(UncheckedMessage); Unchecked?.Invoke(this, null); ToggleButton.ToolTip = UncheckedTooltip; } }
private void ToggleGrid_MouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (checkbox.IsChecked == true) { checkbox.IsChecked = false; IsChecked = false; Unchecked?.Invoke(this, EventArgs.Empty); } else { checkbox.IsChecked = true; IsChecked = true; Checked?.Invoke(this, EventArgs.Empty); } StateChanged?.Invoke(this, EventArgs.Empty); }
public bool Check([CanBeNull] object obj) { bool current; lock (_SyncRoot) { var last = _LastState; current = _LastState = _Checker(obj); Checked?.Invoke(this, EventArgs.Empty); if (current == last) { return(current); } (current ? Raise : Falloff)?.Invoke(this, EventArgs.Empty); } OnPropertyChanged(nameof(LastState)); _StateObservers.ForEach(o => o.OnNext(current)); return(current); }
/// <summary> /// Handler for CheckChanged event. /// </summary> protected virtual void onCheckChanged(ControlBase control, EventArgs Args) { if (checkBox.IsChecked) { if (Checked != null) { Checked.Invoke(this, EventArgs.Empty); } } else { if (UnChecked != null) { UnChecked.Invoke(this, EventArgs.Empty); } } if (CheckChanged != null) { CheckChanged.Invoke(this, EventArgs.Empty); } }
/// <summary> /// Handler for CheckChanged event. /// </summary> protected virtual void OnCheckChanged() { if (IsChecked) { if (Checked != null) { Checked.Invoke(this, EventArgs.Empty); } } else { if (UnChecked != null) { UnChecked.Invoke(this, EventArgs.Empty); } } if (CheckChanged != null) { CheckChanged.Invoke(this, EventArgs.Empty); } }
/// <summary> /// Handler for CheckChanged event. /// </summary> protected virtual void OnCheckChanged(Base control) { if (m_CheckBox.IsChecked) { if (Checked != null) { Checked.Invoke(this); } } else { if (UnChecked != null) { UnChecked.Invoke(this); } } if (CheckChanged != null) { CheckChanged.Invoke(this); } }
public void Check() { SetStatus(IssueStatus.Checking); Checking?.Invoke(this, new EventArgs()); LastException = null; try { if (IsEnabled) { CheckTask(); } } catch (Exception ex) { LastException = ex; //throw; } finally { SetStatus(IssueStatus.Idle); Checked?.Invoke(this, new EventArgs()); } }
public CheckBoxForm() { MouseDown = (b) => { if (b == 0) { Checked = Checked ? false : true; Check?.Invoke(Checked); } }; Draw = () => { DrawFormSolid(new OpenTK.Vector4(0.2f, 0.2f, 0.2f, 0.9f)); DrawFormSolid(new OpenTK.Vector4(0.9f, 0.9f, 0.9f, 0.8f), 2, 2, W - 4, H - 4); if (Checked) { DrawFormSolid(new OpenTK.Vector4(0.2f, 0.2f, 0.2f, 0.9f), 4, 4, W - 8, H - 8); } DrawText(Text, W + 5, -4); }; }
public void Check() { Debug.WriteLine("---> {0}: {1}", "Check", GetType()); SetStatus(IssueStatus.Checking); Checking?.Invoke(this, new EventArgs()); LastException = null; try { if (IsEnabled) { CheckTask(); } } catch (Exception ex) { LastException = ex; //throw; } finally { SetStatus(IssueStatus.Idle); Checked?.Invoke(this, new EventArgs()); } }
protected virtual void OnChecked(EventArgs e) { Checked?.Invoke(this, e); }
private void UwpControl_Checked(object sender, Windows.UI.Xaml.RoutedEventArgs e) { Checked?.Invoke(this, EventArgs.Empty); }
private void ToggleButton_Checked(object sender, RoutedEventArgs e) { Checked?.Invoke(this, null); }
protected void InvokeChecked(RoutedEventArgs e) { Checked?.Invoke(this, e); }
void onCheckBoxPressed() { Checked?.Invoke(this); }
internal void RaiseChecked(RoutedEventArgs args) { Checked?.Invoke(this, args); }