void Command_Expression_SelectByExpression(GetExpressionDialog.Result result)
		{
			var results = GetFixedExpressionResults<bool>(result.Expression);
			Selections.Replace(Selections.Where((str, num) => results[num]).ToList());
		}
		void Command_Expression_Copy(GetExpressionDialog.Result result) => SetClipboardStrings(GetVariableExpressionResults<string>(result.Expression));
		static public Result Run(Window parent, NEVariables variables, int? numRows = null)
		{
			var dialog = new GetExpressionDialog(variables, numRows) { Owner = parent };
			return dialog.ShowDialog() ? dialog.result : null;
		}
		void Command_Expression_Expression(GetExpressionDialog.Result result) => ReplaceSelections(GetFixedExpressionResults<string>(result.Expression));
Example #5
0
		void Command_Table_Select_RowsByExpression(GetExpressionDialog.Result result)
		{
			var table = GetTable();
			var variables = GetTableVariables(table);
			var results = new NEExpression(result.Expression).EvaluateRows<bool>(variables, table.NumRows);
			var lines = results.Indexes(res => res).Select(row => row + 1).ToList();
			Selections.Replace(lines.AsParallel().AsOrdered().Select(line => new Range(Data.GetOffset(line, Data.GetLineLength(line)), Data.GetOffset(line, 0))).ToList());
		}