Beispiel #1
0
 private void OnRefreshWalletData(object sender, ElapsedEventArgs e)
 {
     lock (refreshWalletDataLock)
     {
         xdagRuntime.RefreshData();
         fillingTransactionHistory.Clear();
     }
 }
Beispiel #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            xdagRuntime = new XDagRuntime(xdagWallet);
            refreshingTransactionHistory = new RefreshingOperation(() => { this.LoadTransactionHistory(); }, TimeSpan.FromMinutes(1));

            xdagWallet.SetPromptInputPasswordFunction((prompt, passwordSize) =>
            {
                return(this.Dispatcher.Invoke(() =>
                {
                    return InputPassword(prompt, passwordSize);
                }));
            });

            xdagWallet.SetStateChangedAction((state) =>
            {
                this.Dispatcher.Invoke(() =>
                {
                    OnUpdatingState(state);
                });
            });

            xdagWallet.SetAddressChangedAction((address) =>
            {
                this.Dispatcher.Invoke(() =>
                {
                    OnUpdatingAddress(address);
                });
            });

            xdagWallet.SetBalanceChangedAction((balance) =>
            {
                this.Dispatcher.Invoke(() =>
                {
                    OnUpdatingBalance(balance);
                });
            });

            OnUpdatingState(xdagWallet.State);
            OnUpdatingAddress(xdagWallet.Address);
            OnUpdatingBalance(xdagWallet.Balance);

            Load_LocalizedStrings();

            xdagRuntime.RefreshData();

            refreshWalletDataRepeatTimer.Start();

            dgdTransactionHistorySimple.ItemsSource = transactionHistory;
            fillTransactionHistoryTimer.Start();
        }