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 string FilePath { get; set; } public string UserName { get; set; } public string Company { get; set; } public bool NoNsRef { get; set; } public bool UniqueVars { get; set; } public bool UniqueAttrVars { get; set; } public bool Unique { get; set; } public bool Wrap { get; set; } public bool Values { get; set; } public bool AnaTag { get; set; } public string Prefix { get; set; } public string ExpPrefix { get; set; } public string MaxOcc { get; set; } public bool CountVars { get; set; } public string LogVarName { get; set; } public string LogSectName { get; set; } public bool Specials { get; set; } public bool UserCodeBcup { get; set; } public bool BcupOwnCode { get; set; } public void GetSettings() { this.ActualFile = S.ettingActualFile; this.FilePath = S.ettingFilePath; this.UserName = S.ettingUserName; this.Company = S.ettingCompany; this.NoNsRef = S.ettingNoNsRef; this.UniqueVars = S.ettingUniqueVars; this.UniqueAttrVars = S.ettingUniqueAttrVars; this.Unique = S.ettingUnique; this.Wrap = S.ettingWrap; this.Values = S.ettingValues; this.AnaTag = S.ettingAnaTag; this.Prefix = S.ettingPrefix; this.ExpPrefix = S.ettingExpPrefix; this.MaxOcc = S.ettingMaxOcc; this.CountVars = S.ettingCountVars; this.LogVarName = S.ettingLogVarName; this.LogSectName = S.ettingLogSectName; this.Specials = S.ettingSpecials; this.UserCodeBcup = S.ettingUserCodeBcup; this.BcupOwnCode = S.ettingBackupOwnCode; if (evSave != null) { evSave(this, e); } } public void SetSettings() { S.ettingActualFile =this.ActualFile ; S.ettingFilePath = this.FilePath; S.ettingUserName = this.UserName; S.ettingCompany = this.Company; S.ettingNoNsRef = this.NoNsRef; S.ettingUniqueVars = this.UniqueVars; S.ettingUniqueAttrVars = this.UniqueAttrVars; S.ettingUnique = this.Unique; S.ettingWrap = this.Wrap; S.ettingValues = this.Values; S.ettingAnaTag = this.AnaTag; S.ettingPrefix = this.Prefix; S.ettingExpPrefix = this.ExpPrefix; S.ettingMaxOcc = this.MaxOcc; S.ettingCountVars = this.CountVars; S.ettingLogVarName = this.LogVarName; S.ettingLogSectName = this.LogSectName; S.ettingSpecials = this.Specials; S.ettingUserCodeBcup = this.UserCodeBcup; S.ettingBackupOwnCode = this.BcupOwnCode; } public object Clone() { GenSetting tmpGenSetting = new GenSetting(); tmpGenSetting = (GenSetting)this.MemberwiseClone(); return tmpGenSetting; } } }