1
1
using Flow . Launcher . Plugin . Explorer . Search ;
2
2
using Flow . Launcher . Plugin . Explorer . Search . QuickAccessLinks ;
3
- using Microsoft . AspNetCore . DataProtection . AuthenticatedEncryption ;
4
3
using System ;
5
4
using System . Collections . Generic ;
6
- using System . IO ;
7
5
8
6
namespace Flow . Launcher . Plugin . Explorer
9
7
{
@@ -25,13 +23,15 @@ public class Settings
25
23
26
24
public string FileContentSearchActionKeyword { get ; set ; } = Constants . DefaultContentSearchActionKeyword ;
27
25
26
+ public bool FileContentSearchKeywordEnabled { get ; set ; } = true ;
27
+
28
28
public string PathSearchActionKeyword { get ; set ; } = Query . GlobalPluginWildcardSign ;
29
29
30
30
public bool PathSearchKeywordEnabled { get ; set ; }
31
31
32
32
public string IndexSearchActionKeyword { get ; set ; } = Query . GlobalPluginWildcardSign ;
33
33
34
- public bool IndexOnlySearchKeywordEnabled { get ; set ; }
34
+ public bool IndexSearchKeywordEnabled { get ; set ; }
35
35
36
36
public bool WarnWindowsSearchServiceOff { get ; set ; } = true ;
37
37
@@ -48,7 +48,8 @@ internal enum ActionKeyword
48
48
ActionKeyword . SearchActionKeyword => SearchActionKeyword ,
49
49
ActionKeyword . PathSearchActionKeyword => PathSearchActionKeyword ,
50
50
ActionKeyword . FileContentSearchActionKeyword => FileContentSearchActionKeyword ,
51
- ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword
51
+ ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword ,
52
+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyWord property not found" )
52
53
} ;
53
54
54
55
internal void SetActionKeyword ( ActionKeyword actionKeyword , string keyword ) => _ = actionKeyword switch
@@ -57,23 +58,25 @@ internal enum ActionKeyword
57
58
ActionKeyword . PathSearchActionKeyword => PathSearchActionKeyword = keyword ,
58
59
ActionKeyword . FileContentSearchActionKeyword => FileContentSearchActionKeyword = keyword ,
59
60
ActionKeyword . IndexSearchActionKeyword => IndexSearchActionKeyword = keyword ,
60
- _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "Unexpected property" )
61
+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyWord property not found " )
61
62
} ;
62
63
63
- internal bool ? GetActionKeywordEnabled ( ActionKeyword actionKeyword ) => actionKeyword switch
64
+ internal bool GetActionKeywordEnabled ( ActionKeyword actionKeyword ) => actionKeyword switch
64
65
{
65
66
ActionKeyword . SearchActionKeyword => SearchActionKeywordEnabled ,
66
67
ActionKeyword . PathSearchActionKeyword => PathSearchKeywordEnabled ,
67
- ActionKeyword . IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled ,
68
- _ => null
68
+ ActionKeyword . IndexSearchActionKeyword => IndexSearchKeywordEnabled ,
69
+ ActionKeyword . FileContentSearchActionKeyword => FileContentSearchKeywordEnabled ,
70
+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyword enabled status not defined" )
69
71
} ;
70
72
71
73
internal void SetActionKeywordEnabled ( ActionKeyword actionKeyword , bool enable ) => _ = actionKeyword switch
72
74
{
73
75
ActionKeyword . SearchActionKeyword => SearchActionKeywordEnabled = enable ,
74
76
ActionKeyword . PathSearchActionKeyword => PathSearchKeywordEnabled = enable ,
75
- ActionKeyword . IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled = enable ,
76
- _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "Unexpected property" )
77
+ ActionKeyword . IndexSearchActionKeyword => IndexSearchKeywordEnabled = enable ,
78
+ ActionKeyword . FileContentSearchActionKeyword => FileContentSearchKeywordEnabled = enable ,
79
+ _ => throw new ArgumentOutOfRangeException ( nameof ( actionKeyword ) , actionKeyword , "ActionKeyword enabled status not defined" )
77
80
} ;
78
81
}
79
82
}
0 commit comments