public void BindFileGenerationOptions(FileGenerationOptions fileGenerationOptions) { this._fileGenerationOptions = fileGenerationOptions; System.Windows.FrameworkElement[] dataContextElements = { chBWithManagedInfo , chBAllDescriptions , chBWithDependentComponents , rBTab , rBSpaces , txtBSpaceCount , rBClasses , rBEnums , rBReadOnly , rBConst , chBSchemaAddDescriptionAttribute , chBSchemaAddTypeConverterAttributeForEnums , txtBNamespaceGlobalOptionSetsCSharp , txtBNamespaceGlobalOptionSetsJavaScript , txtBTypeConverterName }; foreach (var element in dataContextElements) { element.DataContext = fileGenerationOptions; } }
public void BindFileGenerationOptions(FileGenerationOptions fileGenerationOptions) { this._fileGenerationOptions = fileGenerationOptions; System.Windows.FrameworkElement[] dataContextElements = { chBWithManagedInfo , chBAllDescriptions , chBWithDependentComponents , rBTab , rBSpaces , txtBSpaceCount , txtBNamespaceClassesJavaScript , txtBNamespaceGlobalOptionSetsJavaScript , chBGenerateJavaScriptIntoSchemaClass , chBGenerateJavaScriptGlobalOptionSet , chBJavaScriptAddConsoleFunctions , chBJavaScriptAddFormTypeEnum , chBJavaScriptAddRequiredLevelEnum , chBJavaScriptAddSubmitModeEnum }; foreach (var element in dataContextElements) { element.DataContext = fileGenerationOptions; } }
public void BindFileGenerationOptions(FileGenerationOptions fileGenerationOptions) { this._fileGenerationOptions = fileGenerationOptions; System.Windows.FrameworkElement[] dataContextElements = { chBSdkMessageRequestAttributesWithNameOf , chBSdkMessageRequestMakeAllPropertiesEditable , chBSdkMessageRequestWithDebuggerNonUserCode , txtBNamespaceSdkMessagesCSharp , txtBNamespaceSdkMessagesJavaScript , chBWithManagedInfo , chBAllDescriptions , chBWithDependentComponents , rBTab , rBSpaces , txtBSpaceCount }; foreach (var element in dataContextElements) { element.DataContext = fileGenerationOptions; } }
public ListViewItem(string solutionFilePath, FileGenerationOptions fileGenerationOptions) { this.SolutionFilePath = solutionFilePath; this.FileGenerationOptions = fileGenerationOptions; this.FileGenerationOptions.PropertyChanged += this.FileGenerationOptions_PropertyChanged; this.FileGenerationOptions.PropertyChanging += this.FileGenerationOptions_PropertyChanging; }
public static CreateFileCSharpConfiguration CreateForSchemaGlobalOptionSet(FileGenerationOptions fileGenerationOptions) { var result = CreateForSchemaEntity(fileGenerationOptions); result.WithDependentComponents = fileGenerationOptions.GenerateSchemaGlobalOptionSetsWithDependentComponents; //result.AddDescriptionAttribute = commonConfig.GenerateSchemaAddDescriptionAttribute; return(result); }
public WindowExplorerEntityMetadataOptions(FileGenerationOptions fileGenerationOptions) { InitializeComponent(); SetInputLanguageEnglish(); this._fileGenerationOptions = fileGenerationOptions; this.Title = string.Format("EntityMetadata File Generation Options - {0}", !string.IsNullOrEmpty(fileGenerationOptions.SolutionFilePath) ? fileGenerationOptions.SolutionFilePath : "Default"); options.BindFileGenerationOptions(this._fileGenerationOptions); }
public WindowFileGenerationJavaScriptOptions(FileGenerationOptions fileGenerationOptions) { InitializeComponent(); SetInputLanguageEnglish(); this._fileGenerationOptions = fileGenerationOptions; this.Title = string.Format("JavaScript File Generation Options - {0}", !string.IsNullOrEmpty(fileGenerationOptions.SolutionFilePath) ? fileGenerationOptions.SolutionFilePath : "Default"); options.BindFileGenerationOptions(this._fileGenerationOptions); }
public CreateFileJavaScriptConfiguration(FileGenerationOptions fileGenerationOptions) { this.TabSpacer = fileGenerationOptions.GetTabSpacer(); this.WithDependentComponents = fileGenerationOptions.GenerateSchemaEntityOptionSetsWithDependentComponents; this.GenerateSchemaIntoSchemaClass = fileGenerationOptions.GenerateJavaScriptIntoSchemaClass; this.GenerateGlobalOptionSets = fileGenerationOptions.GenerateJavaScriptGlobalOptionSet; this.NamespaceClassesJavaScript = fileGenerationOptions.NamespaceClassesJavaScript; this.AddFormTypeEnum = fileGenerationOptions.JavaScriptAddFormTypeEnum; this.AddRequiredLevelEnum = fileGenerationOptions.JavaScriptAddRequiredLevelEnum; this.AddSubmitModeEnum = fileGenerationOptions.JavaScriptAddSubmitModeEnum; this.AddConsoleFunctions = fileGenerationOptions.JavaScriptAddConsoleFunctions; }
public static CreateFileCSharpConfiguration CreateForSdkMessageRequest(FileGenerationOptions fileGenerationOptions) { var result = new CreateFileCSharpConfiguration { TabSpacer = fileGenerationOptions.GetTabSpacer(), NamespaceClasses = fileGenerationOptions.NamespaceSdkMessagesCSharp, NamespaceGlobalOptionSets = fileGenerationOptions.NamespaceGlobalOptionSetsCSharp, GenerateAttributesWithNameOf = fileGenerationOptions.GenerateSdkMessageRequestAttributesWithNameOf, GenerateWithDebuggerNonUserCode = fileGenerationOptions.GenerateSdkMessageRequestWithDebuggerNonUserCode, MakeAllPropertiesEditable = fileGenerationOptions.GenerateSdkMessageRequestMakeAllPropertiesEditable, }; return(result); }
public WindowFileGenerationOptions(FileGenerationOptions fileGenerationOptions) { InitializeComponent(); SetInputLanguageEnglish(); this._fileGenerationOptions = fileGenerationOptions; this.Title = string.Format("File Generation Options - {0}", !string.IsNullOrEmpty(fileGenerationOptions.SolutionFilePath) ? fileGenerationOptions.SolutionFilePath : "Default"); optionsCSharpOptions.BindFileGenerationOptions(_fileGenerationOptions); optionsJavaScriptOptions.BindFileGenerationOptions(_fileGenerationOptions); optionsGlobalOptionSetMetadataOptions.BindFileGenerationOptions(_fileGenerationOptions); optionsSdkMessageRequestsOptions.BindFileGenerationOptions(_fileGenerationOptions); }
public static CreateFileCSharpConfiguration CreateForProxyClass(FileGenerationOptions fileGenerationOptions) { var result = new CreateFileCSharpConfiguration { TabSpacer = fileGenerationOptions.GetTabSpacer(), NamespaceClasses = fileGenerationOptions.NamespaceClassesCSharp, NamespaceGlobalOptionSets = fileGenerationOptions.NamespaceGlobalOptionSetsCSharp, GenerateAttributes = fileGenerationOptions.GenerateProxyClassesAttributes, GenerateAttributesWithNameOf = fileGenerationOptions.GenerateProxyClassesAttributesWithNameOf, GenerateStateStatusOptionSet = fileGenerationOptions.GenerateProxyClassesStatusOptionSet, GenerateLocalOptionSet = fileGenerationOptions.GenerateProxyClassesLocalOptionSet, GenerateGlobalOptionSet = fileGenerationOptions.GenerateProxyClassesGlobalOptionSet, GenerateOneToMany = fileGenerationOptions.GenerateProxyClassesOneToMany, GenerateManyToOne = fileGenerationOptions.GenerateProxyClassesManyToOne, GenerateManyToMany = fileGenerationOptions.GenerateProxyClassesManyToMany, AllDescriptions = fileGenerationOptions.GenerateCommonAllDescriptions, WithDependentComponents = fileGenerationOptions.GenerateSchemaEntityOptionSetsWithDependentComponents, WithManagedInfo = fileGenerationOptions.SolutionComponentWithManagedInfo, GenerateWithDebuggerNonUserCode = fileGenerationOptions.GenerateProxyClassesWithDebuggerNonUserCode, UseSchemaConstInCSharpAttributes = fileGenerationOptions.GenerateProxyClassesUseSchemaConstInCSharpAttributes, WithoutObsoleteAttribute = fileGenerationOptions.GenerateProxyClassesWithoutObsoleteAttribute, MakeAllPropertiesEditable = fileGenerationOptions.GenerateProxyClassesMakeAllPropertiesEditable, AddConstructorWithAnonymousTypeObject = fileGenerationOptions.GenerateProxyClassesAddConstructorWithAnonymousTypeObject, OverrideToStringMethod = fileGenerationOptions.GenerateProxyClassesOverrideToStringMethod, GenerateAttributesEnumsStateStatus = fileGenerationOptions.GenerateProxyClassesAttributesEnumsStateStatus, GenerateAttributesEnumsLocal = fileGenerationOptions.GenerateProxyClassesAttributesEnumsLocal, GenerateAttributesEnumsGlobal = fileGenerationOptions.GenerateProxyClassesAttributesEnumsGlobal, GenerateAttributesEnumsStateStatusUseSchemaEnum = fileGenerationOptions.GenerateProxyClassesAttributesEnumsUseSchemaStateStatusEnum, GenerateAttributesEnumsLocalUseSchemaEnum = fileGenerationOptions.GenerateProxyClassesAttributesEnumsUseSchemaLocalEnum, GenerateAttributesEnumsGlobalUseSchemaEnum = fileGenerationOptions.GenerateProxyClassesAttributesEnumsUseSchemaGlobalEnum, AddDescriptionAttribute = fileGenerationOptions.GenerateProxyClassesAddDescriptionAttribute, }; return(result); }
public static CreateFileCSharpConfiguration CreateForSchemaEntity(FileGenerationOptions fileGenerationOptions) { var result = new CreateFileCSharpConfiguration { TabSpacer = fileGenerationOptions.GetTabSpacer(), NamespaceClasses = fileGenerationOptions.NamespaceClassesCSharp, NamespaceGlobalOptionSets = fileGenerationOptions.NamespaceGlobalOptionSetsCSharp, TypeConverterName = fileGenerationOptions.TypeConverterName, GenerateAttributes = fileGenerationOptions.GenerateSchemaAttributes, GenerateAttributesProperties = fileGenerationOptions.GenerateSchemaAttributesProperties, GenerateStateStatusOptionSet = fileGenerationOptions.GenerateSchemaStatusOptionSet, GenerateLocalOptionSet = fileGenerationOptions.GenerateSchemaLocalOptionSet, GenerateGlobalOptionSet = fileGenerationOptions.GenerateSchemaGlobalOptionSet, GenerateOneToMany = fileGenerationOptions.GenerateSchemaOneToMany, GenerateManyToOne = fileGenerationOptions.GenerateSchemaManyToOne, GenerateManyToMany = fileGenerationOptions.GenerateSchemaManyToMany, GenerateKeys = fileGenerationOptions.GenerateSchemaKeys, AllDescriptions = fileGenerationOptions.GenerateCommonAllDescriptions, WithDependentComponents = fileGenerationOptions.GenerateSchemaEntityOptionSetsWithDependentComponents, ConstantType = fileGenerationOptions.GenerateSchemaConstantType, OptionSetExportType = fileGenerationOptions.GenerateSchemaOptionSetExportType, GenerateSchemaIntoSchemaClass = fileGenerationOptions.GenerateSchemaIntoSchemaClass, WithManagedInfo = fileGenerationOptions.SolutionComponentWithManagedInfo, AddDescriptionAttribute = fileGenerationOptions.GenerateSchemaAddDescriptionAttribute, AddTypeConverterAttributeForEnums = fileGenerationOptions.GenerateSchemaAddTypeConverterAttributeForEnums, }; return(result); }
private void btnLoadConfiguration_Click(object sender, System.Windows.RoutedEventArgs e) { if (this._fileGenerationOptions == null) { return; } string selectedPath = string.Empty; var thread = new Thread(() => { try { var openFileDialog1 = new Microsoft.Win32.OpenFileDialog { Filter = "FileGenerationOptions (.xml)|*.xml", FilterIndex = 1, RestoreDirectory = true }; if (openFileDialog1.ShowDialog().GetValueOrDefault()) { selectedPath = openFileDialog1.FileName; } } catch (Exception ex) { DTEHelper.WriteExceptionToOutput(null, ex); } }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); thread.Join(); if (string.IsNullOrEmpty(selectedPath)) { return; } FileGenerationOptions fileOptionFromDisk = null; try { fileOptionFromDisk = FileGenerationOptions.LoadFromPath(selectedPath); } catch (Exception ex) { DTEHelper.WriteExceptionToOutput(null, ex); fileOptionFromDisk = null; } if (fileOptionFromDisk == null) { return; } this._fileGenerationOptions.LoadFromDisk(fileOptionFromDisk); FileGenerationConfiguration.SaveConfiguration(); }
public void BindFileGenerationOptions(FileGenerationOptions fileGenerationOptions) { this._fileGenerationOptions = fileGenerationOptions; System.Windows.FrameworkElement[] dataContextElements = { chBWithManagedInfo , chBAllDescriptions , chBWithDependentComponents , rBTab , rBSpaces , txtBSpaceCount , rBClasses , rBEnums , rBReadOnly , rBConst , chBProxyClassesAttributes , chBProxyClassesManyToOne , chBProxyClassesManyToMany , chBProxyClassesOneToMany , chBProxyClassesLocalOptionSet , chBProxyClassesGlobalOptionSet , chBProxyClassesStatusOptionSet , chBProxyClassesWithDebuggerNonUserCode , chBProxyClassesAttributesWithNameOf , chBProxyClassesUseSchemaConstInCSharpAttributes , chBProxyClassesWithoutObsoleteAttribute , chBProxyClassesMakeAllPropertiesEditable , chBProxyClassesAddConstructorWithAnonymousTypeObject , chBProxyClassesOverrideToStringMethod , chBProxyClassesAddDescriptionAttribute , cmBProxyClassesAttributesEnumsStateStatus , cmBProxyClassesAttributesEnumsLocal , cmBProxyClassesAttributesEnumsGlobal , chBProxyClassesAttributesEnumsUseSchemaStateStatusEnum , chBProxyClassesAttributesEnumsUseSchemaLocalEnum , cmBProxyClassesAttributesEnumsUseSchemaGlobalEnum , chBSchemaAddDescriptionAttribute , chBSchemaAddTypeConverterAttributeForEnums , chBSchemaAttributes , chBSchemaManyToOne , chBSchemaManyToMany , chBSchemaOneToMany , chBSchemaLocalOptionSet , chBSchemaGlobalOptionSet , chBSchemaStatusOptionSet , chBSchemaKeys , chBIntoSchemaClass , txtBNamespaceClassesCSharp , txtBNamespaceGlobalOptionSetsCSharp , txtBTypeConverterName }; foreach (var element in dataContextElements) { element.DataContext = fileGenerationOptions; } }