CEngineSharp_Client.Graphics.MenuScreen.buttonSendRegistartion_LeftMouseClickedCallback C# (CSharp) Method

buttonSendRegistartion_LeftMouseClickedCallback() private method

private buttonSendRegistartion_LeftMouseClickedCallback ( object sender, TGUI.CallbackArgs e ) : void
sender object
e TGUI.CallbackArgs
return void
        private void buttonSendRegistartion_LeftMouseClickedCallback(object sender, CallbackArgs e)
        {
            ServiceLocator.NetManager.Connect();

            var registrationPacket = new Packet(PacketType.RegistrationPacket);
            registrationPacket.Message.Write(this.GUI.Get<EditBox>("textUser").Text);
            registrationPacket.Message.Write(this.GUI.Get<EditBox>("textPassword").Text);

            ServiceLocator.NetManager.SendMessage(registrationPacket.Message, NetDeliveryMethod.ReliableOrdered, ChannelTypes.WORLD);
        }