private void MenuItem_Click_ZhengZhou(object sender, RoutedEventArgs e)
        {
            var quoteGrpVw = new MarketDataControl();

            quoteGrpVw.Filter("", "CZCE", "", "");
            quotePane.AddContent(new MarketDataControl()).Title = WPFUtility.GetLocalizedString("CFFEX", LocalizationInfo.ResourceFile, LocalizationInfo.AssemblyName);
        }
        public void ReloadData()
        {
            Initialize();
            LayoutAnchorable defaultTab =
                AnchorablePane.Children.FirstOrDefault(pane => ((MarketDataControl)pane.Content).FilterSettingsWin.FilterId == DEFAULT_ID);

            AnchorablePane.Children.Clear();
            if (defaultTab != null)
            {
                AnchorablePane.Children.Add(defaultTab);
            }
            // MessageHandlerContainer.DefaultInstance.Get<MarketDataHandler>().ResubMarketData();
            var  filtersettings = ClientDbContext.GetFilterSettings(MarketDataHandler.MessageWrapper.User.Id, PersistanceId);
            bool found          = false;

            foreach (var fs in filtersettings)
            {
                var marketdatactrl = new MarketDataControl(PersistanceId, fs.Id, MarketDataHandler);
                AnchorablePane.AddContent(marketdatactrl).Title = fs.Title;
                marketdatactrl.LoadUserContracts();
                marketdatactrl.Filter(fs.Title, fs.Exchange, fs.Underlying, fs.Contract);
                if (fs.Id == DEFAULT_ID)
                {
                    found = true;
                }
            }
            if (found)
            {
                AnchorablePane.Children.Remove(defaultTab);
            }

            LoadUserContracts();
        }
 private void MenuItem_Click_Contract(object sender, RoutedEventArgs e)
 {
     //quotePane.AddContent(new MarketDataControl()).Title = WPFUtility.GetLocalizedString("Optional", LocalizationInfo.ResourceFile, LocalizationInfo.AssemblyName);
     var title = WPFUtility.GetLocalizedString("Optional", LocalizationInfo.ResourceFile, LocalizationInfo.AssemblyName);
     var marketDataWin = new MarketDataControl(marketDataLV.PersistanceId, Guid.NewGuid().ToString(), MessageHandlerContainer.DefaultInstance.Get<MarketDataHandler>());
     marketDataWin.FilterSettingsWin.Title += "(" + title + ")";
     marketDataWin.FilterSettingsWin.FilterTabTitle = title;
     quotePane.AddContent(marketDataWin).Title = title;
     marketDataWin.FilterSettingsWin.Save();
 }
 private void MenuItem_Click_ShowCustomizedContractTab(object sender, RoutedEventArgs e)
 {
     if (AnchorablePane != null)
     {
         var title             = WPFUtility.GetLocalizedString("Optional", LocalizationInfo.ResourceFile, LocalizationInfo.AssemblyName);
         var marketDataControl = new MarketDataControl(PersistanceId, Guid.NewGuid().ToString(), MarketDataHandler);
         AnchorablePane.AddContent(marketDataControl).Title = title;
         marketDataControl.FilterSettingsWin.FilterTabTitle = title;
         marketDataControl.FilterSettingsWin.Save();
     }
 }