Наследование: Caliburn.Micro.PropertyChangedBase, ISerializable
Пример #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);
 }
Пример #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;
 }
Пример #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;
 }
Пример #4
0
 public virtual void InitAccount(Account account)
 {
     Account = account;
 }
Пример #5
0
 public LogEvent(Account account, string message)
 {
     Account = account;
     Message = message;
 }
Пример #6
0
 public AccountAddedEvent(Account account)
 {
     Account = account;
 }
Пример #7
0
 public AccountChangedEvent(Account account)
 {
     Account = account;
 }
Пример #8
0
 public AccountDeletedEvent(Account account)
 {
     Account = account;
 }
Пример #9
0
 public LoginStatusChangedEvent(Account selectedAccount, bool isLoggedIn)
 {
     Account = selectedAccount;
     IsLoggedIn = isLoggedIn;
 }