Exemplo n.º 1
0
        public VersionMenu(ProjectVersion version)
        {
            Verify.Argument.IsNotNull(version, "version");

            _version = version;

            Items.Add(GuiItemFactory.GetUpdateRedmineObjectItem <ToolStripMenuItem>(_version));

            var item = new ToolStripMenuItem(Resources.StrCopyToClipboard);

            item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrId, _version.Id.ToString(CultureInfo.InvariantCulture)));
            item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrName, _version.Name));
            if (!string.IsNullOrWhiteSpace(_version.Description))
            {
                item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrDescription, _version.Description));
            }

            Items.Add(item);
        }
Exemplo n.º 2
0
        public IssueMenu(Issue issue)
        {
            Verify.Argument.IsNotNull(issue, "issue");

            _issue = issue;

            Items.Add(GuiItemFactory.GetUpdateRedmineObjectItem <ToolStripMenuItem>(_issue));

            var item = new ToolStripMenuItem(Resources.StrCopyToClipboard);

            item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrId, _issue.Id.ToString(CultureInfo.InvariantCulture)));
            item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrSubject, _issue.Subject));
            if (_issue.Category != null)
            {
                item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrCategory, _issue.Category.Name));
            }

            Items.Add(item);
        }
Exemplo n.º 3
0
        public NewsMenu(News news)
        {
            Verify.Argument.IsNotNull(news, nameof(news));

            _news = news;

            //Items.Add(GuiItemFactory.GetUpdateRedmineObjectItem<ToolStripMenuItem>(_news));

            var item = new ToolStripMenuItem(Resources.StrCopyToClipboard);

            item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrId, _news.Id.ToString(CultureInfo.InvariantCulture)));
            item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrTitle, _news.Title));
            if (!string.IsNullOrWhiteSpace(_news.Summary))
            {
                item.DropDownItems.Add(GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrSummary, _news.Summary));
            }

            Items.Add(item);
        }