private void queryOptionItem_Selected(object sender, EventArgs e) { QueryOptionItem selectedItem = sender as QueryOptionItem; if (selectedItem != null) { m_selectedItem = selectedItem; } OptionChanged.Raise(this, EventArgs.Empty); }
async Task HandleInputChange(ChangeEventArgs args) { Value = args.Value.ToString(); if (ValueChanged.HasDelegate) { await ValueChanged.InvokeAsync(Value); } if (OptionChanged.HasDelegate) { var id = Options?.FirstOrDefault(o => o.Value.ToLower() == Value.ToLower())?.Id; await OptionChanged.InvokeAsync(new DatalistOption { Id = id, Value = Value }); } }
void OnChanged(string optionId) { if (scope == null || service.GetOption(optionId).IsApplicableToScope(scope)) { OptionChanged?.Invoke(this, new EditorOptionChangedEventArgs(optionId)); } for (int i = weakChildren.Count - 1; i >= 0; i--) { var child = weakChildren[i].Target as EditorOptions; if (child == null) { weakChildren.RemoveAt(i); continue; } if (!child.dict.ContainsKey(optionId)) { child.OnChanged(optionId); } } }
private void _optionChanged(object sender, PropertyChangedEventArgs pcea) { try { if (!(sender is OptionChoiceEntity)) { throw new InvalidOperationException(); } OptionChoiceEntity optChoiceEntity = sender as OptionChoiceEntity; OptionChangeKind kind = OptionChangeKind.Default; switch (pcea.PropertyName) { case nameof(optChoiceEntity.Taken): kind = OptionChangeKind.Taken; break; case nameof(optChoiceEntity.TakenStart): case nameof(optChoiceEntity.TakenEnd): kind = OptionChangeKind.TakenDates; break; case nameof(optChoiceEntity.PeopleCount): kind = OptionChangeKind.PeopleCount; break; } OptionChoiceEntityChange optChange = new OptionChoiceEntityChange(kind, optChoiceEntity); OptionChanged?.Invoke(null, optChange); } catch (Exception ex) { Logger.Log(ex); } }
void TextViewOptionsGroup_TextViewOptionChanged(object sender, TextViewOptionChangedEventArgs e) => OptionChanged?.Invoke(this, new OptionChangedEventArgs(e.ContentType, e.OptionId));
/// <summary> /// Raises the <see cref="OptionChanged"/> event. /// </summary> protected virtual void OnOptionChanged(PropertyChangedEventArgs e) { OptionChanged?.Invoke(this, e); }
private void tabSelectedIndexChanged(object sender, EventArgs e) { OptionChanged?.Invoke(tabControl1.SelectedIndex == 0); }
public static void OnOptionChanged(OptionEventArgs e) { OptionChanged?.Invoke(null, e); }
private void OnOptionChanged(OptionKey optionKey) => OptionChanged?.Invoke(this, optionKey);
private void childNode_OptionChanged(object sender, EventArgs args) { OptionChanged.Raise(sender, EventArgs.Empty); }
public void Notify() { OptionChanged?.Invoke(); }
public override void SaveSettingsToStorage() { base.SaveSettingsToStorage(); OptionChanged?.Invoke(this, EventArgs.Empty); }
public override void RaisePropertyChanged([CallerMemberName] string propertyName = "") { base.RaisePropertyChanged(propertyName); OptionChanged?.Invoke(); }
protected virtual void OnOptionsChanged(OptionsEventArgs args) { OptionChanged?.Invoke(this, args); }