示例#1
0
        public void FillTableList()
        {
            conn.CreateConnection(ConnectionHandler.Server, ConnectionHandler.Database, ConnectionHandler.Username, ConnectionHandler.Password);

            lstTables.Items.Clear();
            lstTables.Items.AddRange(conn.GetListOfTables().ToArray());
            logg1.Log("Koblet til database " + ConnectionHandler.Database + ". Lister ut tabeller." + Environment.NewLine, Logg.LogType.Info);
        }
示例#2
0
 void Host_MigrateRequest(object sender, MigrateRequestEventArgs e)
 {
     DestinationClient = new Client(e.Adress, e.Port, Logg);
     DestinationClient.DataReceived += DestinationClient_DataReceived;
     Logg.Log(string.Format("Migration réussit avec succes, server de jeux : {0}: {1} .", e.Adress, e.Port), LogLevelEnum.Succes);
     Host.Bot.BotState = BotStatsEnum.INACTIF;
 }
示例#3
0
        void DestinationClient_DataReceived(object sender, Client.DataReceivedEventArgs e)
        {
            NetworkMessage message = ProtocolManager.GetPacket(e.Data.Data, (uint)e.Data.MessageId);

            Host.Dispatcher.DispatchMessage(message, Host);
            Logg.Log("From server :" + message.MessageId.ToString());
        }
示例#4
0
 void Host_PreMigrateRequest(object sender, EventArgs e)
 {
     IsMigrating       = true;
     Host.Bot.BotState = BotStatsEnum.MIGRATING;
     SourceClient.Stop();
     DestinationClient.Stop();
     Logg.Log("Préparation de la migration ...");
 }
示例#5
0
        public override void SendMessage(NetworkMessage message, DestinationEnum destination)
        {
            CustomDataWriter writer = new CustomDataWriter();

            message.Pack(writer);
            DestinationClient.Send(writer.Data);
            Logg.Log("Sent to server :" + message.MessageId.ToString());
        }