Merge branch 'master' of https://tfomancode.visualstudio.com/defaultcollection/_git/CobXml
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
|
<section name="CobXmlSupport.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="XMLPlayAround.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="XMLPlayAround.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
@ -9,6 +10,64 @@
|
|||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
</startup>
|
</startup>
|
||||||
<userSettings>
|
<userSettings>
|
||||||
|
<CobXmlSupport.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>
|
||||||
|
<setting name="ShowTestbtns" serializeAs="String">
|
||||||
|
<value>False</value>
|
||||||
|
</setting>
|
||||||
|
</CobXmlSupport.Properties.Settings>
|
||||||
<XMLPlayAround.Properties.Settings>
|
<XMLPlayAround.Properties.Settings>
|
||||||
<setting name="LastFile" serializeAs="Xml">
|
<setting name="LastFile" serializeAs="Xml">
|
||||||
<value>
|
<value>
|
||||||
|
|||||||
@ -88,6 +88,7 @@
|
|||||||
<EmbeddedResource Include="ShowCode.resx">
|
<EmbeddedResource Include="ShowCode.resx">
|
||||||
<DependentUpon>ShowCode.cs</DependentUpon>
|
<DependentUpon>ShowCode.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<None Include="App.config" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
|||||||
15
CobXmlSupport/GenCobCode.Designer.cs
generated
15
CobXmlSupport/GenCobCode.Designer.cs
generated
@ -63,6 +63,7 @@
|
|||||||
this.txtExpPrefix = new System.Windows.Forms.TextBox();
|
this.txtExpPrefix = new System.Windows.Forms.TextBox();
|
||||||
this.chkAttribs = new System.Windows.Forms.CheckBox();
|
this.chkAttribs = new System.Windows.Forms.CheckBox();
|
||||||
this.btnTestThings = new System.Windows.Forms.Button();
|
this.btnTestThings = new System.Windows.Forms.Button();
|
||||||
|
this.btnFrXMLTo = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
@ -387,6 +388,7 @@
|
|||||||
this.chkNewArea.TabIndex = 29;
|
this.chkNewArea.TabIndex = 29;
|
||||||
this.chkNewArea.Text = "Till Area";
|
this.chkNewArea.Text = "Till Area";
|
||||||
this.chkNewArea.UseVisualStyleBackColor = true;
|
this.chkNewArea.UseVisualStyleBackColor = true;
|
||||||
|
this.chkNewArea.Visible = false;
|
||||||
this.chkNewArea.CheckedChanged += new System.EventHandler(this.chkNewArea_CheckedChanged);
|
this.chkNewArea.CheckedChanged += new System.EventHandler(this.chkNewArea_CheckedChanged);
|
||||||
//
|
//
|
||||||
// label5
|
// label5
|
||||||
@ -429,11 +431,23 @@
|
|||||||
this.btnTestThings.UseVisualStyleBackColor = true;
|
this.btnTestThings.UseVisualStyleBackColor = true;
|
||||||
this.btnTestThings.Click += new System.EventHandler(this.btnTestThings_Click);
|
this.btnTestThings.Click += new System.EventHandler(this.btnTestThings_Click);
|
||||||
//
|
//
|
||||||
|
// btnFrXMLTo
|
||||||
|
//
|
||||||
|
this.btnFrXMLTo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.btnFrXMLTo.Location = new System.Drawing.Point(673, 655);
|
||||||
|
this.btnFrXMLTo.Name = "btnFrXMLTo";
|
||||||
|
this.btnFrXMLTo.Size = new System.Drawing.Size(92, 22);
|
||||||
|
this.btnFrXMLTo.TabIndex = 34;
|
||||||
|
this.btnFrXMLTo.Text = "Kopiera XML";
|
||||||
|
this.btnFrXMLTo.UseVisualStyleBackColor = true;
|
||||||
|
this.btnFrXMLTo.Click += new System.EventHandler(this.btnFrXMLTo_Click);
|
||||||
|
//
|
||||||
// GenCobCode
|
// GenCobCode
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(951, 686);
|
this.ClientSize = new System.Drawing.Size(951, 686);
|
||||||
|
this.Controls.Add(this.btnFrXMLTo);
|
||||||
this.Controls.Add(this.btnTestThings);
|
this.Controls.Add(this.btnTestThings);
|
||||||
this.Controls.Add(this.chkAttribs);
|
this.Controls.Add(this.chkAttribs);
|
||||||
this.Controls.Add(this.txtExpPrefix);
|
this.Controls.Add(this.txtExpPrefix);
|
||||||
@ -513,6 +527,7 @@
|
|||||||
private System.Windows.Forms.TextBox txtExpPrefix;
|
private System.Windows.Forms.TextBox txtExpPrefix;
|
||||||
private System.Windows.Forms.CheckBox chkAttribs;
|
private System.Windows.Forms.CheckBox chkAttribs;
|
||||||
private System.Windows.Forms.Button btnTestThings;
|
private System.Windows.Forms.Button btnTestThings;
|
||||||
|
private System.Windows.Forms.Button btnFrXMLTo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -68,6 +68,7 @@ namespace CobXmlSupport
|
|||||||
chkDisplays.Enabled = false;
|
chkDisplays.Enabled = false;
|
||||||
chkPerform.Enabled = false;
|
chkPerform.Enabled = false;
|
||||||
chkMvToDisp.Enabled = false;
|
chkMvToDisp.Enabled = false;
|
||||||
|
btnFrXMLTo.Enabled = false;
|
||||||
|
|
||||||
if (cmbLastFile.Text.Length > 0)
|
if (cmbLastFile.Text.Length > 0)
|
||||||
{
|
{
|
||||||
@ -181,6 +182,7 @@ namespace CobXmlSupport
|
|||||||
chkDisplays.Enabled = true;
|
chkDisplays.Enabled = true;
|
||||||
chkPerform.Enabled = true;
|
chkPerform.Enabled = true;
|
||||||
chkMvToDisp.Enabled = true;
|
chkMvToDisp.Enabled = true;
|
||||||
|
btnFrXMLTo.Enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,6 +651,7 @@ namespace CobXmlSupport
|
|||||||
S.ettingWrap = Properties.Settings.Default.Wrap;
|
S.ettingWrap = Properties.Settings.Default.Wrap;
|
||||||
S.ettingLogVarName = Properties.Settings.Default.LogVarName;
|
S.ettingLogVarName = Properties.Settings.Default.LogVarName;
|
||||||
S.ettingLogSectName = Properties.Settings.Default.LogSectName;
|
S.ettingLogSectName = Properties.Settings.Default.LogSectName;
|
||||||
|
S.ettingSpecials = Properties.Settings.Default.ShowTestbtns;
|
||||||
|
|
||||||
chkAnaTag.Checked = S.ettingAnaTag;
|
chkAnaTag.Checked = S.ettingAnaTag;
|
||||||
chkCountVars.Checked = S.ettingCountVars;
|
chkCountVars.Checked = S.ettingCountVars;
|
||||||
@ -662,6 +665,7 @@ namespace CobXmlSupport
|
|||||||
chkUniqueVars.Checked = S.ettingUniqueVars;
|
chkUniqueVars.Checked = S.ettingUniqueVars;
|
||||||
chkValues.Checked = S.ettingValues;
|
chkValues.Checked = S.ettingValues;
|
||||||
chkWrap.Checked = S.ettingWrap;
|
chkWrap.Checked = S.ettingWrap;
|
||||||
|
btnTestThings.Visible = S.ettingSpecials;
|
||||||
|
|
||||||
formLoading = false;
|
formLoading = false;
|
||||||
cmbLastFile.Text = cmbLastFile.Items[0].ToString();
|
cmbLastFile.Text = cmbLastFile.Items[0].ToString();
|
||||||
@ -1020,6 +1024,7 @@ namespace CobXmlSupport
|
|||||||
setWindow.ChkCountVars = S.ettingCountVars;
|
setWindow.ChkCountVars = S.ettingCountVars;
|
||||||
setWindow.LogPost = S.ettingLogVarName;
|
setWindow.LogPost = S.ettingLogVarName;
|
||||||
setWindow.LogSection = S.ettingLogSectName;
|
setWindow.LogSection = S.ettingLogSectName;
|
||||||
|
setWindow.ChkShowTestbtns = S.ettingSpecials;
|
||||||
|
|
||||||
setWindow.ShowDialog();
|
setWindow.ShowDialog();
|
||||||
S.ettingUserName = setWindow.UserName;
|
S.ettingUserName = setWindow.UserName;
|
||||||
@ -1038,6 +1043,7 @@ namespace CobXmlSupport
|
|||||||
S.ettingCountVars = setWindow.ChkCountVars;
|
S.ettingCountVars = setWindow.ChkCountVars;
|
||||||
S.ettingLogVarName = setWindow.LogPost;
|
S.ettingLogVarName = setWindow.LogPost;
|
||||||
S.ettingLogSectName = setWindow.LogSection;
|
S.ettingLogSectName = setWindow.LogSection;
|
||||||
|
S.ettingSpecials = setWindow.ChkShowTestbtns;
|
||||||
|
|
||||||
chkAnaTag.Checked = S.ettingAnaTag;
|
chkAnaTag.Checked = S.ettingAnaTag;
|
||||||
chkCountVars.Checked = S.ettingCountVars;
|
chkCountVars.Checked = S.ettingCountVars;
|
||||||
@ -1051,6 +1057,7 @@ namespace CobXmlSupport
|
|||||||
txtMaxOcc.Text = S.ettingMaxOcc;
|
txtMaxOcc.Text = S.ettingMaxOcc;
|
||||||
txtPrefix.Text = S.ettingPrefix;
|
txtPrefix.Text = S.ettingPrefix;
|
||||||
txtExpPrefix.Text = S.ettingExpPrefix;
|
txtExpPrefix.Text = S.ettingExpPrefix;
|
||||||
|
btnTestThings.Visible = S.ettingSpecials;
|
||||||
|
|
||||||
eventRun = false;
|
eventRun = false;
|
||||||
runXMLgen();
|
runXMLgen();
|
||||||
@ -1680,79 +1687,114 @@ namespace CobXmlSupport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnTestThings_Click(object sender, EventArgs e)
|
|
||||||
|
private void createXMLMoveCode()
|
||||||
{
|
{
|
||||||
bool loopTyp = false;
|
bool loopTyp = false;
|
||||||
|
|
||||||
|
//Create showing window
|
||||||
fromToMoves = new ShowCode();
|
fromToMoves = new ShowCode();
|
||||||
fromToMoves.Parent = this;
|
fromToMoves.Parent = this;
|
||||||
fromToMoves.Labeltext = "Testing to Creat \"move From \" Code";
|
fromToMoves.Labeltext = "Created \"move From \" Code";
|
||||||
|
|
||||||
|
|
||||||
|
//Dictionary for indexes, init IndexState class and list for qualifiedHelper class
|
||||||
Dictionary<string, string> testIndexes = new Dictionary<string, string>();
|
Dictionary<string, string> testIndexes = new Dictionary<string, string>();
|
||||||
IndexState lIs = new IndexState(testIndexes,rowList);
|
IndexState lIs = new IndexState(testIndexes, rowList);
|
||||||
//if (qldList == null)
|
qldList = new List<qualifieldhlp>();
|
||||||
//{
|
|
||||||
qldList = new List<qualifieldhlp>();
|
//Build the qualified helper object for each xml-record fieal (eg XMLTag)
|
||||||
//}
|
|
||||||
foreach (CobRow zRow in rowList)
|
foreach (CobRow zRow in rowList)
|
||||||
{
|
{
|
||||||
qualifieldhlp tmpQlh = new qualifieldhlp(zRow, lIs.Indexes);
|
qualifieldhlp tmpQlh = new qualifieldhlp(zRow, lIs.Indexes);
|
||||||
qldList.Add(tmpQlh);
|
qldList.Add(tmpQlh);
|
||||||
}
|
}
|
||||||
|
//Indstatus keep track on present changings concerning indexes qualifying each qualified XML-record-field
|
||||||
IndStatus indSt = new IndStatus();
|
IndStatus indSt = new IndStatus();
|
||||||
|
|
||||||
|
//here comes the central work-loop
|
||||||
foreach (qualifieldhlp tmpQfh in qldList)
|
foreach (qualifieldhlp tmpQfh in qldList)
|
||||||
{
|
{
|
||||||
|
|
||||||
//obs under development
|
//Create header information on created text
|
||||||
|
if (tmpQfh.qualCobRow.CobLevel < 2)
|
||||||
|
{
|
||||||
|
string inFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1);
|
||||||
|
CreateComment(fromToMoves.CodeShower, "Moves from " + tmpQfh.qualCobRow.FieldName, S.ettingUserName, S.ettingCompany, inFile);
|
||||||
|
fromToMoves.CodeShower.Text += "\r\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
//IndStatus-object takes care of optionally occuring indexes
|
||||||
indSt.handleStatus(tmpQfh.indexStrings);
|
indSt.handleStatus(tmpQfh.indexStrings);
|
||||||
|
|
||||||
|
//If indexes get out of scope there will come an END-PERFORM for each
|
||||||
for (int i = 0; i < indSt.Returns; i++)
|
for (int i = 0; i < indSt.Returns; i++)
|
||||||
{
|
{
|
||||||
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
|
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Each index comming into scope will start a new PERFORM VARYING loop
|
||||||
if (indSt.NewInds != null)
|
if (indSt.NewInds != null)
|
||||||
{
|
{
|
||||||
foreach (string indTxt in indSt.NewInds)
|
foreach (string indTxt in indSt.NewInds)
|
||||||
{
|
{
|
||||||
fromToMoves.CodeShower.Text += " MOVE " + tmpQfh.qualCobRow.CountIn + "\r\n" + tmpQfh.indexRedText;
|
//Before perform varying, move the count-value from old structure to new
|
||||||
|
fromToMoves.CodeShower.Text += " MOVE " + tmpQfh.qualCobRow.CountIn + "\r\n" + tmpQfh.indexRedText;
|
||||||
fromToMoves.CodeShower.Text += " TO " + tmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + tmpQfh.indexRedText;
|
fromToMoves.CodeShower.Text += " TO " + tmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + tmpQfh.indexRedText;
|
||||||
|
//Perform
|
||||||
fromToMoves.CodeShower.Text += " PERFORM VARYING " + indTxt + " FROM 1 BY 1\r\n UNTIL " +
|
fromToMoves.CodeShower.Text += " PERFORM VARYING " + indTxt + " FROM 1 BY 1\r\n UNTIL " +
|
||||||
indTxt + "\r\n > " + tmpQfh.qualCobRow.CountIn.ToString() + "\r\n" + tmpQfh.indexRedText;
|
indTxt + "\r\n > " + tmpQfh.qualCobRow.CountIn.ToString() + "\r\n" + tmpQfh.indexRedText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//obs under development
|
|
||||||
//if (tmpQfh.qualCobRow.FieldDef != "")
|
|
||||||
//{
|
|
||||||
if (tmpQfh.qualCobRow.FieldName.ToUpper().Contains("_VALUE")) { }
|
|
||||||
else {
|
|
||||||
loopTyp = tmpQfh.qualCobRow.isOccurs ;//&& tmpQfh.qualCobRow.FieldDef == "";
|
|
||||||
fromToMoves.CodeShower.Text += " IF " + tmpQfh.qualCobRow.CountIn.ToString() + "\r\n" + (string)(loopTyp ? tmpQfh.indexRedText : tmpQfh.indexText) + " > 0 \r\n";
|
|
||||||
}
|
|
||||||
fromToMoves.CodeShower.Text += " MOVE " + tmpQfh.ToString();
|
|
||||||
fromToMoves.CodeShower.Text += " TO " + tmpQfh.ToExpString();
|
|
||||||
|
|
||||||
if (tmpQfh.qualCobRow.FieldName.ToUpper().Contains("_VALUE")) { }
|
//When count-variable is put on a "Value" XML-record-field the the count-value isnt correctly updated so better always move the value as is
|
||||||
else
|
if (tmpQfh.qualCobRow.FieldName.ToUpper().Contains("_VALUE")) { }
|
||||||
{
|
else
|
||||||
fromToMoves.CodeShower.Text += " MOVE " + tmpQfh.qualCobRow.CountIn + "\r\n" + (string)(loopTyp ? tmpQfh.indexRedText : tmpQfh.indexText);
|
{
|
||||||
fromToMoves.CodeShower.Text += " TO " + tmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + (string)(loopTyp ? tmpQfh.indexRedText : tmpQfh.indexText);
|
//when xml-record-field with occurs, the last index shall not be used (then use tmpQfh.indexRedText instead of tmpQfh.indexText
|
||||||
fromToMoves.CodeShower.Text += " ELSE\r\n";
|
loopTyp = tmpQfh.qualCobRow.isOccurs;
|
||||||
fromToMoves.CodeShower.Text += " MOVE 0 TO " + tmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + (string)(loopTyp ? tmpQfh.indexRedText : tmpQfh.indexText);
|
fromToMoves.CodeShower.Text += " IF " + tmpQfh.qualCobRow.CountIn.ToString() + "\r\n" + (string)(loopTyp ? tmpQfh.indexRedText : tmpQfh.indexText) + " > 0 \r\n";
|
||||||
fromToMoves.CodeShower.Text += " END-IF\r\n";
|
}
|
||||||
}
|
//The acutal move of present fields
|
||||||
//}
|
fromToMoves.CodeShower.Text += " MOVE " + tmpQfh.ToString();
|
||||||
|
fromToMoves.CodeShower.Text += " TO " + tmpQfh.ToExpString();
|
||||||
|
|
||||||
|
if (tmpQfh.qualCobRow.FieldName.ToUpper().Contains("_VALUE")) { }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fromToMoves.CodeShower.Text += " MOVE " + tmpQfh.qualCobRow.CountIn + "\r\n" + (string)(loopTyp ? tmpQfh.indexRedText : tmpQfh.indexText);
|
||||||
|
fromToMoves.CodeShower.Text += " TO " + tmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + (string)(loopTyp ? tmpQfh.indexRedText : tmpQfh.indexText);
|
||||||
|
fromToMoves.CodeShower.Text += " ELSE\r\n";
|
||||||
|
fromToMoves.CodeShower.Text += " MOVE 0 TO " + tmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + (string)(loopTyp ? tmpQfh.indexRedText : tmpQfh.indexText);
|
||||||
|
fromToMoves.CodeShower.Text += " END-IF\r\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get optionally occuring last END-PERFORMs...
|
||||||
indSt.handleStatus(null);
|
indSt.handleStatus(null);
|
||||||
for (int i = 0; i < indSt.Returns; i++)
|
for (int i = 0; i < indSt.Returns; i++)
|
||||||
{
|
{
|
||||||
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
|
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//List all used indexes
|
||||||
|
string tempIndText = "";
|
||||||
|
fromToMoves.CodeShower.Text = addOccursVars(testIndexes, fromToMoves.CodeShower.Text, tempIndText);
|
||||||
|
|
||||||
fromToMoves.Show();
|
fromToMoves.Show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void btnTestThings_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
createXMLMoveCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnFrXMLTo_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
createXMLMoveCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
26
CobXmlSupport/Properties/Settings.Designer.cs
generated
26
CobXmlSupport/Properties/Settings.Designer.cs
generated
@ -8,27 +8,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace CobXmlSupport.Properties
|
namespace CobXmlSupport.Properties {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
|
||||||
public static Settings Default {
|
public static Settings Default {
|
||||||
get {
|
get {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return defaultInstance;
|
return defaultInstance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,5 +217,17 @@ namespace CobXmlSupport.Properties
|
|||||||
this["ExpPrefix"] = value;
|
this["ExpPrefix"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||||
|
public bool ShowTestbtns {
|
||||||
|
get {
|
||||||
|
return ((bool)(this["ShowTestbtns"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["ShowTestbtns"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="CobXmlSupport.Properties" GeneratedClassName="Settings">
|
||||||
<Profiles />
|
<Profiles />
|
||||||
<Settings>
|
<Settings>
|
||||||
<Setting Name="LastFile" Type="System.Collections.Specialized.StringCollection" Scope="User">
|
<Setting Name="LastFile" Type="System.Collections.Specialized.StringCollection" Scope="User">
|
||||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
@ -53,5 +53,8 @@
|
|||||||
<Setting Name="ExpPrefix" Type="System.String" Scope="User">
|
<Setting Name="ExpPrefix" Type="System.String" Scope="User">
|
||||||
<Value Profile="(Default)">GWX_</Value>
|
<Value Profile="(Default)">GWX_</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="ShowTestbtns" Type="System.Boolean" Scope="User">
|
||||||
|
<Value Profile="(Default)">False</Value>
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
@ -23,6 +23,7 @@ namespace CobXmlSupport
|
|||||||
public static bool ettingCountVars;
|
public static bool ettingCountVars;
|
||||||
public static string ettingLogVarName;
|
public static string ettingLogVarName;
|
||||||
public static string ettingLogSectName;
|
public static string ettingLogSectName;
|
||||||
|
public static bool ettingSpecials;
|
||||||
//-------------------------
|
//-------------------------
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
64
CobXmlSupport/frmSettings.Designer.cs
generated
64
CobXmlSupport/frmSettings.Designer.cs
generated
@ -49,21 +49,24 @@
|
|||||||
this.chkValues = new System.Windows.Forms.CheckBox();
|
this.chkValues = new System.Windows.Forms.CheckBox();
|
||||||
this.chkAnaTag = new System.Windows.Forms.CheckBox();
|
this.chkAnaTag = new System.Windows.Forms.CheckBox();
|
||||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.txtExpPrefix = new System.Windows.Forms.TextBox();
|
||||||
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
this.label6 = new System.Windows.Forms.Label();
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
this.txtLogPost = new System.Windows.Forms.TextBox();
|
this.txtLogPost = new System.Windows.Forms.TextBox();
|
||||||
this.txtLogSection = new System.Windows.Forms.TextBox();
|
this.txtLogSection = new System.Windows.Forms.TextBox();
|
||||||
this.label7 = new System.Windows.Forms.Label();
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
this.txtExpPrefix = new System.Windows.Forms.TextBox();
|
this.specials = new System.Windows.Forms.GroupBox();
|
||||||
this.label8 = new System.Windows.Forms.Label();
|
this.chkShowTestbtns = new System.Windows.Forms.CheckBox();
|
||||||
this.groupBox1.SuspendLayout();
|
this.groupBox1.SuspendLayout();
|
||||||
this.groupBox2.SuspendLayout();
|
this.groupBox2.SuspendLayout();
|
||||||
|
this.specials.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// btnCancel
|
// btnCancel
|
||||||
//
|
//
|
||||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
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.Location = new System.Drawing.Point(487, 370);
|
||||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
|
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnCancel.Name = "btnCancel";
|
this.btnCancel.Name = "btnCancel";
|
||||||
this.btnCancel.Size = new System.Drawing.Size(79, 24);
|
this.btnCancel.Size = new System.Drawing.Size(79, 24);
|
||||||
@ -75,7 +78,7 @@
|
|||||||
// btnSave
|
// btnSave
|
||||||
//
|
//
|
||||||
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
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.Location = new System.Drawing.Point(403, 370);
|
||||||
this.btnSave.Margin = new System.Windows.Forms.Padding(2);
|
this.btnSave.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnSave.Name = "btnSave";
|
this.btnSave.Name = "btnSave";
|
||||||
this.btnSave.Size = new System.Drawing.Size(79, 24);
|
this.btnSave.Size = new System.Drawing.Size(79, 24);
|
||||||
@ -114,7 +117,7 @@
|
|||||||
//
|
//
|
||||||
// txtCompanyName
|
// txtCompanyName
|
||||||
//
|
//
|
||||||
this.txtCompanyName.Location = new System.Drawing.Point(101, 65);
|
this.txtCompanyName.Location = new System.Drawing.Point(101, 62);
|
||||||
this.txtCompanyName.Margin = new System.Windows.Forms.Padding(2);
|
this.txtCompanyName.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.txtCompanyName.Name = "txtCompanyName";
|
this.txtCompanyName.Name = "txtCompanyName";
|
||||||
this.txtCompanyName.Size = new System.Drawing.Size(195, 20);
|
this.txtCompanyName.Size = new System.Drawing.Size(195, 20);
|
||||||
@ -271,6 +274,23 @@
|
|||||||
this.groupBox1.TabStop = false;
|
this.groupBox1.TabStop = false;
|
||||||
this.groupBox1.Text = "Utgångs inställningar";
|
this.groupBox1.Text = "Utgångs inställningar";
|
||||||
//
|
//
|
||||||
|
// 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 :";
|
||||||
|
//
|
||||||
// groupBox2
|
// groupBox2
|
||||||
//
|
//
|
||||||
this.groupBox2.Controls.Add(this.label6);
|
this.groupBox2.Controls.Add(this.label6);
|
||||||
@ -317,28 +337,32 @@
|
|||||||
this.label7.TabIndex = 37;
|
this.label7.TabIndex = 37;
|
||||||
this.label7.Text = "Namn log section";
|
this.label7.Text = "Namn log section";
|
||||||
//
|
//
|
||||||
// txtExpPrefix
|
// specials
|
||||||
//
|
//
|
||||||
this.txtExpPrefix.Location = new System.Drawing.Point(213, 51);
|
this.specials.Controls.Add(this.chkShowTestbtns);
|
||||||
this.txtExpPrefix.Name = "txtExpPrefix";
|
this.specials.Location = new System.Drawing.Point(325, 216);
|
||||||
this.txtExpPrefix.Size = new System.Drawing.Size(57, 20);
|
this.specials.Name = "specials";
|
||||||
this.txtExpPrefix.TabIndex = 40;
|
this.specials.Size = new System.Drawing.Size(240, 149);
|
||||||
this.txtExpPrefix.Text = "GWX_";
|
this.specials.TabIndex = 41;
|
||||||
|
this.specials.TabStop = false;
|
||||||
|
this.specials.Text = "specialla inställningar";
|
||||||
//
|
//
|
||||||
// label8
|
// chkShowTestbtns
|
||||||
//
|
//
|
||||||
this.label8.AutoSize = true;
|
this.chkShowTestbtns.AutoSize = true;
|
||||||
this.label8.Location = new System.Drawing.Point(137, 52);
|
this.chkShowTestbtns.Location = new System.Drawing.Point(7, 20);
|
||||||
this.label8.Name = "label8";
|
this.chkShowTestbtns.Name = "chkShowTestbtns";
|
||||||
this.label8.Size = new System.Drawing.Size(70, 13);
|
this.chkShowTestbtns.Size = new System.Drawing.Size(95, 17);
|
||||||
this.label8.TabIndex = 39;
|
this.chkShowTestbtns.TabIndex = 0;
|
||||||
this.label8.Text = "export prefix :";
|
this.chkShowTestbtns.Text = "visa testknapp";
|
||||||
|
this.chkShowTestbtns.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// frmSettings
|
// frmSettings
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(577, 399);
|
this.ClientSize = new System.Drawing.Size(577, 399);
|
||||||
|
this.Controls.Add(this.specials);
|
||||||
this.Controls.Add(this.groupBox2);
|
this.Controls.Add(this.groupBox2);
|
||||||
this.Controls.Add(this.groupBox1);
|
this.Controls.Add(this.groupBox1);
|
||||||
this.Controls.Add(this.txtCompanyName);
|
this.Controls.Add(this.txtCompanyName);
|
||||||
@ -357,6 +381,8 @@
|
|||||||
this.groupBox1.PerformLayout();
|
this.groupBox1.PerformLayout();
|
||||||
this.groupBox2.ResumeLayout(false);
|
this.groupBox2.ResumeLayout(false);
|
||||||
this.groupBox2.PerformLayout();
|
this.groupBox2.PerformLayout();
|
||||||
|
this.specials.ResumeLayout(false);
|
||||||
|
this.specials.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@ -391,5 +417,7 @@
|
|||||||
private System.Windows.Forms.Label label7;
|
private System.Windows.Forms.Label label7;
|
||||||
private System.Windows.Forms.TextBox txtExpPrefix;
|
private System.Windows.Forms.TextBox txtExpPrefix;
|
||||||
private System.Windows.Forms.Label label8;
|
private System.Windows.Forms.Label label8;
|
||||||
|
private System.Windows.Forms.GroupBox specials;
|
||||||
|
private System.Windows.Forms.CheckBox chkShowTestbtns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -21,6 +21,7 @@ namespace CobXmlSupport
|
|||||||
private bool tmpChkValues;
|
private bool tmpChkValues;
|
||||||
private bool tmpChkAnaTag;
|
private bool tmpChkAnaTag;
|
||||||
private bool tmpChkCountVars;
|
private bool tmpChkCountVars;
|
||||||
|
private bool tmpShowTestBtns;
|
||||||
private string tmpTxtPrefix;
|
private string tmpTxtPrefix;
|
||||||
private string tmpTxtExpPrefix;
|
private string tmpTxtExpPrefix;
|
||||||
private string tmpTxtMaxOcc;
|
private string tmpTxtMaxOcc;
|
||||||
@ -170,6 +171,19 @@ namespace CobXmlSupport
|
|||||||
chkAnaTag.Checked = value;
|
chkAnaTag.Checked = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool ChkShowTestbtns
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return chkShowTestbtns.Checked;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
chkShowTestbtns.Checked = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string TxtMaxOcc
|
public string TxtMaxOcc
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -219,6 +233,7 @@ namespace CobXmlSupport
|
|||||||
Properties.Settings.Default.UniqueVars = chkUniqueVars.Checked;
|
Properties.Settings.Default.UniqueVars = chkUniqueVars.Checked;
|
||||||
Properties.Settings.Default.Values = chkValues.Checked;
|
Properties.Settings.Default.Values = chkValues.Checked;
|
||||||
Properties.Settings.Default.Wrap = chkWrap.Checked;
|
Properties.Settings.Default.Wrap = chkWrap.Checked;
|
||||||
|
Properties.Settings.Default.ShowTestbtns= chkShowTestbtns.Checked;
|
||||||
Properties.Settings.Default.LogVarName = txtLogPost.Text;
|
Properties.Settings.Default.LogVarName = txtLogPost.Text;
|
||||||
Properties.Settings.Default.LogSectName = txtLogSection.Text;
|
Properties.Settings.Default.LogSectName = txtLogSection.Text;
|
||||||
Properties.Settings.Default.Save();
|
Properties.Settings.Default.Save();
|
||||||
@ -237,6 +252,7 @@ namespace CobXmlSupport
|
|||||||
tmpChkWrap = chkWrap.Checked;
|
tmpChkWrap = chkWrap.Checked;
|
||||||
tmpChkValues = chkValues.Checked;
|
tmpChkValues = chkValues.Checked;
|
||||||
tmpChkAnaTag = chkAnaTag.Checked;
|
tmpChkAnaTag = chkAnaTag.Checked;
|
||||||
|
tmpShowTestBtns = chkShowTestbtns.Checked;
|
||||||
tmpTxtPrefix = txtPrefix.Text;
|
tmpTxtPrefix = txtPrefix.Text;
|
||||||
tmpTxtExpPrefix = txtExpPrefix.Text;
|
tmpTxtExpPrefix = txtExpPrefix.Text;
|
||||||
tmpTxtMaxOcc = txtMaxOcc.Text;
|
tmpTxtMaxOcc = txtMaxOcc.Text;
|
||||||
@ -257,6 +273,7 @@ namespace CobXmlSupport
|
|||||||
chkWrap.Checked= tmpChkWrap;
|
chkWrap.Checked= tmpChkWrap;
|
||||||
chkValues.Checked= tmpChkValues;
|
chkValues.Checked= tmpChkValues;
|
||||||
chkAnaTag.Checked= tmpChkAnaTag;
|
chkAnaTag.Checked= tmpChkAnaTag;
|
||||||
|
chkShowTestbtns.Checked = tmpShowTestBtns;
|
||||||
txtPrefix.Text= tmpTxtPrefix;
|
txtPrefix.Text= tmpTxtPrefix;
|
||||||
txtExpPrefix.Text = tmpTxtExpPrefix;
|
txtExpPrefix.Text = tmpTxtExpPrefix;
|
||||||
txtMaxOcc.Text = tmpTxtMaxOcc;
|
txtMaxOcc.Text = tmpTxtMaxOcc;
|
||||||
|
|||||||
Reference in New Issue
Block a user