コード例 #1
0
 protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, Tuple <ConnectionData, ConnectionData> connectionDataPair, OleMenuCommand menuCommand)
 {
     CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(
         applicationObject
         , menuCommand
         , out var doc
         , AbstractDynamicCommandXsdSchemas.SiteMapXmlRoot
         );
 }
コード例 #2
0
        protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand)
        {
            CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out var doc, AbstractDynamicCommandXsdSchemas.RootSiteMap);

            if (doc != null)
            {
                string nameCommand = Properties.CommandNames.CodeXmlSiteMapUpdateCommand;

                var attribute = doc.Attribute(Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeSiteMapNameUnique);

                if (attribute != null && !string.IsNullOrEmpty(attribute.Value))
                {
                    nameCommand = string.Format(Properties.CommandNames.CodeXmlSiteMapUpdateByNameCommandFormat1, attribute.Value);
                }

                CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, nameCommand);
            }
        }
        protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand)
        {
            CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out var doc, AbstractDynamicCommandXsdSchemas.SiteMapXmlRoot);

            if (doc != null)
            {
                string siteMapUniqueName = "Default";

                var attribute = doc.Attribute(Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeSiteMapNameUnique);

                if (attribute != null && !string.IsNullOrEmpty(attribute.Value))
                {
                    siteMapUniqueName = attribute.Value;
                }

                menuCommand.Text = string.Format(Properties.CommandNames.CommandNameWithConnectionFormat2, siteMapUniqueName, connectionData.Name);
            }
        }
コード例 #4
0
        protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand)
        {
            CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(
                applicationObject
                , menuCommand
                , out var doc
                , AbstractDynamicCommandXsdSchemas.PluginTypeCustomWorkflowActivityInfoRoot
                );

            if (doc != null && menuCommand.Enabled & menuCommand.Visible)
            {
                var pluginTypeName = doc.XPathSelectElements("./CustomActivityInfo/TypeName").Where(e => !string.IsNullOrEmpty(e.Value)).Select(e => e.Value).FirstOrDefault();

                if (string.IsNullOrEmpty(pluginTypeName))
                {
                    menuCommand.Enabled = menuCommand.Visible = false;
                }
            }
        }
 protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand)
 {
     CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out _, AbstractDynamicCommandXsdSchemas.RootFetch);
 }
 protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand)
 {
     CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out _, AbstractDynamicCommandXsdSchemas.RootRibbonDiffXml, AbstractDynamicCommandXsdSchemas.RootRibbonDefinitions);
 }
コード例 #7
0
        protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand)
        {
            CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out _, AbstractDynamicCommandXsdSchemas.FetchRoot);

            CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, Properties.CommandNames.CodeXmlFetchXmlExecuteRequestCommand);
        }
コード例 #8
0
 protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, string selectedSiteMap, OleMenuCommand menuCommand)
 {
     CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out _, AbstractDynamicCommandXsdSchemas.RootSiteMap);
 }