コード例 #1
0
 private void FillFieldsFunction()
 {
     _hasFieldsFunction  = LoadFunctionsHelper.HasStampsPlugin();
     BtFields.Visibility = _hasFieldsFunction ? Visibility.Visible : Visibility.Collapsed;
 }
コード例 #2
0
        private static void AddHelpPanel(RibbonTab ribTab)
        {
            // create the panel source
            var ribSourcePanel = new RibbonPanelSource
            {
                Title = "ModPlus"
            };

            // now the panel
            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"));

            ribRowPanel.Items.Add(
                RibbonHelpers.AddBigButton(
                    "mpSettings",
                    Language.GetItem(LangItem, "h12"),
                    _colorTheme == 1
                    ? "pack://application:,,,/Modplus_" + VersionData.CurrentCadVersion + ";component/Resources/HelpBt.png"
                    : "pack://application:,,,/Modplus_" + VersionData.CurrentCadVersion + ";component/Resources/HelpBt_dark.png",
                    Language.GetItem(LangItem, "h41"),
                    Orientation.Vertical,
                    Language.GetItem(LangItem, "h42"),
                    string.Empty,
                    "help/mpsettings"));
            ribSourcePanel.Items.Add(ribRowPanel);

            ribRowPanel = new RibbonRowPanel();
            if (LoadFunctionsHelper.HasStampsPlugin(_colorTheme, out var icon))
            {
                ribRowPanel.Items.Add(
                    RibbonHelpers.AddSmallButton(
                        "mpStampFields",
                        Language.GetItem(LangItem, "h43"),
                        icon,
                        Language.GetItem(LangItem, "h44"),
                        Language.GetItem(LangItem, "h45"),
                        string.Empty,
                        "autocadplugins/mpstamps"));
                ribRowPanel.Items.Add(new RibbonRowBreak());
            }

            ribRowPanel.Items.Add(
                RibbonHelpers.AddSmallButton(
                    "mpShowProductIcons",
                    Language.GetItem(LangItem, "h46"),
                    _colorTheme == 1
                        ? "pack://application:,,,/Modplus_" + VersionData.CurrentCadVersion + ";component/Resources/mpShowProductIcons_16x16.png"
                        : "pack://application:,,,/Modplus_" + VersionData.CurrentCadVersion + ";component/Resources/mpShowProductIcons_16x16_dark.png",
                    Language.GetItem(LangItem, "h37"),
                    Language.GetItem(LangItem, "h38"),
                    "pack://application:,,,/Modplus_" + VersionData.CurrentCadVersion + ";component/Resources/mpShowProductIcon.png", "help/mpsettings"));
            ribRowPanel.Items.Add(new RibbonRowBreak());

            ribRowPanel.Items.Add(
                RibbonHelpers.AddSmallButton(
                    "mpHideProductIcons",
                    Language.GetItem(LangItem, "h47"),
                    _colorTheme == 1
                        ? "pack://application:,,,/Modplus_" + VersionData.CurrentCadVersion + ";component/Resources/mpHideProductIcons_16x16.png"
                        : "pack://application:,,,/Modplus_" + VersionData.CurrentCadVersion + ";component/Resources/mpHideProductIcons_16x16_dark.png",
                    Language.GetItem(LangItem, "h39"),
                    string.Empty,
                    string.Empty,
                    "help/mpsettings"));
            ribSourcePanel.Items.Add(ribRowPanel);
        }
コード例 #3
0
 private void FillFieldsFunction()
 {
     BtFields.Visibility = LoadFunctionsHelper.HasStampsPlugin(1, out _) ? Visibility.Visible : Visibility.Collapsed;
 }