Inheritance: Caliburn.Micro.PropertyChangedBase, ISerializable
Beispiel #1
0
 public override void InitAccount(Account account)
 {
     base.InitAccount(account);
     CharacterDetailsViewModel.InitAccount(account);
     Func<Account, Task<ICharacter>> myCharacter = async a => await a.Session.MyCharacterAsync();
     CharacterDetailsViewModel.InitCharacterFunc(myCharacter);
 }
Beispiel #2
0
 public bool DeleteAccount(Account account)
 {
     if (account == null)
         throw new ArgumentNullException("account");
     if (Accounts.Any(a => a == account))
     {
         Accounts.Remove(account);
         _events.PublishOnCurrentThread(new AccountDeletedEvent(account));
         Save();
         return true;
     }
     return false;
 }
Beispiel #3
0
 public bool AddAccount(Account account)
 {
     if (account == null)
         throw new ArgumentNullException("account");
     if (!Accounts.Any(a => a.Username == account.Username && a.Server.ServerUri == account.Server.ServerUri))
     {
         Accounts.Add(account);
         _events.PublishOnCurrentThread(new AccountAddedEvent(account));
         Save();
         return true;
     }
     return false;
 }
Beispiel #4
0
 public virtual void InitAccount(Account account)
 {
     Account = account;
 }
Beispiel #5
0
 public LogEvent(Account account, string message)
 {
     Account = account;
     Message = message;
 }
Beispiel #6
0
 public AccountAddedEvent(Account account)
 {
     Account = account;
 }
Beispiel #7
0
 public AccountChangedEvent(Account account)
 {
     Account = account;
 }
Beispiel #8
0
 public AccountDeletedEvent(Account account)
 {
     Account = account;
 }
Beispiel #9
0
 public LoginStatusChangedEvent(Account selectedAccount, bool isLoggedIn)
 {
     Account = selectedAccount;
     IsLoggedIn = isLoggedIn;
 }