예제 #1
0
        private void ShowTradeWindow(decimal price, TradeTypeEnum way)
        {
            ITradeRequest sellTrade = new TradeRequest
            {
                Amount    = 1,
                Pair      = CurrentPair,
                Rate      = price,
                TradeType = way
            };

            var editTradeViewModel = new EditTradeViewModel(sellTrade, tradingConfigurations, btceModels.AccountInfo);
            var editTradeView      = new EditTrade();

            editTradeView.DataContext = editTradeViewModel;

            editTradeViewModel.CancelCommand = new RelayCommand((parameters) =>
            {
                editTradeView.Close();
            });

            editTradeViewModel.OkCommand = new RelayCommand((parameters) =>
            {
                btceTradeApi.MakeTrade(editTradeViewModel.TradeRequest);
                editTradeView.Close();
            });


            editTradeView.ShowDialog();
        }
예제 #2
0
 public void MakeTrade(ITradeRequest tradeRequest)
 {
     btceTradeApi.MakeTrade(tradeRequest);
 }