private void Init()
        {
            foreach (var item in TradeInfoHelper.ExchangeDisplayList)
            {
                TabItem tabItem = new TabItem();
                tabItem.Header = item;
                tabItem.Style  = FindResource("QuotesTabItemStyle") as Style;
                QuotesDataGrid uscDataGird = new QuotesDataGrid();
                if (CommHelper.ContractModelGroupList.ContainsKey(item))
                {
                    uscDataGird.quotesDataGrid.ItemsSource = CommHelper.ContractModelGroupList[item];
                }
                tabItem.Content = uscDataGird;
                AllFuturesQuota.Items.Add(tabItem);
            }


            //HKEx.quotesDataGrid.ItemsSource = _viewModel.HKExList;
            //CMEENG.quotesDataGrid.ItemsSource = _viewModel.CMEENGList;
            //CMEMET.quotesDataGrid.ItemsSource = _viewModel.CMEMETList;
            //CMEFEX.quotesDataGrid.ItemsSource = _viewModel.CMEFEXList;
            //CMEIDX.quotesDataGrid.ItemsSource = _viewModel.CMEIDXList;
            //CMEFRM.quotesDataGrid.ItemsSource = _viewModel.CMEFRMList;
            //EUREX.quotesDataGrid.ItemsSource = _viewModel.EUREXList;
            //SGXA50.quotesDataGrid.ItemsSource = _viewModel.SGXA50List;

            SetFirstSelectItem();
        }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 10 "..\..\MainWindow.xaml"
                ((PC_Futures.ANXINYI.MainWindow)(target)).StateChanged += new System.EventHandler(this.MainWindow_OnStateChanged);

            #line default
            #line hidden

            #line 12 "..\..\MainWindow.xaml"
                ((PC_Futures.ANXINYI.MainWindow)(target)).MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.MainWindow_OnMouseDoubleClick);

            #line default
            #line hidden

            #line 13 "..\..\MainWindow.xaml"
                ((PC_Futures.ANXINYI.MainWindow)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.MainWindow_OnSizeChanged);

            #line default
            #line hidden

            #line 13 "..\..\MainWindow.xaml"
                ((PC_Futures.ANXINYI.MainWindow)(target)).PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.Window_PreviewKeyDown);

            #line default
            #line hidden

            #line 13 "..\..\MainWindow.xaml"
                ((PC_Futures.ANXINYI.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:

            #line 31 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Grid)(target)).PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.UIElement_OnPreviewMouseLeftButtonDown);

            #line default
            #line hidden

            #line 31 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Grid)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.DockPanel_MouseMove);

            #line default
            #line hidden
                return;

            case 3:
                this.log = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.sysButton = ((System.Windows.Controls.Button)(target));
                return;

            case 5:
                this.plateButton = ((System.Windows.Controls.Button)(target));
                return;

            case 6:

            #line 41 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.Min = ((System.Windows.Controls.Button)(target));

            #line 102 "..\..\MainWindow.xaml"
                this.Min.Click += new System.Windows.RoutedEventHandler(this.State_OnClick);

            #line default
            #line hidden
                return;

            case 8:
                this.Max = ((System.Windows.Controls.Button)(target));

            #line 105 "..\..\MainWindow.xaml"
                this.Max.Click += new System.Windows.RoutedEventHandler(this.State_OnClick);

            #line default
            #line hidden
                return;

            case 9:
                this.StateChange = ((System.Windows.Controls.Image)(target));
                return;

            case 10:
                this.Close = ((System.Windows.Controls.Button)(target));

            #line 108 "..\..\MainWindow.xaml"
                this.Close.Click += new System.Windows.RoutedEventHandler(this.State_OnClick);

            #line default
            #line hidden
                return;

            case 11:
                this.Optional = ((PC_Futures.ANXINYI.QuotesDataGrid)(target));
                return;

            case 12:
                this.border = ((System.Windows.Controls.Border)(target));
                return;

            case 13:
                this.check = ((System.Windows.Controls.CheckBox)(target));

            #line 252 "..\..\MainWindow.xaml"
                this.check.Click += new System.Windows.RoutedEventHandler(this.check_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.txt_UserName = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 16:
                this.txt_UserPassword = ((System.Windows.Controls.PasswordBox)(target));
                return;

            case 17:
                this.txt_AuthCode = ((System.Windows.Controls.TextBox)(target));

            #line 351 "..\..\MainWindow.xaml"
                this.txt_AuthCode.KeyDown += new System.Windows.Input.KeyEventHandler(this.TextBox_KeyDown);

            #line default
            #line hidden
                return;

            case 18:

            #line 352 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Image)(target)).PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.AuthCode_MouseLeftButtonUp);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }