Example #1
0
        public static int CompareByValue(ConfigParameterListItem item1, ConfigParameterListItem item2)
        {
            var data1 = item1.DataContext.Value;
            var data2 = item2.DataContext.Value;

            return(string.Compare(data1, data2));
        }
Example #2
0
        public ConfigParameterMenu(ConfigParameterListItem listItem)
        {
            Verify.Argument.IsNotNull(listItem, "listItem");
            Verify.Argument.IsValidGitObject(listItem.DataContext, "parameter");

            _listItem  = listItem;
            _parameter = listItem.DataContext;

            Items.Add(new ToolStripMenuItem(Resources.StrEditValue, CachedResources.Bitmaps["ImgConfigEdit"], (s, e) => listItem.StartValueEditor()));
            Items.Add(GuiItemFactory.GetUnsetParameterItem <ToolStripMenuItem>(_parameter));
            Items.Add(new ToolStripSeparator());
            Items.Add(new ToolStripMenuItem(Resources.StrCopyToClipboard, null,
                                            GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrName, _parameter.Name),
                                            GuiItemFactory.GetCopyToClipboardItem <ToolStripMenuItem>(Resources.StrValue, _parameter.Value)));
        }