예제 #1
0
        private void LogOutCompleted(object sender, LogOutCompletedEventArgs e)
        {
            if (e.Cancelled || e.Error != null || !e.Result)
            {
                txtStatus.Text = "Logout failed, please try again.";

                if (e.Cancelled)
                {
                    ToolTipService.SetToolTip(txtStatus, "Service call cancelled");
                }
                else if (e.Error != null)
                {
                    string message = string.Format("Service call exception: {0}", e.Error.Message);
                    ToolTipService.SetToolTip(txtStatus, message);
                }
            }
            else if (e.Result)
            {
                SessionManager.Session["user"] = null;

                // messenger service logout
                Messenger.Default.Send(new LogOutMessage());
            }
            else
            {
                // status bar = "Unknown response from service call";
            }
        }
예제 #2
0
        private void LogOutCompleted(object sender, LogOutCompletedEventArgs e)
        {
            if (e.Cancelled || e.Error != null || !e.Result)
            {
                txtStatus.Text = "Logout failed, please try again.";

                if (e.Cancelled)
                {
                    ToolTipService.SetToolTip(txtStatus, "Service call cancelled");
                }
                else if (e.Error != null)
                {
                    string message = string.Format("Service call exception: {0}", e.Error.Message);
                    ToolTipService.SetToolTip(txtStatus, message);
                }
            }
            else if (e.Result)
            {
                SessionManager.Session["user"] = null;

                // messenger service logout
                Messenger.Default.Send(new LogOutMessage());
            }
            else
            {
                // status bar = "Unknown response from service call";
            }
        }