Collected all settings ChkBoxes

This commit is contained in:
2015-07-16 23:39:27 +02:00
parent 125709f4ff
commit 83237693df
7 changed files with 170 additions and 30 deletions

View File

@ -66,15 +66,16 @@
this.btnFrXMLTo = new System.Windows.Forms.Button();
this.btnCrossref = new System.Windows.Forms.Button();
this.chkBackupVars = new System.Windows.Forms.CheckBox();
this.btnRerun = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(20, 47);
this.button1.Location = new System.Drawing.Point(20, 44);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.Size = new System.Drawing.Size(86, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Start";
this.button1.Text = "Starta Nyvald";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
@ -231,7 +232,7 @@
//
this.btnChooseFile.Location = new System.Drawing.Point(20, 17);
this.btnChooseFile.Name = "btnChooseFile";
this.btnChooseFile.Size = new System.Drawing.Size(75, 23);
this.btnChooseFile.Size = new System.Drawing.Size(86, 23);
this.btnChooseFile.TabIndex = 15;
this.btnChooseFile.Text = "Välj fil";
this.btnChooseFile.UseVisualStyleBackColor = true;
@ -306,6 +307,7 @@
this.chkDisplays.TabIndex = 21;
this.chkDisplays.Text = "(Displays)";
this.chkDisplays.UseVisualStyleBackColor = true;
this.chkDisplays.CheckedChanged += new System.EventHandler(this.chkDisplays_CheckedChanged);
//
// chkNoNsRef
//
@ -370,6 +372,7 @@
this.chkPerform.TabIndex = 27;
this.chkPerform.Text = "Perform";
this.chkPerform.UseVisualStyleBackColor = true;
this.chkPerform.CheckedChanged += new System.EventHandler(this.chkPerform_CheckedChanged);
//
// chkMvToDisp
//
@ -381,6 +384,7 @@
this.chkMvToDisp.TabIndex = 28;
this.chkMvToDisp.Text = "(Displays)";
this.chkMvToDisp.UseVisualStyleBackColor = true;
this.chkMvToDisp.CheckedChanged += new System.EventHandler(this.chkMvToDisp_CheckedChanged);
//
// chkNewArea
//
@ -468,12 +472,24 @@
this.chkBackupVars.TabIndex = 36;
this.chkBackupVars.Text = "Backup Vars";
this.chkBackupVars.UseVisualStyleBackColor = true;
this.chkBackupVars.CheckedChanged += new System.EventHandler(this.chkBackupVars_CheckedChanged);
//
// btnRerun
//
this.btnRerun.Location = new System.Drawing.Point(20, 71);
this.btnRerun.Name = "btnRerun";
this.btnRerun.Size = new System.Drawing.Size(86, 23);
this.btnRerun.TabIndex = 37;
this.btnRerun.Text = "Kör om";
this.btnRerun.UseVisualStyleBackColor = true;
this.btnRerun.Click += new System.EventHandler(this.btnRerun_Click);
//
// GenCobCode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(951, 693);
this.Controls.Add(this.btnRerun);
this.Controls.Add(this.chkBackupVars);
this.Controls.Add(this.btnCrossref);
this.Controls.Add(this.btnFrXMLTo);
@ -559,6 +575,7 @@
private System.Windows.Forms.Button btnFrXMLTo;
private System.Windows.Forms.Button btnCrossref;
private System.Windows.Forms.CheckBox chkBackupVars;
private System.Windows.Forms.Button btnRerun;
}
}

View File

@ -1201,6 +1201,11 @@ namespace CobXmlSupport
private void GenCobCode_FormClosing(object sender, FormClosingEventArgs e)
{
GenSetting tmpGS = new GenSetting();
this.sl.Subscribe(tmpGS);
tmpGS.GetSettings();
this.sl.UnSubscribe(tmpGS);
Properties.Settings.Default.LastFile.Clear();
foreach (string savedFile in cmbLastFile.Items)
{
@ -2274,5 +2279,30 @@ namespace CobXmlSupport
S.ettingMaxOcc = txtMaxOcc.Text;
}
private void chkBackupVars_CheckedChanged(object sender, EventArgs e)
{
S.ettingUserCodeBcup = chkBackupVars.Checked;
}
private void chkPerform_CheckedChanged(object sender, EventArgs e)
{
S.ettingPerform = chkPerform.Checked;
}
private void chkMvToDisp_CheckedChanged(object sender, EventArgs e)
{
S.ettingMvToDisp = chkMvToDisp.Checked;
}
private void chkDisplays_CheckedChanged(object sender, EventArgs e)
{
S.ettingDisplays = chkDisplays.Checked;
}
private void btnRerun_Click(object sender, EventArgs e)
{
runXMLgen();
}
}
}

View File

