private static void AddHelpPanel(RibbonTab ribTab) { var ribSourcePanel = new RibbonPanelSource { Title = "ModPlus" }; var ribPanel = new RibbonPanel { Source = ribSourcePanel }; ribTab.Panels.Add(ribPanel); var ribRowPanel = new RibbonRowPanel(); ribRowPanel.Items.Add( RibbonHelpers.AddBigButton( "mpUserInfo", Language.GetItem(LangItem, "h56"), _colorTheme == 1 ? $"pack://application:,,,/Modplus_{VersionData.CurrentCadVersion};component/Resources/UserInfo_32x32.png" : $"pack://application:,,,/Modplus_{VersionData.CurrentCadVersion};component/Resources/UserInfo_32x32_dark.png", Language.GetItem(LangItem, "h56"), Orientation.Vertical, string.Empty, string.Empty, "help/userinfo")); ribSourcePanel.Items.Add(ribRowPanel); ribRowPanel = new RibbonRowPanel(); ribRowPanel.Items.Add( RibbonHelpers.AddSmallButton( "mpSettings", Language.GetItem(LangItem, "h12"), GetSmallIcon("mpSettings"), Language.GetItem(LangItem, "h41"), Language.GetItem(LangItem, "h42"), string.Empty, "help/mpsettings")); ribRowPanel.Items.Add( RibbonHelpers.AddSmallButton( "mpFeedback", Language.GetItem("ModPlusAPI", "f1"), GetSmallIcon("mpFeedback"), Language.GetItem("ModPlusAPI", "f20"), Language.GetItem("ModPlusAPI", "f21"), string.Empty, "help/feedback")); ribRowPanel.Items.Add(new RibbonRowBreak()); if (LoadPluginsHelper.HasStampsPlugin(_colorTheme, out var fieldsIcon, out var signaturesIcon)) { ribRowPanel.Items.Add( RibbonHelpers.AddSmallButton( "mpStampFields", Language.GetItem(LangItem, "h43"), fieldsIcon, Language.GetItem(LangItem, "h44"), Language.GetItem(LangItem, "h45"), string.Empty, "autocadplugins/mpstamps")); ribRowPanel.Items.Add( RibbonHelpers.AddSmallButton( "mpSignatures", Language.GetItem(LangItem, "h60"), signaturesIcon, Language.GetItem(LangItem, "h61"), Language.GetItem(LangItem, "h62"), string.Empty, "autocadplugins/mpstamps")); ribRowPanel.Items.Add(new RibbonRowBreak()); } ribRowPanel.Items.Add( RibbonHelpers.AddSmallButton( "mpShowProductIcons", Language.GetItem(LangItem, "h46"), GetSmallIcon("mpShowProductIcons"), Language.GetItem(LangItem, "h37"), Language.GetItem(LangItem, "h38"), $"pack://application:,,,/Modplus_{VersionData.CurrentCadVersion};component/Resources/mpShowProductIcon.png", "help/mpsettings")); ribRowPanel.Items.Add( RibbonHelpers.AddSmallButton( "mpHideProductIcons", Language.GetItem(LangItem, "h47"), GetSmallIcon("mpHideProductIcons"), Language.GetItem(LangItem, "h39"), string.Empty, string.Empty, "help/mpsettings")); ribSourcePanel.Items.Add(ribRowPanel); }
private void FillFieldsFunction() { BtFields.Visibility = LoadPluginsHelper.HasStampsPlugin(1, out _) ? Visibility.Visible : Visibility.Collapsed; }
private void FillFieldsFunction() { _hasFieldsFunction = LoadPluginsHelper.HasStampsPlugin(); BtFields.Visibility = _hasFieldsFunction ? Visibility.Visible : Visibility.Collapsed; }