Exemple #1
0
 private void cboSortKnowledge_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cboSortKnowledge.SelectedItem is Tuple <string, IComparer <KnowledgeSkill> > selectedItem)
     {
         _lstKnowledgeSkills.SuspendLayout();
         _lstKnowledgeSkills.Sort(selectedItem.Item2);
         _lstKnowledgeSkills.ResumeLayout();
     }
 }
Exemple #2
0
 private void cboDisplayFilter_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cboDisplayFilter.SelectedItem is Tuple <string, Predicate <Skill> > selectedItem)
     {
         if (selectedItem.Item2 == null)
         {
             cboDisplayFilter.DropDownStyle = ComboBoxStyle.DropDown;
             _blnActiveSkillSearchMode      = true;
             cboDisplayFilter.Text          = string.Empty;
         }
         else
         {
             cboDisplayFilter.DropDownStyle = ComboBoxStyle.DropDownList;
             _blnActiveSkillSearchMode      = false;
             _lstActiveSkills.SuspendLayout();
             _lstActiveSkills.Filter(selectedItem.Item2);
             _lstActiveSkills.ResumeLayout();
         }
     }
 }