diff --git a/CobXmlSupport/GenCobCode.Designer.cs b/CobXmlSupport/GenCobCode.Designer.cs index 51905d4..2fa7042 100644 --- a/CobXmlSupport/GenCobCode.Designer.cs +++ b/CobXmlSupport/GenCobCode.Designer.cs @@ -72,6 +72,7 @@ this.btnSaveArea = new System.Windows.Forms.Button(); this.btnShowWorkFiles = new System.Windows.Forms.Button(); this.btnXmlKopAttr = new System.Windows.Forms.Button(); + this.btnMoveFromAttr = new System.Windows.Forms.Button(); this.grpProduce.SuspendLayout(); this.grpSettings.SuspendLayout(); this.SuspendLayout(); @@ -95,7 +96,7 @@ this.outText.Multiline = true; this.outText.Name = "outText"; this.outText.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.outText.Size = new System.Drawing.Size(380, 456); + this.outText.Size = new System.Drawing.Size(380, 445); this.outText.TabIndex = 1; this.outText.WordWrap = false; // @@ -109,7 +110,7 @@ this.outCob.Multiline = true; this.outCob.Name = "outCob"; this.outCob.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.outCob.Size = new System.Drawing.Size(545, 454); + this.outCob.Size = new System.Drawing.Size(545, 443); this.outCob.TabIndex = 2; this.outCob.WordWrap = false; this.outCob.KeyDown += new System.Windows.Forms.KeyEventHandler(this.outCob_KeyDown); @@ -309,7 +310,7 @@ // 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(9, 26); + this.btnSettings.Location = new System.Drawing.Point(9, 37); this.btnSettings.Margin = new System.Windows.Forms.Padding(2); this.btnSettings.Name = "btnSettings"; this.btnSettings.Size = new System.Drawing.Size(81, 23); @@ -339,7 +340,7 @@ // btnTestThings // this.btnTestThings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnTestThings.Location = new System.Drawing.Point(9, 63); + this.btnTestThings.Location = new System.Drawing.Point(9, 74); this.btnTestThings.Name = "btnTestThings"; this.btnTestThings.Size = new System.Drawing.Size(81, 23); this.btnTestThings.TabIndex = 33; @@ -350,7 +351,7 @@ // btnCrossref // this.btnCrossref.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnCrossref.Location = new System.Drawing.Point(95, 26); + this.btnCrossref.Location = new System.Drawing.Point(95, 37); this.btnCrossref.Name = "btnCrossref"; this.btnCrossref.Size = new System.Drawing.Size(81, 23); this.btnCrossref.TabIndex = 35; @@ -362,7 +363,7 @@ // this.chkBackupVars.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.chkBackupVars.AutoSize = true; - this.chkBackupVars.Location = new System.Drawing.Point(96, 67); + this.chkBackupVars.Location = new System.Drawing.Point(96, 78); this.chkBackupVars.Name = "chkBackupVars"; this.chkBackupVars.Size = new System.Drawing.Size(87, 17); this.chkBackupVars.TabIndex = 36; @@ -384,6 +385,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.btnMoveFromAttr); this.grpProduce.Controls.Add(this.btnXmlKopAttr); this.grpProduce.Controls.Add(this.btnFrXMLTo); this.grpProduce.Controls.Add(this.chkAttribs); @@ -394,9 +396,9 @@ this.grpProduce.Controls.Add(this.btnMoveFrom); this.grpProduce.Controls.Add(this.btnMoves); this.grpProduce.Controls.Add(this.btnGenICode); - this.grpProduce.Location = new System.Drawing.Point(406, 583); + this.grpProduce.Location = new System.Drawing.Point(407, 572); this.grpProduce.Name = "grpProduce"; - this.grpProduce.Size = new System.Drawing.Size(545, 99); + this.grpProduce.Size = new System.Drawing.Size(545, 110); this.grpProduce.TabIndex = 38; this.grpProduce.TabStop = false; this.grpProduce.Text = "Producera"; @@ -404,7 +406,7 @@ // 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(290, 49); + this.btnFrXMLTo.Location = new System.Drawing.Point(290, 60); this.btnFrXMLTo.Name = "btnFrXMLTo"; this.btnFrXMLTo.Size = new System.Drawing.Size(92, 22); this.btnFrXMLTo.TabIndex = 43; @@ -416,7 +418,7 @@ // 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(389, 54); + this.chkAttribs.Location = new System.Drawing.Point(389, 65); this.chkAttribs.Name = "chkAttribs"; this.chkAttribs.Size = new System.Drawing.Size(85, 17); this.chkAttribs.TabIndex = 42; @@ -429,7 +431,7 @@ // 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(388, 21); + this.chkNewArea.Location = new System.Drawing.Point(388, 32); this.chkNewArea.Name = "chkNewArea"; this.chkNewArea.Size = new System.Drawing.Size(64, 17); this.chkNewArea.TabIndex = 41; @@ -442,7 +444,7 @@ // 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(212, 38); + this.chkMvToDisp.Location = new System.Drawing.Point(212, 49); this.chkMvToDisp.Name = "chkMvToDisp"; this.chkMvToDisp.Size = new System.Drawing.Size(71, 17); this.chkMvToDisp.TabIndex = 40; @@ -454,7 +456,7 @@ // 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(212, 21); + this.chkPerform.Location = new System.Drawing.Point(212, 32); this.chkPerform.Name = "chkPerform"; this.chkPerform.Size = new System.Drawing.Size(62, 17); this.chkPerform.TabIndex = 39; @@ -467,7 +469,7 @@ 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(389, 38); + this.chkDisplays.Location = new System.Drawing.Point(389, 49); this.chkDisplays.Name = "chkDisplays"; this.chkDisplays.Size = new System.Drawing.Size(71, 17); this.chkDisplays.TabIndex = 38; @@ -479,7 +481,7 @@ // 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(290, 26); + this.btnMoveFrom.Location = new System.Drawing.Point(290, 10); this.btnMoveFrom.Name = "btnMoveFrom"; this.btnMoveFrom.Size = new System.Drawing.Size(92, 23); this.btnMoveFrom.TabIndex = 37; @@ -491,7 +493,7 @@ // 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(113, 26); + this.btnMoves.Location = new System.Drawing.Point(113, 37); this.btnMoves.Margin = new System.Windows.Forms.Padding(2); this.btnMoves.Name = "btnMoves"; this.btnMoves.Size = new System.Drawing.Size(93, 23); @@ -504,7 +506,7 @@ // 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(28, 26); + this.btnGenICode.Location = new System.Drawing.Point(28, 37); this.btnGenICode.Margin = new System.Windows.Forms.Padding(2); this.btnGenICode.Name = "btnGenICode"; this.btnGenICode.Size = new System.Drawing.Size(81, 23); @@ -522,9 +524,9 @@ this.grpSettings.Controls.Add(this.btnSettings); this.grpSettings.Controls.Add(this.btnTestThings); this.grpSettings.Controls.Add(this.btnCrossref); - this.grpSettings.Location = new System.Drawing.Point(21, 583); + this.grpSettings.Location = new System.Drawing.Point(21, 572); this.grpSettings.Name = "grpSettings"; - this.grpSettings.Size = new System.Drawing.Size(379, 99); + this.grpSettings.Size = new System.Drawing.Size(379, 110); this.grpSettings.TabIndex = 39; this.grpSettings.TabStop = false; this.grpSettings.Text = "Ställ in, testa"; @@ -532,7 +534,7 @@ // btnSaveArea // this.btnSaveArea.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnSaveArea.Location = new System.Drawing.Point(255, 26); + this.btnSaveArea.Location = new System.Drawing.Point(255, 37); this.btnSaveArea.Name = "btnSaveArea"; this.btnSaveArea.Size = new System.Drawing.Size(99, 23); this.btnSaveArea.TabIndex = 40; @@ -552,7 +554,7 @@ // // btnXmlKopAttr // - this.btnXmlKopAttr.Location = new System.Drawing.Point(290, 71); + this.btnXmlKopAttr.Location = new System.Drawing.Point(290, 82); this.btnXmlKopAttr.Name = "btnXmlKopAttr"; this.btnXmlKopAttr.Size = new System.Drawing.Size(92, 22); this.btnXmlKopAttr.TabIndex = 44; @@ -560,6 +562,16 @@ this.btnXmlKopAttr.UseVisualStyleBackColor = true; this.btnXmlKopAttr.Click += new System.EventHandler(this.btnXmlKopAttr_Click); // + // btnMoveFromAttr + // + this.btnMoveFromAttr.Location = new System.Drawing.Point(290, 36); + this.btnMoveFromAttr.Name = "btnMoveFromAttr"; + this.btnMoveFromAttr.Size = new System.Drawing.Size(92, 22); + this.btnMoveFromAttr.TabIndex = 45; + this.btnMoveFromAttr.Text = "G. Mov. Fr.+Attr"; + this.btnMoveFromAttr.UseVisualStyleBackColor = true; + this.btnMoveFromAttr.Click += new System.EventHandler(this.btnMoveFromAttr_Click); + // // GenCobCode // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -651,6 +663,7 @@ private System.Windows.Forms.Button btnSaveArea; private System.Windows.Forms.Button btnShowWorkFiles; private System.Windows.Forms.Button btnXmlKopAttr; + private System.Windows.Forms.Button btnMoveFromAttr; } } diff --git a/CobXmlSupport/GenCobCode.cs b/CobXmlSupport/GenCobCode.cs index 31f53da..329e2ca 100644 --- a/CobXmlSupport/GenCobCode.cs +++ b/CobXmlSupport/GenCobCode.cs @@ -1224,6 +1224,11 @@ namespace CobXmlSupport /// /// private void btnMoveFrom_Click(object sender, EventArgs e) + { + GenerateFromCode(false); + } + + private void GenerateFromCode(bool inclAttr) { if (chkNewArea.Checked) { @@ -1238,7 +1243,7 @@ namespace CobXmlSupport SF.idConnect = "598A5F20-9A8A-415D-81B2-BBFE04465381"; SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Unload"; SF.fNameSaved = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Unload.cbl"; - createXMLMoveCode(SF, true); + createXMLMoveCode(SF, true, inclAttr); } else { @@ -2587,5 +2592,10 @@ namespace CobXmlSupport createXMLMoveCode(SF, inclAttribs: true); } + private void btnMoveFromAttr_Click(object sender, EventArgs e) + { + GenerateFromCode(true); + } + } }