Implementation of saver started

This commit is contained in:
2015-07-14 23:40:33 +02:00
parent 79d4c1cb27
commit a06104a7cc
7 changed files with 286 additions and 37 deletions

View File

@ -29,7 +29,61 @@ namespace CobXmlSupport
private string txtLogVarNameTmp;
private string txtLogVarSectTmp;
//------------
private GenSetting genSet;
// private string aktualFile;
// private string filePath;
private SaverListener sl;
public string AktualFile
{
get
{
return txtActualFile.Text;
}
set
{
txtActualFile.Text = value;
}
}
public string FilePath
{
get
{
return txtFilePath.Text;
}
set
{
txtFilePath.Text = value;
}
}
public GenSetting SettingObj
{
get
{
return genSet;
}
set
{
genSet = value;
}
}
public SaverListener SL
{
get
{
return sl;
}
set
{
sl = value;
}
}
//------------
public frmSettings()
{
InitializeComponent();
@ -235,23 +289,30 @@ namespace CobXmlSupport
private void btnSave_Click(object sender, EventArgs e)
{
Properties.Settings.Default.AnaTag = chkAnaTag.Checked;
Properties.Settings.Default.CountVars = chkCountVars.Checked;
Properties.Settings.Default.MaxOcc = txtMaxOcc.Text;
Properties.Settings.Default.NoNsRef = chkNoNsRef.Checked;
Properties.Settings.Default.Prefix = txtPrefix.Text;
Properties.Settings.Default.ExpPrefix = txtExpPrefix.Text;
Properties.Settings.Default.Unique = chkUnique.Checked;
Properties.Settings.Default.UniqueAttrVars = chkUniqueAttrVars.Checked;
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.BackupOwnCode = chkBackupOwnCode.Checked;
Properties.Settings.Default.LogVarName = txtLogPost.Text;
Properties.Settings.Default.LogSectName = txtLogSection.Text;
Properties.Settings.Default.Save();
sl.Subscribe(this.genSet);
S.ettingActualFile = this.AktualFile;
S.ettingFilePath = this.FilePath;
S.ettingAnaTag = Properties.Settings.Default.AnaTag = chkAnaTag.Checked;
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.ettingExpPrefix = Properties.Settings.Default.ExpPrefix = txtExpPrefix.Text;
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.ettingValues = Properties.Settings.Default.Values = chkValues.Checked;
S.ettingWrap = Properties.Settings.Default.Wrap = chkWrap.Checked;
S.ettingSpecials = 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;
Properties.Settings.Default.Save();
this.genSet.GetSettings();
this.sl.UnSubscribe(this.genSet);
this.Close();
}