コード例 #1
0
        private void queryOptionItem_Selected(object sender, EventArgs e)
        {
            QueryOptionItem selectedItem = sender as QueryOptionItem;

            if (selectedItem != null)
            {
                m_selectedItem = selectedItem;
            }

            OptionChanged.Raise(this, EventArgs.Empty);
        }
コード例 #2
0
 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 });
     }
 }
コード例 #3
0
 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);
         }
     }
 }
コード例 #4
0
ファイル: OptionsViewModel.cs プロジェクト: yves982/Resotel
        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);
            }
        }
コード例 #5
0
 void TextViewOptionsGroup_TextViewOptionChanged(object sender, TextViewOptionChangedEventArgs e) =>
 OptionChanged?.Invoke(this, new OptionChangedEventArgs(e.ContentType, e.OptionId));
コード例 #6
0
 /// <summary>
 /// Raises the <see cref="OptionChanged"/> event.
 /// </summary>
 protected virtual void OnOptionChanged(PropertyChangedEventArgs e)
 {
     OptionChanged?.Invoke(this, e);
 }
コード例 #7
0
 private void tabSelectedIndexChanged(object sender, EventArgs e)
 {
     OptionChanged?.Invoke(tabControl1.SelectedIndex == 0);
 }
コード例 #8
0
 public static void OnOptionChanged(OptionEventArgs e)
 {
     OptionChanged?.Invoke(null, e);
 }
コード例 #9
0
 private void OnOptionChanged(OptionKey optionKey)
 => OptionChanged?.Invoke(this, optionKey);
コード例 #10
0
 private void childNode_OptionChanged(object sender, EventArgs args)
 {
     OptionChanged.Raise(sender, EventArgs.Empty);
 }
コード例 #11
0
 public void Notify()
 {
     OptionChanged?.Invoke();
 }
コード例 #12
0
 public override void SaveSettingsToStorage()
 {
     base.SaveSettingsToStorage();
     OptionChanged?.Invoke(this, EventArgs.Empty);
 }
コード例 #13
0
 public override void RaisePropertyChanged([CallerMemberName] string propertyName = "")
 {
     base.RaisePropertyChanged(propertyName);
     OptionChanged?.Invoke();
 }
コード例 #14
0
 protected virtual void OnOptionsChanged(OptionsEventArgs args)
 {
     OptionChanged?.Invoke(this, args);
 }