protected virtual void client_OperationalStateChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { lock (this) { if (this.client != null && !this.SessionCheckBox.Enabled) { if (this.client.IsOperational) { this.ConnectCheckBox.Invoke(new SetControlBoolValue(this.SetControlChecked), this.ConnectCheckBox, true); TransportInfo ti = this.client.ProxyTransportInfo; if (this.platform.RegisterSource( new SourceInfo( SourceTypeEnum.HighPriorityLiveFullProvider, ti) )) { this.Message = "Client Proxy connected"; this.clientID = ti.OriginalSenderId.Value.Id; this.client.OperationalStateChangedEvent -= new OperationalStateChangedDelegate(client_OperationalStateChangedEvent); this.Invoke(new SetControlBoolValue(this.SetControlEnable), this.URLTextBox, false); this.Invoke(new SetControlBoolValue(this.SetControlEnable), this.ExpertNameTextBox, false); this.Invoke(new SetControlBoolValue(this.SetControlEnable), this.SessionCheckBox, true); } } } } }
void _dataDelivery_OperationalStatusChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { if (operational.OperationalState != OperationalStateEnum.Operational) { return; } // Re-map the session orderInfo. RuntimeDataSessionInformation information = _dataDelivery.GetSymbolRuntimeSessionInformation(_symbol); if (information == null) { SystemMonitor.OperationError("Failed to map session information for quote provider."); _sessionInfo = DataSessionInfo.Empty; } else { _sessionInfo = information.Info; if (_dataDelivery.SubscribeToData(_sessionInfo, true, new DataSubscriptionInfo(true, false, null))) { RequestQuoteUpdate(false); } } }
/// <summary> /// /// </summary> void GenericKeeper_OperationalStatusChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { if (ItemOperationalStatusChangedEvent != null) { ItemOperationalStatusChangedEvent(this, (ItemType)operational); } }
protected override void DataProvider_OperationalStatusChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { base.DataProvider_OperationalStatusChangedEvent(operational, previousOperationState); if (operational.OperationalState == OperationalStateEnum.Operational) {// Run in a separate thread since it takes time to request from server. BeginUpdate(); } }
void component_OperationalStatusChangedEvent(IOperational component, OperationalStateEnum previousState) { SystemMonitor.CheckError(_components.ContainsValue((PlatformComponent)component), "Component not present."); if (ActiveComponentChangedOperationalStateEvent != null) { ActiveComponentChangedOperationalStateEvent(this, (PlatformComponent)component, previousState); } }
void _component_OperationalStateChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { WinFormsHelper.BeginManagedInvoke(this, delegate { labelStatus.Text = UserFriendlyNameAttribute.GetTypeAttributeName(operational.GetType()) + " is " + operational.OperationalState.ToString(); }); }
void _account_OperationalStatusChangedEvent(IOperational account, OperationalStateEnum previousState) { if (account.OperationalState == CommonSupport.OperationalStateEnum.Operational) { if (_account.Info.Balance.HasValue) { _initialEquity = _account.Info.Balance.Value; } } }
void _delivery_OperationalStatusChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { if (operational.OperationalState == OperationalStateEnum.Operational) { foreach (Symbol symbol in _symbolQuotes.Keys) { string message; AddSymbol(_dataSourceId.Value, symbol, out message); } } }
/// <summary> /// Follow synchrnozation source status. /// </summary> void _statusSynchronizationSource_OperationalStatusChangedEvent(IOperational parameter1, OperationalStateEnum parameter2) { if (StatusSynchronizationEnabled) { TracerHelper.Trace(this.GetType().Name + " is following its source " + parameter1.GetType().Name + " to state " + parameter1.OperationalState.ToString()); this.ChangeOperationalState(parameter1.OperationalState); } else { TracerHelper.Trace(this.GetType().Name + " is not following its source " + parameter1.GetType().Name + " to new state because synchronization is disabled."); } }
void _expert_OperationalStatusChangedEvent(IOperational expert, OperationalStateEnum previousState) { if (expert.OperationalState == OperationalStateEnum.Operational) { SessionManager_SessionsUpdateEvent(_expert.Manager); } if (previousState == OperationalStateEnum.Operational) {// Coming out of operational state - always persist. _expert.Host.UISerializationInfo = new SerializationInfoEx(); dragContainerControl1.SaveState(_expert.Host.UISerializationInfo); } }
/// <summary> /// Follow synchrnozation source status. /// </summary> void _statusSynchronizationSource_OperationalStatusChangedEvent(IOperational parameter1, OperationalStateEnum parameter2) { if (StatusSynchronizationEnabled) { #if Matrix_Diagnostics SystemMonitor.Debug(this.GetType().Name + " is following its source " + parameter1.GetType().Name + " to state " + parameter1.OperationalState.ToString()); #endif this.ChangeOperationalState(parameter1.OperationalState); } else { #if Matrix_Diagnostics SystemMonitor.Debug(this.GetType().Name + " is not following its source " + parameter1.GetType().Name + " to new state because synchronization is disabled."); #endif } }
void _subItem_OperationalStatusChangedEvent(IOperational subItem, OperationalStateEnum previousState) { if (_sessionDataProvider != null && _sessionDataProvider.OperationalState == OperationalStateEnum.Operational && (_orderExecutionProvider == null || _orderExecutionProvider.OperationalState == OperationalStateEnum.Operational)) { if (_orderExecutionProvider != null && _orderExecutionProvider.TradeEntities != null) { // Create the default position for this session. _position = _orderExecutionProvider.TradeEntities.ObtainPositionBySymbol(_sessionInfo.Symbol); } ChangeOperationalState(OperationalStateEnum.Operational); } else { ChangeOperationalState(OperationalStateEnum.NotOperational); } }
void _dataDelivery_OperationalStatusChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { if (operational.OperationalState != OperationalStateEnum.Operational) { return; } RuntimeDataSessionInformation info = _dataDelivery.GetSymbolRuntimeSessionInformation(_session.Symbol); if (info != null) { if (info.TickDataAvailabe) { _dataDelivery.RequestDataHistoryUpdate(_session, new DataHistoryRequest(TimeSpan.Zero, null), false); } } else { SystemMonitor.OperationError("Failed to estblish runtime data session information."); } }
void _dataDelivery_OperationalStatusChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { if (operational.OperationalState != OperationalStateEnum.Operational) { return; } if (_sessionInfo.IsEmtpy) { SystemMonitor.OperationError("Data bar provider has no valid session assiged."); return; } // Re-map the session orderInfo. RuntimeDataSessionInformation information = _dataDelivery.GetSymbolRuntimeSessionInformation(_sessionInfo.Symbol); if (information == null) { SystemMonitor.OperationError("Failed to map session information for data provider."); _sessionInfo = DataSessionInfo.Empty; return; } else { _sessionInfo = information.Info; } if (_dataDelivery.SubscribeToData(_sessionInfo, true, new DataSubscriptionInfo(false, false, new TimeSpan[] { Period.Value })) == false) { SystemMonitor.OperationError("Failed to subscribe to bar data updates."); return; } RuntimeDataSessionInformation session = _dataDelivery.GetSymbolRuntimeSessionInformation(_sessionInfo.Symbol); if (session != null && session.AvailableDataBarPeriods.Contains(_period.Value)) { _dataDelivery.RequestDataHistoryUpdate(_sessionInfo, new DataHistoryRequest(_period.Value, _defaultHistoryBarsCount), false); } }
void PlatformSourceOrderExecutionProvider_OperationalStateChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { if (OperationalState == OperationalStateEnum.Operational && _accounts.Length == 0) { if (base.SubscribeToAccounts() == false) { SystemMonitor.Error("Failed to subscribe to source. Further operations will not proceed as expected."); } AccountInfo[] accountInfos; if (base.GetAvailableAccountInfos(out accountInfos) && accountInfos.Length > 0) { lock (this) { _accounts = new Account[accountInfos.Length]; for (int i = 0; i < accountInfos.Length; i++) { _accounts[i] = new RemoteExecutionAccount(accountInfos[i]); _accounts[i].SetInitialParameters(_manager, this, _manager.GetDataDelivery(_dataSourced)); _accounts[i].Initialize(this); } if (_accounts.Length > 0) { _defaultAccount = _accounts[0]; } else { _defaultAccount = null; } } } else { SystemMonitor.Warning("Failed to establish accounts (default account) on Order Execution Provider."); } } }
void _session_OperationalStatusChangedEvent(IOperational session, OperationalStateEnum previousState) {// Session has changed operation mode - show in the chart name. if (_session == null) { SystemMonitor.Warning("Control session already cleared."); return; } WinFormsHelper.BeginManagedInvoke(this, delegate() { if (session == _session) { UpdateMasterChart(); } else { SystemMonitor.CheckError(_session == null || session == null, "Session mismatch."); } }); // We can not afford delayed execution here, since on closing the application, persisting is needed // and by than Invoke requests are not handled any more. if (previousState == OperationalStateEnum.Operational) {// All coming out of operation state must be persisted. // Save UI dataDelivery to sessionInformation object. if (_session.ChartControlPersistence != null) { _session.ChartControlPersistence.Clear(); } else { _session.ChartControlPersistence = new SerializationInfoEx(); } chartControl.SaveState(_session.ChartControlPersistence); } }
public virtual void OnDeserialization(object sender) { StatusSynchronizationSource = _statusSynchronizationSource; }
///// <summary> ///// External thread. ///// </summary> //void _manager_SessionUpdateEvent(SessionSource parameter1) //{ // if (this.IsDisposed == false && // this.Disposing == false && this.IsHandleCreated) // { // WinFormsHelper.BeginFilteredManagedInvoke(this, new GeneralHelper.DefaultDelegate(DoUpdateUI)); // } //} void _sessionManager_OperationalStatusChangedEvent(IOperational parameter1, OperationalStateEnum parameter2) { WinFormsHelper.BeginFilteredManagedInvoke(this, UpdateUI); }
void DataStore_OperationalStatusChangedEvent(IOperational parameter1, OperationalStateEnum parameter2) { }
void ExecutionSource_OperationalStatusChangedEvent(IOperational parameter1, OperationalStateEnum parameter2) { WinFormsHelper.BeginFilteredManagedInvoke(this, new GeneralHelper.DefaultDelegate(UpdateUI)); }
protected override void DataProvider_OperationalStatusChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { base.DataProvider_OperationalStatusChangedEvent(operational, previousOperationState); DoUpdate(); }
protected virtual void _provider_OperationalStatusChangedEvent(IOperational operational, OperationalStateEnum previousOperationState) { }
void TimeManagementToolStrip_OperationalStatusChangedEvent(IOperational parameter1, OperationalStateEnum previousState) { WinFormsHelper.BeginFilteredManagedInvoke(this, UpdateUI); }
void _session_OperationalStatusChangedEvent(IOperational session, OperationalStateEnum previousState) { // Session has changed operation mode - show in the chart name. if (_session == null) { SystemMonitor.Warning("Control session already cleared."); return; } WinFormsHelper.BeginManagedInvoke(this, delegate() { if (session == _session) { UpdateMasterChart(); } else { SystemMonitor.CheckError(_session == null || session == null, "Session mismatch."); } }); // We can not afford delayed execution here, since on closing the application, persisting is needed // and by than Invoke requests are not handled any more. if (previousState == OperationalStateEnum.Operational) {// All coming out of operation state must be persisted. // Save UI dataDelivery to sessionInformation object. if (_session.ChartControlPersistence != null) { _session.ChartControlPersistence.Clear(); } else { _session.ChartControlPersistence = new SerializationInfoEx(); } chartControl.SaveState(_session.ChartControlPersistence); } }
void expertHost_OperationalStatusChangedEvent(IOperational host, OperationalStateEnum previousState) { }