예제 #1
0
 public void Add_WordHistory(WordHistoryModel model)
 {
     if (WordHistoryHelper.IsQueryHistoryAllowed & !IsDuplicated(model.Word))
     {
         int maxLength = (int)LeptonTextBlockControl.MaxLengthProperty.GetMetadata(typeof(LeptonTextBlockControl)).DefaultValue;
         if (model.Word.Length > maxLength)
         {
             model.Word = model.Word.Substring(0, maxLength);
         }
         WordHistoryCollection.Insert(0, WordHistoryHelper.Add(model));
     }
 }