コード例 #1
0
        private void RemoveToallWindow(object sender, Gtk.DeleteEventArgs e)
        {
            e.RetVal = true;
            Abstraction main = Abstraction.GetInstance();

            this.Hide();
        }
コード例 #2
0
 public void RunServer()
 {
     Server    = Framework.GetInstance();
     this.form = Abstraction.GetInstance();
     this.Init();
     this.Setup();
 }
コード例 #3
0
        public void ReceivedToall(GraalPlayer Player, CString Message)
        {
            this.form = Abstraction.GetInstance();

            ToallsWindow PM = ToallsWindow.GetInstance();

            if (PM != null)
            {
                PM.SetMessage(Player, Message);
            }
        }
コード例 #4
0
        public void SendMessage()
        {
            try
            {
                this.SendMessage(new Core.CString(this.entry1.Text));

                this.entry1.Text = "";
            }
            catch (System.Exception e)
            {
                Abstraction.GetInstance().WriteText("Error: " + e.Message.ToString());
            }
        }
コード例 #5
0
        public void SendLogin(String Account, String Password, String Nickname)
        {
            this.Codec.Reset(Encrypt.Generation.GEN5);
            //Set the nickname
            this.Nickname = Nickname;
            this.form     = Abstraction.GetInstance();
            string versionStr = "G3D0208A";

            // Key Packet // GNW03014 // G3D14097 // G3D0208A // GSERV025
            if (this.form.isRC)
            {
                versionStr = "GSERV025";
            }

            this.SendLogin(Account, Password, Nickname, versionStr, this.form.isRC);

            this.ReceiveData();
        }
コード例 #6
0
        public void ReceivedPM(GraalPlayer Player, CString Message)
        {
            this.form = Abstraction.GetInstance();

            if (Player != null)
            {
                this.form.WriteText(" -!- Received PM from " + Player.Account.ToString() + "!\n");
                PMWindowManager = PMWindowList.GetInstance();
                PMWindow PM = PMWindowManager.AddPMWindow(Player.Id);

                if (PM != null)
                {
                    PM.SetMessage(Message);
                }
            }
            else
            {
                this.form.WriteText("Something went wrong. Player is null.");
            }
        }
コード例 #7
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;
            }
                                   );
        }