Exemple #1
0
 private void CheckEntryTags(DataEntry dataEntry) //Checks off the tags associated with the entry
 {
     if (dataEntry.Tags.Count != 0 && TagsCheckBoxes.Items.Count != 0)
     {
         foreach (string s in dataEntry.Tags)
         {
             for (int i = 0; i < TagsCheckBoxes.Items.Count; i++)
             {
                 if (s == TagsCheckBoxes.Items[i].ToString())
                 {
                     TagsCheckBoxes.SetItemChecked(i, true);
                 }
             }
         }
     }
 }
Exemple #2
0
 private void CheckTags(List <string> tags)
 {
     if (tags.Count != 0 && TagsCheckBoxes.Items.Count != 0)
     {
         for (int i = 0; i < TagsCheckBoxes.Items.Count; i++)
         {
             foreach (string s in tags)
             {
                 if (TagsCheckBoxes.Items[i].ToString() == s)
                 {
                     TagsCheckBoxes.SetItemChecked(i, true);
                 }
             }
         }
     }
 }