Example #1
0
        public Waver()
        {
            HedgeHog.MEF.Container.SatisfyImportsOnce(this);

            if (fw == null)
            {
                fw = new FXCoreWrapper();
            }
            fw.CoreFX.LoginError += exc => MessageBox.Show(exc + "");
            if (!fw.IsLoggedIn)
            {
                fw.CoreFX.LogOn("MICR512463001", "6131", true);
            }
            if (fw.IsLoggedIn)
            {
                Pairs = fw.CoreFX.Instruments;
                Dispatcher.BeginInvoke(new Action(() => {
                    timer = new System.Threading.Timer((o) => FillRatios(), null, TimeSpan.FromMinutes(10), TimeSpan.FromMinutes(10));
                }));
            }

            InitializeComponent();
            Loaded   += Waver_Loaded;
            Unloaded += new RoutedEventHandler(Waver_Unloaded);
            radChart1.DefaultView.ChartLegend.Visibility = System.Windows.Visibility.Collapsed;
            //radChart1.ItemsSource = barRatios;
        }
Example #2
0
 public PriceService()
 {
     _fw = new FXCoreWrapper(App.CoreFX, t => { throw new NotImplementedException(); });
     App.CoreFX.LoggedIn += CoreFX_LoggedInEvent;
     MainWindowModel.Default.PropertyChanged += MainWindowModel_PropertyChanged;
     //bl.PairLoaded += bl_PairLoaded;
 }