@@ -73,9 +73,42 @@ public static class Program
7373 public static readonly NConsoleDialog ResultDialog = new ( )
7474 {
7575 Options = new List < NConsoleOption > ( ) ,
76- Description = Elements . Description
76+
77+ Description = "Press the result number to open in browser\n " +
78+ "Ctrl: Load direct | Alt: Show other | Shift: Open raw | Alt+Ctrl: Download\n " +
79+ "F1: Show filtered results | F5: Refresh" ,
80+
81+ Functions = new Action [ ]
82+ {
83+ ( ) =>
84+ {
85+ // F1 : Show filtered
86+
87+
88+ ResultDialog ! . Options . Clear ( ) ;
89+
90+ var buffer = new List < SearchResult > ( ) ;
91+
92+ buffer . AddRange ( Client . Results ) ;
93+
94+ if ( ! _isFilteredShown ) {
95+ buffer . AddRange ( Client . FilteredResults ) ;
96+ }
97+
98+ foreach ( NConsoleOption ? option in buffer . Select ( NConsoleFactory . CreateResultOption ) ) {
99+ Program . ResultDialog . Options . Add ( option ) ;
100+ }
101+
102+ _isFilteredShown = ! _isFilteredShown ;
103+
104+ NConsole . Refresh ( ) ;
105+ } ,
106+
107+ }
77108 } ;
78109
110+ private static bool _isFilteredShown = false ;
111+
79112 #endregion
80113
81114 /// <summary>
@@ -129,6 +162,12 @@ private static async Task Main(string[] args)
129162 $ "| PE: { Config . PriorityEngines } " +
130163 $ "| Filtering: { Config . Filtering . ToToggleString ( ) } ";
131164
165+ await Run ( ) ;
166+ }
167+
168+ private static async Task Run ( )
169+ {
170+
132171 CancellationTokenSource cts = new ( ) ;
133172
134173 // Run search
@@ -139,7 +178,8 @@ private static async Task Main(string[] args)
139178 {
140179 OnSearchCompleted ( obj , eventArgs , cts ) ;
141180
142- if ( Config . Notification ) {
181+ if ( Config . Notification )
182+ {
143183 AppInterface . ShowToast ( obj , eventArgs ) ;
144184 }
145185 } ;
@@ -157,7 +197,6 @@ private static async Task Main(string[] args)
157197 ResultDialog . Read ( ) ;
158198
159199 await searchTask ;
160-
161200 }
162201
163202 private static bool HandleArguments ( )
0 commit comments