103 lines
3.6 KiB
C#
103 lines
3.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CobXmlSupport
|
|
{
|
|
public class GenSetting : ICloneable
|
|
{
|
|
public event SaveHandler evSave;
|
|
public EventArgs e = null;
|
|
public delegate void SaveHandler(GenSetting G, EventArgs e);
|
|
|
|
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; }
|
|
public string ExpPrefix { get; set; }
|
|
public string FilePath { get; set; }
|
|
public string LogSectName { get; set; }
|
|
public string LogVarName { get; set; }
|
|
public string MaxOcc { get; set; }
|
|
public bool NoNsRef { get; set; }
|
|
public string Prefix { get; set; }
|
|
public bool Unique { get; set; }
|
|
public bool UniqueAttrVars { get; set; }
|
|
public bool UniqueVars { get; set; }
|
|
public bool UserCodeBcup { get; set; }
|
|
public string UserName { get; set; }
|
|
public bool Values { get; set; }
|
|
public bool Wrap { get; set; }
|
|
public bool ShowTestbtns { get; set; }
|
|
|
|
public void GetSettings()
|
|
{
|
|
this.ActualFile = S.ettingActualFile;
|
|
this.AnaTag = S.ettingAnaTag;
|
|
this.BcupOwnCode = S.ettingBackupOwnCode;
|
|
this.Company = S.ettingCompany;
|
|
this.CountVars = S.ettingCountVars;
|
|
this.Displays = S.ettingDisplays;
|
|
this.ExpPrefix = S.ettingExpPrefix;
|
|
this.FilePath = S.ettingFilePath;
|
|
this.LogSectName = S.ettingLogSectName;
|
|
this.LogVarName = S.ettingLogVarName;
|
|
this.MaxOcc = S.ettingMaxOcc;
|
|
this.NoNsRef = S.ettingNoNsRef;
|
|
this.Prefix = S.ettingPrefix;
|
|
this.Unique = S.ettingUnique;
|
|
this.UniqueAttrVars = S.ettingUniqueAttrVars;
|
|
this.UniqueVars = S.ettingUniqueVars;
|
|
this.UserCodeBcup = S.ettingUserCodeBcup;
|
|
this.UserName = S.ettingUserName;
|
|
this.Values = S.ettingValues;
|
|
this.Wrap = S.ettingWrap;
|
|
this.ShowTestbtns = S.ettingShowTestbtns;
|
|
|
|
if (evSave != null)
|
|
{
|
|
evSave(this, e);
|
|
}
|
|
}
|
|
|
|
public void SetSettings()
|
|
{
|
|
|
|
S.ettingActualFile = this.ActualFile;
|
|
S.ettingAnaTag = this.AnaTag;
|
|
S.ettingBackupOwnCode = this.BcupOwnCode;
|
|
S.ettingCompany = this.Company;
|
|
S.ettingCountVars = this.CountVars;
|
|
S.ettingDisplays = this.Displays;
|
|
S.ettingExpPrefix = this.ExpPrefix;
|
|
S.ettingFilePath = this.FilePath;
|
|
S.ettingLogSectName = this.LogSectName;
|
|
S.ettingLogVarName = this.LogVarName;
|
|
S.ettingMaxOcc = this.MaxOcc;
|
|
S.ettingNoNsRef = this.NoNsRef;
|
|
S.ettingPrefix = this.Prefix;
|
|
S.ettingUnique = this.Unique;
|
|
S.ettingUniqueAttrVars = this.UniqueAttrVars;
|
|
S.ettingUniqueVars = this.UniqueVars;
|
|
S.ettingUserCodeBcup = this.UserCodeBcup;
|
|
S.ettingUserName = this.UserName;
|
|
S.ettingValues = this.Values;
|
|
S.ettingWrap = this.Wrap;
|
|
S.ettingShowTestbtns = this.ShowTestbtns;
|
|
|
|
}
|
|
|
|
public object Clone()
|
|
{
|
|
GenSetting tmpGenSetting = new GenSetting();
|
|
tmpGenSetting = (GenSetting)this.MemberwiseClone();
|
|
return tmpGenSetting;
|
|
}
|
|
|
|
}
|
|
}
|