diff --git a/CobXmlSupport/GenCobCode.Designer.cs b/CobXmlSupport/GenCobCode.Designer.cs index c4d13ca..32bda62 100644 --- a/CobXmlSupport/GenCobCode.Designer.cs +++ b/CobXmlSupport/GenCobCode.Designer.cs @@ -59,6 +59,7 @@ this.chkBackupVars = new System.Windows.Forms.CheckBox(); this.btnRerun = new System.Windows.Forms.Button(); this.grpProduce = new System.Windows.Forms.GroupBox(); + this.chkEvents = new System.Windows.Forms.CheckBox(); this.btnMoveFromAttr = new System.Windows.Forms.Button(); this.btnXmlKopAttr = 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) | System.Windows.Forms.AnchorStyles.Right))); + this.grpProduce.Controls.Add(this.chkEvents); this.grpProduce.Controls.Add(this.btnMoveFromAttr); this.grpProduce.Controls.Add(this.btnXmlKopAttr); this.grpProduce.Controls.Add(this.btnFrXMLTo); @@ -403,6 +405,17 @@ this.grpProduce.TabStop = false; 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 // 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 btnXmlKopAttr; private System.Windows.Forms.Button btnMoveFromAttr; + private System.Windows.Forms.CheckBox chkEvents; } } diff --git a/CobXmlSupport/GenCobCode.cs b/CobXmlSupport/GenCobCode.cs index 62ae087..b7d074d 100644 --- a/CobXmlSupport/GenCobCode.cs +++ b/CobXmlSupport/GenCobCode.cs @@ -109,6 +109,7 @@ namespace CobXmlSupport private void runXMLgen() { + chkEvents.Checked = false; if (!formLoading) { btnGenICode.Enabled = false; @@ -787,6 +788,7 @@ namespace CobXmlSupport chkWrap.Checked = true; chkNewArea.Checked = false; //chkNewArea.Checked = true; + chkEvents.Checked = false; ClientSizeMinWidth = this.ClientSize.Width; @@ -2015,8 +2017,11 @@ namespace CobXmlSupport string chosenKey = testIndexes.FirstOrDefault(x => x.Value == xtIndex).Key; // indexes = search FieldName from present FieldIndex locTmpQfh = qldList.First(x => x.qualCobRow.FieldName == chosenKey); // Find QualifiedHelp-object for right field - fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "LAST-in-", - xtIndex, ref SectionNames) + "\r\n"; + if (chkEvents.Checked) + { + fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "LAST-in-", + xtIndex, ref SectionNames) + "\r\n"; + } fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n"; } @@ -2042,8 +2047,12 @@ namespace CobXmlSupport //string tmpCheckVar = ""; indexStack.Push(indTxt); - fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "FIRST-in-", - indTxt, ref SectionNames) + "\r\n"; + if (chkEvents.Checked) + { + + fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "FIRST-in-", + indTxt, ref SectionNames) + "\r\n"; + } } }