@ -14,7 +14,6 @@ namespace CobXmlSupport
public string ActualFile { get; set; }
public bool AnaTag { get; set; }
public bool BcupOwnCode { get; set; }
public string Company { get; set; }
public bool CountVars { get; set; }
public bool Displays { get; set; }
@ -23,7 +22,9 @@ namespace CobXmlSupport
public string LogSectName { get; set; }
public string LogVarName { get; set; }
public string MaxOcc { get; set; }
public bool MvToDisp { get; set; }
public bool NoNsRef { get; set; }
public bool Perform { get; set; }
public string Prefix { get; set; }
public bool Unique { get; set; }
public bool UniqueAttrVars { get; set; }
@ -38,7 +39,6 @@ namespace CobXmlSupport
{
this.ActualFile = S.ettingActualFile;
this.AnaTag = S.ettingAnaTag;
this.BcupOwnCode = S.ettingBackupOwnCode;
this.Company = S.ettingCompany;
this.CountVars = S.ettingCountVars;
this.Displays = S.ettingDisplays;
@ -47,7 +47,9 @@ namespace CobXmlSupport
this.LogSectName = S.ettingLogSectName;
this.LogVarName = S.ettingLogVarName;
this.MaxOcc = S.ettingMaxOcc;
this.MvToDisp = S.ettingMvToDisp;
this.NoNsRef = S.ettingNoNsRef;
this.Perform = S.ettingPerform;
this.Prefix = S.ettingPrefix;
this.Unique = S.ettingUnique;
this.UniqueAttrVars = S.ettingUniqueAttrVars;
@ -69,7 +71,6 @@ namespace CobXmlSupport
S.ettingActualFile = this.ActualFile;
S.ettingAnaTag = this.AnaTag;
S.ettingBackupOwnCode = this.BcupOwnCode;
S.ettingCompany = this.Company;
S.ettingCountVars = this.CountVars;
S.ettingDisplays = this.Displays;
@ -78,7 +79,9 @@ namespace CobXmlSupport
S.ettingLogSectName = this.LogSectName;
S.ettingLogVarName = this.LogVarName;
S.ettingMaxOcc = this.MaxOcc;
S.ettingMvToDisp = this.MvToDisp;
S.ettingNoNsRef = this.NoNsRef;
S.ettingPerform = this.Perform;
S.ettingPrefix = this.Prefix;
S.ettingUnique = this.Unique;
S.ettingUniqueAttrVars = this.UniqueAttrVars;

View File

@ -52,7 +52,7 @@ namespace CobXmlSupport
get { return __startPos+__length-1; }
}
public string ToString()
public override string ToString()
{
return __wordSource;
}

View File

