示例#1
0
        public void DeleteMailAsync(CharacterMailMessage message, AsyncCompletionDelegate resultDelegate)
        {
            StableSession.Instance.DeleteMailAsync(message.MailId, (bool result, string reason) =>
            {
                if (result)
                {
                    Messages.Remove(message);
                }

                if (resultDelegate != null)
                    resultDelegate(result, reason);

                if (!result)
                    return;

                OnMessagesChanged();
                OnUnreadCountChanged();
            });
        }
示例#2
0
        public void MarkMailReadAsync(CharacterMailMessage message, AsyncCompletionDelegate resultDelegate)
        {
            StableSession.Instance.MarkMailReadAsync(message.MailId, (bool result, string reason) =>
            {
                if (result)
                {
                    message.ReadDate = DateTime.UtcNow;
                }

                if (resultDelegate != null)
                    resultDelegate(result, reason);

                if (!result) 
                    return;

                OnMessagesChanged();
                OnUnreadCountChanged();
            });
        }