Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }