diff --git a/.gitignore b/.gitignore index 9889c68..2eb79ed 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,7 @@ Thumbs.db obj/ [Rr]elease*/ _ReSharper*/ -[Tt]est[Rr]esult* \ No newline at end of file +[Tt]est[Rr]esult* +packages +vs +.vs \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c155d44 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: csharp +solution: CodeBuilder.sln +before_install: + - mysql -e "create database IF NOT EXISTS easy_admin;" -uroot \ No newline at end of file diff --git a/CodeBuilder.Console/CodeBuilder.Console.csproj b/CodeBuilder.Console/CodeBuilder.Console.csproj index 133671e..2f25063 100644 --- a/CodeBuilder.Console/CodeBuilder.Console.csproj +++ b/CodeBuilder.Console/CodeBuilder.Console.csproj @@ -69,10 +69,14 @@ - + + Designer + - + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ConfigurationSection {0} load failure + + + Load configuration failure + + + Not Found {0} {1} Data Type Item + + + Not Found {0} To {1} Data Type Mapping + + + The powerdesigner physical data model(pdm) not specify DBMS. + + + Sorry!CodeBuilder not support this database. + + + Save configuration failure + + \ No newline at end of file diff --git a/CodeBuilder.Framework/Properties/Resource.zh-CN.resx b/CodeBuilder.Framework/Properties/Resource.zh-CN.resx new file mode 100644 index 0000000..7a0321d --- /dev/null +++ b/CodeBuilder.Framework/Properties/Resource.zh-CN.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 配置节 {0} 加载失败 + + + 加载应用程序配置文件失败 + + + 没有找到 {0} {1} 数据类型项 + + + 没有找到 {0} 到 {1} 的数据类型映射 + + + Powerdesigner物理数据模型未指定数据库管理系统(DBMS) + + + 对不起!该CodeBuilder版本不支持此数据库. + + + 保存应用程序配置文件失败 + + \ No newline at end of file diff --git a/CodeBuilder.Framework/TemplateEngine/Adapters/AderEngineAdapter.cs b/CodeBuilder.Framework/TemplateEngine/Adapters/AderEngineAdapter.cs deleted file mode 100644 index 09bc90f..0000000 --- a/CodeBuilder.Framework/TemplateEngine/Adapters/AderEngineAdapter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Text; -using System.IO; -using Ader.TemplateEngine; - -namespace CodeBuilder.TemplateEngine -{ - using Util; - - public class AderEngineAdapter : ITemplateEngine - { - private static Logger logger = InternalTrace.GetLogger(typeof(AderEngineAdapter)); - - public AderEngineAdapter() { } - - public bool Run(TemplateData templateData) - { - try - { - TemplateManager mngr = TemplateManager.FromFile(templateData.TemplateFileName); - mngr.SetValue("tdo", templateData); - - using (StreamWriter StreamWriter = new StreamWriter(templateData.CodeFileName, - false, Encoding.GetEncoding(templateData.Encoding))) - { - mngr.Process(StreamWriter); - } - return true; - } - catch (Exception ex) - { - logger.Error(String.Format("AderEngineAdapter:{0}", templateData.CodeFileName), ex); - return false; - } - } - } -} diff --git a/CodeBuilder.Framework/TemplateEngine/Adapters/NVelocityEngineAdapter.cs b/CodeBuilder.Framework/TemplateEngine/Adapters/NVelocityEngineAdapter.cs index 288a6c5..3142a89 100644 --- a/CodeBuilder.Framework/TemplateEngine/Adapters/NVelocityEngineAdapter.cs +++ b/CodeBuilder.Framework/TemplateEngine/Adapters/NVelocityEngineAdapter.cs @@ -1,108 +1,112 @@ -using System; -using System.Text; -using System.IO; -using System.Reflection; -using NVelocity; -using NVelocity.App; -using NVelocity.Runtime; -using NVelocity.Util.Introspection; - -namespace CodeBuilder.TemplateEngine -{ - using Util; - - public class NVelocityEngineAdapter : ITemplateEngine - { - private static Logger logger = InternalTrace.GetLogger(typeof(NVelocityEngineAdapter)); - private VelocityEngine velocityEngine; - - public NVelocityEngineAdapter() - { - velocityEngine = new VelocityEngine(); - } - - public bool Run(TemplateData templateData) - { - VelocityContext context = new VelocityContext(); - context.Put("tdo", templateData); - - try - { - string loaderPath = Path.GetDirectoryName(templateData.TemplateFileName); - string templateFile = Path.GetFileName(templateData.TemplateFileName); - velocityEngine.SetProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, loaderPath); - velocityEngine.Init(); - - Template template = velocityEngine.GetTemplate(templateFile); - using (StreamWriter StreamWriter = new StreamWriter(templateData.CodeFileName, - false, Encoding.GetEncoding(templateData.Encoding))) - { - template.Merge(context, StreamWriter); - } - return true; - } - catch (Exception ex) - { - logger.Error(String.Format("NVelocityAdapter:{0}", templateData.CodeFileName), ex); - return false; - } - } - } - - public class NVelocityDuck : IDuck - { - private readonly object _instance; - private readonly Type _instanceType; - private readonly Type[] _extensionTypes; - private Introspector _introspector; - - public NVelocityDuck(object instance) - { - if (instance == null) - throw new ArgumentNullException("instance"); - - _extensionTypes = new Type[] { typeof(StringExtension) }; - _instance = instance; - _instanceType = _instance.GetType(); - } - - public Introspector Introspector - { - get - { - if (_introspector == null) - _introspector = RuntimeSingleton.Introspector; - return _introspector; - } - set { _introspector = value; } - } - - public object GetInvoke(string propName) - { - return null; - } - - public void SetInvoke(string propName, object value) - { - } - - public object Invoke(string method, params object[] args) - { - if (string.IsNullOrEmpty(method)) return null; - - MethodInfo methodInfo = Introspector.GetMethod(_instanceType, method, args); - if (methodInfo != null) { return methodInfo.Invoke(_instance, args); } - - object[] extensionArgs = new object[args.Length + 1]; - extensionArgs[0] = _instance; - Array.Copy(args, 0, extensionArgs, 1, args.Length); - foreach (Type extensionType in _extensionTypes) - { - methodInfo = Introspector.GetMethod(extensionType, method, extensionArgs); - if (methodInfo != null) { return methodInfo.Invoke(null, extensionArgs); } - } - - return null; - } - } -} +using System; +using System.Text; +using System.IO; +using System.Reflection; +using NVelocity; +using NVelocity.App; +using NVelocity.Runtime; +using NVelocity.Util.Introspection; + +namespace CodeBuilder.TemplateEngine +{ + using Util; + + public class NVelocityEngineAdapter : ITemplateEngine + { + private static Logger logger = InternalTrace.GetLogger(typeof(NVelocityEngineAdapter)); + private VelocityEngine velocityEngine; + + public NVelocityEngineAdapter() + { + velocityEngine = new VelocityEngine(); + } + + public bool Run(TemplateData templateData) + { + VelocityContext context = new VelocityContext(); + context.Put("tdo", templateData); + + try + { + string loaderPath = Path.GetDirectoryName(templateData.TemplateFileName); + string templateFile = Path.GetFileName(templateData.TemplateFileName); + velocityEngine.SetProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, loaderPath); + velocityEngine.Init(); + + Encoding encoding = Encoding.GetEncoding(templateData.Encoding); + if (templateData.Encoding == "UTF-8") + { + encoding = new UTF8Encoding(false); + } + Template template = velocityEngine.GetTemplate(templateFile); + using (StreamWriter StreamWriter = new StreamWriter(templateData.CodeFileName, false, encoding)) + { + template.Merge(context, StreamWriter); + } + return true; + } + catch (Exception ex) + { + logger.Error(String.Format("NVelocityAdapter:{0}", templateData.CodeFileName), ex); + return false; + } + } + } + + public class NVelocityDuck : IDuck + { + private readonly object _instance; + private readonly Type _instanceType; + private readonly Type[] _extensionTypes; + private Introspector _introspector; + + public NVelocityDuck(object instance) + { + if (instance == null) + throw new ArgumentNullException("instance"); + + _extensionTypes = new Type[] { typeof(StringExtension) }; + _instance = instance; + _instanceType = _instance.GetType(); + } + + public Introspector Introspector + { + get + { + if (_introspector == null) + _introspector = RuntimeSingleton.Introspector; + return _introspector; + } + set { _introspector = value; } + } + + public object GetInvoke(string propName) + { + return null; + } + + public void SetInvoke(string propName, object value) + { + } + + public object Invoke(string method, params object[] args) + { + if (string.IsNullOrEmpty(method)) return null; + + MethodInfo methodInfo = Introspector.GetMethod(_instanceType, method, args); + if (methodInfo != null) { return methodInfo.Invoke(_instance, args); } + + object[] extensionArgs = new object[args.Length + 1]; + extensionArgs[0] = _instance; + Array.Copy(args, 0, extensionArgs, 1, args.Length); + foreach (Type extensionType in _extensionTypes) + { + methodInfo = Introspector.GetMethod(extensionType, method, extensionArgs); + if (methodInfo != null) { return methodInfo.Invoke(null, extensionArgs); } + } + + return null; + } + } +} diff --git a/CodeBuilder.Framework/TemplateEngine/Adapters/RazorEngineAdapter.cs b/CodeBuilder.Framework/TemplateEngine/Adapters/RazorEngineAdapter.cs deleted file mode 100644 index 3a42f26..0000000 --- a/CodeBuilder.Framework/TemplateEngine/Adapters/RazorEngineAdapter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; -using RazorEngine; -using RazorEngine.Templating; - -namespace CodeBuilder.TemplateEngine -{ - using Util; - - public class RazorEngineAdapter : ITemplateEngine - { - private static Logger logger = InternalTrace.GetLogger(typeof(RazorEngineAdapter)); - - public RazorEngineAdapter() { } - - public bool Run(TemplateData templateData) - { - try - { - using (StreamWriter streamWriter = new StreamWriter(templateData.CodeFileName, - false, Encoding.GetEncoding(templateData.Encoding))) - { - streamWriter.Write(Razor.Parse(File.ReadAllText(templateData.TemplateFileName), templateData)); - } - return true; - } - catch (Exception ex) - { - logger.Error(String.Format("RazorEngineAdapter:{0}", templateData.CodeFileName), ex); - return false; - } - } - } -} diff --git a/CodeBuilder.Framework/TemplateEngine/Adapters/ViciEngineAdapter.cs b/CodeBuilder.Framework/TemplateEngine/Adapters/ViciEngineAdapter.cs deleted file mode 100644 index a1b9b40..0000000 --- a/CodeBuilder.Framework/TemplateEngine/Adapters/ViciEngineAdapter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Text; -using System.IO; -using Vici.Core.Parser; -using Vici.Core.Parser.Config; - -namespace CodeBuilder.TemplateEngine -{ - using Util; - - public class ViciEngineAdapter : ITemplateEngine - { - private static Logger logger = InternalTrace.GetLogger(typeof(ViciEngineAdapter)); - - public ViciEngineAdapter() { } - - public bool Run(TemplateData templateData) - { - try - { - TemplateParser template = new TemplateParser(); - IParserContext data = new CSharpContext(); - data.Set("tdo", templateData); - - using (StreamWriter streamWriter = new StreamWriter(templateData.CodeFileName, - false, Encoding.GetEncoding(templateData.Encoding))) - { - streamWriter.Write(template.RenderFile(templateData.TemplateFileName, data)); - } - return true; - } - catch (Exception ex) - { - logger.Error(String.Format("ViciEngineAdapter:{0}", templateData.CodeFileName), ex); - return false; - } - } - } -} diff --git a/CodeBuilder.Framework/TemplateEngine/TemplateData.cs b/CodeBuilder.Framework/TemplateEngine/TemplateData.cs index 2ed991a..1167a42 100644 --- a/CodeBuilder.Framework/TemplateEngine/TemplateData.cs +++ b/CodeBuilder.Framework/TemplateEngine/TemplateData.cs @@ -11,6 +11,7 @@ namespace CodeBuilder.TemplateEngine public class TemplateData { + private string _date; private string _name; private string _language; private string _database; @@ -26,14 +27,18 @@ public class TemplateData private string _templateFileName; private string _codeFileName; private bool _isOmitTablePrefix; - private bool _isStandardizeName; + private bool _isCamelCaseName; private object _modelObject; - public TemplateData() { } + public TemplateData() + { + this._date = DateTime.Now.ToString("yyyy-MM-dd"); + } - public TemplateData(string name,string language, string database,string templateEngine, string package, - string tablePrefix, string author, string version, string templateName,string prefix,string suffix, - string encoding,string templateFileName,string codeFileName,bool isOmitTablePrefix, bool isStandardizeName,object modelObject) + public TemplateData(string name, string language, string database, string templateEngine, string package, + string tablePrefix, string author, string version, string templateName, string prefix, string suffix, + string encoding, string templateFileName, string codeFileName, bool isOmitTablePrefix, + bool isCamelCaseName, object modelObject) : base() { this._name = name; this._language = language; @@ -50,16 +55,31 @@ public TemplateData(string name,string language, string database,string template this._templateFileName = templateFileName; this._codeFileName = codeFileName; this._isOmitTablePrefix = isOmitTablePrefix; - this._isStandardizeName = isStandardizeName; + this._isCamelCaseName = isCamelCaseName; this._modelObject = modelObject; } + public string Date + { + get { return this._date; } + set { this._date = value; } + } + public string Name { get { return this._name; } set { this._name = value; } } + public string LowerCamelName + { + get + { + var name = this._name ?? string.Empty; + return name.LowerCamelCaseName(); + } + } + public string Language { get { return this._language; } @@ -110,7 +130,7 @@ public string TemplateName public string Prefix { - get { return this._prefix ?? string.Empty ; } + get { return this._prefix ?? string.Empty; } set { this._prefix = value; } } @@ -144,10 +164,10 @@ public bool IsOmitTablePrefix set { this._isOmitTablePrefix = value; } } - public bool IsStandardizeName + public bool IsCamelCaseName { - get { return this._isStandardizeName; } - set { this._isStandardizeName = value; } + get { return this._isCamelCaseName; } + set { this._isCamelCaseName = value; } } public object ModelObject diff --git a/CodeBuilder.Framework/TemplateEngine/TemplateDataBuilder.cs b/CodeBuilder.Framework/TemplateEngine/TemplateDataBuilder.cs index bd1b5bb..bcc1af1 100644 --- a/CodeBuilder.Framework/TemplateEngine/TemplateDataBuilder.cs +++ b/CodeBuilder.Framework/TemplateEngine/TemplateDataBuilder.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Text.RegularExpressions; namespace CodeBuilder.TemplateEngine { @@ -77,11 +78,11 @@ private static TemplateData CreateTemplateData(T modelObject, GenerationSetti templateData.TemplateEngine = settings.TemplateEngine; templateData.Encoding = settings.Encoding; templateData.IsOmitTablePrefix = settings.IsOmitTablePrefix; - templateData.IsStandardizeName = settings.IsStandardizeName; + templateData.IsCamelCaseName = settings.IsCamelCaseName; templateData.Prefix = ConfigManager.TemplateSection.Templates[templateName].Prefix; templateData.Suffix = ConfigManager.TemplateSection.Templates[templateName].Suffix; templateData.Name = GetTemplateDataName(settings.IsOmitTablePrefix, - settings.IsStandardizeName, settings.TablePrefix, modelObject.OriginalName); + settings.IsCamelCaseName, settings.TablePrefix, modelObject.OriginalName); templateData.TemplateFileName = Path.Combine(ConfigManager.TemplatePath, ConfigManager.TemplateSection.Templates[templateName].FileName); @@ -93,27 +94,26 @@ private static TemplateData CreateTemplateData(T modelObject, GenerationSetti ConfigManager.SettingsSection.Languages[settings.Language].Extension); modelObject.Name = templateData.Name; - templateData.ModelObject = GetStandardizedModelObject(modelObject, database, settings); + templateData.ModelObject = GetCamelCaseModelObject(modelObject, database, settings); return templateData; } - private static string GetTemplateDataName(bool isOmitPrefix, bool isStandardName, string tablePrefix, string name) + private static string GetTemplateDataName(bool isOmitPrefix, bool isCamelCaseName, string tablePrefix, string name) { - if (isOmitPrefix) name = name.TrimStart(tablePrefix.ToCharArray()); - if (isStandardName) name = name.StandardizeName(); - + if (isOmitPrefix && (tablePrefix ?? "").Length > 0) name = Regex.Replace(name, tablePrefix, ""); + if (isCamelCaseName) name = name.CamelCaseName(); return name; } - private static T GetStandardizedModelObject(T modelObject,string database,GenerationSettings settings) + private static T GetCamelCaseModelObject(T modelObject,string database,GenerationSettings settings) where T : BaseTable, IMetaData { - bool isStandardizeName = settings.IsStandardizeName; + bool isCamelCaseName = settings.IsCamelCaseName; bool isDynamicLanguage = ConfigManager.SettingsSection.Languages[settings.Language].IsDynamic; string languageAlias = ConfigManager.SettingsSection.Languages[settings.Language].Alias; - if (!isStandardizeName && isDynamicLanguage) return modelObject; + if (!isCamelCaseName && isDynamicLanguage) return modelObject; ITypeMapper typeMapper = null; if (!isDynamicLanguage) typeMapper = TypeMapperFactory.Creator(); @@ -121,13 +121,14 @@ private static T GetStandardizedModelObject(T modelObject,string database,Gen foreach (var column in modelObject.Columns.Values) { - if (isStandardizeName) column.Name = column.OriginalName.StandardizeName(); + if (isCamelCaseName) column.Name = column.OriginalName.CamelCaseName(); if (typeMapper != null) { LanguageType langType = typeMapper.GetLanguageType(typeMappingDatabase, languageAlias, column.DataType); if (langType == null) continue; column.LanguageType = langType.TypeName; column.LanguageDefaultValue = string.IsNullOrEmpty(column.DefaultValue) ? langType.DefaultValue : column.DefaultValue; + column.LanguageTypeAlias = langType.Alias; } } diff --git a/CodeBuilder.Framework/TypeMapping/DefaultTypeMapper.cs b/CodeBuilder.Framework/TypeMapping/DefaultTypeMapper.cs index a722929..fb0ae96 100644 --- a/CodeBuilder.Framework/TypeMapping/DefaultTypeMapper.cs +++ b/CodeBuilder.Framework/TypeMapping/DefaultTypeMapper.cs @@ -6,6 +6,7 @@ namespace CodeBuilder.TypeMapping { using Configuration; + using Framework.Properties; using Util; public class DefaultTypeMapper : ITypeMapper @@ -22,7 +23,7 @@ public LanguageType GetLanguageType(string database, string language, string dbD if (mappings[name] == null) { - logger.Warning(string.Format("Not Found {0} To {1} Data Type Mapping", database, language)); + logger.Warning(string.Format(Resource.NotFoundDataTypeMapping, database, language)); return null; //throw new ArgumentNullException(displayName, string.Format("Not Found {0} To {1} Data Type Mapping", database, language)); } @@ -31,7 +32,7 @@ public LanguageType GetLanguageType(string database, string language, string dbD if (mappings[name].Types[dbDataTypeName] == null) { dbType = mappings[name].Types["default"]; - logger.Warning(string.Format("Not Found {0} {1} Data Type Item", database, dbDataTypeName)); + logger.Warning(string.Format(Resource.NotFoundDataTypeItem, database, dbDataTypeName)); //throw new ArgumentNullException(displayName, string.Format("Not Found {0} {1} Data Type Item", database, dbDataTypeName)); } else @@ -39,7 +40,7 @@ public LanguageType GetLanguageType(string database, string language, string dbD dbType = mappings[name].Types[dbDataTypeName]; } - return new LanguageType(dbType.LanguageType, dbType.DefaultValue); + return new LanguageType(dbType.LanguageType, dbType.DefaultValue, dbType.Alias); } } } diff --git a/CodeBuilder.Framework/TypeMapping/ITypeMapper.cs b/CodeBuilder.Framework/TypeMapping/ITypeMapper.cs index 31da0be..d5613a9 100644 --- a/CodeBuilder.Framework/TypeMapping/ITypeMapper.cs +++ b/CodeBuilder.Framework/TypeMapping/ITypeMapper.cs @@ -9,13 +9,6 @@ namespace CodeBuilder.TypeMapping public interface ITypeMapper { - /// - /// - /// - /// - /// - /// - /// LanguageType GetLanguageType(string database, string language, string dbDataTypeName); } } diff --git a/CodeBuilder.Framework/TypeMapping/LanguageType.cs b/CodeBuilder.Framework/TypeMapping/LanguageType.cs index f64ef83..afa17fa 100644 --- a/CodeBuilder.Framework/TypeMapping/LanguageType.cs +++ b/CodeBuilder.Framework/TypeMapping/LanguageType.cs @@ -12,11 +12,13 @@ public class LanguageType { private string _typeName; private string _defaultValue; + private string _alias; - public LanguageType(string typeName, string defaultValue) + public LanguageType(string typeName, string defaultValue,string alias) { this._typeName = typeName; this._defaultValue = defaultValue; + this._alias = alias; } public string TypeName @@ -30,5 +32,11 @@ public string DefaultValue get { return this._defaultValue; } set { this._defaultValue = value; } } + + public string Alias + { + get { return this._alias; } + set { this._alias = value; } + } } } diff --git a/CodeBuilder.Framework/Util/StringExtension.cs b/CodeBuilder.Framework/Util/StringExtension.cs index 5d2dae0..7633a0a 100644 --- a/CodeBuilder.Framework/Util/StringExtension.cs +++ b/CodeBuilder.Framework/Util/StringExtension.cs @@ -6,13 +6,20 @@ namespace CodeBuilder.Util { public static class StringExtension { - public static string StandardizeName(this string str) + public static string CamelCaseName(this string str) { if (String.IsNullOrEmpty(str)) return str; string[] words = Regex.Split(str, "[_\\-\\. ]"); return string.Join("", words.Select(FirstCharToUpper)); } + public static string LowerCamelCaseName(this string str) + { + if (String.IsNullOrEmpty(str)) return str; + string[] words = Regex.Split(str, "[_\\-\\. ]"); + return string.Join("", words.Select(FirstCharToLower)); + } + public static string FirstCharToLower(this string str) { if (String.IsNullOrEmpty(str) || str.Length == 0) diff --git a/CodeBuilder.Framework/app.config b/CodeBuilder.Framework/app.config new file mode 100644 index 0000000..74c0d88 --- /dev/null +++ b/CodeBuilder.Framework/app.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/CodeBuilder.Framework/packages.config b/CodeBuilder.Framework/packages.config new file mode 100644 index 0000000..7ecb002 --- /dev/null +++ b/CodeBuilder.Framework/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/CodeBuilder.WinForm/CodeBuilder.WinForm.csproj b/CodeBuilder.WinForm/CodeBuilder.WinForm.csproj index 88be9b5..f5e9538 100644 --- a/CodeBuilder.WinForm/CodeBuilder.WinForm.csproj +++ b/CodeBuilder.WinForm/CodeBuilder.WinForm.csproj @@ -1,279 +1,328 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {B699B723-2FA2-4318-8C3B-653034E6EABF} - WinExe - Properties - CodeBuilder.WinForm - CodeBuilder - v4.0 - - - 512 - false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - C:\Users\TomDeng\AppData\Roaming\ICSharpCode/SharpDevelop4\Settings.SourceAnalysis - False - 4 - false - - - true - bin\Debug\ - DEBUG;TRACE - Full - x86 - prompt - true - true - true - true - - - bin\Release\ - TRACE - true - pdbonly - AnyCPU - prompt - true - true - - - Resources\Images\App.ico - - - CodeBuilder.WinForm.Program - - - - - - - - - - - - - - - - - Component - - - CodeGeneration.cs - - - - - - Form - - - AboutBox.cs - - - Form - - - MainForm.cs - - - - - UserControl - - - DataSourceOptionsPage.cs - - - UserControl - - - CodeGeneralOptionsPage.cs - - - UserControl - - - RecentFilesOptionsPage.cs - - - UserControl - - - TemplateOptionsPage.cs - - - - - - - UserControl - - - BaseOptionsPage.cs - - - UserControl - - - TraceOptionsPage.cs - - - Form - - - BaseOptionsDialog.cs - - - Form - - - TreeOptionsDialog.cs - - - - - AboutBox.cs - - - MainForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - DataSourceOptionsPage.cs - - - CodeGeneralOptionsPage.cs - - - RecentFilesOptionsPage.cs - - - TemplateOptionsPage.cs - - - TraceOptionsPage.cs - - - BaseOptionsDialog.cs - - - BaseOptionsPage.cs - - - TreeOptionsDialog.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - - - - - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - - - - {1FDA5B2E-BD7D-4BB1-9579-C25130156A43} - CodeBuilder.Framework - True - - - - - - - - - False - - - False - Auto - 4194304 - + + + + Debug + x86 + 8.0.30703 + 2.0 + {B699B723-2FA2-4318-8C3B-653034E6EABF} + WinExe + Properties + CodeBuilder.WinForm + CodeBuilder + v4.0 + + + 512 + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + False + 4 + false + + + true + bin\Debug\ + DEBUG;TRACE + Full + x86 + prompt + true + true + true + true + + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + prompt + true + true + + + Resources\Images\App.ico + + + CodeBuilder.WinForm.Program + + + + + + + + + + + + + + + + + Component + + + CodeGeneration.cs + + + + + + Form + + + AboutBox.cs + + + Form + + + MainForm.cs + + + + + UserControl + + + DataSourceOptionsPage.cs + + + UserControl + + + CodeGeneralOptionsPage.cs + + + UserControl + + + RecentFilesOptionsPage.cs + + + UserControl + + + TemplateOptionsPage.cs + + + + + + + UserControl + + + BaseOptionsPage.cs + + + UserControl + + + TraceOptionsPage.cs + + + Form + + + BaseOptionsDialog.cs + + + Form + + + TreeOptionsDialog.cs + + + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.zh-CN.Designer.cs + Designer + + + AboutBox.cs + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + AboutBox.cs + + + BaseOptionsDialog.cs + + + BaseOptionsPage.cs + + + CodeGeneralOptionsPage.cs + + + DataSourceOptionsPage.cs + + + CodeGeneralOptionsPage.cs + + + DataSourceOptionsPage.cs + + + RecentFilesOptionsPage.cs + + + RecentFilesOptionsPage.cs + + + TemplateOptionsPage.cs + + + TemplateOptionsPage.cs + + + TraceOptionsPage.cs + + + BaseOptionsDialog.cs + + + BaseOptionsPage.cs + + + TraceOptionsPage.cs + + + TreeOptionsDialog.cs + + + TreeOptionsDialog.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + Designer + + + Designer + + + + + + + + + + + + + + + Designer + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + {1FDA5B2E-BD7D-4BB1-9579-C25130156A43} + CodeBuilder.Framework + True + + + + + + + + + + False + + + False + Auto + 4194304 + - - - - - - + --> + + + + + + \ No newline at end of file diff --git a/CodeBuilder.WinForm/Config/DataSources.xml b/CodeBuilder.WinForm/Config/DataSources.xml index e76906f..d100ab5 100644 --- a/CodeBuilder.WinForm/Config/DataSources.xml +++ b/CodeBuilder.WinForm/Config/DataSources.xml @@ -1,9 +1,10 @@ - + - - - - + + + diff --git a/CodeBuilder.WinForm/Config/Settings.xml b/CodeBuilder.WinForm/Config/Settings.xml index 751725e..5753838 100644 --- a/CodeBuilder.WinForm/Config/Settings.xml +++ b/CodeBuilder.WinForm/Config/Settings.xml @@ -5,6 +5,8 @@ + + @@ -36,14 +38,11 @@ - - - - - - + + + \ No newline at end of file diff --git a/CodeBuilder.WinForm/Config/Templates.xml b/CodeBuilder.WinForm/Config/Templates.xml index cc7e6f0..25c53bd 100644 --- a/CodeBuilder.WinForm/Config/Templates.xml +++ b/CodeBuilder.WinForm/Config/Templates.xml @@ -1,16 +1,30 @@ - + - -