/// <summary>Raises the MoneyBalanceReply event</summary> /// <param name="e">A MoneyBalanceReplyEventArgs object containing the /// data returned from the data server</param> protected virtual void OnMoneyBalanceReply(MoneyBalanceReplyEventArgs e) { EventHandler<MoneyBalanceReplyEventArgs> handler = m_MoneyBalance; if (handler != null) handler(this, e); }
private void Self_MoneyBalanceReply(object sender, MoneyBalanceReplyEventArgs e) { if (floading) { tmoneybalance = e.Balance; floading = false; return; } TransactionInfo ti = e.TransactionInfo; if (ti.DestID != UUID.Zero && ti.SourceID != UUID.Zero) { if (instance.Config.CurrentConfig.PlayPaymentReceived) { SoundPlayer simpleSound = new SoundPlayer(Properties.Resources.MoneyBeep); simpleSound.Play(); simpleSound.Dispose(); } } //tabs["chat"].Highlight(); int bal = e.Balance - tmoneybalance; string ttl = "METAbolt Alert"; string body = string.Empty; if (bal > 0) { if (e.Success) { if (ti.DestID != client.Self.AgentID) { body = e.Description; } else { if (!String.IsNullOrEmpty(e.Description)) { string pfrm = string.Empty; if (ti.TransactionType == 5008) { pfrm = " via " + ti.ItemDescription; } body = e.Description + pfrm; body = body.Replace(".", string.Empty); } else { if (!String.IsNullOrEmpty(ti.ItemDescription)) { body = "You have received a payment of L$" + ti.Amount.ToString(CultureInfo.CurrentCulture) + " from " + ti.ItemDescription; } else { body = "You have received a payment of L$" + ti.Amount.ToString(CultureInfo.CurrentCulture); } } } } TrayNotifiy(ttl, body, false); } else { ////body = e.Description; //if (ti.DestID != client.Self.AgentID) //{ // if (!String.IsNullOrEmpty(ti.ItemDescription)) // { // body = "You paid L$" + ti.Amount.ToString() + " to/for " + ti.ItemDescription; // } // else // { // body = "You paid L$" + ti.Amount.ToString(); // } //} //else //{ // body = e.Description; //} if (!String.IsNullOrEmpty(e.Description)) { body = e.Description; TrayNotifiy(ttl, body, false); } } tmoneybalance = e.Balance; }
void Self_MoneyBalanceReply(object sender, MoneyBalanceReplyEventArgs e) { if (!String.IsNullOrEmpty(e.Description)) { if (instance.GlobalSettings["transaction_notification_dialog"].AsBoolean()) AddNotification(new ntfGeneric(instance, e.Description)); if (instance.GlobalSettings["transaction_notification_chat"].AsBoolean()) TabConsole.DisplayNotificationInChat(e.Description); } }
private void Self_MoneyBalanceReply(object sender, MoneyBalanceReplyEventArgs e) { balance = e.Balance; }
public void Self_MoneyBalanceReply(object sender, MoneyBalanceReplyEventArgs e) { Hashtable item = new Hashtable(); item.Add("MessageType", "MoneyBalanceReplyReceived"); item.Add("TransactionID", e.TransactionID); item.Add("TransactionSuccess", e.Success); item.Add("Balance", e.Balance); item.Add("MetersCredit", e.MetersCredit); item.Add("MetersCommitted", e.MetersCommitted); item.Add("Description", e.Description); enqueue(item); }
void Self_MoneyBalanceReply(object sender, MoneyBalanceReplyEventArgs e) { Gtk.Application.Invoke(delegate { status_balance_lable.Text=e.Balance.ToString(); }); }
public virtual void Self_OnMoneyBalanceReplyReceived(object sender, MoneyBalanceReplyEventArgs e) { OnEvent("On-Money-Balance-Reply-Received", paramNamesOnMoneyBalanceReplyReceived, paramTypesOnMoneyBalanceReplyReceived, e); }