public PlayerControl(ConnectionManager _manager) { manager = _manager; }
private void MainWindow_Load(object sender, EventArgs e) { ModList.Init("MODLIST.txt"); Packet.Init(); CustomLib.form = this; time = BotSettings.Default.timer; cManager = new ConnectionManager(); cManager.player.name = textUsername.Text; cManager.onClientDisconnect += ConnectionManager_onClientDisconnect; cManager.onClientConnect += Client_onClientConnect; cManager.onPlayerDeath += cManager_onPlayerDeath; textConsole.MaxLength = Int32.MaxValue; textUsername.Text = BotSettings.Default.Username; textHost.Text = BotSettings.Default.HostIP; textPort.Text = BotSettings.Default.Port; time = BotSettings.Default.timer; textOnlineTimer.Text = BotSettings.Default.timer.ToString(); }