Написал след код:
Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using StockSharp.Quik;
using StockSharp.BusinessEntities;
using Ecng.Xaml;
namespace test
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private QuikTrader _trader;
private void connect_Click(object sender, RoutedEventArgs e)
{
_trader = new QuikTrader(QuikTerminal.GetDefaultPath());
_trader.NewSecurities += securities => this.GuiAsync(() =>
{
Securities.ItemsSource = _trader.Securities;
});
_trader.NewPortfolios += portfolios => this.GuiAsync(() =>
{
Portfolios.ItemsSource = _trader.Portfolios;
});
_trader.Connected += () => _trader.StartExport();
_trader.Connect();
}
}
}
А он не делает экспорт. в чем ошибка?