Ejemplo n.º 1
0
        private void btnSetLoginRoom_Click(object sender, EventArgs e)
        {
            frmLoginRoom form = new frmLoginRoom();

            form.ShowDialog();

            while (form.Visible)
            {
                Application.DoEvents();
            }

            form = null;

            //Reset the login room text
            bool good = false;

            if (EngineSettings.Default.InitialRoom != null)
            {
                string[] env = EngineSettings.Default.InitialRoom.Split('>');

                if (env.Length == 3)
                {
                    IRealm realm = Editor.Game.World.GetRealm(env[0]);
                    if (realm != null)
                    {
                        IZone zone = realm.GetZone(env[1]);
                        if (zone != null)
                        {
                            IRoom room = zone.GetRoom(env[2]);
                            if (room != null)
                            {
                                lblLoginRoom.Text = string.Format("Login Room: {0}>{1}>{2}", realm.Name, zone.Name, room.Name);
                                good = true;
                            }
                        }
                    }
                }
            }

            if (!good)
            {
                lblLoginRoom.Text = "Login Room: None set.";
            }
        }
Ejemplo n.º 2
0
        private void btnSetLoginRoom_Click(object sender, EventArgs e)
        {
            frmLoginRoom form = new frmLoginRoom();

            form.ShowDialog();

            while (form.Visible)
            {
                Application.DoEvents();
            }

            form = null;

            //Reset the login room text
            bool good = false;
            if (EngineSettings.Default.InitialRoom != null)
            {
                string[] env = EngineSettings.Default.InitialRoom.Split('>');

                if (env.Length == 3)
                {
                    IRealm realm = Editor.Game.World.GetRealm(env[0]);
                    if (realm != null)
                    {
                        IZone zone = realm.GetZone(env[1]);
                        if (zone != null)
                        {
                            IRoom room = zone.GetRoom(env[2]);
                            if (room != null)
                            {
                                lblLoginRoom.Text = string.Format("Login Room: {0}>{1}>{2}", realm.Name, zone.Name, room.Name);
                                good = true;
                            }
                        }
                    }
                }
            }

            if (!good)
                lblLoginRoom.Text = "Login Room: None set.";
        }