コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }