예제 #1
0
 public void UpdateTransaction(GUITransaction aTransaction)
 {
     aTransaction.ParentCurrency = FGUIParentCurrency;
     if (FTransactions.ContainsKey(aTransaction.RecordId))
     {
         FTransactions[aTransaction.RecordId].CopyFrom(aTransaction);
     }
 }
예제 #2
0
 public void AddTransaction(GUITransaction aTransaction)
 {
     if (aTransaction.TxType == TransactionDirection.Unknown)
     {
         return;
     }
     FTransactions.TryAdd(aTransaction.RecordId, aTransaction);
     aTransaction.ParentCurrency = FGUIParentCurrency;
     if (!aTransaction.Confirmed)
     {
         UnconfirmedBalance += aTransaction.Amount;
     }
     else
     {
         ConfirmedBalance += aTransaction.Amount;
     }
 }
예제 #3
0
        public bool RemoveTransaction(GUITransaction aTransaction)
        {
            var lResult = FTransactions.TryRemove(aTransaction.RecordId, out _);

            if (lResult)
            {
                if (!aTransaction.Confirmed)
                {
                    UnconfirmedBalance -= aTransaction.Amount;
                }
                else
                {
                    ConfirmedBalance -= aTransaction.Amount;
                }
                return(lResult);
            }
            return(lResult);
        }