This commit is contained in:
2014-11-17 00:24:51 +01:00
commit 05390b4bdd
26 changed files with 14585 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

68
CobXmlSupport/App.config Normal file
View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="XMLPlayAround.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<userSettings>
<XMLPlayAround.Properties.Settings>
<setting name="LastFile" serializeAs="Xml">
<value>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>@"C:\testdata\Reengineering\FD_GetVehicleHistory.xml"</string>
</ArrayOfString>
</value>
</setting>
<setting name="UserName" serializeAs="String">
<value>Tommy Öman</value>
</setting>
<setting name="CompanyName" serializeAs="String">
<value>Fordonsdata Nordic AB</value>
</setting>
<setting name="NoNsRef" serializeAs="String">
<value>False</value>
</setting>
<setting name="UniqueVars" serializeAs="String">
<value>False</value>
</setting>
<setting name="UniqueAttrVars" serializeAs="String">
<value>False</value>
</setting>
<setting name="Unique" serializeAs="String">
<value>False</value>
</setting>
<setting name="Wrap" serializeAs="String">
<value>False</value>
</setting>
<setting name="Values" serializeAs="String">
<value>False</value>
</setting>
<setting name="AnaTag" serializeAs="String">
<value>False</value>
</setting>
<setting name="Prefix" serializeAs="String">
<value>GWM_</value>
</setting>
<setting name="MaxOcc" serializeAs="String">
<value>25</value>
</setting>
<setting name="CountVars" serializeAs="String">
<value>False</value>
</setting>
<setting name="LogVarName" serializeAs="String">
<value>Logg-post</value>
</setting>
<setting name="LogSectName" serializeAs="String">
<value>UpdateLogFile</value>
</setting>
<setting name="ExpPrefix" serializeAs="String">
<value>GWX_</value>
</setting>
</XMLPlayAround.Properties.Settings>
</userSettings>
</configuration>

425
CobXmlSupport/CobRow.cs Normal file
View File

@ -0,0 +1,425 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace CobXmlSupport
{
public class CobRow
{
private List<RowWord> __wordList;
private string __rowSource;
private int __startPos;
public CobRow(string rowSource)
{
//Debug.WriteLine(rowSource);
__rowSource = rowSource;
analyseRowSource(__rowSource);
checkLongNames();
this.LevelChild = null;
this.LevelParent = null;
}
public CobRow(string rowSource,bool chkLongNames)
{
//Debug.WriteLine(rowSource);
__rowSource = rowSource;
analyseRowSource(__rowSource);
if (chkLongNames)
{
checkLongNames();
}
this.LevelChild = null;
this.LevelParent = null;
}
public CobRow LevelParent { get; set; }
public CobRow LevelChild { get; set; }
public int CobLevel { get; set; }
public bool isAttribute { get; set; }
public string LocalKey { get; set; }
public string SampleStr { get; set; }
public string FieldName
{
get
{
return __wordList[1].ToString();
}
set
{
__wordList[1] = new RowWord(value, __wordList[1].startPos, __wordList[1].isQuoted);
checkLongNames();
}
}
public string Value
{
get
{
return findCodeValue("value");
}
}
public string TagName
{
get
{
return findCodeValue("identified");
}
}
public string CountIn
{
get
{
return findCodeValue("count");
}
}
public string FieldDef
{
get
{
return findCodeValue("pic");
}
}
public string Hirarchy
{
get
{
return localHirarchy();
}
}
public bool isOccurs
{
get
{
return findCodeValue("occurs").Equals("true");
}
}
public static string checkLongNames(string inStr, int maxLngth=30)
{
string tmp = inStr;
if (inStr.Length > maxLngth)
{
int shortenLength = 8;
string tstStr = "";
tstStr = analyseAndShortenCamelFormedName(tmp, shortenLength);
while (shortenLength > 0 && !(tstStr.Length < maxLngth))
{
//Debug.WriteLine(tmp + "<-->"+tstStr);
shortenLength--;
tstStr = analyseAndShortenCamelFormedName(tmp, shortenLength);
}
//Debug.WriteLine(tmp + "<-->" + tstStr);
tmp = tstStr;
}
return tmp;
}
private void checkLongNames()
{
__wordList[1] = new RowWord(checkLongNames(__wordList[1].ToString()), __wordList[1].startPos, __wordList[1].isQuoted);
}
private static string analyseAndShortenCamelFormedName(string inPut, int maxLow)
{
string markStr = "";
int lowCount = 0;
foreach (char c in inPut)
{
if (Char.IsUpper(c))
{
markStr += c;
lowCount = 0;
}
else
{
if (lowCount < maxLow)
{
markStr += c;
if(!c.Equals('_')) lowCount++;
}
}
}
return markStr;
}
/// <summary>
/// Find a value for certain code word in the wordtable of the cobol row
/// </summary>
/// <param name="searchVal">desired value</param>
/// <returns>value as string</returns>
private string findCodeValue(string searchVal)
{
RowWord[] rws = __wordList.ToArray();
string tmp = "";
for (int i = 0; i < __wordList.Count; i++)
{
switch (searchVal.ToLower()){
case "value":{
if (__wordList[i].ToString().ToLower() == searchVal.ToLower())
{
tmp = __wordList[i + 1].ToString();
i=__wordList.Count;
}
break;
}
case "identified":
{
if (__wordList[i].ToString().ToLower() == searchVal.ToLower())
{
tmp = __wordList[i + 1].ToString();
if (tmp.ToLower() == "by")
{
tmp = __wordList[i + 2].ToString();
}
i = __wordList.Count;
}
break;
}
case "count":
{
if (__wordList[i].ToString().ToLower() == searchVal.ToLower())
{
tmp = __wordList[i + 1].ToString();
if (tmp.ToLower() == "in")
{
tmp = __wordList[i + 2].ToString();
}
if (tmp.Contains('.'))
{
tmp = tmp.Substring(0, tmp.IndexOf('.'));
}
i = __wordList.Count;
}
break;
}
case "pic":
{
if (__wordList[i].ToString().ToLower() == searchVal.ToLower())
{
tmp = __wordList[i].ToString() +" "+__wordList[i + 1].ToString();
i = __wordList.Count;
}
break;
}
case "occurs":
{
tmp = "false";
if (__wordList[i].ToString().ToLower() == searchVal.ToLower())
{
tmp = "true";
i = __wordList.Count;
}
break;
}
default: {
break;
}
}
}
return tmp;
}
public string wrapped(int maxPos=72)
{
RowWord[] rowWords = __wordList.ToArray();
string tmpString = "",extrString="";
int actPos=0;
tmpString += "".PadLeft(__startPos);
actPos=__startPos;
for (int i = 0; i < rowWords.Length; i++)
{
rowWords[i].startPos=actPos;
if (rowWords[i].endPos < maxPos)
{
tmpString += rowWords[i].ToString() + " ";
actPos = rowWords[i].endPos + 2;
}
else
{
if (rowWords[i].isQuoted)
{
// a quoted string fills the row to maxPos and the remaining on next row with "-" in pos 7
if (actPos >= maxPos)
{
tmpString += "\r\n" + "".PadLeft(__startPos);
actPos = __startPos+1;
i--;
}
else
{
extrString = rowWords[i].ToString();
tmpString += extrString.Substring(0, maxPos - rowWords[i].startPos); // +"\"";
tmpString += "\r\n" + " -" + "".PadLeft(__startPos - 7) + "\"";
actPos = __startPos+2;
RowWord tmpRW = new RowWord(extrString.Substring(maxPos - rowWords[i].startPos), actPos, true);
if (tmpRW.endPos >= maxPos)
{
extrString = tmpRW.ToString();
tmpString += extrString.Substring(0, maxPos - tmpRW.startPos); // +"\"";
tmpString += "\r\n" + " -" + "".PadLeft(__startPos - 7) + "\"";
actPos = __startPos+2;
tmpRW = new RowWord(extrString.Substring(maxPos - tmpRW.startPos), actPos, true);
}
tmpString += tmpRW.ToString()+" ";
actPos = tmpRW.endPos + 2;
}
}
else
{
if (rowWords[i].isComment)
{
rowWords[i].startPos = actPos;
tmpString += rowWords[i].ToString();
}
else
{
tmpString += "\r\n" + "".PadLeft(__startPos);
actPos = __startPos + 1;
rowWords[i].startPos = actPos;
tmpString += rowWords[i].ToString() + " ";
actPos = rowWords[i].endPos + 2;
}
}
}
}
return tmpString;
}
private void analyseRowSource(string row_Source)
{
string sChar, tmpStr="";
int wrdStart=0;
bool filling=false, comment=false;
__wordList = new List<RowWord>();
for(int i=0;i<row_Source.Length;i++){
sChar = row_Source.Substring(i, 1);
switch (sChar)
{
case " ":
{
if (filling||comment)
{
tmpStr += sChar;
}
else
{
if (tmpStr.Length > 0)
{
__wordList.Add(new RowWord(tmpStr, wrdStart, false));
tmpStr = "";
wrdStart = 0;
}
}
break;
}
case "\"":
{
if (comment)
{
tmpStr += sChar;
}
else
{
filling = !filling;
if (filling)
{
wrdStart = i;
tmpStr += sChar;
}
else
{
tmpStr += sChar;
__wordList.Add(new RowWord(tmpStr, wrdStart, true));
tmpStr = "";
wrdStart = 0;
}
}
break;
}
case "*":
{
if (i == 6 || (i < row_Source.Length - 1 && row_Source.Substring(i + 1, 1) == ">"))
{
comment = true;
wrdStart = i;
}
tmpStr += sChar;
break;
}
default:
{
if (filling||comment)
{}
else
{
if (tmpStr.Length == 0)
{
wrdStart = i;
}
}
tmpStr += sChar;
break;
}
}
}
if (tmpStr.Length > 0)
{
__wordList.Add(new RowWord(tmpStr, wrdStart, false));
tmpStr = "";
wrdStart = 0;
}
if (__wordList.Count > 0)
{
RowWord e = __wordList.First();
__startPos = e.startPos;
}
else __startPos = 0;
}
private string localHirarchy()
{
string tmp="";
List<string> tagNames = new List<string>();
CobRow tmpRow = this;
while (tmpRow.LevelParent != null)
{
tagNames.Add(tmpRow.TagName);
tmpRow = tmpRow.LevelParent;
}
tagNames.Add(tmpRow.TagName);
tagNames.Reverse();
foreach (string ts in tagNames)
{
tmp += ts.Replace("\"", "") + "/";
}
return tmp;
}
public override string ToString()
{
// Just for debug reasons
string outString = base.ToString() + Environment.NewLine;
//return base.ToString();
foreach (RowWord xx in __wordList)
{
outString += " " + xx.ToString();
}
outString += Environment.NewLine;
outString += " " + __rowSource + Environment.NewLine + Environment.NewLine;
return outString;
}
}
}