@ -11,7 +11,6 @@ namespace CobXmlSupport
{
public static string ettingActualFile;
public static bool ettingAnaTag;
public static bool ettingBackupOwnCode;
public static string ettingCompany;
public static bool ettingCountVars;
public static bool ettingDisplays;
@ -20,7 +19,9 @@ namespace CobXmlSupport
public static string ettingLogSectName;
public static string ettingLogVarName;
public static string ettingMaxOcc;
public static bool ettingMvToDisp;
public static bool ettingNoNsRef;
public static bool ettingPerform;
public static string ettingPrefix;
public static bool ettingUnique;
public static bool ettingUniqueAttrVars;

View File

@ -63,6 +63,9 @@
this.txtFilePath = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.chkPerforms = new System.Windows.Forms.CheckBox();
this.chkMvToDisp = new System.Windows.Forms.CheckBox();
this.chkDisplays = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.specials.SuspendLayout();
@ -71,7 +74,7 @@
// 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(467, 416);
this.btnCancel.Location = new System.Drawing.Point(467, 489);
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(79, 24);
@ -83,7 +86,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(383, 416);
this.btnSave.Location = new System.Drawing.Point(383, 489);
this.btnSave.Margin = new System.Windows.Forms.Padding(2);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(79, 24);
@ -260,6 +263,9 @@
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.chkDisplays);
this.groupBox1.Controls.Add(this.chkMvToDisp);
this.groupBox1.Controls.Add(this.chkPerforms);
this.groupBox1.Controls.Add(this.txtExpPrefix);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.label5);
@ -274,9 +280,9 @@
this.groupBox1.Controls.Add(this.chkWrap);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.chkUnique);
this.groupBox1.Location = new System.Drawing.Point(15, 157);
this.groupBox1.Location = new System.Drawing.Point(15, 198);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(287, 260);
this.groupBox1.Size = new System.Drawing.Size(287, 292);
this.groupBox1.TabIndex = 39;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Utgångs inställningar";
@ -305,9 +311,9 @@
this.groupBox2.Controls.Add(this.txtLogPost);
this.groupBox2.Controls.Add(this.txtLogSection);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Location = new System.Drawing.Point(306, 157);
this.groupBox2.Location = new System.Drawing.Point(306, 204);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(240, 104);
this.groupBox2.Size = new System.Drawing.Size(240, 109);
this.groupBox2.TabIndex = 40;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Namn på generella variabler och procedurer";
@ -350,9 +356,9 @@
this.specials.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.specials.Controls.Add(this.chkBackupOwnCode);
this.specials.Controls.Add(this.chkShowTestbtns);
this.specials.Location = new System.Drawing.Point(305, 263);
this.specials.Location = new System.Drawing.Point(305, 319);
this.specials.Name = "specials";
this.specials.Size = new System.Drawing.Size(240, 149);
this.specials.Size = new System.Drawing.Size(240, 166);
this.specials.TabIndex = 41;
this.specials.TabStop = false;
this.specials.Text = "specialla inställningar";
@ -415,11 +421,41 @@
this.label10.TabIndex = 44;
this.label10.Text = "Aktuell Urspr Fil:";
//
// chkPerforms
//
this.chkPerforms.AutoSize = true;
this.chkPerforms.Location = new System.Drawing.Point(14, 220);
this.chkPerforms.Name = "chkPerforms";
this.chkPerforms.Size = new System.Drawing.Size(90, 17);
this.chkPerforms.TabIndex = 41;
this.chkPerforms.Text = "Visa Performs";
this.chkPerforms.UseVisualStyleBackColor = true;
//
// chkMvToDisp
//
this.chkMvToDisp.AutoSize = true;
this.chkMvToDisp.Location = new System.Drawing.Point(14, 244);
this.chkMvToDisp.Name = "chkMvToDisp";
this.chkMvToDisp.Size = new System.Drawing.Size(111, 17);
this.chkMvToDisp.TabIndex = 42;
this.chkMvToDisp.Text = "Move To Displays";
this.chkMvToDisp.UseVisualStyleBackColor = true;
//
// chkDisplays
//
this.chkDisplays.AutoSize = true;
this.chkDisplays.Location = new System.Drawing.Point(14, 267);
this.chkDisplays.Name = "chkDisplays";
this.chkDisplays.Size = new System.Drawing.Size(104, 17);
this.chkDisplays.TabIndex = 43;
this.chkDisplays.Text = "Move fr Displays";
this.chkDisplays.UseVisualStyleBackColor = true;
//
// frmSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(557, 445);
this.ClientSize = new System.Drawing.Size(557, 518);
this.Controls.Add(this.label9);
this.Controls.Add(this.label10);
this.Controls.Add(this.txtFilePath);
@ -486,5 +522,8 @@
private System.Windows.Forms.TextBox txtFilePath;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.CheckBox chkPerforms;
private System.Windows.Forms.CheckBox chkMvToDisp;
private System.Windows.Forms.CheckBox chkDisplays;
}
}

View File

