backup switch, adjustment codeintegration
This commit is contained in:
@ -67,6 +67,9 @@
|
|||||||
<setting name="ShowTestbtns" serializeAs="String">
|
<setting name="ShowTestbtns" serializeAs="String">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</setting>
|
</setting>
|
||||||
|
<setting name="BackupOwnCode" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
</CobXmlSupport.Properties.Settings>
|
</CobXmlSupport.Properties.Settings>
|
||||||
<XMLPlayAround.Properties.Settings>
|
<XMLPlayAround.Properties.Settings>
|
||||||
<setting name="LastFile" serializeAs="Xml">
|
<setting name="LastFile" serializeAs="Xml">
|
||||||
|
|||||||
14
CobXmlSupport/GenCobCode.Designer.cs
generated
14
CobXmlSupport/GenCobCode.Designer.cs
generated
@ -65,6 +65,7 @@
|
|||||||
this.btnTestThings = new System.Windows.Forms.Button();
|
this.btnTestThings = new System.Windows.Forms.Button();
|
||||||
this.btnFrXMLTo = new System.Windows.Forms.Button();
|
this.btnFrXMLTo = new System.Windows.Forms.Button();
|
||||||
this.btnCrossref = new System.Windows.Forms.Button();
|
this.btnCrossref = new System.Windows.Forms.Button();
|
||||||
|
this.chkBackupVars = new System.Windows.Forms.CheckBox();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
@ -454,11 +455,23 @@
|
|||||||
this.btnCrossref.UseVisualStyleBackColor = true;
|
this.btnCrossref.UseVisualStyleBackColor = true;
|
||||||
this.btnCrossref.Click += new System.EventHandler(this.btnCrossref_Click);
|
this.btnCrossref.Click += new System.EventHandler(this.btnCrossref_Click);
|
||||||
//
|
//
|
||||||
|
// chkBackupVars
|
||||||
|
//
|
||||||
|
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(109, 664);
|
||||||
|
this.chkBackupVars.Name = "chkBackupVars";
|
||||||
|
this.chkBackupVars.Size = new System.Drawing.Size(87, 17);
|
||||||
|
this.chkBackupVars.TabIndex = 36;
|
||||||
|
this.chkBackupVars.Text = "Backup Vars";
|
||||||
|
this.chkBackupVars.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// GenCobCode
|
// GenCobCode
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(951, 693);
|
this.ClientSize = new System.Drawing.Size(951, 693);
|
||||||
|
this.Controls.Add(this.chkBackupVars);
|
||||||
this.Controls.Add(this.btnCrossref);
|
this.Controls.Add(this.btnCrossref);
|
||||||
this.Controls.Add(this.btnFrXMLTo);
|
this.Controls.Add(this.btnFrXMLTo);
|
||||||
this.Controls.Add(this.btnTestThings);
|
this.Controls.Add(this.btnTestThings);
|
||||||
@ -542,6 +555,7 @@
|
|||||||
private System.Windows.Forms.Button btnTestThings;
|
private System.Windows.Forms.Button btnTestThings;
|
||||||
private System.Windows.Forms.Button btnFrXMLTo;
|
private System.Windows.Forms.Button btnFrXMLTo;
|
||||||
private System.Windows.Forms.Button btnCrossref;
|
private System.Windows.Forms.Button btnCrossref;
|
||||||
|
private System.Windows.Forms.CheckBox chkBackupVars;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1049,6 +1049,7 @@ namespace CobXmlSupport
|
|||||||
setWindow.LogPost = S.ettingLogVarName;
|
setWindow.LogPost = S.ettingLogVarName;
|
||||||
setWindow.LogSection = S.ettingLogSectName;
|
setWindow.LogSection = S.ettingLogSectName;
|
||||||
setWindow.ChkShowTestbtns = S.ettingSpecials;
|
setWindow.ChkShowTestbtns = S.ettingSpecials;
|
||||||
|
setWindow.ChkBackupOwnCode = S.ettingUserCodeBcup;
|
||||||
|
|
||||||
setWindow.ShowDialog();
|
setWindow.ShowDialog();
|
||||||
S.ettingUserName = setWindow.UserName;
|
S.ettingUserName = setWindow.UserName;
|
||||||
@ -1068,6 +1069,7 @@ namespace CobXmlSupport
|
|||||||
S.ettingLogVarName = setWindow.LogPost;
|
S.ettingLogVarName = setWindow.LogPost;
|
||||||
S.ettingLogSectName = setWindow.LogSection;
|
S.ettingLogSectName = setWindow.LogSection;
|
||||||
S.ettingSpecials = setWindow.ChkShowTestbtns;
|
S.ettingSpecials = setWindow.ChkShowTestbtns;
|
||||||
|
S.ettingUserCodeBcup = setWindow.ChkBackupOwnCode;
|
||||||
|
|
||||||
chkAnaTag.Checked = S.ettingAnaTag;
|
chkAnaTag.Checked = S.ettingAnaTag;
|
||||||
chkCountVars.Checked = S.ettingCountVars;
|
chkCountVars.Checked = S.ettingCountVars;
|
||||||
@ -1082,6 +1084,8 @@ namespace CobXmlSupport
|
|||||||
txtPrefix.Text = S.ettingPrefix;
|
txtPrefix.Text = S.ettingPrefix;
|
||||||
txtExpPrefix.Text = S.ettingExpPrefix;
|
txtExpPrefix.Text = S.ettingExpPrefix;
|
||||||
btnTestThings.Visible = S.ettingSpecials;
|
btnTestThings.Visible = S.ettingSpecials;
|
||||||
|
chkBackupVars.Checked = S.ettingUserCodeBcup;
|
||||||
|
|
||||||
|
|
||||||
eventRun = false;
|
eventRun = false;
|
||||||
runXMLgen();
|
runXMLgen();
|
||||||
@ -1185,7 +1189,15 @@ namespace CobXmlSupport
|
|||||||
|
|
||||||
// Until here---
|
// Until here---
|
||||||
|
|
||||||
genExtMoves.CodeShower.Text += "\r\n MOVE 0 TO " + cr.CountIn;
|
genExtMoves.CodeShower.Text += "\r\n MOVE ";
|
||||||
|
|
||||||
|
if (cr.MoveCode.Trim().Length != 0)
|
||||||
|
genExtMoves.CodeShower.Text += "1";
|
||||||
|
else
|
||||||
|
genExtMoves.CodeShower.Text += "0";
|
||||||
|
|
||||||
|
genExtMoves.CodeShower.Text += " TO " + cr.CountIn;
|
||||||
|
|
||||||
if (occParRows.Length > 0)
|
if (occParRows.Length > 0)
|
||||||
{
|
{
|
||||||
genExtMoves.CodeShower.Text += " (" + occParRows + " )";
|
genExtMoves.CodeShower.Text += " (" + occParRows + " )";
|
||||||
@ -1203,17 +1215,27 @@ namespace CobXmlSupport
|
|||||||
CobRow crTmp = cr;
|
CobRow crTmp = cr;
|
||||||
struktMove += "\r\n " + "".PadLeft(prfNiv) + " <" + cr.TagName.Replace("\"", "") + "> (" + cr.FieldName + ")";
|
struktMove += "\r\n " + "".PadLeft(prfNiv) + " <" + cr.TagName.Replace("\"", "") + "> (" + cr.FieldName + ")";
|
||||||
|
|
||||||
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "MOVE ";
|
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj);
|
||||||
//------------- move from --------------
|
//------------- move from --------------
|
||||||
if (cr.FieldDef.ToUpper().IndexOf("X") > -1)
|
if (cr.MoveCode.Length > 1 && cr.MoveCode != " ")
|
||||||
{
|
{
|
||||||
genExtMoves.CodeShower.Text += "MoveToStringVar ";
|
if (cr.MoveCode.ToUpper().Contains("MOVE")) {}
|
||||||
|
else genExtMoves.CodeShower.Text += "MOVE ";
|
||||||
|
genExtMoves.CodeShower.Text += cr.MoveCode;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
genExtMoves.CodeShower.Text += "MoveToNumVar ";
|
if (cr.FieldDef.ToUpper().IndexOf("X") > -1)
|
||||||
|
{
|
||||||
|
genExtMoves.CodeShower.Text += "MOVE MoveToStringVar ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
genExtMoves.CodeShower.Text += "MOVE MoveToNumVar ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
genExtMoves.CodeShower.Text += " *> #" + cr.FieldName + "#";
|
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + " *> #" + cr.FieldName + "#";
|
||||||
|
|
||||||
//------------- move to ---------------
|
//------------- move to ---------------
|
||||||
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "TO " + cr.FieldName;
|
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "TO " + cr.FieldName;
|
||||||
genExtMoves.CodeShower.Text = checkForOccurs(indexNames, cr, genExtMoves.CodeShower.Text, ref occParRows, ref slask, false, adj);
|
genExtMoves.CodeShower.Text = checkForOccurs(indexNames, cr, genExtMoves.CodeShower.Text, ref occParRows, ref slask, false, adj);
|
||||||
|
|||||||
12
CobXmlSupport/Properties/Settings.Designer.cs
generated
12
CobXmlSupport/Properties/Settings.Designer.cs
generated
@ -229,5 +229,17 @@ namespace CobXmlSupport.Properties {
|
|||||||
this["ShowTestbtns"] = value;
|
this["ShowTestbtns"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
|
public bool BackupOwnCode {
|
||||||
|
get {
|
||||||
|
return ((bool)(this["BackupOwnCode"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["BackupOwnCode"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,5 +56,8 @@
|
|||||||
<Setting Name="ShowTestbtns" Type="System.Boolean" Scope="User">
|
<Setting Name="ShowTestbtns" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">False</Value>
|
<Value Profile="(Default)">False</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="BackupOwnCode" Type="System.Boolean" Scope="User">
|
||||||
|
<Value Profile="(Default)">True</Value>
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
@ -24,6 +24,7 @@ namespace CobXmlSupport
|
|||||||
public static string ettingLogVarName;
|
public static string ettingLogVarName;
|
||||||
public static string ettingLogSectName;
|
public static string ettingLogSectName;
|
||||||
public static bool ettingSpecials;
|
public static bool ettingSpecials;
|
||||||
|
public static bool ettingUserCodeBcup;
|
||||||
//-------------------------
|
//-------------------------
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,13 +106,23 @@ namespace CobXmlSupport
|
|||||||
codeComplInit += cr.FieldName + "\t" + enQuote( cr.MoveCode.Replace("\r\n", "\n")) + "\r\n";
|
codeComplInit += cr.FieldName + "\t" + enQuote( cr.MoveCode.Replace("\r\n", "\n")) + "\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string backupfile = inPath + inFile.Substring(0, inFile.LastIndexOf(".")) + "." +
|
|
||||||
(DateTime.Now.Year-2000).ToString("00") +
|
string backupfile;
|
||||||
DateTime.Now.Month.ToString("00") +
|
if (S.ettingUserCodeBcup)
|
||||||
DateTime.Now.Day.ToString("00") + "T"+
|
{
|
||||||
DateTime.Now.Hour.ToString("00") +
|
backupfile = inPath + inFile.Substring(0, inFile.LastIndexOf(".")) + "." +
|
||||||
DateTime.Now.Minute.ToString("00") +
|
(DateTime.Now.Year - 2000).ToString("00") +
|
||||||
DateTime.Now.Second.ToString("00") + ".cvs";
|
DateTime.Now.Month.ToString("00") +
|
||||||
|
DateTime.Now.Day.ToString("00") + "T" +
|
||||||
|
DateTime.Now.Hour.ToString("00") +
|
||||||
|
DateTime.Now.Minute.ToString("00") +
|
||||||
|
DateTime.Now.Second.ToString("00") + ".cvs";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
backupfile = inPath + inFile.Substring(0, inFile.LastIndexOf(".")) + ".backup.cvs";
|
||||||
|
File.Delete(backupfile);
|
||||||
|
}
|
||||||
|
|
||||||
File.Move(inPath + codeFile, backupfile );//+ DateTime.Now.ToString());
|
File.Move(inPath + codeFile, backupfile );//+ DateTime.Now.ToString());
|
||||||
File.WriteAllText(inPath + codeFile, codeComplInit);
|
File.WriteAllText(inPath + codeFile, codeComplInit);
|
||||||
|
|
||||||
|
|||||||
13
CobXmlSupport/frmSettings.Designer.cs
generated
13
CobXmlSupport/frmSettings.Designer.cs
generated
@ -58,6 +58,7 @@
|
|||||||
this.label7 = new System.Windows.Forms.Label();
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
this.specials = new System.Windows.Forms.GroupBox();
|
this.specials = new System.Windows.Forms.GroupBox();
|
||||||
this.chkShowTestbtns = new System.Windows.Forms.CheckBox();
|
this.chkShowTestbtns = new System.Windows.Forms.CheckBox();
|
||||||
|
this.chkBackupOwnCode = new System.Windows.Forms.CheckBox();
|
||||||
this.groupBox1.SuspendLayout();
|
this.groupBox1.SuspendLayout();
|
||||||
this.groupBox2.SuspendLayout();
|
this.groupBox2.SuspendLayout();
|
||||||
this.specials.SuspendLayout();
|
this.specials.SuspendLayout();
|
||||||
@ -339,6 +340,7 @@
|
|||||||
//
|
//
|
||||||
// specials
|
// specials
|
||||||
//
|
//
|
||||||
|
this.specials.Controls.Add(this.chkBackupOwnCode);
|
||||||
this.specials.Controls.Add(this.chkShowTestbtns);
|
this.specials.Controls.Add(this.chkShowTestbtns);
|
||||||
this.specials.Location = new System.Drawing.Point(325, 216);
|
this.specials.Location = new System.Drawing.Point(325, 216);
|
||||||
this.specials.Name = "specials";
|
this.specials.Name = "specials";
|
||||||
@ -357,6 +359,16 @@
|
|||||||
this.chkShowTestbtns.Text = "visa testknapp";
|
this.chkShowTestbtns.Text = "visa testknapp";
|
||||||
this.chkShowTestbtns.UseVisualStyleBackColor = true;
|
this.chkShowTestbtns.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// chkBackupOwnCode
|
||||||
|
//
|
||||||
|
this.chkBackupOwnCode.AutoSize = true;
|
||||||
|
this.chkBackupOwnCode.Location = new System.Drawing.Point(7, 44);
|
||||||
|
this.chkBackupOwnCode.Name = "chkBackupOwnCode";
|
||||||
|
this.chkBackupOwnCode.Size = new System.Drawing.Size(129, 17);
|
||||||
|
this.chkBackupOwnCode.TabIndex = 1;
|
||||||
|
this.chkBackupOwnCode.Text = "Backup av Egna vars";
|
||||||
|
this.chkBackupOwnCode.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// frmSettings
|
// frmSettings
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -419,5 +431,6 @@
|
|||||||
private System.Windows.Forms.Label label8;
|
private System.Windows.Forms.Label label8;
|
||||||
private System.Windows.Forms.GroupBox specials;
|
private System.Windows.Forms.GroupBox specials;
|
||||||
private System.Windows.Forms.CheckBox chkShowTestbtns;
|
private System.Windows.Forms.CheckBox chkShowTestbtns;
|
||||||
|
private System.Windows.Forms.CheckBox chkBackupOwnCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,6 +22,7 @@ namespace CobXmlSupport
|
|||||||
private bool tmpChkAnaTag;
|
private bool tmpChkAnaTag;
|
||||||
private bool tmpChkCountVars;
|
private bool tmpChkCountVars;
|
||||||
private bool tmpShowTestBtns;
|
private bool tmpShowTestBtns;
|
||||||
|
private bool tmpBackupOwnCode;
|
||||||
private string tmpTxtPrefix;
|
private string tmpTxtPrefix;
|
||||||
private string tmpTxtExpPrefix;
|
private string tmpTxtExpPrefix;
|
||||||
private string tmpTxtMaxOcc;
|
private string tmpTxtMaxOcc;
|
||||||
@ -184,6 +185,18 @@ namespace CobXmlSupport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool ChkBackupOwnCode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return chkBackupOwnCode.Checked;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
chkBackupOwnCode.Checked = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string TxtMaxOcc
|
public string TxtMaxOcc
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -234,6 +247,7 @@ namespace CobXmlSupport
|
|||||||
Properties.Settings.Default.Values = chkValues.Checked;
|
Properties.Settings.Default.Values = chkValues.Checked;
|
||||||
Properties.Settings.Default.Wrap = chkWrap.Checked;
|
Properties.Settings.Default.Wrap = chkWrap.Checked;
|
||||||
Properties.Settings.Default.ShowTestbtns= chkShowTestbtns.Checked;
|
Properties.Settings.Default.ShowTestbtns= chkShowTestbtns.Checked;
|
||||||
|
Properties.Settings.Default.BackupOwnCode = chkBackupOwnCode.Checked;
|
||||||
Properties.Settings.Default.LogVarName = txtLogPost.Text;
|
Properties.Settings.Default.LogVarName = txtLogPost.Text;
|
||||||
Properties.Settings.Default.LogSectName = txtLogSection.Text;
|
Properties.Settings.Default.LogSectName = txtLogSection.Text;
|
||||||
Properties.Settings.Default.Save();
|
Properties.Settings.Default.Save();
|
||||||
@ -253,6 +267,7 @@ namespace CobXmlSupport
|
|||||||
tmpChkValues = chkValues.Checked;
|
tmpChkValues = chkValues.Checked;
|
||||||
tmpChkAnaTag = chkAnaTag.Checked;
|
tmpChkAnaTag = chkAnaTag.Checked;
|
||||||
tmpShowTestBtns = chkShowTestbtns.Checked;
|
tmpShowTestBtns = chkShowTestbtns.Checked;
|
||||||
|
tmpBackupOwnCode = chkBackupOwnCode.Checked;
|
||||||
tmpTxtPrefix = txtPrefix.Text;
|
tmpTxtPrefix = txtPrefix.Text;
|
||||||
tmpTxtExpPrefix = txtExpPrefix.Text;
|
tmpTxtExpPrefix = txtExpPrefix.Text;
|
||||||
tmpTxtMaxOcc = txtMaxOcc.Text;
|
tmpTxtMaxOcc = txtMaxOcc.Text;
|
||||||
@ -274,7 +289,8 @@ namespace CobXmlSupport
|
|||||||
chkValues.Checked= tmpChkValues;
|
chkValues.Checked= tmpChkValues;
|
||||||
chkAnaTag.Checked= tmpChkAnaTag;
|
chkAnaTag.Checked= tmpChkAnaTag;
|
||||||
chkShowTestbtns.Checked = tmpShowTestBtns;
|
chkShowTestbtns.Checked = tmpShowTestBtns;
|
||||||
txtPrefix.Text= tmpTxtPrefix;
|
chkBackupOwnCode.Checked = tmpBackupOwnCode;
|
||||||
|
txtPrefix.Text = tmpTxtPrefix;
|
||||||
txtExpPrefix.Text = tmpTxtExpPrefix;
|
txtExpPrefix.Text = tmpTxtExpPrefix;
|
||||||
txtMaxOcc.Text = tmpTxtMaxOcc;
|
txtMaxOcc.Text = tmpTxtMaxOcc;
|
||||||
txtLogPost.Text= txtLogVarNameTmp;
|
txtLogPost.Text= txtLogVarNameTmp;
|
||||||
|
|||||||
Reference in New Issue
Block a user