示例#1
0
        private void ShowLimitConfigWindow()
        {
            LimitConfigViewModel limitVM = new LimitConfigViewModel(StartPoint, EndPoint, LimitLineSeries, CurrentLoadedSymbol, CurrentMinTradeSize);
            LimitCondig          lc      = new LimitCondig(limitVM);

            lc.ShowDialog();
            if (limitVM.LineOrder != null)
            {
                ActiveLineOrders.Insert(0, limitVM.LineOrder);
                OverrideAddingUpcoming();
                LimitLineSeries = limitVM.LineOrder.LimitLineSeries;
                plotmodel.InvalidatePlot(true);

                OnPropertyChanged("ActiveLineOrders");
            }
            else
            {
                if (plotmodel.Series.Any(l => l.Title == "Limit Line"))
                {
                    var match = plotmodel.Series.First(l => l.Title == "Limit Line");
                    plotmodel.Series.Remove(LimitLineSeries);
                }
                LimitLineSeries = null;
            }
        }
 public LimitCondig(LimitConfigViewModel vm)
 {
     VM = vm;
     this.DataContext = vm;
     InitializeComponent();
     VM.Screen = this;
 }