protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentReport(applicationObject, menuCommand); if (menuCommand.Enabled) { string custom = this._isCustom ? Properties.CommandNames.CodeReportShowDifferenceCommandCustom : string.Empty; string name = string.Format(Properties.CommandNames.CodeReportShowDifferenceCommandFormat2, _fieldTitle, custom); CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, name); } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { if (connectionData.IsReadOnly) { menuCommand.Enabled = menuCommand.Visible = false; } else { menuCommand.Enabled = menuCommand.Visible = true; CommonHandlers.ActionBeforeQueryStatusSolutionExplorerReportSingle(applicationObject, menuCommand); } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { if (connectionData.IsReadOnly) { menuCommand.Enabled = menuCommand.Visible = false; } else { menuCommand.Enabled = menuCommand.Visible = true; CommonHandlers.ActionBeforeQueryStatusOpenedDocumentsWebResource(applicationObject, menuCommand); } }
private void RestoreDefaultShortcuts() { RegistryManager.Instance.UserDefinedShortcuts = string.Empty; this.ParentSettingsWindow.mIsShortcutEdited = false; CommonHandlers.ReloadShortcutsForAllInstances(); if (this.ParentWindow.mCommonHandler.mShortcutsConfigInstance != null) { this.AddShortcutKeyElements(); } this.mSaveBtn.IsEnabled = false; this.ParentWindow.mTopbarOptions?.SetLabel(); BlueStacks.Common.Stats.SendMiscellaneousStatsAsync("KeyboardShortcuts", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "shortcut_restore_default", (string)null, (string)null, (string)null, (string)null, (string)null, "Android", 0); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { if (this._withDetails) { _sourceSelectedFiles.CommandBeforeQueryStatus(applicationObject, menuCommand, SelectedFileType.WebResourceText); } else { _sourceSelectedFiles.CommandBeforeQueryStatus(applicationObject, menuCommand, SelectedFileType.WebResource); } CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, this._commandNameForCorrection); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { if (_selectedFileType == SelectedFileType.WebResourceJavaScriptHasLinkedGlobalOptionSet) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentJavaScriptHasLinkedGlobalOptionSetName(applicationObject, menuCommand); } else if (_selectedFileType == SelectedFileType.CSharpHasLinkedGlobalOptionSet) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentCSharpHasLinkedGlobalOptionSetName(applicationObject, menuCommand); } CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, Properties.CommandNames.CodeLinkedGlobalOptionSetExplorerCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRootWithAttribute(applicationObject, menuCommand, Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeFormId, out var attribute, AbstractDynamicCommandXsdSchemas.RootForm); CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, Properties.CommandNames.CodeXmlSystemFormUpdateCommand); if (attribute == null || !Guid.TryParse(attribute.Value, out _) ) { menuCommand.Enabled = menuCommand.Visible = false; } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRootWithAttribute(applicationObject , menuCommand , Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeWebResourceName , out var attribute , AbstractDynamicCommandXsdSchemas.WebResourceDependencyXmlRoot ); if (attribute == null || string.IsNullOrEmpty(attribute.Value)) { menuCommand.Enabled = menuCommand.Visible = false; } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, Tuple <ConnectionData, ConnectionData> connectionDataPair, OleMenuCommand menuCommand) { if (this._differenceType == ShowDifferenceThreeFileType.ThreeWay) { var commonConfig = Model.CommonConfiguration.Get(); if (!commonConfig.DifferenceThreeWayAvaliable()) { menuCommand.Enabled = menuCommand.Visible = false; return; } } CommonHandlers.ActionBeforeQueryStatusActiveDocumentReport(applicationObject, menuCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRootWithAttribute( applicationObject , menuCommand , Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeWorkflowId , out var attribute , AbstractDynamicCommandXsdSchemas.WorkflowActivityRoot ); if (attribute == null || !Guid.TryParse(attribute.Value, out _)) { menuCommand.Enabled = menuCommand.Visible = false; } }
protected override void CommandBeforeQueryStatus(DTE2 applicationObject, OpenFilesType openFilesType, OleMenuCommand menuCommand) { var selectedFileType = _selectedFileTypeForOpenFilesType[openFilesType]; if (selectedFileType == SelectedFileType.WebResource) { CommonHandlers.ActionBeforeQueryStatusListForPublishWebResourceAny(applicationObject, menuCommand); } else if (selectedFileType == SelectedFileType.WebResourceText) { CommonHandlers.ActionBeforeQueryStatusListForPublishWebResourceTextAny(applicationObject, menuCommand); } else { menuCommand.Enabled = menuCommand.Visible = false; } }
public void CommandBeforeQueryStatus(DTE2 applicationObject, OleMenuCommand menuCommand, SelectedFileType selectedFileType) { switch (selectedFileType) { case SelectedFileType.WebResource: CommonHandlers.ActionBeforeQueryStatusActiveDocumentWebResource(applicationObject, menuCommand); break; case SelectedFileType.WebResourceText: CommonHandlers.ActionBeforeQueryStatusActiveDocumentWebResourceText(applicationObject, menuCommand); break; case SelectedFileType.WebResourceJavaScript: CommonHandlers.ActionBeforeQueryStatusActiveDocumentJavaScript(applicationObject, menuCommand); break; case SelectedFileType.WebResourceJavaScriptHasLinkedSystemForm: CommonHandlers.ActionBeforeQueryStatusActiveDocumentJavaScriptHasLinkedSystemForm(applicationObject, menuCommand); break; case SelectedFileType.WebResourceJavaScriptHasLinkedGlobalOptionSet: CommonHandlers.ActionBeforeQueryStatusActiveDocumentJavaScriptHasLinkedGlobalOptionSetName(applicationObject, menuCommand); break; case SelectedFileType.Report: CommonHandlers.ActionBeforeQueryStatusActiveDocumentReport(applicationObject, menuCommand); break; case SelectedFileType.CSharp: CommonHandlers.ActionBeforeQueryStatusActiveDocumentCSharp(applicationObject, menuCommand); break; case SelectedFileType.CSharpHasLinkedGlobalOptionSet: CommonHandlers.ActionBeforeQueryStatusActiveDocumentCSharpHasLinkedGlobalOptionSetName(applicationObject, menuCommand); break; case SelectedFileType.Xml: CommonHandlers.ActionBeforeQueryStatusActiveDocumentXml(applicationObject, menuCommand); break; default: menuCommand.Enabled = menuCommand.Visible = false; break; } }
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); } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRootWithAttribute(applicationObject, menuCommand, Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeEntityName, out var attribute, AbstractDynamicCommandXsdSchemas.RootRibbonDefinitions); if (attribute != null) { string entityName = attribute.Value; string nameCommand = Properties.CommandNames.CodeXmlRibbonApplicationShowDifferenceCommand; if (!string.IsNullOrEmpty(entityName)) { nameCommand = string.Format(Properties.CommandNames.CodeXmlRibbonEntityShowDifferenceCommandFormat1, entityName); } CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, nameCommand); } }
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; } } }
private void DeleteMacroScript(MacroRecording mRecording) { string path = Path.Combine(RegistryStrings.MacroRecordingsFolderPath, mRecording.Name + ".json"); if (File.Exists(path)) { File.Delete(path); } if (mRecording.Shortcut != null && MainWindow.sMacroMapping.ContainsKey(mRecording.Shortcut)) { MainWindow.sMacroMapping.Remove(mRecording.Shortcut); } ImportMacroWindow.DeleteScriptNameFromBookmarkedScriptListIfPresent(mRecording.Name); MacroGraph.Instance.RemoveVertex((BiDirectionalVertex <MacroRecording>)MacroGraph.Instance.Vertices.Cast <MacroRecording>().Where <MacroRecording>((Func <MacroRecording, bool>)(macro => string.Equals(macro.Name, mRecording.Name, StringComparison.InvariantCultureIgnoreCase))).FirstOrDefault <MacroRecording>()); if (this.ParentWindow.mAutoRunMacro != null && this.ParentWindow.mAutoRunMacro.Name.ToLower(CultureInfo.InvariantCulture).Trim() == mRecording.Name.ToLower(CultureInfo.InvariantCulture).Trim()) { this.ParentWindow.mAutoRunMacro = (MacroRecording)null; } CommonHandlers.OnMacroDeleted(mRecording.Name); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRootWithAttribute( applicationObject , menuCommand , Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeEntityName , out var attribute , AbstractDynamicCommandXsdSchemas.RootRibbonDiffXml , AbstractDynamicCommandXsdSchemas.RootRibbonDefinitions ); if (attribute != null) { string entityName = attribute.Value; if (string.IsNullOrEmpty(entityName)) { menuCommand.Enabled = menuCommand.Visible = false; } } }
protected override void CommandAction(DTEHelper helper, string solutionUniqueName) { var connectionConfig = ConnectionConfiguration.Get(); var connectionData = connectionConfig.CurrentConnectionData; List <SelectedFile> selectedFiles = helper.GetSelectedFilesFromListForPublish(FileOperations.SupportsJavaScriptType).ToList(); if (selectedFiles.Any()) { helper.ShowListForPublish(connectionData); var hashFormIds = new HashSet <Guid>(); foreach (var selectedFile in selectedFiles) { if (!File.Exists(selectedFile.FilePath)) { continue; } string javaScriptCode = File.ReadAllText(selectedFile.FilePath); if (CommonHandlers.GetLinkedSystemForm(javaScriptCode, out string entityName, out Guid formId, out int formType)) { hashFormIds.Add(formId); } } if (hashFormIds.Any()) { helper.HandleLinkedSystemFormAddingToSolutionCommand(null, solutionUniqueName, false, hashFormIds); } } else { helper.WriteToOutput(connectionData, Properties.OutputStrings.PublishListIsEmpty); helper.ActivateOutputWindow(connectionData); } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXml(applicationObject, menuCommand, out var doc); if (doc == null) { menuCommand.Enabled = menuCommand.Visible = false; return; } string docRootName = doc.Name.ToString(); var schemas = AbstractDynamicCommandXsdSchemas.GetSchemaByRootName(docRootName); if (!string.IsNullOrEmpty(schemas)) { menuCommand.Text = string.Format(Properties.CommandNames.CodeXmlCommonXsdSchemaSetProperCommandFormat1, schemas); } else { menuCommand.Enabled = menuCommand.Visible = false; } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRootWithAttribute(applicationObject , menuCommand , Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeEntityName , out var attribute , AbstractDynamicCommandXsdSchemas.RibbonDiffXmlRoot ); if (attribute != null) { string entityName = attribute.Value; if (string.IsNullOrEmpty(entityName)) { entityName = "ApplicationRibbon"; } string nameCommand = string.Format(Properties.CommandNames.CommandNameWithConnectionFormat2, entityName, connectionData.Name); menuCommand.Text = nameCommand; } }
public void CommandBeforeQueryStatus(DTE2 applicationObject, OleMenuCommand menuCommand, SelectedFileType selectedFileType) { switch (selectedFileType) { case SelectedFileType.WebResource: CommonHandlers.ActionBeforeQueryStatusSolutionExplorerWebResourceRecursive(applicationObject, menuCommand); break; case SelectedFileType.WebResourceText: CommonHandlers.ActionBeforeQueryStatusSolutionExplorerWebResourceTextRecursive(applicationObject, menuCommand); break; case SelectedFileType.WebResourceJavaScript: case SelectedFileType.WebResourceJavaScriptHasLinkedSystemForm: case SelectedFileType.WebResourceJavaScriptHasLinkedGlobalOptionSet: CommonHandlers.ActionBeforeQueryStatusSolutionExplorerJavaScriptRecursive(applicationObject, menuCommand); break; case SelectedFileType.Report: CommonHandlers.ActionBeforeQueryStatusSolutionExplorerReportRecursive(applicationObject, menuCommand); break; case SelectedFileType.CSharp: case SelectedFileType.CSharpHasLinkedGlobalOptionSet: CommonHandlers.ActionBeforeQueryStatusSolutionExplorerCSharpRecursive(applicationObject, menuCommand); break; case SelectedFileType.Xml: CommonHandlers.ActionBeforeQueryStatusSolutionExplorerXmlRecursive(applicationObject, menuCommand); break; default: menuCommand.Enabled = menuCommand.Visible = false; break; } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, Properties.CommandNames.CommonOpenOrganizationDifferenceImageCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusSolutionExplorerWebResourceAny(applicationObject, menuCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentXml(applicationObject, menuCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentCSharp(applicationObject, menuCommand); CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, Properties.CommandNames.CodeCSharpUpdateEntityMetadataFileProxyClassOrSchemaWithSelectCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusSolutionExplorerWebResourceRecursive(applicationObject, menuCommand); CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, Properties.CommandNames.FolderWebResourceCompareWithDetailsCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusOpenedDocumentsWebResource(applicationObject, menuCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusSolutionExplorerAnyItemContainsProject(applicationObject, menuCommand, true); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, Properties.CommandNames.CommonEntityRelationshipOneToManyExplorerCommand); }