Ejemplo n.º 1
0
 protected override void OnClosing(DockControlClosingEventArgs e)
 {
   Global.TimerManager.Stop((ITimerItem) this);
   if ((int) ((IProvider) this.marketDataProvider).Id != 1)
     ThreadPool.QueueUserWorkItem((WaitCallback) (state => Global.ProviderHelper.CancelMarketData(this.marketDataProvider, this.instrument, (MarketDataType) 4)));
   base.OnClosing(e);
 }
Ejemplo n.º 2
0
 protected override void OnClosing(DockControlClosingEventArgs e)
 {
     Global.TimerManager.Stop((ITimerItem)this);
     // ISSUE: method pointer
     ProviderManager.NewTrade -= new TradeEventHandler(this.ProviderManager_NewTrade);
     // ISSUE: method pointer
     ProviderManager.NewQuote -= new QuoteEventHandler(this.ProviderManager_NewQuote);
     base.OnClosing(e);
 }
Ejemplo n.º 3
0
 private void DocumentManager_DockControlClosing(object sender, TD.SandDock.DockControlClosingEventArgs e)
 {
     if (e.DockControl is TabbedDocument && this.DocumentsClosing != null)
     {
         ClosingDocumentsEventArgs ce = new ClosingDocumentsEventArgs(new TabbedDocument[] { (TabbedDocument)e.DockControl });
         this.DocumentsClosing(this, ce);
         e.Cancel = ce.Cancel;
     }
 }
Ejemplo n.º 4
0
        protected override void OnClosing(DockControlClosingEventArgs e)
        {   
            // 这里写这么长是因为SmartQuant.Global与SmartQuant.Shared.Global冲突
            // SmartQuant.Global是给策略开发者用
            // SmartQuant.Shared.Global是给界面开发者用
            if (SmartQuant.Shared.Global.Framework.StrategyManager.Status == StrategyStatus.Running)
            {
                // 做成策略没有停止就不能关闭的示例
                e.Cancel = true;
            }
            
            if (e.Cancel)
            {
                // 如果不关闭的话,不清理和保存
                return;
            }
            // 删除定时刷新
            SmartQuant.Shared.Global.TimerManager.Remove(this);

            base.OnClosing(e);
        }
Ejemplo n.º 5
0
    protected override void OnClosing(DockControlClosingEventArgs e)
    {
      // ISSUE: method pointer
			ProviderManager.Error -= new ProviderErrorEventHandler(this.ProviderManager_Error);
      base.OnClosing(e);
    }
Ejemplo n.º 6
0
 protected override void OnClosing(DockControlClosingEventArgs e)
 {
     this.counter.Stop();
 }
Ejemplo n.º 7
0
 protected override void OnClosing(DockControlClosingEventArgs e)
 {
   this.RemoveAllTabs();
   base.OnClosing(e);
 }
Ejemplo n.º 8
0
 protected internal virtual void OnDockControlClosing(DockControlClosingEventArgs e)
 {
     DockControlClosing?.Invoke(this, e);
 }
Ejemplo n.º 9
0
 internal bool method_14(bool bool_8)
 {
     var e = new DockControlClosingEventArgs(this, false);
     Manager?.OnDockControlClosing(e);
     if (!e.Cancel)
         OnClosing(e);
     if (e.Cancel)
         return false;
     LayoutUtilities.smethod_11(this);
     OnClosed(EventArgs.Empty);
     if (CloseAction == DockControlCloseAction.Dispose)
         Dispose();
     return true;
 }
Ejemplo n.º 10
0
		protected override void OnClosing(DockControlClosingEventArgs e)
		{
			if (this.isChanged && MessageBox.Show((IWin32Window)this, "The file was changed. Do you want to save it?", "File Changed", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
				this.Save();
			base.OnClosing(e);
		}
Ejemplo n.º 11
0
 protected override void OnClosing(DockControlClosingEventArgs e)
 {
     this.instrumentPad.Instrument = (Instrument)null;
     this.RemoveInstruments(new List<Instrument>((IEnumerable<Instrument>)this.instruments).ToArray());
     this.eventQueueWaitHandle.Reset();
     this.eventQueue.Enqueue((MarketDataUpdateItem)null);
     this.eventQueueWaitHandle.WaitOne();
     Global.TimerManager.Stop((ITimerItem)this);
     base.OnClosing(e);
 }
Ejemplo n.º 12
0
    protected override void OnClosing(DockControlClosingEventArgs e)
    {
      // ISSUE: method pointer
			ProviderManager.Added -= new ProviderEventHandler(this.ProviderManager_Added);
      // ISSUE: method pointer
			ProviderManager.Connected -= new ProviderEventHandler(this.ProviderManager_Connected);
      // ISSUE: method pointer
			ProviderManager.Disconnected -= new ProviderEventHandler(this.ProviderManager_Disconnected);
      base.OnClosing(e);
    }
Ejemplo n.º 13
0
		protected override void OnDockControlClosing(DockControlClosingEventArgs e)
		{
			base.OnDockControlClosing(e);
		}
Ejemplo n.º 14
0
 protected override void OnClosing(DockControlClosingEventArgs e)
 {
   Global.TimerManager.Stop((ITimerItem) this);
   base.OnClosing(e);
 }
Ejemplo n.º 15
0
 protected override void OnClosing(DockControlClosingEventArgs e)
 {
   this.DetachWatcher();
   base.OnClosing(e);
 }
Ejemplo n.º 16
0
    protected override void OnClosing(DockControlClosingEventArgs e)
    {
      if (this.isRunning)
      {
        if (MessageBox.Show("Do you want to stop capture realtime data from " + ((IProvider) this.provider).Name + "?", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
          this.Stop();
        else
          e.Cancel = true;
      }
      if (e.Cancel)
        return;
      this.waitHandle.Reset();
      this.queue.Enqueue((Action) null);
      this.waitHandle.WaitOne();
			((IProvider) this.provider).Connected -= new EventHandler(this.OnConnected);
			((IProvider) this.provider).Disconnected -= new EventHandler(this.OnDisconnected);
      // ISSUE: method pointer
			this.provider.NewTrade -= new TradeEventHandler(this.OnNewTrade);
      // ISSUE: method pointer
			this.provider.NewQuote -= new QuoteEventHandler(this.OnNewQuote);
      // ISSUE: method pointer
			this.provider.NewBar -= new BarEventHandler(this.OnNewBar);
      // ISSUE: method pointer
			this.provider.NewMarketDepth -= new MarketDepthEventHandler(this.OnNewMarketDepth);
    }
Ejemplo n.º 17
0
    protected override void OnClosing(DockControlClosingEventArgs e)
    {
      // ISSUE: method pointer
			InstrumentManager.InstrumentAdded -= new InstrumentEventHandler(this.InstrumentManager_InstrumentAdded);
      // ISSUE: method pointer
			InstrumentManager.InstrumentRemoved -= new InstrumentEventHandler(this.InstrumentManager_InstrumentRemoved);
      base.OnClosing(e);
    }
Ejemplo n.º 18
0
 protected override void OnClosing(DockControlClosingEventArgs e)
 {
   Console.SetOut(this.standardOut);
   base.OnClosing(e);
 }