Skip to content

Commit 95c05c6

Browse files
committed
Archive
1 parent 4a86600 commit 95c05c6

File tree

482 files changed

+58374
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

482 files changed

+58374
-0
lines changed

CodeGenerator/Class.cs

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Collections;
4+
using System.Text;
5+
6+
namespace CodeGenerator
7+
{
8+
public class Class
9+
{
10+
private string _Name;
11+
public string Name
12+
{
13+
get { return _Name; }
14+
set { _Name = value; }
15+
}
16+
17+
private string _Prefix=string.Empty;
18+
19+
public string Prefix
20+
{
21+
get { return _Prefix; }
22+
set { _Prefix = value; }
23+
}
24+
25+
private string _NameSpace=string.Empty;
26+
27+
public string NameSpace
28+
{
29+
get { return _NameSpace; }
30+
set { _NameSpace = value; }
31+
}
32+
33+
private string _Inherits;
34+
35+
public string Inherits
36+
{
37+
get { return _Inherits; }
38+
set { _Inherits = value; }
39+
}
40+
41+
private List<string> _Implements=new List<string>();
42+
43+
public List<string> Implements
44+
{
45+
get { return _Implements; }
46+
set { _Implements = value; }
47+
}
48+
49+
private List<string> _Usings=new List<string>();
50+
51+
public List<string> UsingLibrary
52+
{
53+
get { return _Usings; }
54+
set { _Usings= value; }
55+
}
56+
57+
private List<string> _Attributes = new List<string>();
58+
59+
public List<string> Attributes
60+
{
61+
get { return _Attributes; }
62+
set { _Attributes = value; }
63+
}
64+
private Properties _Properties = new Properties();
65+
66+
public Properties Properties
67+
{
68+
get { return _Properties; }
69+
set { _Properties = value; }
70+
}
71+
72+
private Methods _Methods=new Methods() ;
73+
74+
public Methods Methods
75+
{
76+
get { return _Methods ; }
77+
set { _Methods = value; }
78+
}
79+
80+
private List<string> _PrivateVariables = new List<string>();
81+
82+
public List<string> DeclareVariable
83+
{
84+
get { return _PrivateVariables; }
85+
set { _PrivateVariables = value; }
86+
}
87+
88+
public override string ToString()
89+
{
90+
//Construct the class by assymbling all parts togather.
91+
StringBuilder Body = new StringBuilder();
92+
foreach (string str in this.UsingLibrary)
93+
{
94+
Body.Append(str);
95+
}
96+
Body.Append("\r\r");
97+
if (NameSpace.Length > 0)
98+
{
99+
Body.AppendFormat("namespace {0} \r\t", NameSpace);
100+
Body.Append("{\r");
101+
}
102+
103+
foreach (string atr in Attributes)
104+
{
105+
Body.Append(atr);
106+
}
107+
108+
Body.AppendFormat(" class {0}{1}:{2}DataBaseObject,IDisposable\r", Prefix, Name, NameSpace.Length > 0 ? NameSpace + @"." : "");
109+
Body.Append("\t{\r");
110+
111+
Body.Append("\t\t#region Private Variables\r");
112+
foreach (string pval in DeclareVariable)
113+
{
114+
Body.Append(pval);
115+
}
116+
Body.Append("\t\t#endregion\r\r");
117+
118+
Body.Append("\t\t#region Public properties\r");
119+
foreach (Property prop in this.Properties)
120+
{
121+
Body.Append(prop.ToString());
122+
}
123+
Body.Append("\t\t#endregion\r\r");
124+
125+
Body.Append("\t\t#region methods\r");
126+
foreach (Method oMethod in this.Methods)
127+
{
128+
Body.Append(oMethod.ToString());
129+
}
130+
Body.Append("\t\t#endregion\r\r");
131+
132+
Body.Append("\t}\r");
133+
134+
if (NameSpace.Length > 0)
135+
{
136+
137+
Body.Append("}\r");
138+
}
139+
140+
return Body.ToString();
141+
}
142+
143+
}
144+
}

