private static List <FilterTabData> ReadFilterTabs(XmlElement startNode) { List <FilterTabData> dataList = new List <FilterTabData>(); XmlNode filterTabsNode = startNode.SelectSingleNode("filterTabs"); if (filterTabsNode != null) { XmlNodeList filterTabNodeList = filterTabsNode.ChildNodes; // all "filterTab" nodes foreach (XmlNode node in filterTabNodeList) { PersistenceData persistenceData = ReadPersistenceDataFromNode(node); XmlNode filterNode = node.SelectSingleNode("tabFilter"); if (filterNode != null) { List <FilterParams> filterList = ReadFilter(filterNode as XmlElement); FilterTabData data = new FilterTabData(); data.persistenceData = persistenceData; data.filterParams = filterList[0]; // there's only 1 dataList.Add(data); } } } return(dataList); }
private static List<FilterTabData> ReadFilterTabs(XmlElement startNode) { List<FilterTabData> dataList = new List<FilterTabData>(); XmlNode filterTabsNode = startNode.SelectSingleNode("filterTabs"); if (filterTabsNode != null) { XmlNodeList filterTabNodeList = filterTabsNode.ChildNodes; // all "filterTab" nodes foreach (XmlNode node in filterTabNodeList) { PersistenceData persistenceData = ReadPersistenceDataFromNode(node); XmlNode filterNode = node.SelectSingleNode("tabFilter"); if (filterNode != null) { List<FilterParams> filterList = ReadFilter(filterNode as XmlElement); FilterTabData data = new FilterTabData(); data.persistenceData = persistenceData; data.filterParams = filterList[0]; // there's only 1 dataList.Add(data); } } } return dataList; }
public PersistenceData GetPersistenceData() { PersistenceData persistenceData = new PersistenceData(); persistenceData.bookmarkList = BookmarkProvider.BookmarkList; persistenceData.rowHeightList = _rowHeightList; persistenceData.multiFile = IsMultiFile; persistenceData.multiFilePattern = _multifileOptions.FormatPattern; persistenceData.multiFileMaxDays = _multifileOptions.MaxDayTry; persistenceData.currentLine = dataGridView.CurrentCellAddress.Y; persistenceData.firstDisplayedLine = dataGridView.FirstDisplayedScrollingRowIndex; persistenceData.filterVisible = !splitContainer1.Panel2Collapsed; persistenceData.filterAdvanced = !advancedFilterSplitContainer.Panel1Collapsed; persistenceData.filterPosition = splitContainer1.SplitterDistance; persistenceData.followTail = _guiStateArgs.FollowTail; persistenceData.fileName = FileName; persistenceData.tabName = Text; persistenceData.columnizerName = CurrentColumnizer.GetName(); persistenceData.lineCount = CurrentLogFileReader.LineCount; _filterParams.isFilterTail = filterTailCheckBox.Checked; // this option doesnt need a press on 'search' if (Preferences.saveFilters) { List<FilterParams> filterList = new List<FilterParams>(); filterList.Add(_filterParams); persistenceData.filterParamsList = filterList; foreach (FilterPipe filterPipe in _filterPipeList) { FilterTabData data = new FilterTabData(); data.persistenceData = filterPipe.OwnLogWindow.GetPersistenceData(); data.filterParams = filterPipe.FilterParams; persistenceData.filterTabDataList.Add(data); } } if (_currentHighlightGroup != null) { persistenceData.highlightGroupName = _currentHighlightGroup.GroupName; } if (_fileNames != null && IsMultiFile) { persistenceData.multiFileNames.AddRange(_fileNames); } //persistenceData.showBookmarkCommentColumn = bookmarkWindow.ShowBookmarkCommentColumn; persistenceData.filterSaveListVisible = !highlightSplitContainer.Panel2Collapsed; persistenceData.encoding = CurrentLogFileReader.CurrentEncoding; return persistenceData; }