Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            MySqlDatabaseConnection.Initialize("127.0.0.1", "3306", "MuOnline", "root", "");
            Account player = DatabaseOperations.GetObject <Account>(1);

            DatabaseOperations.SaveObject(player);
        }
Example #2
0
        public GameCore()
        {
            Logger.Info("[GameCore] Starting...");
            SimpleModulus.InitCryptSite(true);
            Logger.Info("[GameCore] Crypt Keys Change To Server Side");
            Xor32Modulus.InitKeys(true);
            Logger.Info("[GameCore] Crypt Keys Change To Old Keys");
            OpCodes.Init();
            Logger.Info("[GameCore] OpCodes Initialized");


            if (!MySqlDatabaseConnection.Initialize(Define.databaseHost, Define.databasePort, Define.databaseName, Define.databaseLogin, Define.databasePassword))
            {
                MessageBox.Show("No Connection MySql. Exit Process");
                Application.Exit();
            }


            socketServer = SocketServer.Instance;
            socketServer.Initialize(Define.port, Define.ipAddress);
            clientManager = UserManager.Instance;
            packetHandler = PacketHandler.Instance;
            mapService.Init();
            Logger.Info("[GameCore] Server Succesfully Initialized, Waiting For Listen");
        }
Example #3
0
        public Intialization()
        {
            var configPath = Path.Join(Directory.GetCurrentDirectory(), "configs.json");

            configContent = new JsonFileContent(configPath);
            consumer      = new Consumer(
                configContent.Value("RabbitUrl").ToString(),
                configContent.Value("RabbitLogin").ToString(),
                configContent.Value("RabbitPassword").ToString()
                );
            publisher = new Publisher(
                configContent.Value("RabbitUrl").ToString(),
                configContent.Value("RabbitLogin").ToString(),
                configContent.Value("RabbitPassword").ToString()
                );
            connection = new MySqlDatabaseConnection(
                configContent.Value("MySqlServer").ToString(),
                configContent.Value("MySqlDatabase").ToString(),
                configContent.Value("MySqlLogin").ToString(),
                configContent.Value("MySqlPassword").ToString()
                );
            databaseClient = new MySqlDatabaseClient(connection);
            facade         = new SubscriptionFacade("configs.json", consumer, publisher, databaseClient);
        }
Example #4
0
 public MiddlewareClient(string databaseName)
 {
     _db = new MySqlDatabaseConnection(ConnectionStringFromAppConfig(databaseName));
 }
Example #5
0
 public MiddlewareClient()
 {
     _db = new MySqlDatabaseConnection();
 }
Example #6
0
 public MySqlTransaction(MySqlDatabaseConnection databaseConnection)
 {
     this.connection = new RawConnection(databaseConnection.ConnectionString);
 }
Example #7
0
 private void IntitializeDb()
 {
     _mySqlDatabaseConnection = new MySqlDatabaseConnection();
     _mySqlDatabaseConnection.MySqlConnection.Open();
 }