CodeGenerator/ClassDiagram1.cd

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ClassDiagram MajorVersion="1" MinorVersion="1">
3+
<Class Name="CodeGenerator.Classes">
4+
<Position X="8.75" Y="3.75" Width="1.5" />
5+
<TypeIdentifier>
6+
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA=</HashCode>
7+
<FileName>Classes.cs</FileName>
8+
</TypeIdentifier>
9+
</Class>
10+
<Class Name="CodeGenerator.Class">
11+
<Position X="5.25" Y="1" Width="1.5" />
12+
<TypeIdentifier>
13+
<HashCode>AAAAAGAAAAACABAEAAAAIARSAAAAMIIKAAAAAAAGCEg=</HashCode>
14+
<FileName>Class.cs</FileName>
15+
</TypeIdentifier>
16+
</Class>
17+
<Class Name="CodeGenerator.ITemplate">
18+
<Position X="10.5" Y="1" Width="2.75" />
19+
<NestedTypes>
20+
<Delegate Name="CodeGenerator.ITemplate.OnProcessingDatabaseObject" Collapsed="true">
21+
<TypeIdentifier>
22+
<NewMemberFileName>ITemplate.cs</NewMemberFileName>
23+
</TypeIdentifier>
24+
</Delegate>
25+
<Delegate Name="CodeGenerator.ITemplate.OnCompleteProcessing" Collapsed="true">
26+
<TypeIdentifier>
27+
<NewMemberFileName>ITemplate.cs</NewMemberFileName>
28+
</TypeIdentifier>
29+
</Delegate>
30+
</NestedTypes>
31+
<TypeIdentifier>
32+
<HashCode>gAAAAAAgAAAAAAAEAgAAAQAAAAAAAAAAQAAAAAAAAgA=</HashCode>
33+
<FileName>ITemplate.cs</FileName>
34+
</TypeIdentifier>
35+
</Class>
36+
<Class Name="CodeGenerator.Methods">
37+
<Position X="7" Y="2.5" Width="1.5" />
38+
<TypeIdentifier>
39+
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA=</HashCode>
40+
<FileName>Method.cs</FileName>
41+
</TypeIdentifier>
42+
</Class>
43+
<Class Name="CodeGenerator.Method">
44+
<Position X="8.75" Y="1" Width="1.5" />
45+
<TypeIdentifier>
46+
<HashCode>AAAAAAAAAAAAABAEAAABIAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
47+
<FileName>Method.cs</FileName>
48+
</TypeIdentifier>
49+
</Class>
50+
<Class Name="CodeGenerator.Properties">
51+
<Position X="7" Y="1" Width="1.5" />
52+
<TypeIdentifier>
53+
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA=</HashCode>
54+
<FileName>Method.cs</FileName>
55+
</TypeIdentifier>
56+
</Class>
57+
<Class Name="CodeGenerator.Property">
58+
<Position X="7" Y="4" Width="1.5" />
59+
<TypeIdentifier>
60+
<HashCode>AAAAAAAAAAAAABAEAAABIAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
61+
<FileName>Method.cs</FileName>
62+
</TypeIdentifier>
63+
</Class>
64+
<Font Name="Segoe UI" Size="9" />
65+
</ClassDiagram>

CodeGenerator/Classes.cs

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CodeGenerator
6+
{
7+
public class Classes: List<Class>
8+
{
9+
public Class Item(string ClassName)
10+
{
11+
foreach (Class oClass in this)
12+
{
13+
if (oClass.Name == ClassName)
14+
return oClass;
15+
}
16+
return null;
17+
}
18+
}
19+
}

