예제 #1
0
        private void OnExportStarted()
        {
            if (_criteria == null)
            {
                if (_exportStarted)
                {
                    return;
                }

                _exportStarted = true;
                ExportStarted.SafeInvoke();

                var connectorSettings = _task.Settings as ConnectorHydraTaskSettings;

                if (connectorSettings != null && connectorSettings.IsDownloadNews)
                {
                    Connector.RegisterNews();
                }
            }
            else
            {
                ProcessLookupSecurities(_criteria, _newSecurity, _wasConnected);
                _criteria    = null;
                _isRefreshed = false;
            }
        }
예제 #2
0
        /// <summary>
        /// Вызвать событие <see cref="ExportStarted"/>.
        /// </summary>
        protected void RaiseExportStarted()
        {
            _prevTime = default(DateTimeOffset);

            ExportState = ConnectionStates.Connected;
            ExportStarted.SafeInvoke();
        }
예제 #3
0
        public void StartExport()
        {
            Dispatcher.OnResponseThreadAsync(() =>
            {
                IsExportStarted = true;
                ExportStarted.SafeInvoke();

                RaiseHardcodedDataEvents();

                _accountsModule.HandleClientState();
                _marketModule.HandleClientState();
                _orderModule.HandleClientState();
            });
        }
예제 #4
0
        private void ExportTypeCtrlSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ExportType = (ExportTypes)ExportTypeCtrl.SelectedIndex;

            ExportTypeCtrl.SelectionChanged -= ExportTypeCtrlSelectionChanged;

            try
            {
                ExportTypeCtrl.SelectedIndex = -1;
                ExportStarted.SafeInvoke();
            }
            finally
            {
                ExportTypeCtrl.SelectionChanged += ExportTypeCtrlSelectionChanged;
            }
        }
예제 #5
0
 private void ExportStartedHandler()
 {
     AddGuiAction(() => ExportStarted.SafeInvoke());
 }