Ejemplo n.º 1
0
 public void SetTagModel(ref Button button, TagsType tagsType)
 {
     if (button.FontWeight == FontWeights.Normal)
     {
         button.FontWeight = FontWeights.Bold;
         button.Foreground = FindResource("MouseOverBrush") as SolidColorBrush;
         if (tagsType == TagsType.SongTags)
         {
             SongTags.Add(button.Content.ToString());
         }
         else if (tagsType == TagsType.SelectTags)
         {
             SelectTags.Add(button.Content.ToString());
         }
     }
     else if (button.FontWeight == FontWeights.Bold)
     {
         button.FontWeight = FontWeights.Normal;
         button.Foreground = FindResource("ForegroundBrush") as SolidColorBrush;
         if (tagsType == TagsType.SongTags)
         {
             SongTags.RemoveAt(SongTags.IndexOf(button.Content.ToString()));
         }
         else if (tagsType == TagsType.SelectTags)
         {
             SelectTags.RemoveAt(SelectTags.IndexOf(button.Content.ToString()));
         }
     }
 }
Ejemplo n.º 2
0
 public Tag(TagsName name, TagsType type, int position)
 {
     Name     = name;
     Type     = type;
     Position = position;
     HtmlTag  = GetHtmlTag();
 }
 protected TagsWithTypeAttribute(TagsType tagsType, params string[] tags) : base(tags)
 {
     TagsType = tagsType;
 }
 protected TagsWithTypeAttribute(TagsType tagsType, TagBehavior behavior, params string[] tags) : base(behavior, tags)
 {
     TagsType = tagsType;
 }