From abe258e8d2b7b6ddeb4e6c27acb176a4bb36c1e4 Mon Sep 17 00:00:00 2001 From: tfoman Date: Wed, 10 Dec 2014 14:36:16 +0100 Subject: [PATCH] hiding of testbutton --- CobXmlSupport/App.config | 59 +++++++++++++++++++ CobXmlSupport/CobXmlSupport.csproj | 1 + CobXmlSupport/GenCobCode.Designer.cs | 1 + CobXmlSupport/GenCobCode.cs | 7 +++ CobXmlSupport/Properties/Settings.Designer.cs | 26 ++++---- CobXmlSupport/Properties/Settings.settings | 11 ++-- CobXmlSupport/S.cs | 1 + CobXmlSupport/frmSettings.Designer.cs | 34 ++++++++++- CobXmlSupport/frmSettings.cs | 17 ++++++ 9 files changed, 138 insertions(+), 19 deletions(-) diff --git a/CobXmlSupport/App.config b/CobXmlSupport/App.config index ceeb852..b158d81 100644 --- a/CobXmlSupport/App.config +++ b/CobXmlSupport/App.config @@ -2,6 +2,7 @@ +
@@ -9,6 +10,64 @@ + + + + + @"C:\testdata\Reengineering\FD_GetVehicleHistory.xml" + + + + + Tommy Öman + + + Fordonsdata Nordic AB + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + GWM_ + + + 25 + + + False + + + Logg-post + + + UpdateLogFile + + + GWX_ + + + False + + diff --git a/CobXmlSupport/CobXmlSupport.csproj b/CobXmlSupport/CobXmlSupport.csproj index 92fa566..4b447d3 100644 --- a/CobXmlSupport/CobXmlSupport.csproj +++ b/CobXmlSupport/CobXmlSupport.csproj @@ -88,6 +88,7 @@ ShowCode.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/CobXmlSupport/GenCobCode.Designer.cs b/CobXmlSupport/GenCobCode.Designer.cs index 3b35984..3f5376f 100644 --- a/CobXmlSupport/GenCobCode.Designer.cs +++ b/CobXmlSupport/GenCobCode.Designer.cs @@ -432,6 +432,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(673, 655); this.btnFrXMLTo.Name = "btnFrXMLTo"; this.btnFrXMLTo.Size = new System.Drawing.Size(92, 22); diff --git a/CobXmlSupport/GenCobCode.cs b/CobXmlSupport/GenCobCode.cs index e16c544..8a97d19 100644 --- a/CobXmlSupport/GenCobCode.cs +++ b/CobXmlSupport/GenCobCode.cs @@ -68,6 +68,7 @@ namespace CobXmlSupport chkDisplays.Enabled = false; chkPerform.Enabled = false; chkMvToDisp.Enabled = false; + btnFrXMLTo.Enabled = false; if (cmbLastFile.Text.Length > 0) { @@ -181,6 +182,7 @@ namespace CobXmlSupport chkDisplays.Enabled = true; chkPerform.Enabled = true; chkMvToDisp.Enabled = true; + btnFrXMLTo.Enabled = true; } } @@ -649,6 +651,7 @@ namespace CobXmlSupport S.ettingWrap = Properties.Settings.Default.Wrap; S.ettingLogVarName = Properties.Settings.Default.LogVarName; S.ettingLogSectName = Properties.Settings.Default.LogSectName; + S.ettingSpecials = Properties.Settings.Default.ShowTestbtns; chkAnaTag.Checked = S.ettingAnaTag; chkCountVars.Checked = S.ettingCountVars; @@ -662,6 +665,7 @@ namespace CobXmlSupport chkUniqueVars.Checked = S.ettingUniqueVars; chkValues.Checked = S.ettingValues; chkWrap.Checked = S.ettingWrap; + btnTestThings.Visible = S.ettingSpecials; formLoading = false; cmbLastFile.Text = cmbLastFile.Items[0].ToString(); @@ -1020,6 +1024,7 @@ namespace CobXmlSupport setWindow.ChkCountVars = S.ettingCountVars; setWindow.LogPost = S.ettingLogVarName; setWindow.LogSection = S.ettingLogSectName; + setWindow.ChkShowTestbtns = S.ettingSpecials; setWindow.ShowDialog(); S.ettingUserName = setWindow.UserName; @@ -1038,6 +1043,7 @@ namespace CobXmlSupport S.ettingCountVars = setWindow.ChkCountVars; S.ettingLogVarName = setWindow.LogPost; S.ettingLogSectName = setWindow.LogSection; + S.ettingSpecials = setWindow.ChkShowTestbtns; chkAnaTag.Checked = S.ettingAnaTag; chkCountVars.Checked = S.ettingCountVars; @@ -1051,6 +1057,7 @@ namespace CobXmlSupport txtMaxOcc.Text = S.ettingMaxOcc; txtPrefix.Text = S.ettingPrefix; txtExpPrefix.Text = S.ettingExpPrefix; + btnTestThings.Visible = S.ettingSpecials; eventRun = false; runXMLgen(); diff --git a/CobXmlSupport/Properties/Settings.Designer.cs b/CobXmlSupport/Properties/Settings.Designer.cs index 2029b01..27485f8 100644 --- a/CobXmlSupport/Properties/Settings.Designer.cs +++ b/CobXmlSupport/Properties/Settings.Designer.cs @@ -8,27 +8,17 @@ // //------------------------------------------------------------------------------ -namespace CobXmlSupport.Properties -{ +namespace CobXmlSupport.Properties { - - - [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 { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - public static Settings Default { get { - - - return defaultInstance; } } @@ -227,5 +217,17 @@ namespace CobXmlSupport.Properties 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; + } + } } } diff --git a/CobXmlSupport/Properties/Settings.settings b/CobXmlSupport/Properties/Settings.settings index 902ecee..a5d3aff 100644 --- a/CobXmlSupport/Properties/Settings.settings +++ b/CobXmlSupport/Properties/Settings.settings @@ -1,7 +1,7 @@  - - - + + + <?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"> @@ -53,5 +53,8 @@ GWX_ + + False + - + \ No newline at end of file diff --git a/CobXmlSupport/S.cs b/CobXmlSupport/S.cs index c805b46..e49bcd1 100644 --- a/CobXmlSupport/S.cs +++ b/CobXmlSupport/S.cs @@ -23,6 +23,7 @@ namespace CobXmlSupport public static bool ettingCountVars; public static string ettingLogVarName; public static string ettingLogSectName; + public static bool ettingSpecials; //------------------------- } } diff --git a/CobXmlSupport/frmSettings.Designer.cs b/CobXmlSupport/frmSettings.Designer.cs index edccada..4eaff8f 100644 --- a/CobXmlSupport/frmSettings.Designer.cs +++ b/CobXmlSupport/frmSettings.Designer.cs @@ -56,14 +56,17 @@ this.txtLogPost = new System.Windows.Forms.TextBox(); this.txtLogSection = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); + this.specials = new System.Windows.Forms.GroupBox(); + this.chkShowTestbtns = new System.Windows.Forms.CheckBox(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); + this.specials.SuspendLayout(); this.SuspendLayout(); // // btnCancel // 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.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(79, 24); @@ -75,7 +78,7 @@ // btnSave // 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.Name = "btnSave"; this.btnSave.Size = new System.Drawing.Size(79, 24); @@ -114,7 +117,7 @@ // // 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.Name = "txtCompanyName"; this.txtCompanyName.Size = new System.Drawing.Size(195, 20); @@ -334,11 +337,32 @@ this.label7.TabIndex = 37; this.label7.Text = "Namn log section"; // + // specials + // + this.specials.Controls.Add(this.chkShowTestbtns); + this.specials.Location = new System.Drawing.Point(325, 216); + this.specials.Name = "specials"; + this.specials.Size = new System.Drawing.Size(240, 149); + this.specials.TabIndex = 41; + this.specials.TabStop = false; + this.specials.Text = "specialla inställningar"; + // + // chkShowTestbtns + // + this.chkShowTestbtns.AutoSize = true; + this.chkShowTestbtns.Location = new System.Drawing.Point(7, 20); + this.chkShowTestbtns.Name = "chkShowTestbtns"; + this.chkShowTestbtns.Size = new System.Drawing.Size(95, 17); + this.chkShowTestbtns.TabIndex = 0; + this.chkShowTestbtns.Text = "visa testknapp"; + this.chkShowTestbtns.UseVisualStyleBackColor = true; + // // frmSettings // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(577, 399); + this.Controls.Add(this.specials); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.txtCompanyName); @@ -357,6 +381,8 @@ this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); + this.specials.ResumeLayout(false); + this.specials.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -391,5 +417,7 @@ private System.Windows.Forms.Label label7; private System.Windows.Forms.TextBox txtExpPrefix; private System.Windows.Forms.Label label8; + private System.Windows.Forms.GroupBox specials; + private System.Windows.Forms.CheckBox chkShowTestbtns; } } \ No newline at end of file diff --git a/CobXmlSupport/frmSettings.cs b/CobXmlSupport/frmSettings.cs index d85b88d..34f25fe 100644 --- a/CobXmlSupport/frmSettings.cs +++ b/CobXmlSupport/frmSettings.cs @@ -21,6 +21,7 @@ namespace CobXmlSupport private bool tmpChkValues; private bool tmpChkAnaTag; private bool tmpChkCountVars; + private bool tmpShowTestBtns; private string tmpTxtPrefix; private string tmpTxtExpPrefix; private string tmpTxtMaxOcc; @@ -170,6 +171,19 @@ namespace CobXmlSupport chkAnaTag.Checked = value; } } + + public bool ChkShowTestbtns + { + get + { + return chkShowTestbtns.Checked; + } + set + { + chkShowTestbtns.Checked = value; + } + } + public string TxtMaxOcc { get @@ -219,6 +233,7 @@ namespace CobXmlSupport Properties.Settings.Default.UniqueVars = chkUniqueVars.Checked; Properties.Settings.Default.Values = chkValues.Checked; Properties.Settings.Default.Wrap = chkWrap.Checked; + Properties.Settings.Default.ShowTestbtns= chkShowTestbtns.Checked; Properties.Settings.Default.LogVarName = txtLogPost.Text; Properties.Settings.Default.LogSectName = txtLogSection.Text; Properties.Settings.Default.Save(); @@ -237,6 +252,7 @@ namespace CobXmlSupport tmpChkWrap = chkWrap.Checked; tmpChkValues = chkValues.Checked; tmpChkAnaTag = chkAnaTag.Checked; + tmpShowTestBtns = chkShowTestbtns.Checked; tmpTxtPrefix = txtPrefix.Text; tmpTxtExpPrefix = txtExpPrefix.Text; tmpTxtMaxOcc = txtMaxOcc.Text; @@ -257,6 +273,7 @@ namespace CobXmlSupport chkWrap.Checked= tmpChkWrap; chkValues.Checked= tmpChkValues; chkAnaTag.Checked= tmpChkAnaTag; + chkShowTestbtns.Checked = tmpShowTestBtns; txtPrefix.Text= tmpTxtPrefix; txtExpPrefix.Text = tmpTxtExpPrefix; txtMaxOcc.Text = tmpTxtMaxOcc;