CodeGenerator/CodeGenerator.csproj

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>9.0.30729</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{6D59D6A8-B8DD-4D9B-9AEF-0897D9165DFC}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>CodeGenerator</RootNamespace>
12+
<AssemblyName>CodeGenerator</AssemblyName>
13+
<SccProjectName>SAK</SccProjectName>
14+
<SccLocalPath>SAK</SccLocalPath>
15+
<SccAuxPath>SAK</SccAuxPath>
16+
<SccProvider>SAK</SccProvider>
17+
<FileUpgradeFlags>
18+
</FileUpgradeFlags>
19+
<OldToolsVersion>3.5</OldToolsVersion>
20+
<UpgradeBackupLocation>
21+
</UpgradeBackupLocation>
22+
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
23+
<IsWebBootstrapper>false</IsWebBootstrapper>
24+
<PublishUrl>publish\</PublishUrl>
25+
<Install>true</Install>
26+
<InstallFrom>Disk</InstallFrom>
27+
<UpdateEnabled>false</UpdateEnabled>
28+
<UpdateMode>Foreground</UpdateMode>
29+
<UpdateInterval>7</UpdateInterval>
30+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
31+
<UpdatePeriodically>false</UpdatePeriodically>
32+
<UpdateRequired>false</UpdateRequired>
33+
<MapFileExtensions>true</MapFileExtensions>
34+
<ApplicationRevision>0</ApplicationRevision>
35+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
36+
<UseApplicationTrust>false</UseApplicationTrust>
37+
<BootstrapperEnabled>true</BootstrapperEnabled>
38+
</PropertyGroup>
39+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
40+
<DebugSymbols>true</DebugSymbols>
41+
<DebugType>full</DebugType>
42+
<Optimize>false</Optimize>
43+
<OutputPath>bin\Debug\</OutputPath>
44+
<DefineConstants>DEBUG;TRACE</DefineConstants>
45+
<ErrorReport>prompt</ErrorReport>
46+
<WarningLevel>4</WarningLevel>
47+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
48+
</PropertyGroup>
49+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
50+
<DebugType>pdbonly</DebugType>
51+
<Optimize>true</Optimize>
52+
<OutputPath>bin\Release\</OutputPath>
53+
<DefineConstants>TRACE</DefineConstants>
54+
<ErrorReport>prompt</ErrorReport>
55+
<WarningLevel>4</WarningLevel>
56+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
57+
</PropertyGroup>
58+
<ItemGroup>
59+
<Reference Include="System" />
60+
<Reference Include="System.Data" />
61+
<Reference Include="System.Xml" />
62+
</ItemGroup>
63+
<ItemGroup>
64+
<Compile Include="Class.cs" />
65+
<Compile Include="Classes.cs" />
66+
<Compile Include="ITemplate.cs" />
67+
<Compile Include="Method.cs" />
68+
<Compile Include="Properties\AssemblyInfo.cs" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<ProjectReference Include="..\DataBaseManagerInterface\SchemaObjects.csproj">
72+
<Project>{3CE96A1E-0D22-448D-9345-098C6E13E050}</Project>
73+
<Name>SchemaObjects</Name>
74+
</ProjectReference>
75+
</ItemGroup>
76+
<ItemGroup>
77+
<None Include="ClassDiagram1.cd" />
78+
</ItemGroup>
79+
<ItemGroup>
80+
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
81+
<Visible>False</Visible>
82+
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
83+
<Install>false</Install>
84+
</BootstrapperPackage>
85+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
86+
<Visible>False</Visible>
87+
<ProductName>.NET Framework 3.5 SP1</ProductName>
88+
<Install>true</Install>
89+
</BootstrapperPackage>
90+
<BootstrapperPackage Include="Microsoft.VisualBasic.PowerPacks.10.0">
91+
<Visible>False</Visible>
92+
<ProductName>Microsoft Visual Basic PowerPacks 10.0</ProductName>
93+
<Install>true</Install>
94+
</BootstrapperPackage>
95+
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
96+
<Visible>False</Visible>
97+
<ProductName>Windows Installer 3.1</ProductName>
98+
<Install>true</Install>
99+
</BootstrapperPackage>
100+
</ItemGroup>
101+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
102+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
103+
Other similar extension points exist, see Microsoft.Common.targets.
104+
<Target Name="BeforeBuild">
105+
</Target>
106+
<Target Name="AfterBuild">
107+
</Target>
108+
-->
109+
</Project>
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file contains Alternate Data Streams, storing configuration information used by CodeSMART 10 and VS10X Extensions.
2+
3+
PLEASE DO NOT DELETE.
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
""
2+
{
3+
"FILE_VERSION" = "9237"
4+
"ENLISTMENT_CHOICE" = "NEVER"
5+
"PROJECT_FILE_RELATIVE_PATH" = ""
6+
"NUMBER_OF_EXCLUDED_FILES" = "0"
7+
"ORIGINAL_PROJECT_FILE_PATH" = ""
8+
"NUMBER_OF_NESTED_PROJECTS" = "0"
9+
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10+
}

CodeGenerator/CodeGenerator.vsdoc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<!-- VSdocman config file for current project/solution.-->
4+
<activeProfile>default</activeProfile>
5+
<appSettings>
6+
</appSettings>
7+
</configuration>

CodeGenerator/ITemplate.cs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using SchemaObjects;
5+
6+
namespace CodeGenerator
7+
{
8+
public abstract class ITemplate
9+
{
10+
public delegate void OnProcessingDatabaseObject(string DbObjectName);
11+
public delegate void OnCompleteProcessing();
12+
13+
public event OnProcessingDatabaseObject ProcessingDatabaseObject;
14+
public event OnCompleteProcessing ProcessingCompleted;
15+
16+
public string TemplateName = string.Empty;
17+
public string OutputDir=string.Empty;
18+
19+
public abstract void Process(IDataBaseObject DbObject,string NameSpace,string Prefix,bool bSerialize);
20+
public abstract void SaveToFile();
21+
protected abstract bool SupportedDatabaseObject(IDataBaseObject DbObject);
22+
public abstract override string ToString();
23+
24+
}
25+
}

0 commit comments

Comments
 (0)