View File

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{847B8069-1ED4-41A8-B17D-EA6F596895D5}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CobXmlSupport</RootNamespace>
<AssemblyName>CobXmlSupport</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CobRow.cs" />
<Compile Include="frmSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSettings.Designer.cs">
<DependentUpon>frmSettings.cs</DependentUpon>
</Compile>
<Compile Include="GenCobCode.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="GenCobCode.designer.cs">
<DependentUpon>GenCobCode.cs</DependentUpon>
</Compile>
<Compile Include="IndexState.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="qualifieldhlp.cs" />
<Compile Include="RowWord.cs" />
<Compile Include="S.cs" />
<Compile Include="ShowCode.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ShowCode.Designer.cs">
<DependentUpon>ShowCode.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="frmSettings.resx">
<DependentUpon>frmSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GenCobCode.resx">
<DependentUpon>GenCobCode.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="ShowCode.resx">
<DependentUpon>ShowCode.cs</DependentUpon>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

517
CobXmlSupport/GenCobCode.Designer.cs generated Normal file
View File

@ -0,0 +1,517 @@
namespace CobXmlSupport
{
partial class GenCobCode
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GenCobCode));
this.button1 = new System.Windows.Forms.Button();
this.outText = new System.Windows.Forms.TextBox();
this.outCob = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnClose = new System.Windows.Forms.Button();
this.chkAnaTag = new System.Windows.Forms.CheckBox();
this.chkValues = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPrefix = new System.Windows.Forms.TextBox();
this.chkWrap = new System.Windows.Forms.CheckBox();
this.btnGenICode = new System.Windows.Forms.Button();
this.chkUnique = new System.Windows.Forms.CheckBox();
this.btnMoves = new System.Windows.Forms.Button();
this.btnChooseFile = new System.Windows.Forms.Button();
this.openFile = new System.Windows.Forms.OpenFileDialog();
this.btnMoveFrom = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.txtMaxOcc = new System.Windows.Forms.TextBox();
this.chkUniqueAttrVars = new System.Windows.Forms.CheckBox();
this.chkUniqueVars = new System.Windows.Forms.CheckBox();
this.chkDisplays = new System.Windows.Forms.CheckBox();
this.chkNoNsRef = new System.Windows.Forms.CheckBox();
this.cmbLastFile = new System.Windows.Forms.ComboBox();
this.btnClearSettings = new System.Windows.Forms.Button();
this.chkCountVars = new System.Windows.Forms.CheckBox();
this.btnSettings = new System.Windows.Forms.Button();
this.chkPerform = new System.Windows.Forms.CheckBox();
this.chkMvToDisp = new System.Windows.Forms.CheckBox();
this.chkNewArea = new System.Windows.Forms.CheckBox();
this.label5 = new System.Windows.Forms.Label();
this.txtExpPrefix = new System.Windows.Forms.TextBox();
this.chkAttribs = new System.Windows.Forms.CheckBox();
this.btnTestThings = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(20, 47);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Start";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// outText
//
this.outText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.outText.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.outText.Location = new System.Drawing.Point(20, 121);
this.outText.Multiline = true;
this.outText.Name = "outText";
this.outText.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.outText.Size = new System.Drawing.Size(380, 496);
this.outText.TabIndex = 1;
this.outText.WordWrap = false;
//
// outCob
//
this.outCob.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.outCob.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.outCob.Location = new System.Drawing.Point(406, 121);
this.outCob.Multiline = true;
this.outCob.Name = "outCob";
this.outCob.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.outCob.Size = new System.Drawing.Size(533, 496);
this.outCob.TabIndex = 2;
this.outCob.WordWrap = false;
this.outCob.KeyDown += new System.Windows.Forms.KeyEventHandler(this.outCob_KeyDown);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(17, 105);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(89, 15);
this.label1.TabIndex = 4;
this.label1.Text = "XML-struktur";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(406, 105);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(167, 15);
this.label2.TabIndex = 5;
this.label2.Text = "Försök till COB-copybook";
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.Location = new System.Drawing.Point(864, 632);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 6;
this.btnClose.Text = "Close";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// chkAnaTag
//
this.chkAnaTag.AutoSize = true;
this.chkAnaTag.Location = new System.Drawing.Point(118, 51);
this.chkAnaTag.Name = "chkAnaTag";
this.chkAnaTag.Size = new System.Drawing.Size(118, 17);
this.chkAnaTag.TabIndex = 7;
this.chkAnaTag.Text = "analysera tag-value";
this.chkAnaTag.UseVisualStyleBackColor = true;
this.chkAnaTag.CheckedChanged += new System.EventHandler(this.chkAnaTag_CheckedChanged);
//
// chkValues
//
this.chkValues.AutoSize = true;
this.chkValues.Location = new System.Drawing.Point(118, 75);
this.chkValues.Name = "chkValues";
this.chkValues.Size = new System.Drawing.Size(92, 17);
this.chkValues.TabIndex = 8;
this.chkValues.Text = "lägg till values";
this.chkValues.UseVisualStyleBackColor = true;
this.chkValues.CheckedChanged += new System.EventHandler(this.chkValues_CheckedChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(273, 52);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 9;
this.label3.Text = "prefix :";
//
// txtPrefix
//
this.txtPrefix.Location = new System.Drawing.Point(317, 49);
this.txtPrefix.Name = "txtPrefix";
this.txtPrefix.Size = new System.Drawing.Size(57, 20);
this.txtPrefix.TabIndex = 10;
this.txtPrefix.Text = "GWM_";
//
// chkWrap
//
this.chkWrap.AutoSize = true;
this.chkWrap.Location = new System.Drawing.Point(389, 73);
this.chkWrap.Margin = new System.Windows.Forms.Padding(2);
this.chkWrap.Name = "chkWrap";
this.chkWrap.Size = new System.Drawing.Size(79, 17);
this.chkWrap.TabIndex = 11;
this.chkWrap.Text = "radbryt kod";
this.chkWrap.UseVisualStyleBackColor = true;
this.chkWrap.CheckedChanged += new System.EventHandler(this.chkWrap_CheckedChanged);
//
// btnGenICode
//
this.btnGenICode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnGenICode.Enabled = false;
this.btnGenICode.Location = new System.Drawing.Point(411, 632);
this.btnGenICode.Margin = new System.Windows.Forms.Padding(2);
this.btnGenICode.Name = "btnGenICode";
this.btnGenICode.Size = new System.Drawing.Size(81, 23);
this.btnGenICode.TabIndex = 12;
this.btnGenICode.Text = "Gen Init kod";
this.btnGenICode.UseVisualStyleBackColor = true;
this.btnGenICode.Click += new System.EventHandler(this.btnGenICode_Click);
//
// chkUnique
//
this.chkUnique.AutoSize = true;
this.chkUnique.Location = new System.Drawing.Point(503, 74);
this.chkUnique.Margin = new System.Windows.Forms.Padding(2);
this.chkUnique.Name = "chkUnique";
this.chkUnique.Size = new System.Drawing.Size(95, 17);
this.chkUnique.TabIndex = 13;
this.chkUnique.Text = "unika X-pather";
this.chkUnique.UseVisualStyleBackColor = true;
this.chkUnique.CheckedChanged += new System.EventHandler(this.chkUnique_CheckedChanged);
//
// btnMoves
//
this.btnMoves.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnMoves.Enabled = false;
this.btnMoves.Location = new System.Drawing.Point(496, 632);
this.btnMoves.Margin = new System.Windows.Forms.Padding(2);
this.btnMoves.Name = "btnMoves";
this.btnMoves.Size = new System.Drawing.Size(93, 23);
this.btnMoves.TabIndex = 14;
this.btnMoves.Text = "Gen Move kod";
this.btnMoves.UseVisualStyleBackColor = true;
this.btnMoves.Click += new System.EventHandler(this.btnMoves_Click);
//
// btnChooseFile
//
this.btnChooseFile.Location = new System.Drawing.Point(20, 17);
this.btnChooseFile.Name = "btnChooseFile";
this.btnChooseFile.Size = new System.Drawing.Size(75, 23);
this.btnChooseFile.TabIndex = 15;
this.btnChooseFile.Text = "Välj fil";
this.btnChooseFile.UseVisualStyleBackColor = true;
this.btnChooseFile.Click += new System.EventHandler(this.btnChooseFile_Click);
//
// openFile
//
this.openFile.FileName = "openFile";
//
// btnMoveFrom
//
this.btnMoveFrom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnMoveFrom.Enabled = false;
this.btnMoveFrom.Location = new System.Drawing.Point(673, 632);
this.btnMoveFrom.Name = "btnMoveFrom";
this.btnMoveFrom.Size = new System.Drawing.Size(92, 23);
this.btnMoveFrom.TabIndex = 16;
this.btnMoveFrom.Text = "Gen Move från";
this.btnMoveFrom.UseVisualStyleBackColor = true;
this.btnMoveFrom.Click += new System.EventHandler(this.btnMoveFrom_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(614, 73);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(51, 13);
this.label4.TabIndex = 17;
this.label4.Text = "max OCC";
//
// txtMaxOcc
//
this.txtMaxOcc.Location = new System.Drawing.Point(672, 72);
this.txtMaxOcc.Name = "txtMaxOcc";
this.txtMaxOcc.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtMaxOcc.Size = new System.Drawing.Size(37, 20);
this.txtMaxOcc.TabIndex = 18;
this.txtMaxOcc.Text = "25";
this.txtMaxOcc.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// chkUniqueAttrVars
//
this.chkUniqueAttrVars.AutoSize = true;
this.chkUniqueAttrVars.Location = new System.Drawing.Point(389, 51);
this.chkUniqueAttrVars.Name = "chkUniqueAttrVars";
this.chkUniqueAttrVars.Size = new System.Drawing.Size(93, 17);
this.chkUniqueAttrVars.TabIndex = 19;
this.chkUniqueAttrVars.Text = "unika attr.vars";
this.chkUniqueAttrVars.UseVisualStyleBackColor = true;
this.chkUniqueAttrVars.CheckedChanged += new System.EventHandler(this.chkUniqueAttrVars_CheckedChanged);
//
// chkUniqueVars
//
this.chkUniqueVars.AutoSize = true;
this.chkUniqueVars.Location = new System.Drawing.Point(503, 52);
this.chkUniqueVars.Name = "chkUniqueVars";
this.chkUniqueVars.Size = new System.Drawing.Size(104, 17);
this.chkUniqueVars.TabIndex = 20;
this.chkUniqueVars.Text = "unika cobol vars";
this.chkUniqueVars.UseVisualStyleBackColor = true;
this.chkUniqueVars.CheckedChanged += new System.EventHandler(this.chkUniqueVars_CheckedChanged);
//
// chkDisplays
//
this.chkDisplays.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkDisplays.AutoSize = true;
this.chkDisplays.Enabled = false;
this.chkDisplays.Location = new System.Drawing.Point(771, 644);
this.chkDisplays.Name = "chkDisplays";
this.chkDisplays.Size = new System.Drawing.Size(71, 17);
this.chkDisplays.TabIndex = 21;
this.chkDisplays.Text = "(Displays)";
this.chkDisplays.UseVisualStyleBackColor = true;
//
// chkNoNsRef
//
this.chkNoNsRef.AutoSize = true;
this.chkNoNsRef.Location = new System.Drawing.Point(737, 51);
this.chkNoNsRef.Name = "chkNoNsRef";
this.chkNoNsRef.Size = new System.Drawing.Size(129, 17);
this.chkNoNsRef.TabIndex = 22;
this.chkNoNsRef.Text = "utan NameSpace refs";
this.chkNoNsRef.UseVisualStyleBackColor = true;
this.chkNoNsRef.CheckedChanged += new System.EventHandler(this.chkNoNsRef_CheckedChanged);
//
// cmbLastFile
//
this.cmbLastFile.FormattingEnabled = true;
this.cmbLastFile.Location = new System.Drawing.Point(120, 19);
this.cmbLastFile.Name = "cmbLastFile";
this.cmbLastFile.Size = new System.Drawing.Size(735, 21);
this.cmbLastFile.TabIndex = 23;
this.cmbLastFile.SelectedIndexChanged += new System.EventHandler(this.cmbLastFile_SelectedIndexChanged);
//
// btnClearSettings
//
this.btnClearSettings.Location = new System.Drawing.Point(861, 19);
this.btnClearSettings.Name = "btnClearSettings";
this.btnClearSettings.Size = new System.Drawing.Size(75, 23);
this.btnClearSettings.TabIndex = 24;
this.btnClearSettings.Text = "Rensa";
this.btnClearSettings.UseVisualStyleBackColor = true;
this.btnClearSettings.Click += new System.EventHandler(this.btnClearSettings_Click);
//
// chkCountVars
//
this.chkCountVars.AutoSize = true;
this.chkCountVars.Location = new System.Drawing.Point(737, 74);
this.chkCountVars.Name = "chkCountVars";
this.chkCountVars.Size = new System.Drawing.Size(106, 17);
this.chkCountVars.TabIndex = 25;
this.chkCountVars.Text = "\"count\" variabler";
this.chkCountVars.UseVisualStyleBackColor = true;
this.chkCountVars.CheckedChanged += new System.EventHandler(this.chkCountVars_CheckedChanged);
//
// btnSettings
//
this.btnSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSettings.Location = new System.Drawing.Point(20, 655);
this.btnSettings.Margin = new System.Windows.Forms.Padding(2);
this.btnSettings.Name = "btnSettings";
this.btnSettings.Size = new System.Drawing.Size(81, 23);
this.btnSettings.TabIndex = 26;
this.btnSettings.Text = "Inställningar";
this.btnSettings.UseVisualStyleBackColor = true;
this.btnSettings.Click += new System.EventHandler(this.btnSettings_Click);
//
// chkPerform
//
this.chkPerform.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkPerform.AutoSize = true;
this.chkPerform.Location = new System.Drawing.Point(594, 627);
this.chkPerform.Name = "chkPerform";
this.chkPerform.Size = new System.Drawing.Size(62, 17);
this.chkPerform.TabIndex = 27;
this.chkPerform.Text = "Perform";
this.chkPerform.UseVisualStyleBackColor = true;
//
// chkMvToDisp
//
this.chkMvToDisp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkMvToDisp.AutoSize = true;
this.chkMvToDisp.Location = new System.Drawing.Point(594, 644);
this.chkMvToDisp.Name = "chkMvToDisp";
this.chkMvToDisp.Size = new System.Drawing.Size(71, 17);
this.chkMvToDisp.TabIndex = 28;
this.chkMvToDisp.Text = "(Displays)";
this.chkMvToDisp.UseVisualStyleBackColor = true;
//
// chkNewArea
//
this.chkNewArea.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkNewArea.AutoSize = true;
this.chkNewArea.Location = new System.Drawing.Point(771, 627);
this.chkNewArea.Name = "chkNewArea";
this.chkNewArea.Size = new System.Drawing.Size(64, 17);
this.chkNewArea.TabIndex = 29;
this.chkNewArea.Text = "Till Area";
this.chkNewArea.UseVisualStyleBackColor = true;
this.chkNewArea.CheckedChanged += new System.EventHandler(this.chkNewArea_CheckedChanged);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(241, 76);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(70, 13);
this.label5.TabIndex = 30;
this.label5.Text = "export prefix :";
//
// txtExpPrefix
//
this.txtExpPrefix.Location = new System.Drawing.Point(317, 75);
this.txtExpPrefix.Name = "txtExpPrefix";
this.txtExpPrefix.Size = new System.Drawing.Size(57, 20);
this.txtExpPrefix.TabIndex = 31;
this.txtExpPrefix.Text = "GWX_";
//
// chkAttribs
//
this.chkAttribs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkAttribs.AutoSize = true;
this.chkAttribs.Location = new System.Drawing.Point(771, 660);
this.chkAttribs.Name = "chkAttribs";
this.chkAttribs.Size = new System.Drawing.Size(85, 17);
this.chkAttribs.TabIndex = 32;
this.chkAttribs.Text = "Move Attribs";
this.chkAttribs.UseVisualStyleBackColor = true;
this.chkAttribs.Visible = false;
//
// btnTestThings
//
this.btnTestThings.Location = new System.Drawing.Point(20, 632);
this.btnTestThings.Name = "btnTestThings";
this.btnTestThings.Size = new System.Drawing.Size(81, 23);
this.btnTestThings.TabIndex = 33;
this.btnTestThings.Text = "run test";
this.btnTestThings.UseVisualStyleBackColor = true;
this.btnTestThings.Click += new System.EventHandler(this.btnTestThings_Click);
//
// GenCobCode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(951, 686);
this.Controls.Add(this.btnTestThings);
this.Controls.Add(this.chkAttribs);
this.Controls.Add(this.txtExpPrefix);
this.Controls.Add(this.label5);
this.Controls.Add(this.chkNewArea);
this.Controls.Add(this.chkMvToDisp);
this.Controls.Add(this.chkPerform);
this.Controls.Add(this.btnSettings);
this.Controls.Add(this.chkCountVars);
this.Controls.Add(this.btnClearSettings);
this.Controls.Add(this.cmbLastFile);
this.Controls.Add(this.chkNoNsRef);
this.Controls.Add(this.chkDisplays);
this.Controls.Add(this.chkUniqueVars);
this.Controls.Add(this.chkUniqueAttrVars);
this.Controls.Add(this.txtMaxOcc);
this.Controls.Add(this.label4);
this.Controls.Add(this.btnMoveFrom);
this.Controls.Add(this.btnChooseFile);
this.Controls.Add(this.btnMoves);
this.Controls.Add(this.chkUnique);
this.Controls.Add(this.btnGenICode);
this.Controls.Add(this.chkWrap);
this.Controls.Add(this.txtPrefix);
this.Controls.Add(this.label3);
this.Controls.Add(this.chkValues);
this.Controls.Add(this.chkAnaTag);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.outCob);
this.Controls.Add(this.outText);
this.Controls.Add(this.button1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "GenCobCode";
this.Text = "X M L to C O B";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.GenCobCode_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox outText;
private System.Windows.Forms.TextBox outCob;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.CheckBox chkAnaTag;
private System.Windows.Forms.CheckBox chkValues;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPrefix;
private System.Windows.Forms.CheckBox chkWrap;
private System.Windows.Forms.Button btnGenICode;
private System.Windows.Forms.CheckBox chkUnique;
private System.Windows.Forms.Button btnMoves;
private System.Windows.Forms.Button btnChooseFile;
private System.Windows.Forms.OpenFileDialog openFile;
private System.Windows.Forms.Button btnMoveFrom;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtMaxOcc;
private System.Windows.Forms.CheckBox chkUniqueAttrVars;
private System.Windows.Forms.CheckBox chkUniqueVars;
private System.Windows.Forms.CheckBox chkDisplays;
private System.Windows.Forms.CheckBox chkNoNsRef;
private System.Windows.Forms.ComboBox cmbLastFile;
private System.Windows.Forms.Button btnClearSettings;
private System.Windows.Forms.CheckBox chkCountVars;
private System.Windows.Forms.Button btnSettings;
private System.Windows.Forms.CheckBox chkPerform;
private System.Windows.Forms.CheckBox chkMvToDisp;
private System.Windows.Forms.CheckBox chkNewArea;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtExpPrefix;
private System.Windows.Forms.CheckBox chkAttribs;
private System.Windows.Forms.Button btnTestThings;
}
}

