public HistoryQuotationAddingControl(InstrumentQuotation instrumentQuotation,Action<HistoryQuotationData> addHistoryQuotation)
        {
            InitializeComponent();
            this._HistoryQuotationData = new HistoryQuotationData();
            this._AddHistoryQuotation = addHistoryQuotation;

            this._HistoryQuotationData.InstrumentId = instrumentQuotation.InstruemtnId;
            this._HistoryQuotationData.InstrumentCode = instrumentQuotation.InstrumentCode;
            this._HistoryQuotationData.ExchangeCode = instrumentQuotation.ExchangeCode;
            this._HistoryQuotationData.Time = instrumentQuotation.TimeSpan;
            InstrumentClient instrument = App.MainFrameWindow.ExchangeDataManager.ExchangeSettingManagers[instrumentQuotation.ExchangeCode].Instruments[instrumentQuotation.InstruemtnId];
            HistoryQuotationInfo info = new HistoryQuotationInfo();
            info.NumeratorUnit = instrument.NumeratorUnit;
            info.Denominator = instrument.Denominator;
            this.Origin.Mask = info.GetMask();
            this.TimeSpan.Value = instrumentQuotation.TimeSpan;
            this.Origin.Value = instrumentQuotation.Origin;
            this.TimeMessage.Text = string.Format("Value must less than {0}", instrumentQuotation.TimeSpan);
        }
        public UpdateExchangeHistoryQuotationControl()
        {
            try
            {
                InitializeComponent();
                foreach (InstrumentQuotation instrument in ExchangeQuotationViewModel.Instance.Exchanges)
                {

                    if (!this.Exchange.Items.Contains(instrument.ExchangeCode))
                    {
                        this.Exchange.Items.Add(instrument.ExchangeCode);
                    }
                }
                this.Exchange.SelectedIndex = -1;
                this._HistoryQuotation = new HistoryQuotationInfo();
                this.HistotyQuotation.ItemsSource = this._HistoryQuotation.HistoryQuotationGridData;
                this.RestoreProcess.ItemsSource = ExchangeQuotationViewModel.Instance.HighLowBatchProcessInfos;
                this._EditExchangeCodes = new List<string>();
            }
            catch (Exception ex)
            {
                Logger.TraceEvent(System.Diagnostics.TraceEventType.Error, "UpdateExchangeHistoryQuotationControl.\r\n{0}", ex.ToString());
            }
        }