void codeSetWindow_Closed(object sender, EventArgs e)
        {
            ChooseContract chooseContract = ((sender as Window).Content) as ChooseContract;

            if (chooseContract.IsUpdated == false)
            {
                UserCodeSetInstance.Reload();
            }
        }
        /// <summary>
        /// 显示自选行情设置窗口
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ShowContract_Click(object sender, RoutedEventArgs e)
        {
            ChooseContract chooseContract = new ChooseContract();

            chooseContract.DataContext = this._MainWindow;
            Window codeSetWindow = CommonUtil.GetWindow("合约设置", chooseContract, _MainWindow);

            codeSetWindow.Closed += new EventHandler(codeSetWindow_Closed);
            codeSetWindow.ShowDialog();
        }
        private void btnReportSetting_Click(object sender, RoutedEventArgs e)
        {
            ChooseContract chooseContract = new ChooseContract();

            chooseContract.DataContext = this._MainWindow;
            Window codeSetWindow = CommonUtil.GetWindow("合约设置", chooseContract, _MainWindow);

            codeSetWindow.Closed += new EventHandler(codeSetWindow_Closed);
            ObservableCollection <UserCodeSet> lstUserCodeSet = UserCodeSetInstance.GetUserCodeSetList();
            int         i           = 0;
            UserCodeSet userCodeSet = null;

            foreach (var item in lstUserCodeSet)
            {
                userCodeSet = item as UserCodeSet;
                if (defaultButton != null && defaultButton.Content.ToString() == userCodeSet.Name)
                {
                    break;
                }
                i += 1;
            }
            chooseContract.cbUserCodeSet.SelectedIndex = i;
            codeSetWindow.ShowDialog();
        }