Ejemplo n.º 1
0
    /*
     * this function show popup message came from server
     */
    public void ShowPopup(string msg)
    {
        var Popup = new Gtk.MessageDialog(null, Gtk.DialogFlags.Modal, Gtk.MessageType.Question,
                                          Gtk.ButtonsType.Ok, msg);

        Popup.Show();
        Popup.Run();
        Popup.Destroy();

        if (msg.CompareTo("로그인 성공") == 0)
        {
            GTK_Demo_Client.GameWindow GameWindow = new GTK_Demo_Client.GameWindow();
            GameWindow.Show();
            this.Destroy();
        }
    }
Ejemplo n.º 2
0
    /*
     * Not use
     */
    private void ShowPopup()
    {
        string result_msg = GTK_Demo_Client.Popup.CPopupHandler.GetMessageFromServer();
        var    result     = new Gtk.MessageDialog(null, Gtk.DialogFlags.Modal, Gtk.MessageType.Question,
                                                  Gtk.ButtonsType.Ok, result_msg);

        result.Show();
        result.Run();
        result.Destroy();

        if (result_msg.CompareTo("로그인 성공") == 0)
        {
            GTK_Demo_Client.GameWindow GameWindow = new GTK_Demo_Client.GameWindow();
            GameWindow.Show();
            this.Destroy();
            return;
        }

        if (result_msg.CompareTo("서버와의 연결이 끊겼습니다") == 0)
        {
            Gtk.Main.Quit();
            return;
        }
    }