protected void OnProviderChanged(ProviderEventArgs e)
 {
     if (OnProviderChange != null)
     {
         OnProviderChange(this, e);
     }
 }
 protected void OnProviderChanged(ProviderEventArgs e)
 {
     if (OnProviderChange != null)
     {
         OnProviderChange(this, e);
     }
 }
Beispiel #3
0
 private void ProviderManager_Disconnected(ProviderEventArgs args)
 {
     if (this.providers.Contains(args.Provider))
     {
         this.metaStrategyBase.SetProviderDisconnected(args);
     }
 }
Beispiel #4
0
 private void ProviderManager_Disconnected(ProviderEventArgs args)
 {
     if (this.InvokeRequired)
     {
         // ISSUE: method pointer
         this.BeginInvoke((Delegate) new ProviderEventHandler(this.ProviderManager_Disconnected), new object[] { args });
     }
     else
     {
         this.UpdateProviderStatus(args.Provider);
     }
 }
Beispiel #5
0
 private void searchInitialized(ProviderEventArgs e)
 {
     if (this.Dispatcher.Thread != System.Threading.Thread.CurrentThread)
     {
         searchInitialized_Callback bR = new searchInitialized_Callback(searchInitialized);
         this.Dispatcher.Invoke(bR, new Object[] { e });
         return;
     }
     //
     imgCurrentProvider.Source = this.getBitmapSource(e.Image);
     //
     lMessage.Content = "Suche wird durchgeführt";
 }
Beispiel #6
0
 private void SQ_ProviderManager_Disconnected(ProviderEventArgs args)
 {
     try
     {
         foreach (Strategy strategy in this.strategies.Values)
         {
             strategy.OnDisconnected(args.Provider.Name);
         }
     }
     catch (Exception ex)
     {
         this.EmitError(ex);
     }
 }
Beispiel #7
0
 private void ProviderManager_Added(ProviderEventArgs args)
 {
     if (this.InvokeRequired)
     {
         // ISSUE: method pointer
         this.BeginInvoke((Delegate) new ProviderEventHandler(this.ProviderManager_Added), new object[]
         {
             (object)args
         });
     }
     else
     {
         this.AddProvider(args.Provider);
     }
 }
Beispiel #8
0
        private static void OnAdded(ProviderEventArgs e)
        {
            if (!(e.Provider is IExecutionProvider))
            {
                return;
            }
            IExecutionProvider executionProvider = (IExecutionProvider)e.Provider;

            foreach (SingleOrder singleOrder in OrderManager.orders.All)
            {
                if (singleOrder.Provider == executionProvider && !singleOrder.IsDone)
                {
                    executionProvider.RegisterOrder(singleOrder);
                }
            }
        }
Beispiel #9
0
        private static void a9pwYGI8t(ProviderEventArgs e)
        {
            IMarketDataProvider provider = e.Provider as IMarketDataProvider;

            if (provider == null || provider == ProviderManager.MarketDataSimulator)
            {
                return;
            }
            Hashtable hashtable1 = DataManager.providers[provider] as Hashtable;

            if (hashtable1 == null)
            {
                return;
            }
            foreach (Hashtable hashtable2 in (IEnumerable)hashtable1.Values)
            {
                foreach (RequestItem reqItem in (IEnumerable)hashtable2.Values)
                {
                    provider.SendMarketDataRequest(reqItem.GetFIXMarketDataRequest());
                }
            }
        }
 private static void ProviderManager_Added(ProviderEventArgs args)
 {
     ProviderManager.Providers.Add(new Provider(args.Provider));
 }
 private void OnProviderRequested(object sender, ProviderEventArgs e)
 {
     Task.Run(() => UpdateProviderAsync(e.Provider, Limit, UpdateReason.Forced));
 }
		private static void ProviderManager_Added(ProviderEventArgs args)
		{
			ProviderManager.Providers.Add(new Provider(args.Provider));
		}
Beispiel #13
0
 private void providers_ProviderAvailabilityChanged(Object sender, ProviderEventArgs e)
 {
     try {
         if (this.Dispatcher.Thread != System.Threading.Thread.CurrentThread)
         {
             providers_ProviderAvailabilityChangedCallback bR = new providers_ProviderAvailabilityChangedCallback(providers_ProviderAvailabilityChanged);
             this.Dispatcher.Invoke(bR, new object[] { sender, e });
             return;
         }
         //
         StackPanel newPanel = e.IsAvailable ? stackIcons : stackInactiveIcons;
         StackPanel oldPanel = e.IsAvailable ? stackInactiveIcons : stackIcons;
         //
         List <UIElement> itemListToRemove = new List <UIElement>();
         // append to remove list
         foreach (System.Windows.Controls.Image currentBox in oldPanel.Children)
         {
             //log.Debug("old panel " + e.Name + " " + currentBox.Tag + " " + this.Dispatcher.Thread.ManagedThreadId);
             if (String.Compare(currentBox.Tag.ToString(), e.Name, true) == 0)
             {
                 itemListToRemove.Add(currentBox);
             }
         }
         // append to remove list
         foreach (System.Windows.Controls.Image currentBox in newPanel.Children)
         {
             //log.Debug("old panel " + e.Name + " " + currentBox.Tag + " " + this.Dispatcher.Thread.ManagedThreadId);
             if (String.Compare(currentBox.Tag.ToString(), e.Name, true) == 0)
             {
                 itemListToRemove.Add(currentBox);
             }
         }
         // remove ui elements from stackpanel
         foreach (UIElement uiElem in itemListToRemove)
         {
             oldPanel.Children.Remove(uiElem);
             newPanel.Children.Remove(uiElem);
         }
         //
         System.Drawing.Image img = e.Image;
         if (!e.IsAvailable)
         {
             img = this.getGrayscale(new Bitmap(img));
         }
         //
         System.Windows.Controls.Image imgControl = new System.Windows.Controls.Image();
         imgControl.Tag    = e.Name;
         imgControl.Width  = 15;
         imgControl.Height = 15;
         imgControl.Margin = new Thickness(0, 0, 10, 0);
         imgControl.Source = this.getBitmapSource(img);
         //
         newPanel.Children.Add(imgControl);
         //
         txtSearch.Focusable = newPanel.Children.Count > 0;
         if (txtSearch.Focusable)
         {
             txtSearch.Focus();
         }
         txtSearch.Background = txtSearch.Focusable ? System.Windows.Media.Brushes.White : System.Windows.Media.Brushes.LightGray;
     } catch (Exception ex) {
         log.Error(ex, ex);
     }
 }