@@ -103,6 +103,18 @@ public class SettingsRoot
103103 public int ShortcutTimerStartKeyCode ;
104104 public bool ShortcutTimerStopEnable ;
105105 public int ShortcutTimerStopKeyCode ;
106+ #region AutoSplitter
107+ public bool ShortcutPracticeEnable ;
108+ public int ShortcutPracticeKeyCode ;
109+ public bool ShortcutHitBossPrevEnable ;
110+ public int ShortcutHitBossPrevKeyCode ;
111+ public bool ShortcutHitWayPrevEnable ;
112+ public int ShortcutHitWayPrevKeyCode ;
113+ public bool ShortcutBossHitUndoPrevEnable ;
114+ public int ShortcutBossHitUndoPrevKeyCode ;
115+ public bool ShortcutWayHitUndoPrevEnable ;
116+ public int ShortcutWayHitUndoPrevKeyCode ;
117+ #endregion
106118 public string Inputfile ;
107119 public string OutputFile ;
108120 public bool ShowAttemptsCounter ;
@@ -171,7 +183,6 @@ private bool LoadHotKeySettings(Shortcuts.SC_Type Type, int KeyCode, bool Enable
171183 return true ;
172184 }
173185
174- /// <summary>
175186 /// Loads user data from XML
176187 /// </summary>
177188 private void LoadSettings ( )
@@ -334,6 +345,22 @@ private void LoadSettings()
334345 _settings . StyleSubscriptPB = _settings . StyleSuperscriptPB ;
335346 //_settings.ColWidths added but no default is needed
336347 }
348+ if ( _settings . Version == 9 ) // Coming from version 1.21
349+ {
350+ _settings . Version = 10 ;
351+ #region AutoSplitter
352+ _settings . ShortcutPracticeEnable = false ;
353+ _settings . ShortcutPracticeKeyCode = 0 ;
354+ _settings . ShortcutHitBossPrevEnable = false ;
355+ _settings . ShortcutHitBossPrevKeyCode = 0 ;
356+ _settings . ShortcutHitWayPrevEnable = false ;
357+ _settings . ShortcutHitWayPrevKeyCode = 0 ;
358+ _settings . ShortcutBossHitUndoPrevEnable = false ;
359+ _settings . ShortcutBossHitUndoPrevKeyCode = 0 ;
360+ _settings . ShortcutWayHitUndoPrevEnable = false ;
361+ _settings . ShortcutWayHitUndoPrevKeyCode = 0 ;
362+ #endregion
363+ }
337364
338365 // Check for updates..
339366 if ( _settings . CheckUpdatesOnStartup )
@@ -400,6 +427,23 @@ private void LoadSettings()
400427 MessageBox . Show ( "Not all enabled hot keys could be registered successfully!" , "Error setting up hot keys!" ) ;
401428 }
402429
430+ #region AutoSplitter
431+ /// <summary>
432+ /// Load AutoSplitter HotKeys from XML
433+ /// </summary>
434+ public void LoadAutoSplitterHotKeys ( )
435+ {
436+ bool isKeyInvalid = false ;
437+ if ( ! LoadHotKeySettings ( Shortcuts . SC_Type . SC_Type_Practice , _settings . ShortcutPracticeKeyCode , _settings . ShortcutPracticeEnable ) ) isKeyInvalid = true ;
438+ if ( ! LoadHotKeySettings ( Shortcuts . SC_Type . SC_Type_HitBossPrev , _settings . ShortcutHitBossPrevKeyCode , _settings . ShortcutHitBossPrevEnable ) ) isKeyInvalid = true ;
439+ if ( ! LoadHotKeySettings ( Shortcuts . SC_Type . SC_Type_HitWayPrev , _settings . ShortcutHitWayPrevKeyCode , _settings . ShortcutHitWayPrevEnable ) ) isKeyInvalid = true ;
440+ if ( ! LoadHotKeySettings ( Shortcuts . SC_Type . SC_Type_BossHitUndoPrev , _settings . ShortcutBossHitUndoPrevKeyCode , _settings . ShortcutBossHitUndoPrevEnable ) ) isKeyInvalid = true ;
441+ if ( ! LoadHotKeySettings ( Shortcuts . SC_Type . SC_Type_WayHitUndoPrev , _settings . ShortcutWayHitUndoPrevKeyCode , _settings . ShortcutWayHitUndoPrevEnable ) ) isKeyInvalid = true ;
442+ if ( isKeyInvalid )
443+ MessageBox . Show ( "Error setting up hot keys of AutoSplitterCore!" ) ;
444+ }
445+ #endregion
446+
403447 /// <summary>
404448 /// Stores user data in XML
405449 /// </summary>
@@ -460,6 +504,39 @@ private void SaveSettings()
460504 key = sc . Key_Get ( Shortcuts . SC_Type . SC_Type_TimerStop ) ;
461505 _settings . ShortcutTimerStopEnable = key . used ;
462506 _settings . ShortcutTimerStopKeyCode = ( int ) key . key . KeyData ;
507+ #region AutoSplitter
508+ if ( AutoSplitterLoaded )
509+ {
510+ key = sc . Key_Get ( Shortcuts . SC_Type . SC_Type_Practice ) ;
511+ _settings . ShortcutPracticeEnable = key . used ;
512+ _settings . ShortcutPracticeKeyCode = ( int ) key . key . KeyData ;
513+ key = sc . Key_Get ( Shortcuts . SC_Type . SC_Type_HitBossPrev ) ;
514+ _settings . ShortcutHitBossPrevEnable = key . used ;
515+ _settings . ShortcutHitBossPrevKeyCode = ( int ) key . key . KeyData ;
516+ key = sc . Key_Get ( Shortcuts . SC_Type . SC_Type_HitWayPrev ) ;
517+ _settings . ShortcutHitWayPrevEnable = key . used ;
518+ _settings . ShortcutHitWayPrevKeyCode = ( int ) key . key . KeyData ;
519+ key = sc . Key_Get ( Shortcuts . SC_Type . SC_Type_BossHitUndoPrev ) ;
520+ _settings . ShortcutBossHitUndoPrevEnable = key . used ;
521+ _settings . ShortcutBossHitUndoPrevKeyCode = ( int ) key . key . KeyData ;
522+ key = sc . Key_Get ( Shortcuts . SC_Type . SC_Type_WayHitUndoPrev ) ;
523+ _settings . ShortcutWayHitUndoPrevEnable = key . used ;
524+ _settings . ShortcutWayHitUndoPrevKeyCode = ( int ) key . key . KeyData ;
525+ }
526+ else
527+ {
528+ _settings . ShortcutPracticeEnable = false ;
529+ _settings . ShortcutPracticeKeyCode = 0 ;
530+ _settings . ShortcutHitBossPrevEnable = false ;
531+ _settings . ShortcutHitBossPrevKeyCode = 0 ;
532+ _settings . ShortcutHitWayPrevEnable = false ;
533+ _settings . ShortcutHitWayPrevKeyCode = 0 ;
534+ _settings . ShortcutBossHitUndoPrevEnable = false ;
535+ _settings . ShortcutBossHitUndoPrevKeyCode = 0 ;
536+ _settings . ShortcutWayHitUndoPrevEnable = false ;
537+ _settings . ShortcutWayHitUndoPrevKeyCode = 0 ;
538+ }
539+ #endregion
463540
464541 // Store customizing..
465542 int TotalSplits , TotalActiveSplit , SuccessionHits , SuccessionHitsWay , SuccessionHitsPB ;
0 commit comments