示例#1
0
        private void AccountSelection_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!accountSelection.Items.IsEmpty)
            {
                for (var i = 0; i < tradeHandler.TradeAccounts.Length; i++)
                {
                    if (tradeHandler.TradeAccounts[i].Account.AccountName == (string)((Label)accountSelection.Items[accountSelection.SelectedIndex]).Content)
                    {
                        currentAccount = tradeHandler.TradeAccounts[i];
                    }
                }
            }

            Reset();
        }
示例#2
0
 private void BtnDeny_Click(object sender, RoutedEventArgs e)
 {
     acpt = false;
     if (deny)
     {
         lblConfirm.Content = Properties.strings.TradePleaseWait;
         currentAccount.Account.DenyConfirmation(currentAccount.Confirmations[listBox.SelectedIndex]);
         currentAccount = tradeHandler.RemoveTradeID(currentAccount.Account.AccountName, currentAccount.Confirmations[listBox.SelectedIndex].ID.ToString());
         listBox.Items.RemoveAt(listBox.SelectedIndex);
         Reset();
     }
     else
     {
         deny = true;
         lblConfirm.Content = Properties.strings.TradeDoubleDeny;
     }
 }