public Boolean Load() { Boolean result = false; if (File.Exists(Module.TravoxSentinel + Module.File_Config)) { TypeSFO FileConfig = new TypeSFO(); Byte[] bytes = Module.Read(Module.TravoxSentinel + Module.File_Config); if (bytes.Length > 0) { result = true; FileConfig.Load(bytes); this.Mapping(FileConfig.ToArray); } } return result; }
public void Save() { TypeSFO FileConfig = new TypeSFO(); FileConfig.Param("SentinelPort", SentinelPort); FileConfig.Param("NodeAPI.IPAddress", ECB.Encrypt(API.IPAddress, KeyEncrypt)); FileConfig.Param("NodeAPI.Port", ECB.Encrypt(API.Port, KeyEncrypt)); FileConfig.Param("MSSQL.Name", ECB.Encrypt(MSSQL.Name, KeyEncrypt)); FileConfig.Param("MSSQL.ServerName", ECB.Encrypt(MSSQL.ServerName, KeyEncrypt)); FileConfig.Param("MSSQL.Username", ECB.Encrypt(MSSQL.Username, KeyEncrypt)); FileConfig.Param("MSSQL.Password", ECB.Encrypt(MSSQL.Password, KeyEncrypt)); FileConfig.Param("PanelConfig.X", ECB.Encrypt(PanelSetting.X.ToString(), KeyEncrypt)); FileConfig.Param("PanelConfig.Y", ECB.Encrypt(PanelSetting.Y.ToString(), KeyEncrypt)); FileConfig.SaveAs(Module.TravoxSentinel + Module.File_Config); }
public Boolean Load() { Boolean result = false; if (File.Exists(Module.TravoxSentinel + Module.File_Config)) { TypeSFO FileConfig = new TypeSFO(); Byte[] bytes = Module.Read(Module.TravoxSentinel + Module.File_Config); if (bytes.Length > 0) { result = true; FileConfig.Load(bytes); this.Mapping(FileConfig.ToArray); } } return(result); }