/// <summary> /// Path should come from user click which directly points to the wanted cell. /// </summary> private void TryAutoDetectDescriptorFromSelection(IHtmlElement selectedElement) { if (!selectedElement.GetPath().PointsToTableCell) { return; } var table = MarkupBehavior.Marker.Table; if (table == null) { return; } if (ValuesPosition == -1) { // just guess ... ValuesPosition = 0; } if (TimesPosition == -1) { // just guess ... TimesPosition = 0; } ValuesPattern = (Descriptor.Orientation == SeriesOrientation.Row ? table.GetCell(table.RowIndexOf(selectedElement), ValuesPosition) : table.GetCell(ValuesPosition, table.ColumnIndexOf(selectedElement))) .InnerText.Trim(); }
/// <summary> /// Path should come from user click which directly points to the wanted cell. /// </summary> private void TryAutoDetectDescriptorFromSelection(IHtmlElement selectedElement) { if (!selectedElement.GetPath().PointsToTableCell) { return; } var table = MarkupBehavior.Marker.Table; if (table == null) { return; } if (ColumnPosition == -1) { // just guess ... ColumnPosition = 0; } if (RowPosition == -1) { // just guess ... RowPosition = 0; } ColumnPattern = table.GetCell(ColumnPosition, table.ColumnIndexOf(selectedElement)).InnerText.Trim(); RowPattern = table.GetCell(table.RowIndexOf(selectedElement), RowPosition).InnerText.Trim(); }