1710
CobXmlSupport/GenCobCode.cs Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

194
CobXmlSupport/IndexState.cs Normal file
View File

@ -0,0 +1,194 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CobXmlSupport
{
public class IndexState
{
private char[] splitChars={'#'};
private string latestStr;
private string wrkString;
private string wrkSectStr;
private string wrkVarStr;
private Dictionary<string, string> indexes;
private List<CobRow> rows;
private bool inOut;
private string extraParam;
public Dictionary<string, string> Indexes
{
get { return indexes; }
//set { indexes = value; }
}
public string ExtraParam
{
// private variable to use from method which need temporary extra
// method using it responsible for cleaning it
get { return extraParam; }
}
public IndexState(Dictionary<string, string> varIndex, List<CobRow> xrows, bool bin=true)
{
latestStr = "";
indexes = varIndex;
wrkSectStr = "";
wrkVarStr = "";
rows = xrows;
inOut = bin; // "IN" == true "OUT" == false
}
public string ProcStr
{
get
{
string repInfoStr = "\r\n * ==================== 88 - variabler =============* ";
repInfoStr += wrkVarStr;
repInfoStr += "\r\n * ==================== 88 - variabler =============* \r\n";
repInfoStr += wrkSectStr;
return repInfoStr;
}
}
public string PresentStrings(string indexlist) {
string codeString="";
wrkString = indexlist;
if(!latestStr.Equals(wrkString)){
codeString=analyseDiff();
}
return codeString;
}
private string analyseDiff()
{
string genCode = "";
string[] latestList=latestStr.Split(splitChars),
wrkList=wrkString.Split(splitChars);
if (latestList.Length > 0)
{
for(int i=latestList.Length-1;i>-1;i--){
if (!wrkList.Contains(latestList[i]) && latestList[i].Length>0)
{
genCode+="\r\n END-PERFORM";
}
}
}
if (wrkList.Length > 0)
{
for(int i=wrkList.Length-1;i>-1;i--){
if(!latestList.Contains(wrkList[i])){
string countVar = "";
string tagName = "";
if (!wrkList[i].Equals(""))
{
string chosenKey = indexes.FirstOrDefault(x => x.Value == wrkList[i]).Key; // indexes = <FieldName , FieldIndex> search FieldName from present FieldIndex
countVar = rows.First(x => x.FieldName == chosenKey).CountIn; // from cobrows find "Count In"-variable for given FieldName
tagName = rows.First(x => x.FieldName == chosenKey).TagName; // from cobrows find "xmltag" for given FieldName
string inLst = "";
int j = i + 1;
//genCode += "\r\n *>" + wrkString;
if (inOut) // When moving to cobol xml structure
{
genCode += "\r\n MOVE "+ S.ettingMaxOcc + " TO " + countVar;
// genCode += "\r\n MOVE 0 TO " + countVar;
while (wrkList.Length > j)
{
if (inLst.Length == 0)
{
inLst = "\r\n " + wrkList[j];
}
else
{
inLst = "\r\n " + wrkList[j] +"," +inLst;
}
j++;
}
if (inLst.Length > 0)
{
genCode += "\r\n ( " + inLst + " )";
}
inLst = "";
}
genCode += "\r\n PERFORM VARYING " + wrkList[i] + " FROM 1 BY 1";
//genCode += "\r\n UNTIL EXIT ";
//genCode += "\r\n UNTIL " + wrkList[i] + " > " + countVar;
genCode += "\r\n UNTIL " + wrkList[i] + " > ";
extraParam = countVar;
j = i + 1;
while (wrkList.Length > j)
{
if (inLst.Length == 0)
{
inLst = "\r\n " + wrkList[j];
}
else
{
inLst = "\r\n " + wrkList[j] + "," + inLst;
}
j++;
}
if (inLst.Length > 0)
{
extraParam += "\r\n ( " + inLst + " )";
}
genCode += extraParam;
if (inOut)
{
string tmpCheckVar="";
genCode += "\r\n PERFORM " + createReferenceSections(tagName,"NXT-",out tmpCheckVar);
genCode += "\r\n IF " + tmpCheckVar;
genCode += "\r\n SUBTRACT 1 FROM " + wrkList[i];
genCode += "\r\n MOVE " + wrkList[i] + " TO " + countVar;
if (inLst.Length > 0)
{
genCode += "\r\n ( " + inLst + " )";
}
genCode += "\r\n EXIT PERFORM";
genCode += "\r\n END-IF";
}
}
}
}
}
latestStr = wrkString;
return genCode;
}
private string createReferenceSections(string tagName, string procPrefix,out string missIdent)
{
missIdent=tagName.Replace("\"","").Replace(":","");
string tmpProcName = procPrefix + missIdent;
if(!wrkSectStr.Contains(tmpProcName)){
wrkSectStr += "\r\n *>-------------------- READ SECTION ---------------*" + tmpProcName;
wrkSectStr += "\r\n * Den här sektionen används för att positionera ";
wrkSectStr += "\r\n * datat när den genererade xml-proceduren körs";
wrkSectStr += "\r\n *--------------------- READ SECTION ---------------*\r\n";
wrkSectStr += "\r\n " + tmpProcName + " SECTION.";
wrkSectStr += "\r\n * READ NEXT" + tagName;
wrkSectStr += "\r\n IF POST-SAKNAS";
wrkSectStr += "\r\n SET " + "NO-"+missIdent + " TO TRUE";
wrkSectStr += "\r\n END-IF";
wrkSectStr += "\r\n .";
wrkSectStr += "\r\n "+tmpProcName+"-EX.";
wrkSectStr += "\r\n EXIT.\r\n";
wrkVarStr += "\r\n 01 "+missIdent+"-X PIC X VALUE SPACE.";
wrkVarStr += "\r\n 88 " + "NO-" + missIdent + " VALUE \"X\".";
wrkVarStr += "\r\n 88 " + missIdent + "-OK VALUE SPACE.";
missIdent = "NO-" + missIdent;
}
return tmpProcName;
}
}
}

