@@ -160,7 +160,7 @@ public static SmartSystemMenuSettings Read(string fileName, string languageFileN
160160 HotKeyEnabled = x . Attribute ( "hotKeyEnabled" ) != null && ! string . IsNullOrEmpty ( x . Attribute ( "hotKeyEnabled" ) . Value ) ? x . Attribute ( "hotKeyEnabled" ) . Value . ToLower ( ) == "true" : false ,
161161 Key1 = x . Attribute ( "key1" ) != null && ! string . IsNullOrEmpty ( x . Attribute ( "key1" ) . Value ) ? ( VirtualKeyModifier ) int . Parse ( x . Attribute ( "key1" ) . Value ) : VirtualKeyModifier . None ,
162162 Key2 = x . Attribute ( "key2" ) != null && ! string . IsNullOrEmpty ( x . Attribute ( "key2" ) . Value ) ? ( VirtualKeyModifier ) int . Parse ( x . Attribute ( "key2" ) . Value ) : VirtualKeyModifier . None ,
163- Key3 = x . Attribute ( "key3" ) != null && ! string . IsNullOrEmpty ( x . Attribute ( "key3" ) . Value ) ? ( VirtualKey ) int . Parse ( x . Attribute ( "key3" ) . Value ) : 0
163+ Key3 = x . Attribute ( "key3" ) != null && ! string . IsNullOrEmpty ( x . Attribute ( "key3" ) . Value ) ? ( VirtualKey ) int . Parse ( x . Attribute ( "key3" ) . Value ) : VirtualKey . None
164164 } )
165165 . ToList ( ) ;
166166
@@ -225,9 +225,9 @@ public static void Save(string fileName, SmartSystemMenuSettings settings)
225225 new XElement ( "item" , settings . MenuItems . Items . Select ( x => new XElement ( "item" ,
226226 new XAttribute ( "name" , x . Name ) ,
227227 new XAttribute ( "hotKeyEnabled" , x . HotKeyEnabled . ToString ( ) . ToLower ( ) ) ,
228- new XAttribute ( "key1" , ( ( int ) x . Key1 ) . ToString ( ) ) ,
229- new XAttribute ( "key2" , ( ( int ) x . Key2 ) . ToString ( ) ) ,
230- new XAttribute ( "key3" , ( ( int ) x . Key3 ) . ToString ( ) ) ) ) ) ,
228+ new XAttribute ( "key1" , x . Key1 == VirtualKeyModifier . None ? "" : ( ( int ) x . Key1 ) . ToString ( ) ) ,
229+ new XAttribute ( "key2" , x . Key2 == VirtualKeyModifier . None ? "" : ( ( int ) x . Key2 ) . ToString ( ) ) ,
230+ new XAttribute ( "key3" , x . Key3 == VirtualKey . None ? "" : ( ( int ) x . Key3 ) . ToString ( ) ) ) ) ) ,
231231 new XElement ( "startProgramItem" , settings . MenuItems . StartProgramItems . Select ( x => new XElement ( "item" ,
232232 new XAttribute ( "title" , x . Title ) ,
233233 new XAttribute ( "fileName" , x . FileName ) ,
0 commit comments