Ejemplo n.º 1
0
        private void generateTransaction_Click(object sender, RoutedEventArgs e)
        {
            if (accountFromListBox.Items.Count < 1 || accountToListBox.Items.Count < 1)
            {
                MessageBox.Show("Укажите счета");
                return;
            }

            Account accountFrom = accountFromListBox.Items[0] as Account;
            Account accountTo   = accountToListBox.Items[0] as Account;

            Task task = new Task(() =>
            {
                for (int i = 0; i < 10_000_000; i++)
                {
                    LogsTransactions.AddTransaction(accountFrom, accountTo, 1);
                }
            });

            task.Start();
            task.ContinueWith(_ => MessageBox.Show("Транзакции созданы"));
        }
Ejemplo n.º 2
0
 private void logsTransactions_Click(object sender, RoutedEventArgs e)
 {
     MessageBox.Show(LogsTransactions.PrintLogs());
 }