コード例 #1
0
        //todo: деавторизация не работает!
        public void Deauthorize()
        {
            _eventAggregator.GetEvent <AuthBarEvents.LogOutRequest>().Publish();

            IsAuthorized = false;
            UserName     = string.Empty;
            SetUpAvatar(DEFAULT_AVATAR);

            _vkApi.Token.Set(new AccessToken());

            var authWindow = new AuthView();//App.Container.GetInstance<AuthView>();

            authWindow.Action = AuthAction.Deauthorize;
            authWindow.ShowDialog();

            VkAuthorization.ClearAllCookies();
            //App.SuppressWininetBehavior();

            _eventAggregator.GetEvent <AuthBarEvents.LogOutCompleted>().Publish();
        }