@ -23,6 +23,9 @@ namespace CobXmlSupport
private bool tmpChkCountVars;
private bool tmpShowTestBtns;
private bool tmpBackupOwnCode;
private bool tmpPerforms;
private bool tmpMvToDisp;
private bool tmpDisplays;
private string tmpTxtPrefix;
private string tmpTxtExpPrefix;
private string tmpTxtMaxOcc;
@ -251,6 +254,43 @@ namespace CobXmlSupport
}
}
public bool Performs
{
get
{
return chkPerforms.Checked;
}
set
{
chkPerforms.Checked = value;
}
}
public bool MvToDisp
{
get
{
return chkMvToDisp.Checked;
}
set
{
chkMvToDisp.Checked = value;
}
}
public bool Displays
{
get
{
return chkDisplays.Checked;
}
set
{
chkDisplays.Checked = value;
}
}
public string TxtMaxOcc
{
get
@ -292,24 +332,27 @@ namespace CobXmlSupport
sl.Subscribe(this.genSet);
S.ettingActualFile = this.AktualFile;
S.ettingFilePath = this.FilePath;
S.ettingAnaTag = Properties.Settings.Default.AnaTag = chkAnaTag.Checked;
S.ettingCompany = Properties.Settings.Default.CompanyName = txtCompanyName.Text;
S.ettingCountVars = Properties.Settings.Default.CountVars = chkCountVars.Checked;
S.ettingMaxOcc = Properties.Settings.Default.MaxOcc = txtMaxOcc.Text;
S.ettingNoNsRef = Properties.Settings.Default.NoNsRef = chkNoNsRef.Checked;
S.ettingPrefix = Properties.Settings.Default.Prefix = txtPrefix.Text;
S.ettingDisplays = chkDisplays.Checked;
S.ettingExpPrefix = Properties.Settings.Default.ExpPrefix = txtExpPrefix.Text;
S.ettingFilePath = this.FilePath;
S.ettingLogSectName = Properties.Settings.Default.LogSectName = txtLogSection.Text;
S.ettingLogVarName = Properties.Settings.Default.LogVarName = txtLogPost.Text;
S.ettingMaxOcc = Properties.Settings.Default.MaxOcc = txtMaxOcc.Text;
S.ettingMvToDisp = this.chkMvToDisp.Checked;
S.ettingNoNsRef = Properties.Settings.Default.NoNsRef = chkNoNsRef.Checked;
S.ettingPerform = this.chkPerforms.Checked;
S.ettingPrefix = Properties.Settings.Default.Prefix = txtPrefix.Text;
S.ettingShowTestbtns = Properties.Settings.Default.ShowTestbtns = chkShowTestbtns.Checked;
S.ettingUnique = Properties.Settings.Default.Unique = chkUnique.Checked;
S.ettingUniqueAttrVars = Properties.Settings.Default.UniqueAttrVars = chkUniqueAttrVars.Checked;
S.ettingUniqueVars = Properties.Settings.Default.UniqueVars = chkUniqueVars.Checked;
S.ettingUserCodeBcup = Properties.Settings.Default.BackupOwnCode = chkBackupOwnCode.Checked;
S.ettingUserName = Properties.Settings.Default.UserName = txtUserName.Text;
S.ettingValues = Properties.Settings.Default.Values = chkValues.Checked;
S.ettingWrap = Properties.Settings.Default.Wrap = chkWrap.Checked;
S.ettingShowTestbtns = Properties.Settings.Default.ShowTestbtns = chkShowTestbtns.Checked;
S.ettingBackupOwnCode = Properties.Settings.Default.BackupOwnCode = chkBackupOwnCode.Checked;
S.ettingLogVarName = Properties.Settings.Default.LogVarName = txtLogPost.Text;
S.ettingLogSectName = Properties.Settings.Default.LogSectName = txtLogSection.Text;
S.ettingUserName = Properties.Settings.Default.UserName = txtUserName.Text;
S.ettingCompany = Properties.Settings.Default.CompanyName = txtCompanyName.Text;
Properties.Settings.Default.Save();
@ -325,8 +368,12 @@ namespace CobXmlSupport
this.FilePath = S.ettingFilePath;
tmpChkAnaTag = chkAnaTag.Checked = S.ettingAnaTag;
tmpChkCountVars = chkCountVars.Checked = S.ettingCountVars;
tmpBackupOwnCode = chkBackupOwnCode.Checked = S.ettingUserCodeBcup;
tmpDisplays = chkDisplays.Checked = S.ettingDisplays;
tmpTxtMaxOcc = txtMaxOcc.Text = S.ettingMaxOcc;
tmpMvToDisp = chkMvToDisp.Checked = S.ettingMvToDisp;
tmpChkNoNsRef = chkNoNsRef.Checked = S.ettingNoNsRef;
tmpPerforms = chkPerforms.Checked = S.ettingPerform;
tmpTxtPrefix = txtPrefix.Text = S.ettingPrefix;
tmpTxtExpPrefix = txtExpPrefix.Text = S.ettingExpPrefix;
tmpChkUnique = chkUnique.Checked = S.ettingUnique;
@ -335,7 +382,7 @@ namespace CobXmlSupport
tmpChkValues = chkValues.Checked = S.ettingValues;
tmpChkWrap = chkWrap.Checked = S.ettingWrap;
tmpShowTestBtns = chkShowTestbtns.Checked = S.ettingShowTestbtns;
tmpBackupOwnCode = chkBackupOwnCode.Checked = S.ettingBackupOwnCode;
txtLogVarNameTmp = txtLogPost.Text = S.ettingLogVarName;
txtLogVarSectTmp = txtLogSection.Text = S.ettingLogSectName;
@ -347,8 +394,12 @@ namespace CobXmlSupport
{
chkAnaTag.Checked = tmpChkAnaTag;
chkCountVars.Checked = tmpChkCountVars;
chkBackupOwnCode.Checked = tmpBackupOwnCode;
chkDisplays.Checked = tmpDisplays;
txtMaxOcc.Text = tmpTxtMaxOcc;
chkMvToDisp.Checked = tmpMvToDisp;
chkNoNsRef.Checked = tmpChkNoNsRef;
chkPerforms.Checked = tmpPerforms;
txtPrefix.Text = tmpTxtPrefix;
txtExpPrefix.Text = tmpTxtExpPrefix;
chkUnique.Checked = tmpChkUnique;
@ -357,7 +408,6 @@ namespace CobXmlSupport
chkValues.Checked = tmpChkValues;
chkWrap.Checked = tmpChkWrap;
chkShowTestbtns.Checked = tmpShowTestBtns;
chkBackupOwnCode.Checked = tmpBackupOwnCode;
txtLogPost.Text = txtLogVarNameTmp;
txtLogSection.Text = txtLogVarSectTmp;