Possibility to avoid event-procedures

This commit is contained in:
2015-11-11 01:27:31 +01:00
parent d115ed2307
commit 342f19daef
2 changed files with 27 additions and 4 deletions

View File

@ -59,6 +59,7 @@
this.chkBackupVars = new System.Windows.Forms.CheckBox(); this.chkBackupVars = new System.Windows.Forms.CheckBox();
this.btnRerun = new System.Windows.Forms.Button(); this.btnRerun = new System.Windows.Forms.Button();
this.grpProduce = new System.Windows.Forms.GroupBox(); this.grpProduce = new System.Windows.Forms.GroupBox();
this.chkEvents = new System.Windows.Forms.CheckBox();
this.btnMoveFromAttr = new System.Windows.Forms.Button(); this.btnMoveFromAttr = new System.Windows.Forms.Button();
this.btnXmlKopAttr = new System.Windows.Forms.Button(); this.btnXmlKopAttr = new System.Windows.Forms.Button();
this.btnFrXMLTo = new System.Windows.Forms.Button(); this.btnFrXMLTo = new System.Windows.Forms.Button();
@ -385,6 +386,7 @@
// //
this.grpProduce.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.grpProduce.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.grpProduce.Controls.Add(this.chkEvents);
this.grpProduce.Controls.Add(this.btnMoveFromAttr); this.grpProduce.Controls.Add(this.btnMoveFromAttr);
this.grpProduce.Controls.Add(this.btnXmlKopAttr); this.grpProduce.Controls.Add(this.btnXmlKopAttr);
this.grpProduce.Controls.Add(this.btnFrXMLTo); this.grpProduce.Controls.Add(this.btnFrXMLTo);
@ -403,6 +405,17 @@
this.grpProduce.TabStop = false; this.grpProduce.TabStop = false;
this.grpProduce.Text = "Producera"; this.grpProduce.Text = "Producera";
// //
// chkEvents
//
this.chkEvents.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkEvents.AutoSize = true;
this.chkEvents.Location = new System.Drawing.Point(389, 86);
this.chkEvents.Name = "chkEvents";
this.chkEvents.Size = new System.Drawing.Size(90, 17);
this.chkEvents.TabIndex = 46;
this.chkEvents.Text = "skapa events";
this.chkEvents.UseVisualStyleBackColor = true;
//
// btnMoveFromAttr // btnMoveFromAttr
// //
this.btnMoveFromAttr.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnMoveFromAttr.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@ -664,6 +677,7 @@
private System.Windows.Forms.Button btnShowWorkFiles; private System.Windows.Forms.Button btnShowWorkFiles;
private System.Windows.Forms.Button btnXmlKopAttr; private System.Windows.Forms.Button btnXmlKopAttr;
private System.Windows.Forms.Button btnMoveFromAttr; private System.Windows.Forms.Button btnMoveFromAttr;
private System.Windows.Forms.CheckBox chkEvents;
} }
} }

View File

@ -109,6 +109,7 @@ namespace CobXmlSupport
private void runXMLgen() private void runXMLgen()
{ {
chkEvents.Checked = false;
if (!formLoading) if (!formLoading)
{ {
btnGenICode.Enabled = false; btnGenICode.Enabled = false;
@ -787,6 +788,7 @@ namespace CobXmlSupport
chkWrap.Checked = true; chkWrap.Checked = true;
chkNewArea.Checked = false; chkNewArea.Checked = false;
//chkNewArea.Checked = true; //chkNewArea.Checked = true;
chkEvents.Checked = false;
ClientSizeMinWidth = this.ClientSize.Width; ClientSizeMinWidth = this.ClientSize.Width;
@ -2015,8 +2017,11 @@ namespace CobXmlSupport
string chosenKey = testIndexes.FirstOrDefault(x => x.Value == xtIndex).Key; // indexes = <FieldName , FieldIndex> search FieldName from present FieldIndex string chosenKey = testIndexes.FirstOrDefault(x => x.Value == xtIndex).Key; // indexes = <FieldName , FieldIndex> search FieldName from present FieldIndex
locTmpQfh = qldList.First(x => x.qualCobRow.FieldName == chosenKey); // Find QualifiedHelp-object for right field locTmpQfh = qldList.First(x => x.qualCobRow.FieldName == chosenKey); // Find QualifiedHelp-object for right field
if (chkEvents.Checked)
{
fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "LAST-in-", fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "LAST-in-",
xtIndex, ref SectionNames) + "\r\n"; xtIndex, ref SectionNames) + "\r\n";
}
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n"; fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
} }
@ -2042,10 +2047,14 @@ namespace CobXmlSupport
//string tmpCheckVar = ""; //string tmpCheckVar = "";
indexStack.Push(indTxt); indexStack.Push(indTxt);
if (chkEvents.Checked)
{
fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "FIRST-in-", fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "FIRST-in-",
indTxt, ref SectionNames) + "\r\n"; indTxt, ref SectionNames) + "\r\n";
} }
} }
}
//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 //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
if (tmpQfh.qualCobRow.FieldName.ToUpper().Contains("_VALUE")) { } if (tmpQfh.qualCobRow.FieldName.ToUpper().Contains("_VALUE")) { }