Completed the S.ettings object with some more fields and checked the use of them
This commit is contained in:
@ -735,6 +735,7 @@ namespace CobXmlSupport
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
formLoading = true;
|
||||
|
||||
chkValues.Checked = true;
|
||||
chkUnique.Checked = true;
|
||||
chkAnaTag.Checked = true;
|
||||
@ -765,8 +766,6 @@ namespace CobXmlSupport
|
||||
|
||||
S.ettingUserName = Properties.Settings.Default.UserName;
|
||||
S.ettingCompany = Properties.Settings.Default.CompanyName;
|
||||
|
||||
|
||||
S.ettingAnaTag = Properties.Settings.Default.AnaTag;
|
||||
S.ettingCountVars = Properties.Settings.Default.CountVars;
|
||||
S.ettingMaxOcc = Properties.Settings.Default.MaxOcc;
|
||||
@ -780,7 +779,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;
|
||||
S.ettingShowTestbtns = Properties.Settings.Default.ShowTestbtns;
|
||||
|
||||
chkAnaTag.Checked = S.ettingAnaTag;
|
||||
chkCountVars.Checked = S.ettingCountVars;
|
||||
@ -794,7 +793,7 @@ namespace CobXmlSupport
|
||||
chkUniqueVars.Checked = S.ettingUniqueVars;
|
||||
chkValues.Checked = S.ettingValues;
|
||||
chkWrap.Checked = S.ettingWrap;
|
||||
btnTestThings.Visible = S.ettingSpecials;
|
||||
btnTestThings.Visible = S.ettingShowTestbtns;
|
||||
|
||||
formLoading = false;
|
||||
// cmbLastFile.Text = cmbLastFile.Items[0].ToString();
|
||||
@ -1180,6 +1179,22 @@ namespace CobXmlSupport
|
||||
|
||||
private void cmbLastFile_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if ( S.ettingActualFile != null)
|
||||
{
|
||||
GenSetting tmpSetting = new GenSetting();
|
||||
this.sl.Subscribe(tmpSetting);
|
||||
tmpSetting.GetSettings();
|
||||
this.sl.UnSubscribe(tmpSetting);
|
||||
}
|
||||
S.ettingActualFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1);
|
||||
GenSetting tmpGS = null;
|
||||
sl.dict.TryGetValue(S.ettingActualFile, out tmpGS);
|
||||
if (tmpGS != null)
|
||||
{
|
||||
tmpGS.SetSettings();
|
||||
setLocalValues();
|
||||
}
|
||||
|
||||
runXMLgen();
|
||||
}
|
||||
|
||||
@ -1295,66 +1310,10 @@ namespace CobXmlSupport
|
||||
|
||||
eventRun = true;
|
||||
|
||||
//setWindow.UserName = S.ettingUserName;
|
||||
//setWindow.CompanyName = S.ettingCompany;
|
||||
|
||||
//setWindow.AktualFile = S.ettingActualFile;
|
||||
//setWindow.FilePath = S.ettingFilePath;
|
||||
|
||||
//setWindow.ChkNoNsRef = S.ettingNoNsRef;
|
||||
//setWindow.ChkUniqueVars = S.ettingUniqueVars;
|
||||
//setWindow.ChkUniqueAttrVars = S.ettingUniqueAttrVars;
|
||||
//setWindow.ChkUnique = S.ettingUnique;
|
||||
//setWindow.ChkWrap = S.ettingWrap;
|
||||
//setWindow.ChkValues = S.ettingValues;
|
||||
//setWindow.ChkAnaTag = S.ettingAnaTag;
|
||||
//setWindow.TxtPrefix = S.ettingPrefix;
|
||||
//setWindow.TxtExpPrefix = S.ettingExpPrefix;
|
||||
//setWindow.TxtMaxOcc = S.ettingMaxOcc;
|
||||
//setWindow.ChkCountVars = S.ettingCountVars;
|
||||
//setWindow.LogPost = S.ettingLogVarName;
|
||||
//setWindow.LogSection = S.ettingLogSectName;
|
||||
//setWindow.ChkShowTestbtns = S.ettingSpecials;
|
||||
//setWindow.ChkBackupOwnCode = S.ettingUserCodeBcup;
|
||||
|
||||
setWindow.ShowDialog();
|
||||
|
||||
//S.ettingUserName = setWindow.UserName;
|
||||
//S.ettingCompany = setWindow.CompanyName;
|
||||
//S.ettingNoNsRef = setWindow.ChkNoNsRef;
|
||||
//S.ettingUniqueVars = setWindow.ChkUniqueVars;
|
||||
//S.ettingUniqueAttrVars = setWindow.ChkUniqueAttrVars;
|
||||
//S.ettingUnique = setWindow.ChkUnique;
|
||||
//S.ettingWrap = setWindow.ChkWrap;
|
||||
//S.ettingValues = setWindow.ChkValues;
|
||||
//S.ettingAnaTag = setWindow.ChkAnaTag;
|
||||
//S.ettingPrefix = setWindow.TxtPrefix;
|
||||
//S.ettingExpPrefix = setWindow.TxtExpPrefix;
|
||||
//S.ettingMaxOcc = setWindow.TxtMaxOcc;
|
||||
//S.ettingCountVars = setWindow.ChkCountVars;
|
||||
//S.ettingLogVarName = setWindow.LogPost;
|
||||
//S.ettingLogSectName = setWindow.LogSection;
|
||||
//S.ettingSpecials = setWindow.ChkShowTestbtns;
|
||||
//S.ettingUserCodeBcup = setWindow.ChkBackupOwnCode;
|
||||
|
||||
setLocalValues();
|
||||
|
||||
//chkAnaTag.Checked = S.ettingAnaTag;
|
||||
//chkCountVars.Checked = S.ettingCountVars;
|
||||
//chkDisplays.Checked = true;
|
||||
//chkNoNsRef.Checked = S.ettingNoNsRef;
|
||||
//chkUnique.Checked = S.ettingUnique;
|
||||
//chkUniqueAttrVars.Checked = S.ettingUniqueAttrVars;
|
||||
//chkUniqueVars.Checked = S.ettingUniqueVars;
|
||||
//chkValues.Checked = S.ettingValues;
|
||||
//chkWrap.Checked = S.ettingWrap;
|
||||
//txtMaxOcc.Text = S.ettingMaxOcc;
|
||||
//txtPrefix.Text = S.ettingPrefix;
|
||||
//txtExpPrefix.Text = S.ettingExpPrefix;
|
||||
//btnTestThings.Visible = S.ettingSpecials;
|
||||
//chkBackupVars.Checked = S.ettingUserCodeBcup;
|
||||
|
||||
|
||||
eventRun = false;
|
||||
runXMLgen();
|
||||
}
|
||||
@ -1362,20 +1321,32 @@ namespace CobXmlSupport
|
||||
private void setLocalValues()
|
||||
{
|
||||
eventRun = true;
|
||||
chkAnaTag.Checked = S.ettingAnaTag;
|
||||
chkCountVars.Checked = S.ettingCountVars;
|
||||
chkDisplays.Checked = true;
|
||||
chkAnaTag.Checked = S.ettingAnaTag; chkAnaTag.Refresh();
|
||||
chkCountVars.Checked = S.ettingCountVars; chkCountVars.Refresh();
|
||||
chkDisplays.Checked = S.ettingDisplays;
|
||||
chkDisplays.Refresh();
|
||||
chkNoNsRef.Checked = S.ettingNoNsRef;
|
||||
chkNoNsRef.Refresh();
|
||||
chkUnique.Checked = S.ettingUnique;
|
||||
chkUnique.Refresh();
|
||||
chkUniqueAttrVars.Checked = S.ettingUniqueAttrVars;
|
||||
chkUniqueAttrVars.Refresh();
|
||||
chkUniqueVars.Checked = S.ettingUniqueVars;
|
||||
chkUniqueVars.Refresh();
|
||||
chkValues.Checked = S.ettingValues;
|
||||
chkValues.Refresh();
|
||||
chkWrap.Checked = S.ettingWrap;
|
||||
chkWrap.Refresh();
|
||||
txtMaxOcc.Text = S.ettingMaxOcc;
|
||||
txtMaxOcc.Refresh();
|
||||
txtPrefix.Text = S.ettingPrefix;
|
||||
txtPrefix.Refresh();
|
||||
txtExpPrefix.Text = S.ettingExpPrefix;
|
||||
btnTestThings.Visible = S.ettingSpecials;
|
||||
txtExpPrefix.Refresh();
|
||||
btnTestThings.Visible = S.ettingShowTestbtns;
|
||||
btnTestThings.Refresh();
|
||||
chkBackupVars.Checked = S.ettingUserCodeBcup;
|
||||
chkBackupVars.Refresh();
|
||||
eventRun = false;
|
||||
}
|
||||
|
||||
@ -2298,6 +2269,10 @@ namespace CobXmlSupport
|
||||
S.ettingExpPrefix = txtExpPrefix.Text;
|
||||
}
|
||||
|
||||
private void txtMaxOcc_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
S.ettingMaxOcc = txtMaxOcc.Text;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user