コード例 #1
0
        private void SaveTcpConnectionSettings(TcpConnectionSettings settings)
        {
            FileDataManager fdm = new FileDataManager(this);

            fdm.InsertOrUpdateValueByKey("tcp_ip", settings.Ip);
            fdm.InsertOrUpdateValueByKey("tcp_port", settings.Port.ToString());
            fdm.SaveData();
        }
コード例 #2
0
        private void SaveMySqlSettings(MySqlConnectionSettings mySqlConnSettings)
        {
            FileDataManager fdm = new FileDataManager(this);

            fdm.InsertOrUpdateValueByKey("mysql_server", mySqlConnSettings.Server);
            fdm.InsertOrUpdateValueByKey("mysql_port", mySqlConnSettings.Port.ToString());
            fdm.InsertOrUpdateValueByKey("mysql_database", mySqlConnSettings.Database);
            fdm.InsertOrUpdateValueByKey("mysql_user", mySqlConnSettings.User);
            fdm.InsertOrUpdateValueByKey
            (
                "mysql_pass",
                (
                    !String.IsNullOrWhiteSpace(mySqlConnSettings.Pass) ?
                    Crypto.EncryptStringAES(mySqlConnSettings.Pass, GlobalData.PassKey) :
                    ""
                )
            );

            fdm.SaveData();
        }