@@ -51,21 +51,26 @@ public class CheatRow
51
51
public string ProcessName ;
52
52
public string ProcessContentid ;
53
53
public int ProcessPid ;
54
+
55
+ bool KeyMain ;
56
+ Keys KeyPerformOpen ;
57
+ Keys KeyPerformSave ;
58
+ Keys KeyOpenNewQuery ;
59
+ Keys KeyOpenHexView ;
60
+ Keys KeyOpenSettings ;
61
+ Keys KeyPerformAdd ;
62
+ Keys KeyPerformRefreshCheat ;
63
+ Keys KeyCollapseExpandAll ;
64
+ Keys KeySetLockEnable ;
65
+ Keys KeySetAutoRefresh ;
54
66
public Main ( )
55
67
{
56
68
Thread . CurrentThread . CurrentCulture = CultureInfo . InvariantCulture ; //Avoid the case where CurrentCulture.NumberFormatInfo.NumberDecimalSeparator is not "."
57
69
if ( ( Properties . Settings . Default . PS4IP . Value ?? "" ) == "" ) Properties . Settings . Default . Upgrade ( ) ; //Need to get the settings again when the AssemblyVersion is changed
58
70
InitializeComponent ( ) ;
59
71
ParseLanguageJson ( ) ;
60
72
ApplyUI ( ) ;
61
- ToolStripLockEnable . Checked = Properties . Settings . Default . CheatLock . Value ;
62
- ToolStripAutoRefresh . Checked = Properties . Settings . Default . CheatAutoRefresh . Value ;
63
- CheatAutoRefreshShowStatus = Properties . Settings . Default . CheatAutoRefreshShowStatus . Value ;
64
- AutoRefreshTimer . Interval = ( int ) Properties . Settings . Default . CheatAutoRefreshTimerInterval . Value ;
65
- VerifySectionWhenLock = Properties . Settings . Default . VerifySectionWhenLock . Value ;
66
- VerifySectionWhenRefresh = Properties . Settings . Default . VerifySectionWhenRefresh . Value ;
67
- CheatGridGroupRefreshThreshold = Properties . Settings . Default . CheatGridGroupRefreshThreshold . Value ;
68
- CheatGridView . GroupByEnabled = Properties . Settings . Default . CheatGridViewGroupByEnabled . Value ;
73
+
69
74
70
75
Text += " " + Application . ProductVersion ; //Assembly.GetExecutingAssembly().GetName().Version.ToString(); // Assembly.GetEntryAssembly().GetName().Version.ToString();
71
76
sectionTool = new SectionTool ( this ) ;
@@ -76,41 +81,31 @@ public Main()
76
81
77
82
protected override bool ProcessCmdKey ( ref Message msg , Keys keyData )
78
83
{
79
- switch ( keyData )
80
- {
81
- case Keys . Control | Keys . O :
82
- ToolStripOpen . PerformClick ( ) ;
83
- break ;
84
- case Keys . Control | Keys . S :
85
- ToolStripSave . PerformClick ( ) ;
86
- break ;
87
- case Keys . Control | Keys . Q :
88
- ToolStripNewQuery . PerformClick ( ) ;
89
- break ;
90
- case Keys . Control | Keys . A :
91
- ToolStripAdd . PerformClick ( ) ;
92
- break ;
93
- case Keys . Control | Keys . H :
94
- ToolStripHexView . PerformClick ( ) ;
95
- break ;
96
- case Keys . Control | Keys . R :
97
- ToolStripRefreshCheat . PerformClick ( ) ;
98
- break ;
99
- case Keys . Alt | Keys . E :
100
- CheatGridView . CollapseExpandAll ( ) ;
101
- break ;
102
- case Keys . Alt | Keys . L :
103
- ToolStripLockEnable . PerformClick ( ) ;
104
- break ;
105
- case Keys . Alt | Keys . R :
106
- ToolStripAutoRefresh . PerformClick ( ) ;
107
- break ;
108
- case Keys . Alt | Keys . S :
109
- ToolStripSettings . PerformClick ( ) ;
110
- break ;
111
- default :
112
- return base . ProcessCmdKey ( ref msg , keyData ) ;
113
- }
84
+ if ( ! KeyMain ) return base . ProcessCmdKey ( ref msg , keyData ) ;
85
+
86
+ if ( keyData == KeyPerformOpen )
87
+ ToolStripOpen . PerformClick ( ) ;
88
+ else if ( keyData == KeyPerformSave )
89
+ ToolStripSave . PerformClick ( ) ;
90
+ else if ( keyData == KeyOpenNewQuery )
91
+ ToolStripNewQuery . PerformClick ( ) ;
92
+ else if ( keyData == KeyOpenHexView )
93
+ ToolStripHexView . PerformClick ( ) ;
94
+ else if ( keyData == KeyOpenSettings )
95
+ ToolStripSettings . PerformClick ( ) ;
96
+ else if ( keyData == KeyPerformAdd )
97
+ ToolStripAdd . PerformClick ( ) ;
98
+ else if ( keyData == KeyPerformRefreshCheat )
99
+ ToolStripRefreshCheat . PerformClick ( ) ;
100
+ else if ( keyData == KeyCollapseExpandAll )
101
+ CheatGridView . CollapseExpandAll ( ) ;
102
+ else if ( keyData == KeySetLockEnable )
103
+ ToolStripLockEnable . PerformClick ( ) ;
104
+ else if ( keyData == KeySetAutoRefresh )
105
+ ToolStripAutoRefresh . PerformClick ( ) ;
106
+ else
107
+ return base . ProcessCmdKey ( ref msg , keyData ) ;
108
+
114
109
return true ;
115
110
}
116
111
@@ -177,6 +172,27 @@ public void ApplyUI()
177
172
}
178
173
UIFont = Properties . Settings . Default . UIFont . Value ;
179
174
Font = new Font ( UIFont , Font . Size ) ;
175
+
176
+ ToolStripLockEnable . Checked = Properties . Settings . Default . CheatLock . Value ;
177
+ ToolStripAutoRefresh . Checked = Properties . Settings . Default . CheatAutoRefresh . Value ;
178
+ CheatAutoRefreshShowStatus = Properties . Settings . Default . CheatAutoRefreshShowStatus . Value ;
179
+ AutoRefreshTimer . Interval = ( int ) Properties . Settings . Default . CheatAutoRefreshTimerInterval . Value ;
180
+ VerifySectionWhenLock = Properties . Settings . Default . VerifySectionWhenLock . Value ;
181
+ VerifySectionWhenRefresh = Properties . Settings . Default . VerifySectionWhenRefresh . Value ;
182
+ CheatGridGroupRefreshThreshold = Properties . Settings . Default . CheatGridGroupRefreshThreshold . Value ;
183
+ CheatGridView . GroupByEnabled = Properties . Settings . Default . CheatGridViewGroupByEnabled . Value ;
184
+
185
+ KeyMain = Properties . Settings . Default . KeyMain . Value ;
186
+ KeyPerformOpen = Properties . Settings . Default . KeyMainPerformOpen . Value ;
187
+ KeyPerformSave = Properties . Settings . Default . KeyMainPerformSave . Value ;
188
+ KeyOpenNewQuery = Properties . Settings . Default . KeyMainOpenNewQuery . Value ;
189
+ KeyOpenHexView = Properties . Settings . Default . KeyMainOpenHexView . Value ;
190
+ KeyOpenSettings = Properties . Settings . Default . KeyMainOpenSettings . Value ;
191
+ KeyPerformAdd = Properties . Settings . Default . KeyMainPerformAdd . Value ;
192
+ KeyPerformRefreshCheat = Properties . Settings . Default . KeyMainPerformRefreshCheat . Value ;
193
+ KeyCollapseExpandAll = Properties . Settings . Default . KeyMainCheatGridViewCollapseExpandAll . Value ;
194
+ KeySetLockEnable = Properties . Settings . Default . KeyMainSetLockEnable . Value ;
195
+ KeySetAutoRefresh = Properties . Settings . Default . KeyMainSetAutoRefresh . Value ;
180
196
}
181
197
catch ( Exception ex )
182
198
{
0 commit comments