Exemplo n.º 1
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.º 2
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);
        }