Example #1
0
 /// <summary>
 /// Set Properties
 /// </summary>
 public void SetMessage(OpenGraal.Common.Players.GraalPlayer player, OpenGraal.Core.CString Packet)
 {
     Gtk.Application.Invoke(delegate
     {
         if (player != null)
         {
             this.WriteText("(" + player.Nickname + "): " + Packet.ReadChars(Packet.ReadGUByte1()));
         }
     }
                            );
 }
Example #2
0
        public void SendMessage(OpenGraal.Core.CString message)
        {
            try
            {
                this.Server = Framework.GetInstance();
                this.Server.SendGSPacket(new OpenGraal.Core.CString() + (byte)Common.Connections.Client.GraalServer.PacketOut.TOALL + (byte)message.Text.Length + message.Text);
            }
            catch (System.Exception e)
            {
                Abstraction.GetInstance().WriteText("Error: " + e.Message.ToString());
            }

            Gtk.Application.Invoke(delegate
            {
                Abstraction mw = Abstraction.GetInstance();
                if (mw.NCPlayer != null)
                {
                    this.WriteText("(" + mw.NCPlayer.Nickname + "(You)): " + message.Text);
                }
                message = null;
            }
                                   );
        }