/// <inheritdoc/>
        protected override IEnumerable <Row> GetRows(string filePath, RowsFilter filter)
        {
            var simpleBannedCache = new List <string>();

            foreach (Row row in base.GetRows(filePath, filter))
            {
                if (simpleBannedCache.Contains(row[FieldId.LastUpdate]))
                {
                    continue;
                }

                if (filter(new Field(FieldId.LastUpdate, row[FieldId.LastUpdate])))
                {
                    yield return(row);
                }
                else
                {
                    simpleBannedCache.Add(row[FieldId.LastUpdate]);
                }
            }
        }
        public void SetLayout(XElement layout)
        {
            try
            {
                if (layout.HasElements)
                {
                    XElement filterElement = layout.Element("Fitler");
                    if (filterElement != null)
                    {
                        RowsFilter rowsFilter = new RowsFilter(typeof(string), this.MonitorGrid.Columns.DataColumns["Code"]);
                        rowsFilter.Conditions.LogicalOperator = (LogicalOperator)int.Parse(filterElement.Attribute("LogicalOperator").Value);

                        foreach (XElement element in filterElement.Elements("Condition"))
                        {
                            rowsFilter.Conditions.Add(new ComparisonCondition() { FilterValue = element.Attribute("val").Value, Operator = (ComparisonOperator)int.Parse(element.Attribute("op").Value) });
                        }
                        this.MonitorGrid.FilteringSettings.RowFiltersCollection.Add(rowsFilter);
                    }
                    XElement spliterElement = layout.Element("Spliter");
                    if(spliterElement != null)
                    {
                        this.MainGrid.ColumnDefinitions[0].Width = new GridLength(double.Parse(spliterElement.Attribute("width0").Value));
                    }
                    ColumnWidthPersistence.LoadColumnsWidth(this.MonitorGrid, layout);
                }
            }
            catch (Exception ex)
            {
                Logger.AddEvent(System.Diagnostics.TraceEventType.Error, "QuotationMonitorControl.SetLayout\r\n{0}", ex.ToString());
            }
        }
        public void SetLayout(XElement layout)
        {
            try
            {
                if (layout.HasElements)
                {
                    XElement filterElement = layout.Element("Fitler");
                    if (filterElement != null)
                    {
                        RowsFilter rowsFilter = new RowsFilter(typeof(string), this._OrderTaskGrid.Columns.DataColumns["InstrumentCode"]);
                        rowsFilter.Conditions.LogicalOperator = (LogicalOperator)int.Parse(filterElement.Attribute("LogicalOperator").Value);

                        foreach (XElement element in filterElement.Elements("Condition"))
                        {
                            rowsFilter.Conditions.Add(new ComparisonCondition() { FilterValue = element.Attribute("val").Value, Operator = (ComparisonOperator)int.Parse(element.Attribute("op").Value) });
                        }
                        this._OrderTaskGrid.FilteringSettings.RowFiltersCollection.Add(rowsFilter);
                    }
                    //Grid Column Width
                    XElement columnWidthElement = layout.Element("GridSettings").Element("ColumnsWidth");
                    if (columnWidthElement != null)
                    {
                        ColumnWidthPersistence.LoadColumnsWidth(this._OrderTaskGrid, columnWidthElement);
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.AddEvent(System.Diagnostics.TraceEventType.Error, "DealingInstanceOrder.SetLayout\r\n{0}", ex.ToString());
            }
        }