コード例 #1
0
 protected override void UpdateFuzzyResult(string value)
 {
     if (string.IsNullOrEmpty(value))
     {
         return;
     }
     (TraineeCollection.FuzzySearchForBlock(value) ?? new List <TraineeModel>()).ForEach(s =>
     {
         PopupTraineeCollection.Add(new FuzzyTraineeViewModel(s, ClassType.Block));
         PopupTraineeCollection.Last().TraineeSelectedEvent += OnTraineeSelected;
     });
 }
コード例 #2
0
        private void OnTraineeNameChanged(string value)
        {
            if (value == null || string.IsNullOrEmpty(value.Trim()))
            {
                IsPopupOpen = false;
                return;
            }

            PopupTraineeCollection.Clear();

            if (Operation == OperationType.Add)
            {
                UpdateFuzzyResult(value);

                PopupHeight = (PopupTraineeCollection.Count > _maxItemCount ? _maxItemCount : PopupTraineeCollection.Count) * _itemUnitHeight;
                IsPopupOpen = true;
            }
        }