1414using SimpleCore . Net ;
1515using SmartImage . Lib ;
1616using SmartImage . Utilities ;
17+
1718// ReSharper disable PossibleNullReferenceException
1819
1920namespace SmartImage . Core
@@ -40,9 +41,13 @@ public static class MainDialog
4041
4142 internal static string ToToggleString ( this bool b ) => b ? Enabled : Disabled ;
4243
43- private static string GetFilterName ( bool added ) => $ "Filter ({ ( added . ToToggleString ( ) ) } )";
44- private static string GetName ( string s , bool added ) => $ "{ s } ({ ( added . ToToggleString ( ) ) } )";
45- private static string GetContextMenuName ( bool added ) => $ "Context menu ({ ( added . ToToggleString ( ) ) } )";
44+ private static string GetFilterName ( bool added ) => GetName ( "Filter" , added ) ;
45+ private static string GetNotificationName ( bool added ) => GetName ( "Notification" , added ) ;
46+ private static string GetNotificationImageName ( bool added ) => GetName ( "Notification image" , added ) ;
47+ private static string GetName ( string s , bool added ) => $ "{ s } ({ ( added . ToToggleString ( ) ) } )";
48+
49+
50+ private static string GetContextMenuName ( bool added ) => GetName ( "Context menu" , added ) ;
4651
4752 #endregion
4853
@@ -51,15 +56,15 @@ public static class MainDialog
5156 {
5257 new ( )
5358 {
54- Name = ">>> Run <<<" ,
59+ Name = ">>> Run <<<" ,
5560 Color = ColorMain ,
5661 Function = ( ) =>
5762 {
5863 ImageQuery query = NConsole . ReadInput ( "Image file or direct URL" , x =>
5964 {
6065 ( bool url , bool file ) = ImageQuery . IsUriOrFile ( x ) ;
6166 return ! ( url || file ) ;
62- } , "Input must be file or direct image link" ) ;
67+ } , "Input must be file or direct image link" ) ;
6368
6469 Program . Config . Query = query ;
6570 return true ;
@@ -68,7 +73,7 @@ public static class MainDialog
6873
6974 new ( )
7075 {
71- Name = "Engines" ,
76+ Name = "Engines" ,
7277 Color = ColorOther ,
7378 Function = ( ) =>
7479 {
@@ -109,24 +114,24 @@ public static class MainDialog
109114 } ,
110115 new ( )
111116 {
112- Name = GetName ( "Notification" , Program . Config . Notification ) ,
117+ Name = GetNotificationName ( Program . Config . Notification ) ,
113118 Function = ( ) =>
114119 {
115120 Program . Config . Notification = ! Program . Config . Notification ;
116121
117- MainMenuOptions [ 4 ] . Name = GetName ( "Notification" , Program . Config . Notification ) ;
122+ MainMenuOptions [ 4 ] . Name = GetNotificationName ( Program . Config . Notification ) ;
118123 SaveAndUpdateConfig ( ) ;
119124 return null ;
120125 }
121126 } ,
122127 new ( )
123128 {
124- Name = GetName ( "Notification" , Program . Config . NotificationImage ) ,
129+ Name = GetNotificationImageName ( Program . Config . NotificationImage ) ,
125130 Function = ( ) =>
126131 {
127132 Program . Config . NotificationImage = ! Program . Config . NotificationImage ;
128133
129- MainMenuOptions [ 5 ] . Name = GetName ( "Notification" , Program . Config . NotificationImage ) ;
134+ MainMenuOptions [ 5 ] . Name = GetNotificationImageName ( Program . Config . NotificationImage ) ;
130135 SaveAndUpdateConfig ( ) ;
131136 return null ;
132137 }
@@ -179,7 +184,7 @@ public static class MainDialog
179184 var di = new DirectoryInfo ( Info . ExeLocation ) ;
180185
181186 Console . WriteLine ( $ "Executable location: { di . Parent . Name } ") ;
182-
187+
183188 Console . WriteLine ( $ "In path: { Info . IsAppFolderInPath } ") ;
184189 Console . WriteLine ( $ "Context menu added: { OSIntegration . IsContextMenuAdded } ") ;
185190
@@ -216,7 +221,7 @@ public static class MainDialog
216221 {
217222 WebUtilities . OpenUrl ( Info . Wiki ) ;
218223
219-
224+
220225 return null ;
221226 }
222227 } ,
0 commit comments