21
CobXmlSupport/Program.cs Normal file
View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace CobXmlSupport
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new GenCobCode());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CobXmlSupport")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CobXmlSupport")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("70a4aa6e-716a-4c50-a490-8fa39263e528")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CobXmlSupport.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CobXmlSupport.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,231 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CobXmlSupport.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ArrayOfString xmlns:xsi=\"http://www.w3." +
"org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <s" +
"tring>@\"C:\\testdata\\Reengineering\\FD_GetVehicleHistory.xml\"</string>\r\n</ArrayOfS" +
"tring>")]
public global::System.Collections.Specialized.StringCollection LastFile {
get {
return ((global::System.Collections.Specialized.StringCollection)(this["LastFile"]));
}
set {
this["LastFile"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Tommy Öman")]
public string UserName {
get {
return ((string)(this["UserName"]));
}
set {
this["UserName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Fordonsdata Nordic AB")]
public string CompanyName {
get {
return ((string)(this["CompanyName"]));
}
set {
this["CompanyName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool NoNsRef {
get {
return ((bool)(this["NoNsRef"]));
}
set {
this["NoNsRef"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool UniqueVars {
get {
return ((bool)(this["UniqueVars"]));
}
set {
this["UniqueVars"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool UniqueAttrVars {
get {
return ((bool)(this["UniqueAttrVars"]));
}
set {
this["UniqueAttrVars"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool Unique {
get {
return ((bool)(this["Unique"]));
}
set {
this["Unique"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool Wrap {
get {
return ((bool)(this["Wrap"]));
}
set {
this["Wrap"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool Values {
get {
return ((bool)(this["Values"]));
}
set {
this["Values"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool AnaTag {
get {
return ((bool)(this["AnaTag"]));
}
set {
this["AnaTag"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("GWM_")]
public string Prefix {
get {
return ((string)(this["Prefix"]));
}
set {
this["Prefix"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("25")]
public string MaxOcc {
get {
return ((string)(this["MaxOcc"]));
}
set {
this["MaxOcc"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool CountVars {
get {
return ((bool)(this["CountVars"]));
}
set {
this["CountVars"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Logg-post")]
public string LogVarName {
get {
return ((string)(this["LogVarName"]));
}
set {
this["LogVarName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("UpdateLogFile")]
public string LogSectName {
get {
return ((string)(this["LogSectName"]));
}
set {
this["LogSectName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("GWX_")]
public string ExpPrefix {
get {
return ((string)(this["ExpPrefix"]));
}
set {
this["ExpPrefix"] = value;
}
}
}
}

View File

@ -0,0 +1,57 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles />
<Settings>
<Setting Name="LastFile" Type="System.Collections.Specialized.StringCollection" Scope="User">
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;string&gt;@"C:\testdata\Reengineering\FD_GetVehicleHistory.xml"&lt;/string&gt;
&lt;/ArrayOfString&gt;</Value>
</Setting>
<Setting Name="UserName" Type="System.String" Scope="User">
<Value Profile="(Default)">Tommy Öman</Value>
</Setting>
<Setting Name="CompanyName" Type="System.String" Scope="User">
<Value Profile="(Default)">Fordonsdata Nordic AB</Value>
</Setting>
<Setting Name="NoNsRef" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="UniqueVars" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="UniqueAttrVars" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Unique" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Wrap" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Values" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="AnaTag" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Prefix" Type="System.String" Scope="User">
<Value Profile="(Default)">GWM_</Value>
</Setting>
<Setting Name="MaxOcc" Type="System.String" Scope="User">
<Value Profile="(Default)">25</Value>
</Setting>
<Setting Name="CountVars" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="LogVarName" Type="System.String" Scope="User">
<Value Profile="(Default)">Logg-post</Value>
</Setting>
<Setting Name="LogSectName" Type="System.String" Scope="User">
<Value Profile="(Default)">UpdateLogFile</Value>
</Setting>
<Setting Name="ExpPrefix" Type="System.String" Scope="User">
<Value Profile="(Default)">GWX_</Value>
</Setting>
</Settings>
</SettingsFile>

62
CobXmlSupport/RowWord.cs Normal file
View File

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace CobXmlSupport
{
public class RowWord
{
private string __wordSource;
private int __startPos;
private int __length;
private bool __quoted;
public RowWord(string wordSource, int strtPos,bool quoted)
{
__startPos = strtPos;
__wordSource = wordSource;
__length = __wordSource.Length;
__quoted = quoted;
//Debug.WriteLine(strtPos.ToString("00") + " " + wordSource);
}
public int startPos
{
get { return __startPos; }
set { __startPos = value; }
}
public int length
{
get { return __length; }
}
public bool isQuoted
{
get { return __quoted; }
}
public bool isComment
{
get {
return (this.__wordSource.StartsWith("*>") || this.__wordSource.StartsWith("*"));
}
}
public int endPos
{
get { return __startPos+__length-1; }
}
public string ToString()
{
return __wordSource;
}
}
}

28
CobXmlSupport/S.cs Normal file
View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CobXmlSupport
{
public static class S
{
public static string ettingUserName;
public static string ettingCompany;
public static bool ettingNoNsRef;
public static bool ettingUniqueVars;
public static bool ettingUniqueAttrVars;
public static bool ettingUnique;
public static bool ettingWrap;
public static bool ettingValues;
public static bool ettingAnaTag;
public static string ettingPrefix;
public static string ettingExpPrefix;
public static string ettingMaxOcc;
public static bool ettingCountVars;
public static string ettingLogVarName;
public static string ettingLogSectName;
//-------------------------
}
}

99
CobXmlSupport/ShowCode.Designer.cs generated Normal file
View File

@ -0,0 +1,99 @@
namespace CobXmlSupport
{
partial class ShowCode
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShowCode));
this.btnClose = new System.Windows.Forms.Button();
this.txtCode = new System.Windows.Forms.TextBox();
this.lblCodeType = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.Location = new System.Drawing.Point(604, 642);
this.btnClose.Margin = new System.Windows.Forms.Padding(2);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(56, 23);
this.btnClose.TabIndex = 0;
this.btnClose.Text = "Close";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// txtCode
//
this.txtCode.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtCode.Font = new System.Drawing.Font("Courier New", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCode.Location = new System.Drawing.Point(11, 54);
this.txtCode.Margin = new System.Windows.Forms.Padding(2);
this.txtCode.Multiline = true;
this.txtCode.Name = "txtCode";
this.txtCode.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtCode.Size = new System.Drawing.Size(650, 578);
this.txtCode.TabIndex = 1;
this.txtCode.TextChanged += new System.EventHandler(this.txtCode_TextChanged);
this.txtCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtCode_KeyDown);
//
// lblCodeType
//
this.lblCodeType.AutoSize = true;
this.lblCodeType.Font = new System.Drawing.Font("Microsoft YaHei UI", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCodeType.Location = new System.Drawing.Point(9, 28);
this.lblCodeType.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblCodeType.Name = "lblCodeType";
this.lblCodeType.Size = new System.Drawing.Size(75, 16);
this.lblCodeType.TabIndex = 2;
this.lblCodeType.Text = "<codeType>";
//
// ShowCode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(670, 674);
this.Controls.Add(this.lblCodeType);
this.Controls.Add(this.txtCode);
this.Controls.Add(this.btnClose);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "ShowCode";
this.Text = "ShowCode";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.TextBox txtCode;
private System.Windows.Forms.Label lblCodeType;
}
}

74
CobXmlSupport/ShowCode.cs Normal file
View File

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
namespace CobXmlSupport
{
public partial class ShowCode : Form
{
string oldTxt;
public ShowCode()
{
InitializeComponent();
oldTxt = "";
}
public TextBox CodeShower
{
get { return txtCode; }
set { txtCode = value; }
}
public string Labeltext
{
get { return lblCodeType.Text; }
set { lblCodeType.Text = value; }
}
private GenCobCode parentWindow;
public GenCobCode Parent
{
get { return parentWindow; }
set { parentWindow = value; }
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
private void txtCode_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.A)
{
txtCode.SelectAll();
}
}
private void txtCode_TextChanged(object sender, EventArgs e)
{
if (txtCode.Text.Length > oldTxt.Length)
{
string tmpNewText = txtCode.Text.Substring(oldTxt.Length);
// Debug.Write(tmpNewText);
// Tag bort denna kommentering för att testa på vad som precis skrivs på log-fönster.
oldTxt = txtCode.Text;
}
}
}
}

3255
CobXmlSupport/ShowCode.resx Normal file

File diff suppressed because it is too large Load Diff

395
CobXmlSupport/frmSettings.Designer.cs generated Normal file
View File

@ -0,0 +1,395 @@
namespace CobXmlSupport
{
partial class frmSettings
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSettings));
this.btnCancel = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtUserName = new System.Windows.Forms.TextBox();
this.txtCompanyName = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.chkCountVars = new System.Windows.Forms.CheckBox();
this.chkNoNsRef = new System.Windows.Forms.CheckBox();
this.chkUniqueVars = new System.Windows.Forms.CheckBox();
this.chkUniqueAttrVars = new System.Windows.Forms.CheckBox();
this.txtMaxOcc = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.chkUnique = new System.Windows.Forms.CheckBox();
this.chkWrap = new System.Windows.Forms.CheckBox();
this.txtPrefix = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.chkValues = new System.Windows.Forms.CheckBox();
this.chkAnaTag = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.txtLogPost = new System.Windows.Forms.TextBox();
this.txtLogSection = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.txtExpPrefix = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.Location = new System.Drawing.Point(490, 366);
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(79, 24);
this.btnCancel.TabIndex = 0;
this.btnCancel.Text = "Avbryt";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.Location = new System.Drawing.Point(406, 366);
this.btnSave.Margin = new System.Windows.Forms.Padding(2);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(79, 24);
this.btnSave.TabIndex = 1;
this.btnSave.Text = "&Spara";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(10, 11);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(309, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Här kan vissa standardinställningar göras (byggs på efter behov)";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 42);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(85, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Användarnamn :";
//
// txtUserName
//
this.txtUserName.Location = new System.Drawing.Point(101, 42);
this.txtUserName.Margin = new System.Windows.Forms.Padding(2);
this.txtUserName.Name = "txtUserName";
this.txtUserName.Size = new System.Drawing.Size(195, 20);
this.txtUserName.TabIndex = 4;
//
// txtCompanyName
//
this.txtCompanyName.Location = new System.Drawing.Point(101, 65);
this.txtCompanyName.Margin = new System.Windows.Forms.Padding(2);
this.txtCompanyName.Name = "txtCompanyName";
this.txtCompanyName.Size = new System.Drawing.Size(195, 20);
this.txtCompanyName.TabIndex = 6;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 65);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(83, 13);
this.label3.TabIndex = 5;
this.label3.Text = "Företagsnamn :";
//
// chkCountVars
//
this.chkCountVars.AutoSize = true;
this.chkCountVars.Location = new System.Drawing.Point(14, 152);
this.chkCountVars.Name = "chkCountVars";
this.chkCountVars.Size = new System.Drawing.Size(106, 17);
this.chkCountVars.TabIndex = 38;
this.chkCountVars.Text = "\"count\" variabler";
this.chkCountVars.UseVisualStyleBackColor = true;
//
// chkNoNsRef
//
this.chkNoNsRef.AutoSize = true;
this.chkNoNsRef.Location = new System.Drawing.Point(15, 127);
this.chkNoNsRef.Name = "chkNoNsRef";
this.chkNoNsRef.Size = new System.Drawing.Size(129, 17);
this.chkNoNsRef.TabIndex = 37;
this.chkNoNsRef.Text = "utan NameSpace refs";
this.chkNoNsRef.UseVisualStyleBackColor = true;
//
// chkUniqueVars
//
this.chkUniqueVars.AutoSize = true;
this.chkUniqueVars.Location = new System.Drawing.Point(15, 175);
this.chkUniqueVars.Name = "chkUniqueVars";
this.chkUniqueVars.Size = new System.Drawing.Size(104, 17);
this.chkUniqueVars.TabIndex = 36;
this.chkUniqueVars.Text = "unika cobol vars";
this.chkUniqueVars.UseVisualStyleBackColor = true;
//
// chkUniqueAttrVars
//
this.chkUniqueAttrVars.AutoSize = true;
this.chkUniqueAttrVars.Location = new System.Drawing.Point(14, 82);
this.chkUniqueAttrVars.Name = "chkUniqueAttrVars";
this.chkUniqueAttrVars.Size = new System.Drawing.Size(93, 17);
this.chkUniqueAttrVars.TabIndex = 35;
this.chkUniqueAttrVars.Text = "unika attr.vars";
this.chkUniqueAttrVars.UseVisualStyleBackColor = true;
//
// txtMaxOcc
//
this.txtMaxOcc.Location = new System.Drawing.Point(213, 80);
this.txtMaxOcc.Name = "txtMaxOcc";
this.txtMaxOcc.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtMaxOcc.Size = new System.Drawing.Size(37, 20);
this.txtMaxOcc.TabIndex = 34;
this.txtMaxOcc.Text = "25";
this.txtMaxOcc.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(155, 81);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(51, 13);
this.label4.TabIndex = 33;
this.label4.Text = "max OCC";
//
// chkUnique
//
this.chkUnique.AutoSize = true;
this.chkUnique.Location = new System.Drawing.Point(14, 106);
this.chkUnique.Margin = new System.Windows.Forms.Padding(2);
this.chkUnique.Name = "chkUnique";
this.chkUnique.Size = new System.Drawing.Size(95, 17);
this.chkUnique.TabIndex = 32;
this.chkUnique.Text = "unika X-pather";
this.chkUnique.UseVisualStyleBackColor = true;
//
// chkWrap
//
this.chkWrap.AutoSize = true;
this.chkWrap.Location = new System.Drawing.Point(14, 197);
this.chkWrap.Margin = new System.Windows.Forms.Padding(2);
this.chkWrap.Name = "chkWrap";
this.chkWrap.Size = new System.Drawing.Size(79, 17);
this.chkWrap.TabIndex = 31;
this.chkWrap.Text = "radbryt kod";
this.chkWrap.UseVisualStyleBackColor = true;
//
// txtPrefix
//
this.txtPrefix.Location = new System.Drawing.Point(213, 28);
this.txtPrefix.Name = "txtPrefix";
this.txtPrefix.Size = new System.Drawing.Size(57, 20);
this.txtPrefix.TabIndex = 30;
this.txtPrefix.Text = "GWM_";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(169, 31);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(38, 13);
this.label5.TabIndex = 29;
this.label5.Text = "prefix :";
//
// chkValues
//
this.chkValues.AutoSize = true;
this.chkValues.Location = new System.Drawing.Point(14, 53);
this.chkValues.Name = "chkValues";
this.chkValues.Size = new System.Drawing.Size(92, 17);
this.chkValues.TabIndex = 28;
this.chkValues.Text = "lägg till values";
this.chkValues.UseVisualStyleBackColor = true;
//
// chkAnaTag
//
this.chkAnaTag.AutoSize = true;
this.chkAnaTag.Location = new System.Drawing.Point(14, 27);
this.chkAnaTag.Name = "chkAnaTag";
this.chkAnaTag.Size = new System.Drawing.Size(118, 17);
this.chkAnaTag.TabIndex = 27;
this.chkAnaTag.Text = "analysera tag-value";
this.chkAnaTag.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtExpPrefix);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.chkCountVars);
this.groupBox1.Controls.Add(this.chkAnaTag);
this.groupBox1.Controls.Add(this.chkNoNsRef);
this.groupBox1.Controls.Add(this.chkValues);
this.groupBox1.Controls.Add(this.chkUniqueVars);
this.groupBox1.Controls.Add(this.chkUniqueAttrVars);
this.groupBox1.Controls.Add(this.txtPrefix);
this.groupBox1.Controls.Add(this.txtMaxOcc);
this.groupBox1.Controls.Add(this.chkWrap);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.chkUnique);
this.groupBox1.Location = new System.Drawing.Point(15, 110);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(304, 255);
this.groupBox1.TabIndex = 39;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Utgångs inställningar";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.txtLogPost);
this.groupBox2.Controls.Add(this.txtLogSection);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Location = new System.Drawing.Point(325, 110);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(240, 99);
this.groupBox2.TabIndex = 40;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Namn på generella variabler och procedurer";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(20, 28);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(82, 13);
this.label6.TabIndex = 35;
this.label6.Text = "Namn logfil post";
//
// txtLogPost
//
this.txtLogPost.Location = new System.Drawing.Point(123, 25);
this.txtLogPost.Name = "txtLogPost";
this.txtLogPost.Size = new System.Drawing.Size(97, 20);
this.txtLogPost.TabIndex = 36;
//
// txtLogSection
//
this.txtLogSection.Location = new System.Drawing.Point(123, 51);
this.txtLogSection.Name = "txtLogSection";
this.txtLogSection.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtLogSection.Size = new System.Drawing.Size(97, 20);
this.txtLogSection.TabIndex = 38;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(20, 54);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(89, 13);
this.label7.TabIndex = 37;
this.label7.Text = "Namn log section";
//
// txtExpPrefix
//
this.txtExpPrefix.Location = new System.Drawing.Point(213, 51);
this.txtExpPrefix.Name = "txtExpPrefix";
this.txtExpPrefix.Size = new System.Drawing.Size(57, 20);
this.txtExpPrefix.TabIndex = 40;
this.txtExpPrefix.Text = "GWX_";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(137, 52);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(70, 13);
this.label8.TabIndex = 39;
this.label8.Text = "export prefix :";
//
// frmSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(577, 399);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.txtCompanyName);
this.Controls.Add(this.label3);
this.Controls.Add(this.txtUserName);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.btnCancel);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "frmSettings";
this.Text = "Inställningar";
this.Load += new System.EventHandler(this.frmSettings_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtUserName;
private System.Windows.Forms.TextBox txtCompanyName;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.CheckBox chkCountVars;
private System.Windows.Forms.CheckBox chkNoNsRef;
private System.Windows.Forms.CheckBox chkUniqueVars;
private System.Windows.Forms.CheckBox chkUniqueAttrVars;
private System.Windows.Forms.TextBox txtMaxOcc;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.CheckBox chkUnique;
private System.Windows.Forms.CheckBox chkWrap;
private System.Windows.Forms.TextBox txtPrefix;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox chkValues;
private System.Windows.Forms.CheckBox chkAnaTag;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtLogPost;
private System.Windows.Forms.TextBox txtLogSection;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtExpPrefix;
private System.Windows.Forms.Label label8;
}
}

View File

@ -0,0 +1,270 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CobXmlSupport
{
public partial class frmSettings : Form
{
private string UserTmp, CompanyTmp;
private bool tmpChkNoNsRef;
private bool tmpChkUniqueVars;
private bool tmpChkUniqueAttrVars;
private bool tmpChkUnique;
private bool tmpChkWrap;
private bool tmpChkValues;
private bool tmpChkAnaTag;
private bool tmpChkCountVars;
private string tmpTxtPrefix;
private string tmpTxtExpPrefix;
private string tmpTxtMaxOcc;
private string txtLogVarNameTmp;
private string txtLogVarSectTmp;
public frmSettings()
{
InitializeComponent();
}
public string LogPost
{
get
{
return txtLogPost.Text;
}
set
{
txtLogPost.Text = value;
}
}
public string LogSection
{
get
{
return txtLogSection.Text;
}
set
{
txtLogSection.Text = value;
}
}
public string UserName
{
get
{
return txtUserName.Text;
}
set
{
txtUserName.Text = value;
}
}
public string CompanyName
{
get
{
return txtCompanyName.Text;
}
set
{
txtCompanyName.Text = value;
}
}
public bool ChkCountVars
{
get
{
return chkCountVars.Checked;
}
set
{
chkCountVars.Checked = value;
}
}
public bool ChkNoNsRef
{
get
{
return chkNoNsRef.Checked;
}
set
{
chkNoNsRef.Checked = value;
}
}
public bool ChkUniqueVars
{
get
{
return chkUniqueVars.Checked;
}
set
{
chkUniqueVars.Checked = value;
}
}
public bool ChkUniqueAttrVars
{
get
{
return chkUniqueAttrVars.Checked;
}
set
{
chkUniqueAttrVars.Checked = value;
}
}
public bool ChkUnique
{
get
{
return chkUnique.Checked;
}
set
{
chkUnique.Checked = value;
}
}
public bool ChkWrap
{
get
{
return chkWrap.Checked;
}
set
{
chkWrap.Checked = value;
}
}
public bool ChkValues
{
get
{
return chkValues.Checked;
}
set
{
chkValues.Checked = value;
}
}
public bool ChkAnaTag
{
get
{
return chkAnaTag.Checked;
}
set
{
chkAnaTag.Checked = value;
}
}
public string TxtMaxOcc
{
get
{
return txtMaxOcc.Text;
}
set
{
txtMaxOcc.Text = value;
}
}
public string TxtPrefix
{
get
{
return txtPrefix.Text;
}
set
{
txtPrefix.Text = value;
}
}
public string TxtExpPrefix
{
get
{
return txtExpPrefix.Text;
}
set
{
txtExpPrefix.Text = value;
}
}
private void btnSave_Click(object sender, EventArgs e)
{
Properties.Settings.Default.AnaTag = chkAnaTag.Checked;
Properties.Settings.Default.CountVars = chkCountVars.Checked;
Properties.Settings.Default.MaxOcc = txtMaxOcc.Text;
Properties.Settings.Default.NoNsRef = chkNoNsRef.Checked;
Properties.Settings.Default.Prefix = txtPrefix.Text;
Properties.Settings.Default.ExpPrefix = txtExpPrefix.Text;
Properties.Settings.Default.Unique = chkUnique.Checked;
Properties.Settings.Default.UniqueAttrVars = chkUniqueAttrVars.Checked;
Properties.Settings.Default.UniqueVars = chkUniqueVars.Checked;
Properties.Settings.Default.Values = chkValues.Checked;
Properties.Settings.Default.Wrap = chkWrap.Checked;
Properties.Settings.Default.LogVarName = txtLogPost.Text;
Properties.Settings.Default.LogSectName = txtLogSection.Text;
Properties.Settings.Default.Save();
this.Close();
}
private void frmSettings_Load(object sender, EventArgs e)
{
UserTmp = txtUserName.Text;
CompanyTmp = txtCompanyName.Text;
tmpChkNoNsRef = chkNoNsRef.Checked;
tmpChkUniqueVars = chkUniqueVars.Checked;
tmpChkUniqueAttrVars = chkUniqueAttrVars.Checked;
tmpChkUnique = chkUnique.Checked;
tmpChkWrap = chkWrap.Checked;
tmpChkValues = chkValues.Checked;
tmpChkAnaTag = chkAnaTag.Checked;
tmpTxtPrefix = txtPrefix.Text;
tmpTxtExpPrefix = txtExpPrefix.Text;
tmpTxtMaxOcc = txtMaxOcc.Text;
txtLogVarNameTmp = txtLogPost.Text ;
txtLogVarSectTmp = txtLogSection.Text;
tmpChkCountVars = chkCountVars.Checked;
}
private void btnCancel_Click(object sender, EventArgs e)
{
txtUserName.Text = UserTmp;
txtCompanyName.Text = CompanyTmp;
chkNoNsRef.Checked= tmpChkNoNsRef;
chkUniqueVars.Checked= tmpChkUniqueVars;
chkUniqueAttrVars.Checked= tmpChkUniqueAttrVars ;
chkUnique.Checked= tmpChkUnique;
chkWrap.Checked= tmpChkWrap;
chkValues.Checked= tmpChkValues;
chkAnaTag.Checked= tmpChkAnaTag;
txtPrefix.Text= tmpTxtPrefix;
txtExpPrefix.Text = tmpTxtExpPrefix;
txtMaxOcc.Text = tmpTxtMaxOcc;
txtLogPost.Text= txtLogVarNameTmp;
txtLogSection.Text= txtLogVarSectTmp;
chkCountVars.Checked = tmpChkCountVars;
this.Close();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CobXmlSupport
{
public class qualifieldhlp
{
private CobRow qualifiedRow;
private List<CobRow> qualRows;
private Dictionary<string, string> locIndexis;
private string qfhCode;
public qualifieldhlp()
{
qualifiedRow = null;
initQualifieldhlp();
}
private void initQualifieldhlp()
{
qualRows = null;
qfhCode = string.Empty;
locIndexis = null;
}
public qualifieldhlp(CobRow actRow, Dictionary<string, string> all_Inds)
{
initQualifieldhlp();
qualifiedRow = actRow;
initQualRows(ref all_Inds);
generateFieldCode();
}
public void generateFieldCode()
{
if (qualRows.Count > 0)
{
qfhCode = "";
foreach (CobRow localCobRow in qualRows)
{
if (qfhCode.Length > 0)
{
qfhCode += " OF ";
}
qfhCode += localCobRow.FieldName;
if (localCobRow.isOccurs)
{
string tmpInd;
locIndexis.TryGetValue(localCobRow.FieldName, out tmpInd);
qfhCode += " *> ( " + tmpInd + " )";
}
qfhCode += "\r\n";
}
}
}
private void initQualRows(ref Dictionary<string, string> allInds)
{
CobRow tmpRow = qualifiedRow;
if (qualRows == null)
{
qualRows = new List<CobRow>();
}
while (true)
{
if (tmpRow.isOccurs)
{
if (locIndexis == null) locIndexis = new Dictionary<string, string>();
string indVarName = "";
if (!allInds.TryGetValue(tmpRow.FieldName, out indVarName))
{
indVarName = CobRow.checkLongNames(tmpRow.FieldName, 25) + "_ind";
allInds.Add(tmpRow.FieldName, indVarName);
}
locIndexis.Add(tmpRow.FieldName, indVarName);
}
qualRows.Add(tmpRow);
if (tmpRow.LevelParent != null)
{
tmpRow = tmpRow.LevelParent;
}
else break;
}
}
public override string ToString()
{
return qfhCode;
}
}
}