private void EditButton_OnClick(object sender, RoutedEventArgs e) { var window = new TagWindow(); var tag = (TagModel)TagsListBox.SelectedItems[TagsListBox.SelectedItems.Count - 1]; if (window.ShowDialog() == false) { return; } tag.Text = window.NewText; _tagsList[TagsListBox.SelectedIndex].Text = tag.Text; _tagService.Update(tag); }
private void AddTagButton_OnCLick(object sender, RoutedEventArgs e) { var window = new TagWindow(); if (window.ShowDialog() == false) { return; } var tag = new TagModel { Text = window.NewText, TagTextColor = "Black" }; _tagService.Add(tag); _tagsList.Add(tag); }
private void AddSharedTagButton_OnClick(object sender, RoutedEventArgs e) { var window = new TagWindow(); if (window.ShowDialog() == false) { return; } var tag = new TagModel { Text = window.NewText, ProjectId = _projectId, TagTextColor = "#2295F2" }; _tagService.Add(tag); _tagsList.Add(tag); }