From ffe8b61444f8c6b08811d90ea9abc11641c07f45 Mon Sep 17 00:00:00 2001 From: tfoman Date: Mon, 28 Dec 2015 22:06:10 +0100 Subject: [PATCH] some unused controls hidden, tooltips on other --- CobXmlSupport.sln | 4 ++- CobXmlSupport/GenCobCode.Designer.cs | 24 +++++++++++++ CobXmlSupport/GenCobCode.cs | 3 ++ CobXmlSupport/GenCobCode.resx | 20 +++++++++++ CobXmlSupport/ShowCode.Designer.cs | 50 ++++++++++++++-------------- CobXmlSupport/ShowCode.cs | 10 ++++-- 6 files changed, 83 insertions(+), 28 deletions(-) diff --git a/CobXmlSupport.sln b/CobXmlSupport.sln index d7d284d..7175759 100644 --- a/CobXmlSupport.sln +++ b/CobXmlSupport.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CobXmlSupport", "CobXmlSupport\CobXmlSupport.csproj", "{847B8069-1ED4-41A8-B17D-EA6F596895D5}" EndProject Global diff --git a/CobXmlSupport/GenCobCode.Designer.cs b/CobXmlSupport/GenCobCode.Designer.cs index 32bda62..37ddb17 100644 --- a/CobXmlSupport/GenCobCode.Designer.cs +++ b/CobXmlSupport/GenCobCode.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GenCobCode)); this.button1 = new System.Windows.Forms.Button(); this.outText = new System.Windows.Forms.TextBox(); @@ -74,6 +75,7 @@ this.grpSettings = new System.Windows.Forms.GroupBox(); this.btnSaveArea = new System.Windows.Forms.Button(); this.btnShowWorkFiles = new System.Windows.Forms.Button(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.grpProduce.SuspendLayout(); this.grpSettings.SuspendLayout(); this.SuspendLayout(); @@ -317,6 +319,7 @@ this.btnSettings.Size = new System.Drawing.Size(81, 23); this.btnSettings.TabIndex = 26; this.btnSettings.Text = "Inställningar"; + this.toolTip1.SetToolTip(this.btnSettings, "Välj bestående inställningar för vissa funktioner."); this.btnSettings.UseVisualStyleBackColor = true; this.btnSettings.Click += new System.EventHandler(this.btnSettings_Click); // @@ -369,6 +372,7 @@ this.chkBackupVars.Size = new System.Drawing.Size(87, 17); this.chkBackupVars.TabIndex = 36; this.chkBackupVars.Text = "Backup Vars"; + this.toolTip1.SetToolTip(this.chkBackupVars, "Få en ny backup för varje tillfälle för editering av kodkomplettering (json)"); this.chkBackupVars.UseVisualStyleBackColor = true; this.chkBackupVars.CheckedChanged += new System.EventHandler(this.chkBackupVars_CheckedChanged); // @@ -414,6 +418,7 @@ this.chkEvents.Size = new System.Drawing.Size(90, 17); this.chkEvents.TabIndex = 46; this.chkEvents.Text = "skapa events"; + this.toolTip1.SetToolTip(this.chkEvents, resources.GetString("chkEvents.ToolTip")); this.chkEvents.UseVisualStyleBackColor = true; // // btnMoveFromAttr @@ -424,6 +429,8 @@ this.btnMoveFromAttr.Size = new System.Drawing.Size(92, 22); this.btnMoveFromAttr.TabIndex = 45; this.btnMoveFromAttr.Text = "G. Mov. Fr.+Attr"; + this.toolTip1.SetToolTip(this.btnMoveFromAttr, "Generera kod för att insamla kod från inläst xml enligt \r\naktuell xml-copy (även " + + "variabler som refererar till attribut \r\ni xml-taggar skapas)"); this.btnMoveFromAttr.UseVisualStyleBackColor = true; this.btnMoveFromAttr.Click += new System.EventHandler(this.btnMoveFromAttr_Click); // @@ -435,6 +442,8 @@ this.btnXmlKopAttr.Size = new System.Drawing.Size(92, 22); this.btnXmlKopAttr.TabIndex = 44; this.btnXmlKopAttr.Text = "Kop XML+Attr"; + this.toolTip1.SetToolTip(this.btnXmlKopAttr, "Samma som för knappen \'Kopiera XML\' men med tillägget att \r\nhär kopieras alla fäl" + + "t , även attribut ..."); this.btnXmlKopAttr.UseVisualStyleBackColor = true; this.btnXmlKopAttr.Click += new System.EventHandler(this.btnXmlKopAttr_Click); // @@ -446,6 +455,7 @@ this.btnFrXMLTo.Size = new System.Drawing.Size(92, 22); this.btnFrXMLTo.TabIndex = 43; this.btnFrXMLTo.Text = "Kopiera XML"; + this.toolTip1.SetToolTip(this.btnFrXMLTo, resources.GetString("btnFrXMLTo.ToolTip")); this.btnFrXMLTo.UseVisualStyleBackColor = true; this.btnFrXMLTo.Click += new System.EventHandler(this.btnFrXMLTo_Click); // @@ -482,6 +492,9 @@ this.chkMvToDisp.Size = new System.Drawing.Size(71, 17); this.chkMvToDisp.TabIndex = 40; this.chkMvToDisp.Text = "(Displays)"; + this.toolTip1.SetToolTip(this.chkMvToDisp, "Om både Checkboxen Perform och (Displays) är markerade fås \r\ndisplayer av aktuell" + + " sökväg (kvalificering) till varje variabel.\r\n(planen är att resultatet av inför" + + "d kod också skall visas då)"); this.chkMvToDisp.UseVisualStyleBackColor = true; this.chkMvToDisp.CheckedChanged += new System.EventHandler(this.chkMvToDisp_CheckedChanged); // @@ -494,6 +507,9 @@ this.chkPerform.Size = new System.Drawing.Size(62, 17); this.chkPerform.TabIndex = 39; this.chkPerform.Text = "Perform"; + this.toolTip1.SetToolTip(this.chkPerform, "Om ikryssad; generera koden så att varje möjlig tag \r\ni xml-en genomlöps via \"per" + + "form varying ...\" för varje\r\nmultipel förekomst . (jmf. 1-*, 0-*, 0-15... i xml-" + + "instruktionerna)"); this.chkPerform.UseVisualStyleBackColor = true; this.chkPerform.CheckedChanged += new System.EventHandler(this.chkPerform_CheckedChanged); // @@ -507,6 +523,8 @@ this.chkDisplays.Size = new System.Drawing.Size(71, 17); this.chkDisplays.TabIndex = 38; this.chkDisplays.Text = "(Displays)"; + this.toolTip1.SetToolTip(this.chkDisplays, "Gäller vid generering kod för tömning av responsareor.\r\nInnebär att alla värden i" + + " filen displayas ut kvalificerat i \r\nloggen "); this.chkDisplays.UseVisualStyleBackColor = true; this.chkDisplays.CheckedChanged += new System.EventHandler(this.chkDisplays_CheckedChanged); // @@ -519,6 +537,7 @@ this.btnMoveFrom.Size = new System.Drawing.Size(92, 23); this.btnMoveFrom.TabIndex = 37; this.btnMoveFrom.Text = "Gen Move från"; + this.toolTip1.SetToolTip(this.btnMoveFrom, "Generera kod för att insamla kod från inläst xml enligt \r\naktuell xml-copy"); this.btnMoveFrom.UseVisualStyleBackColor = true; this.btnMoveFrom.Click += new System.EventHandler(this.btnMoveFrom_Click); // @@ -532,6 +551,7 @@ this.btnMoves.Size = new System.Drawing.Size(93, 23); this.btnMoves.TabIndex = 36; this.btnMoves.Text = "Gen Move kod"; + this.toolTip1.SetToolTip(this.btnMoves, "Skapa kod för ifyllnad av aktuell xml-copy-area\r\n\r\n"); this.btnMoves.UseVisualStyleBackColor = true; this.btnMoves.Click += new System.EventHandler(this.btnMoves_Click); // @@ -545,6 +565,7 @@ this.btnGenICode.Size = new System.Drawing.Size(81, 23); this.btnGenICode.TabIndex = 35; this.btnGenICode.Text = "Gen Init kod"; + this.toolTip1.SetToolTip(this.btnGenICode, "Generera ett kod-extrakt som fyller attribut i xmlen med defaultvärden"); this.btnGenICode.UseVisualStyleBackColor = true; this.btnGenICode.Click += new System.EventHandler(this.btnGenICodeNew_Click); // @@ -572,6 +593,7 @@ this.btnSaveArea.Size = new System.Drawing.Size(99, 23); this.btnSaveArea.TabIndex = 40; this.btnSaveArea.Text = "Spara COB-copy"; + this.toolTip1.SetToolTip(this.btnSaveArea, "Spara och registrera den aktuella xml-cob-arean"); this.btnSaveArea.UseVisualStyleBackColor = true; this.btnSaveArea.Click += new System.EventHandler(this.btnSaveArea_Click); // @@ -582,6 +604,7 @@ this.btnShowWorkFiles.Size = new System.Drawing.Size(99, 23); this.btnShowWorkFiles.TabIndex = 41; this.btnShowWorkFiles.Text = "Arbetsfiler"; + this.toolTip1.SetToolTip(this.btnShowWorkFiles, "Se aktuella sparade copy areor, jämför med prodsatta, prodsätt !!"); this.btnShowWorkFiles.UseVisualStyleBackColor = true; this.btnShowWorkFiles.Click += new System.EventHandler(this.btnShowWorkFiles_Click); // @@ -678,6 +701,7 @@ private System.Windows.Forms.Button btnXmlKopAttr; private System.Windows.Forms.Button btnMoveFromAttr; private System.Windows.Forms.CheckBox chkEvents; + private System.Windows.Forms.ToolTip toolTip1; } } diff --git a/CobXmlSupport/GenCobCode.cs b/CobXmlSupport/GenCobCode.cs index b7d074d..f3f876e 100644 --- a/CobXmlSupport/GenCobCode.cs +++ b/CobXmlSupport/GenCobCode.cs @@ -839,6 +839,7 @@ namespace CobXmlSupport chkValues.Checked = S.ettingValues; chkWrap.Checked = S.ettingWrap; btnTestThings.Visible = S.ettingShowTestbtns; + btnCrossref.Visible = S.ettingShowTestbtns; formLoading = false; // cmbLastFile.Text = cmbLastFile.Items[0].ToString(); @@ -1468,6 +1469,8 @@ namespace CobXmlSupport txtExpPrefix.Refresh(); btnTestThings.Visible = S.ettingShowTestbtns; btnTestThings.Refresh(); + btnCrossref.Visible = S.ettingShowTestbtns; + btnCrossref.Refresh(); chkBackupVars.Checked = S.ettingUserCodeBcup; chkBackupVars.Refresh(); eventRun = false; diff --git a/CobXmlSupport/GenCobCode.resx b/CobXmlSupport/GenCobCode.resx index b85e23d..ada4767 100644 --- a/CobXmlSupport/GenCobCode.resx +++ b/CobXmlSupport/GenCobCode.resx @@ -120,6 +120,26 @@ 17, 17 + + 115, 17 + + + 115, 17 + + + Mallprocedurer för event-hantering vid start och slut av +varje 'perform varying' varv genereras och anropas i +genererad kod kan vara bra om ny post behöver läsas in +och uppdateras i slutet av varvet. + + + Läser ut från en respond-xml och fyller samtidigt en +likadan area med annat prefix (jmf. prefix och 'export prefix') +ovan. Copyn för att skriva den kopierade xml-en fås genom +att kopiera original-arean för respond-xml och rename all från +prefix till 'export prefix' (enligt vad som valts ovan. + + 78 diff --git a/CobXmlSupport/ShowCode.Designer.cs b/CobXmlSupport/ShowCode.Designer.cs index 1a38085..bf9308d 100644 --- a/CobXmlSupport/ShowCode.Designer.cs +++ b/CobXmlSupport/ShowCode.Designer.cs @@ -42,10 +42,10 @@ // 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(805, 790); - this.btnClose.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.btnClose.Location = new System.Drawing.Point(604, 642); + this.btnClose.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.btnClose.Name = "btnClose"; - this.btnClose.Size = new System.Drawing.Size(75, 28); + this.btnClose.Size = new System.Drawing.Size(56, 23); this.btnClose.TabIndex = 0; this.btnClose.Text = "Close"; this.btnClose.UseVisualStyleBackColor = true; @@ -57,12 +57,12 @@ | 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(15, 66); - this.txtCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.txtCode.Location = new System.Drawing.Point(11, 54); + this.txtCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtCode.Multiline = true; this.txtCode.Name = "txtCode"; this.txtCode.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtCode.Size = new System.Drawing.Size(865, 710); + 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); @@ -70,10 +70,9 @@ // btnSynch // this.btnSynch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnSynch.Location = new System.Drawing.Point(659, 790); - this.btnSynch.Margin = new System.Windows.Forms.Padding(4); + this.btnSynch.Location = new System.Drawing.Point(494, 642); this.btnSynch.Name = "btnSynch"; - this.btnSynch.Size = new System.Drawing.Size(140, 28); + this.btnSynch.Size = new System.Drawing.Size(105, 23); this.btnSynch.TabIndex = 3; this.btnSynch.Text = "Synch Moves To"; this.btnSynch.UseVisualStyleBackColor = true; @@ -83,10 +82,9 @@ // btnSynchOut // this.btnSynchOut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnSynchOut.Location = new System.Drawing.Point(504, 790); - this.btnSynchOut.Margin = new System.Windows.Forms.Padding(4); + this.btnSynchOut.Location = new System.Drawing.Point(378, 642); this.btnSynchOut.Name = "btnSynchOut"; - this.btnSynchOut.Size = new System.Drawing.Size(147, 28); + this.btnSynchOut.Size = new System.Drawing.Size(110, 23); this.btnSynchOut.TabIndex = 4; this.btnSynchOut.Text = "Synch Moves From"; this.btnSynchOut.UseVisualStyleBackColor = true; @@ -96,10 +94,9 @@ // btnSaveAktualText // this.btnSaveAktualText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnSaveAktualText.Location = new System.Drawing.Point(16, 790); - this.btnSaveAktualText.Margin = new System.Windows.Forms.Padding(4); + this.btnSaveAktualText.Location = new System.Drawing.Point(12, 642); this.btnSaveAktualText.Name = "btnSaveAktualText"; - this.btnSaveAktualText.Size = new System.Drawing.Size(111, 28); + this.btnSaveAktualText.Size = new System.Drawing.Size(83, 23); this.btnSaveAktualText.TabIndex = 5; this.btnSaveAktualText.Text = "Spara Copy"; this.btnSaveAktualText.UseVisualStyleBackColor = true; @@ -107,10 +104,10 @@ // // btnCompare // - this.btnCompare.Location = new System.Drawing.Point(135, 790); - this.btnCompare.Margin = new System.Windows.Forms.Padding(4); + this.btnCompare.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnCompare.Location = new System.Drawing.Point(101, 642); this.btnCompare.Name = "btnCompare"; - this.btnCompare.Size = new System.Drawing.Size(131, 28); + this.btnCompare.Size = new System.Drawing.Size(98, 23); this.btnCompare.TabIndex = 6; this.btnCompare.Text = "Compare Existing"; this.btnCompare.UseVisualStyleBackColor = true; @@ -118,10 +115,12 @@ // // btnMoveToLib // + this.btnMoveToLib.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnMoveToLib.Enabled = false; - this.btnMoveToLib.Location = new System.Drawing.Point(273, 790); + this.btnMoveToLib.Location = new System.Drawing.Point(205, 642); + this.btnMoveToLib.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.btnMoveToLib.Name = "btnMoveToLib"; - this.btnMoveToLib.Size = new System.Drawing.Size(131, 28); + this.btnMoveToLib.Size = new System.Drawing.Size(98, 23); this.btnMoveToLib.TabIndex = 7; this.btnMoveToLib.Text = "Flytta Till cpylib"; this.btnMoveToLib.UseVisualStyleBackColor = true; @@ -132,17 +131,18 @@ this.txtCodeType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtCodeType.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtCodeType.Location = new System.Drawing.Point(16, 34); + this.txtCodeType.Location = new System.Drawing.Point(12, 28); + this.txtCodeType.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtCodeType.Name = "txtCodeType"; this.txtCodeType.ReadOnly = true; - this.txtCodeType.Size = new System.Drawing.Size(864, 15); + this.txtCodeType.Size = new System.Drawing.Size(648, 13); this.txtCodeType.TabIndex = 8; // // ShowCode // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(893, 830); + this.ClientSize = new System.Drawing.Size(670, 674); this.Controls.Add(this.txtCodeType); this.Controls.Add(this.btnMoveToLib); this.Controls.Add(this.btnCompare); @@ -152,7 +152,7 @@ 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(3, 2, 3, 2); + this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.Name = "ShowCode"; this.Text = "ShowCode"; this.Load += new System.EventHandler(this.ShowCode_Load); diff --git a/CobXmlSupport/ShowCode.cs b/CobXmlSupport/ShowCode.cs index a12430c..ae4314e 100644 --- a/CobXmlSupport/ShowCode.cs +++ b/CobXmlSupport/ShowCode.cs @@ -131,7 +131,10 @@ namespace CobXmlSupport } } - Cc.Save_In_Dic(); + if (DialogResult.OK == MessageBox.Show("Vill du verkligen spara...?", "Spara kompletterad kod", MessageBoxButtons.OKCancel)) + { + Cc.Save_In_Dic(); + } refreshWindow("IN"); @@ -350,7 +353,10 @@ namespace CobXmlSupport } } - Cc.Save_Out_Dic(); + if (DialogResult.OK == MessageBox.Show("Vill du verkligen spara...?", "Spara kompletterad kod", MessageBoxButtons.OKCancel)) + { + Cc.Save_Out_Dic(); + } refreshWindow("OUT");