public CP2Simulator(CPlaza2Connector plaza2Connector) : base(plaza2Connector) { _plaza2Connector = plaza2Connector; CUtil.ThreadStart(ThreadSimulator); }
public void Bind(CPlaza2Connector plaza2Connector, string inpIsin, string inpTf, string inpDt, Button but, Dispatcher disp) { _dispatcher = System.Windows.Threading.Dispatcher.CurrentDispatcher; _dispatcherParentWindow = disp; m_buttonTF = but; m_plaza2Connector = plaza2Connector; m_isin = inpIsin; tf = inpTf; dt = inpDt; TF = dictIntervalsTF[tf]; m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt].SetSubsribedDispatcher(_dispatcher); this.Chart.ItemsSource = m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt]; this.ChartBody.ItemsSource = m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt]; m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt].CandleCollectionUpdate += OnUpdateCandleCollection; _dispatcher.UnhandledException += new DispatcherUnhandledExceptionEventHandler(m_plaza2Connector.Alarmer.GUIdispatcher_UnhandledException); SubscribeGUIUserDealsOnCreation(); UpdateAxis(); }
private void ThreadFunc() { Plaza2Connector = new CPlaza2Connector(); _dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(BindData)); Plaza2Connector.Process(); }
private void TaskBindWhenReady() { MainWindowViewModel mwvm = (MainWindowViewModel)this.FindResource("MainWindowViewModel"); for (int i = 0; i < 50; i++) { m_plaza2Connector = mwvm.Plaza2Connector; if (m_plaza2Connector != null && m_plaza2Connector.GUIBox != null) { m_FORTSStatusWindoViewModel = new FORTSStatusWindoViewModel(m_plaza2Connector); } Thread.Sleep(100); } }
private void ThreadFunc() { Plaza2Connector = new CPlaza2Connector(); _dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(BindData)); Plaza2Connector.GUIBox.GUIDispatcher = GUIDispatcher; Plaza2Connector.GUIBox.PropertyChanged += OnGUIBoxPropertyChanged; Plaza2Connector.GUIBox.Part.CollectionChanged += OnCollectionPartChanged; Plaza2Connector.GUIBox.VM.CollectionChanged += OnCollectionVMChanged; Plaza2Connector.GUIBox.Position.CollectionChanged += OnCollectionPositionChanged; Plaza2Connector.GUIBox.Orders.CollectionChanged += OnCollectionOrdersChanged; Plaza2Connector.Process(); }
public FORTSStatusWindoViewModel(CPlaza2Connector pz2) { m_plaza2Connector = pz2; m_plaza2Connector.GUIBox.PropertyChanged += OnGUIBoxPropertyChanged; }