Exemplo n.º 1
0
        private void AddAccount()
        {
            var auth = new AuthenticateViewModel();
            var msg  = new TransitionMessage(auth, "ShowAuth");

            this.Messenger.Raise(msg);
            var ainfo = auth.GetAccountInfo();

            if (auth.Success && ainfo != null)
            {
                if (AccountStorage.Contains(ainfo.ScreenName))
                {
                    this.Messenger.Raise(new InformationMessage("アカウント @" + ainfo.ScreenName + " は既に存在します。", "アカウント追加エラー", System.Windows.MessageBoxImage.Error, "Information"));
                }
                else
                {
                    IsAccountModified = true;
                    ShowAccountConfig(ainfo);
                    AccountStorage.RegisterAccount(ainfo);
                    UserInformationManager.ReceiveInidividualInfo(ainfo);
                }
            }
        }