diff --git a/PS4CheaterNeo/HexEditor.cs b/PS4CheaterNeo/HexEditor.cs index eafbac9..169c2d4 100644 --- a/PS4CheaterNeo/HexEditor.cs +++ b/PS4CheaterNeo/HexEditor.cs @@ -104,6 +104,46 @@ public HexEditor(Main mainForm, SectionTool sectionTool, Section section, int ba InitPageData(section, baseAddr); } + protected override bool ProcessCmdKey(ref Message msg, Keys keyData) + { + switch (keyData) + { + case Keys.Control | Keys.P: + PreviousBtn.PerformClick(); + break; + case Keys.Control | Keys.N: + NextBtn.PerformClick(); + break; + case Keys.Control | Keys.R: + RefreshBtn.PerformClick(); + break; + case Keys.Control | Keys.S: + CommitBtn.PerformClick(); + break; + case Keys.Control | Keys.A: + AddToCheatGridBtn.PerformClick(); + break; + case Keys.F3: + FindBtn.PerformClick(); + break; + case Keys.Control | Keys.Left: + SplitContainer1.SplitterPanelCollapseExpand(true); + break; + case Keys.Control | Keys.Right: + SplitContainer1.SplitterPanelCollapseExpand(false); + break; + case Keys.Control | Keys.Up: + SplitContainer2.SplitterPanelCollapseExpand(true); + break; + case Keys.Control | Keys.Down: + SplitContainer2.SplitterPanelCollapseExpand(false); + break; + default: + return base.ProcessCmdKey(ref msg, keyData); + } + return true; + } + /// /// Initialize the contents of the PageBox menu based on the specified Section and /// select the corresponding PageBox menu based on the relative address (baseAddr). diff --git a/PS4CheaterNeo/Main.cs b/PS4CheaterNeo/Main.cs index 760ea19..4cb0bc0 100644 --- a/PS4CheaterNeo/Main.cs +++ b/PS4CheaterNeo/Main.cs @@ -74,6 +74,46 @@ public Main() CheatGridView.RowCount = 0; } + protected override bool ProcessCmdKey(ref Message msg, Keys keyData) + { + switch (keyData) + { + case Keys.Control | Keys.O: + ToolStripOpen.PerformClick(); + break; + case Keys.Control | Keys.S: + ToolStripSave.PerformClick(); + break; + case Keys.Control | Keys.Q: + ToolStripNewQuery.PerformClick(); + break; + case Keys.Control | Keys.A: + ToolStripAdd.PerformClick(); + break; + case Keys.Control | Keys.H: + ToolStripHexView.PerformClick(); + break; + case Keys.Control | Keys.R: + ToolStripRefreshCheat.PerformClick(); + break; + case Keys.Alt | Keys.E: + CheatGridView.CollapseExpandAll(); + break; + case Keys.Alt | Keys.L: + ToolStripLockEnable.PerformClick(); + break; + case Keys.Alt | Keys.R: + ToolStripAutoRefresh.PerformClick(); + break; + case Keys.Alt | Keys.S: + ToolStripSettings.PerformClick(); + break; + default: + return base.ProcessCmdKey(ref msg, keyData); + } + return true; + } + public void ParseLanguageJson() { string codes = Properties.Settings.Default.UILanguage.Value.ToString(); diff --git a/PS4CheaterNeo/Properties/AssemblyInfo.cs b/PS4CheaterNeo/Properties/AssemblyInfo.cs index 3c9e4a9..c90b3f6 100644 --- a/PS4CheaterNeo/Properties/AssemblyInfo.cs +++ b/PS4CheaterNeo/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.2.8")] -[assembly: AssemblyFileVersion("1.0.2.8")] +[assembly: AssemblyVersion("1.0.2.9")] +[assembly: AssemblyFileVersion("1.0.2.9")] diff --git a/PS4CheaterNeo/Query.cs b/PS4CheaterNeo/Query.cs index 7c04c2b..550abeb 100644 --- a/PS4CheaterNeo/Query.cs +++ b/PS4CheaterNeo/Query.cs @@ -76,6 +76,52 @@ public Query(Main mainForm, ComparerTool comparerTool = null, int bitsDictDictsI this.bitsDictDicts = new List>(bitsDictDicts); } + protected override bool ProcessCmdKey(ref Message msg, Keys keyData) + { + switch (keyData) + { + case Keys.Control | Keys.G: + GetProcessesBtn.PerformClick(); + break; + case Keys.Control | Keys.P: + PauseResume(); + break; + case Keys.Alt | Keys.S: + ScanBtn.PerformClick(); + break; + case Keys.Alt | Keys.U: + UndoBtn.PerformClick(); + break; + case Keys.Alt | Keys.R: + RedoBtn.PerformClick(); + break; + case Keys.Control | Keys.R: + RefreshBtn.PerformClick(); + break; + case Keys.Control | Keys.N: + NewBtn.PerformClick(); + break; + case Keys.Alt | Keys.C: + CloneScanBtn.PerformClick(); + break; + case Keys.Control | Keys.Left: + SplitContainer1.SplitterPanelCollapseExpand(true); + break; + case Keys.Control | Keys.Right: + SplitContainer1.SplitterPanelCollapseExpand(false); + break; + case Keys.Control | Keys.Up: + SplitContainer2.SplitterPanelCollapseExpand(true); + break; + case Keys.Control | Keys.Down: + SplitContainer2.SplitterPanelCollapseExpand(false); + break; + default: + return base.ProcessCmdKey(ref msg, keyData); + } + return true; + } + public void ApplyUI(LanguageJson langJson) { try @@ -1578,16 +1624,13 @@ private void CompareTypeBox_SelectedIndexChanged(object sender, EventArgs e) } } - private void ResumeBtn_Click(object sender, EventArgs e) - { - processStatus = ProcessStatus.Resume; - ComboItem process = (ComboItem)ProcessesBox.SelectedItem; - PS4Tool.AttachDebugger((int)process.Value, (string)process.Text, processStatus); - } + private void ResumeBtn_Click(object sender, EventArgs e) => PauseResume(ProcessStatus.Resume); + + private void PauseBtn_Click(object sender, EventArgs e) => PauseResume(ProcessStatus.Pause); - private void PauseBtn_Click(object sender, EventArgs e) + private void PauseResume(ProcessStatus? newStatus = null) { - processStatus = ProcessStatus.Pause; + processStatus = newStatus != null ? (ProcessStatus)newStatus : (processStatus == ProcessStatus.Pause ? ProcessStatus.Resume : ProcessStatus.Pause); ComboItem process = (ComboItem)ProcessesBox.SelectedItem; PS4Tool.AttachDebugger((int)process.Value, (string)process.Text, processStatus); } diff --git a/PS4CheaterNeo/common/CollapsibleSplitContainer.cs b/PS4CheaterNeo/common/CollapsibleSplitContainer.cs index af88ccb..fadcb64 100644 --- a/PS4CheaterNeo/common/CollapsibleSplitContainer.cs +++ b/PS4CheaterNeo/common/CollapsibleSplitContainer.cs @@ -32,8 +32,8 @@ public class CollapsibleSplitContainer : SplitContainer, ISupportInitialize private ButtonPosition splitterButtonPosition; private CollapseDistance splitterCollapseDistance; - private Button splitterButton1; - private Button splitterButton2; + private Button SplitterButton1; + private Button SplitterButton2; private readonly string TableFillLeft = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAuElEQVR4XqXTsQ3DIBAF0Is7iyYV9F4gK1hikWQEOjwBdIyQbJAsgJQVsgA9VGksSgdXJxFFoMs1V6D/kPjisG0btCbnfCxrHsfxUZ8NneHnuq73Ap27gDrsnDtpraEg1xoZesLee0gpQYwRdQTaYcYYGGNgmqZLeYdbBZDCCJDDCNDDCNAHgXLLu6xZKfWSUu6VwbIsEELA6n4BRAQBIoIAGUGgjXDOQQjR30KNWGv3ar8q/fs7fwCWA6ahjYFLQgAAAABJRU5ErkJggg=="; #endregion @@ -46,22 +46,22 @@ public CollapsibleSplitContainer() MethodInfo objMethodInfo = typeof(Control).GetMethod("SetStyle", BindingFlags.NonPublic | BindingFlags.Instance); objMethodInfo.Invoke(Panel1, objArgs); objMethodInfo.Invoke(Panel2, objArgs); - splitterButton1 = new Button(); - splitterButton2 = new Button(); - splitterButton1.Size = new Size(16, 16); - splitterButton2.Size = new Size(16, 16); - splitterButton1.Margin = new Padding(0); - splitterButton2.Margin = new Padding(0); - splitterButton1.BackgroundImageLayout = ImageLayout.Zoom; - splitterButton2.BackgroundImageLayout = ImageLayout.Zoom; - splitterButton1.BackColor = Color.Transparent; - splitterButton2.BackColor = Color.Transparent; - splitterButton1.FlatStyle = FlatStyle.Flat; - splitterButton2.FlatStyle = FlatStyle.Flat; - splitterButton1.FlatAppearance.BorderSize = 0; - splitterButton2.FlatAppearance.BorderSize = 0; - splitterButton1.Click += SplitterButton1_Click; - splitterButton2.Click += SplitterButton2_Click; + SplitterButton1 = new Button(); + SplitterButton2 = new Button(); + SplitterButton1.Size = new Size(16, 16); + SplitterButton2.Size = new Size(16, 16); + SplitterButton1.Margin = new Padding(0); + SplitterButton2.Margin = new Padding(0); + SplitterButton1.BackgroundImageLayout = ImageLayout.Zoom; + SplitterButton2.BackgroundImageLayout = ImageLayout.Zoom; + SplitterButton1.BackColor = Color.Transparent; + SplitterButton2.BackColor = Color.Transparent; + SplitterButton1.FlatStyle = FlatStyle.Flat; + SplitterButton2.FlatStyle = FlatStyle.Flat; + SplitterButton1.FlatAppearance.BorderSize = 0; + SplitterButton2.FlatAppearance.BorderSize = 0; + SplitterButton1.Click += SplitterButton1_Click; + SplitterButton2.Click += SplitterButton2_Click; SplitterButtonSize = 16; SplitterButtonStyle = ButtonStyle.Image; @@ -98,7 +98,7 @@ public Bitmap SplitterButtonBitmap } } - [Category("Collapsible"), Description("Where the collapse buttons are located on the splitter")] + [Category("Collapsible"), Description("Determines whether to place collapse buttons on both sides of the splitter or on one side of Panel1 and Panel2")] [DefaultValue(ButtonLocation.Panel)] public ButtonLocation SplitterButtonLocation { @@ -108,31 +108,31 @@ public ButtonLocation SplitterButtonLocation splitterButtonLocation = value; if (splitterCollapseDistance == CollapseDistance.Collapsed || splitterButtonLocation == ButtonLocation.Panel) { - if (!Panel1.Controls.Contains(splitterButton1)) Panel1.Controls.Add(splitterButton1); - if (!Panel2.Controls.Contains(splitterButton2)) Panel2.Controls.Add(splitterButton2); - if (Panel2.Controls.Contains(splitterButton1)) Panel2.Controls.Remove(splitterButton1); - if (Panel1.Controls.Contains(splitterButton2)) Panel1.Controls.Remove(splitterButton2); + if (!Panel1.Controls.Contains(SplitterButton1)) Panel1.Controls.Add(SplitterButton1); + if (!Panel2.Controls.Contains(SplitterButton2)) Panel2.Controls.Add(SplitterButton2); + if (Panel2.Controls.Contains(SplitterButton1)) Panel2.Controls.Remove(SplitterButton1); + if (Panel1.Controls.Contains(SplitterButton2)) Panel1.Controls.Remove(SplitterButton2); } else if (splitterButtonLocation == ButtonLocation.Panel1) { - if (!Panel1.Controls.Contains(splitterButton1)) Panel1.Controls.Add(splitterButton1); - if (!Panel1.Controls.Contains(splitterButton2)) Panel1.Controls.Add(splitterButton2); - if (Panel2.Controls.Contains(splitterButton1)) Panel2.Controls.Remove(splitterButton1); - if (Panel2.Controls.Contains(splitterButton2)) Panel2.Controls.Remove(splitterButton2); + if (!Panel1.Controls.Contains(SplitterButton1)) Panel1.Controls.Add(SplitterButton1); + if (!Panel1.Controls.Contains(SplitterButton2)) Panel1.Controls.Add(SplitterButton2); + if (Panel2.Controls.Contains(SplitterButton1)) Panel2.Controls.Remove(SplitterButton1); + if (Panel2.Controls.Contains(SplitterButton2)) Panel2.Controls.Remove(SplitterButton2); } else if (splitterButtonLocation == ButtonLocation.Panel2) { - if (!Panel2.Controls.Contains(splitterButton1)) Panel2.Controls.Add(splitterButton1); - if (!Panel2.Controls.Contains(splitterButton2)) Panel2.Controls.Add(splitterButton2); - if (Panel1.Controls.Contains(splitterButton1)) Panel1.Controls.Remove(splitterButton1); - if (Panel1.Controls.Contains(splitterButton2)) Panel1.Controls.Remove(splitterButton2); + if (!Panel2.Controls.Contains(SplitterButton1)) Panel2.Controls.Add(SplitterButton1); + if (!Panel2.Controls.Contains(SplitterButton2)) Panel2.Controls.Add(SplitterButton2); + if (Panel1.Controls.Contains(SplitterButton1)) Panel1.Controls.Remove(SplitterButton1); + if (Panel1.Controls.Contains(SplitterButton2)) Panel1.Controls.Remove(SplitterButton2); } else { - Panel1.Controls.Remove(splitterButton1); - Panel1.Controls.Remove(splitterButton2); - Panel2.Controls.Remove(splitterButton1); - Panel2.Controls.Remove(splitterButton2); + Panel1.Controls.Remove(SplitterButton1); + Panel1.Controls.Remove(SplitterButton2); + Panel2.Controls.Remove(SplitterButton1); + Panel2.Controls.Remove(SplitterButton2); } Refresh(); UpdateSplitterButtonsPosition(); @@ -153,7 +153,7 @@ public ButtonPosition SplitterButtonPosition } } - [Category("Collapsible"), Description("The technique used to generate the splitter buttons")] + [Category("Collapsible"), Description("Determines the style of splitter buttons: Image - displayed on both sides of the panel; SingleImage - displayed on one side; None - not displayed.")] [DefaultValue(ButtonStyle.Image)] public ButtonStyle SplitterButtonStyle { @@ -164,13 +164,13 @@ public ButtonStyle SplitterButtonStyle splitterButtonStyle = value; if (splitterButtonStyle == ButtonStyle.None) { - splitterButton1.Hide(); - splitterButton2.Hide(); + SplitterButton1.Hide(); + SplitterButton2.Hide(); } else { - splitterButton1.Show(); - splitterButton2.Show(); + SplitterButton1.Show(); + SplitterButton2.Show(); } Refresh(); } @@ -185,16 +185,16 @@ public int SplitterButtonSize { if (splitterButtonSize == value) return; splitterButtonSize = value; - var size = splitterButton1.Size; + var size = SplitterButton1.Size; size.Width = SplitterButtonSize; size.Height = SplitterButtonSize; - splitterButton1.Size = size; - splitterButton2.Size = size; + SplitterButton1.Size = size; + SplitterButton2.Size = size; Refresh(); } } - [Category("Collapsible"), Description("How completely the affected panel collapses")] + [Category("Collapsible"), Description("Determines the style of the splitter after collapsing: MinSize - the panel collapses to the specified MinSize; Collapsed - One-sided panel completely collapsed")] [DefaultValue(CollapseDistance.MinSize)] public CollapseDistance SplitterCollapseDistance { @@ -239,7 +239,7 @@ public CollapseDistance SplitterCollapseDistance } } - [Category("Collapsible"), Description("Determines whether to collapse Panel2 when SplitterButtonStyle is SingleImage, otherwise Panel1 collapse")] + [Category("Collapsible"), Description("Determines whether to collapse Panel2; if not, Panel1 will collapse. This setting only takes effect when SplitterButtonStyle is SingleImage and the location of the splitter button is on either Panel1 or Panel2.")] [DefaultValue(true)] public bool SingleImageCollapsePanel2 { get; set; } = true; @@ -282,78 +282,67 @@ public CollapseDistance SplitterCollapseDistance #endregion #region General Event Handlers - private void SplitterButton1_Click(object sender, EventArgs e) + private void SplitterButton1_Click(object sender, EventArgs e) => SplitterPanelCollapseExpand(true); + + private void SplitterButton2_Click(object sender, EventArgs e) => SplitterPanelCollapseExpand(false); + + private bool clickSplitterButtonStaus = false; + + /// + /// Trigger the collapse or expand of the splitter panel. + /// When status parameter is true, Panel1 collapses; when status is false, Panel2 collapses. + /// If the status parameter is not provided, it will automatically determine whether to collapse or expand. + /// + public void SplitterPanelCollapseExpand(bool? status = null) { if (splitterButtonStyle == ButtonStyle.None) return; + if (status == null) + { + status = clickSplitterButtonStaus; + clickSplitterButtonStaus = !clickSplitterButtonStaus; + } + object sender = (bool)status ? SplitterButton1 : SplitterButton2; + if (splitterCollapseDistance == CollapseDistance.Collapsed) { // Hide the panel associated with the clicked button if (Panel1Collapsed && !Panel2Collapsed) Panel2Collapsed = !Panel2Collapsed; else if (!Panel1Collapsed && Panel2Collapsed) Panel1Collapsed = !Panel1Collapsed; - else Panel1Collapsed = true; + else if (sender == SplitterButton1) Panel1Collapsed = true; + else if (sender == SplitterButton2) Panel2Collapsed = true; } else if (splitterCollapseDistance == CollapseDistance.MinSize) { - // If the panel for the clicked button is already minimized, do nothing - // Otherwise, have the panel shrink to or return from the minimum size - if (Panel1Minimized) - { - if (splitterButtonStyle == ButtonStyle.SingleImage) splitterButton2.BringToFront(); - return; - } - else if (Panel2Minimized) // Panel 2 - { - SplitterDistance = splitterDistanceOriginal; - Panel2Minimized = false; - } - else // Panel 1 + if (!Panel1Minimized && !Panel2Minimized) { splitterDistanceOriginal = SplitterDistance; - SplitterDistance = Panel1MinSize; - Panel1Minimized = true; + if (sender == SplitterButton1) + { // Panel 1 + (SplitterDistance, Panel1Minimized) = (Panel1MinSize, true); + } + else if (sender == SplitterButton2) + { // Panel 2 + // When the splitter is vertical, set the location of the splitter to + // the splitcontainer control width minus the minimum size of panel 2. + // For horizontal, set it to height minus panel 2 minimum size + (SplitterDistance, Panel2Minimized) = (Orientation == Orientation.Vertical ? Width - Panel2MinSize : Height - Panel2MinSize, true); + } } - } - Refresh(); - } - - private void SplitterButton2_Click(object sender, EventArgs e) - { - if (splitterButtonStyle == ButtonStyle.None) return; - - if (splitterCollapseDistance == CollapseDistance.Collapsed) - { - // Hide the panel associated with the clicked button - if (!Panel1Collapsed && Panel2Collapsed) Panel1Collapsed = !Panel1Collapsed; - else if (Panel1Collapsed && !Panel2Collapsed) Panel2Collapsed = !Panel2Collapsed; - else Panel2Collapsed = true; - } - else if (splitterCollapseDistance == CollapseDistance.MinSize) - { // If the panel for the clicked button is already minimized, do nothing // Otherwise, have the panel shrink to or return from the minimum size - if (Panel2Minimized) + else if (Panel1Minimized && sender == SplitterButton2) + (SplitterDistance, Panel1Minimized) = (splitterDistanceOriginal, false); + else if (Panel2Minimized && sender == SplitterButton1) + (SplitterDistance, Panel2Minimized) = (splitterDistanceOriginal, false); + else { - if (splitterButtonStyle == ButtonStyle.SingleImage) splitterButton1.BringToFront(); + if (Panel1Minimized && sender == SplitterButton1 && splitterButtonStyle == ButtonStyle.SingleImage) + SplitterButton2.BringToFront(); + else if (Panel2Minimized && sender == SplitterButton2 && splitterButtonStyle == ButtonStyle.SingleImage) + SplitterButton1.BringToFront(); return; } - else if (Panel1Minimized) // Panel 1 - { - SplitterDistance = splitterDistanceOriginal; - Panel1Minimized = false; - } - else // Panel 2 - { - splitterDistanceOriginal = SplitterDistance; - - // When the splitter is vertical, set the location of the splitter to - // the splitcontainer control width minus the minimum size of panel 2. - // For horizontal, set it to height minus panel 2 minimum size - if (Orientation == Orientation.Vertical) SplitterDistance = Width - Panel2MinSize; - else SplitterDistance = Height - Panel2MinSize; - - Panel2Minimized = true; - } } Refresh(); } @@ -383,62 +372,65 @@ private void UpdateSplitterButtonsPosition() int position = GetButtonPosition(); if (Orientation == Orientation.Vertical) { - int width = splitterCollapseDistance == CollapseDistance.Collapsed ? 0 : (Panel1Collapsed ? Panel2.ClientRectangle.Right - splitterButton2.Width : Panel1.ClientRectangle.Right - splitterButton1.Width); + int width = splitterCollapseDistance == CollapseDistance.Collapsed ? 0 : (Panel1Collapsed ? Panel2.ClientRectangle.Right - SplitterButton2.Width : Panel1.ClientRectangle.Right - SplitterButton1.Width); if (splitterCollapseDistance == CollapseDistance.Collapsed || splitterButtonLocation == ButtonLocation.Panel) { - splitterButton1.Location = new Point(width, position); - splitterButton2.Location = new Point(0, position); + SplitterButton1.Location = new Point(width, position); + SplitterButton2.Location = new Point(0, position); } else if (SplitterButtonLocation == ButtonLocation.Panel1) { - splitterButton1.Location = new Point(width, position); - splitterButton2.Location = new Point(width, position + (splitterButtonStyle == ButtonStyle.SingleImage ? 0 : splitterButton1.Height)); + SplitterButton1.Location = new Point(width, position); + SplitterButton2.Location = new Point(width, position + (splitterButtonStyle == ButtonStyle.SingleImage ? 0 : SplitterButton1.Height)); } else if (SplitterButtonLocation == ButtonLocation.Panel2) { - splitterButton1.Location = new Point(0, position); - splitterButton2.Location = new Point(0, position + (splitterButtonStyle == ButtonStyle.SingleImage ? 0 : splitterButton1.Height)); + SplitterButton1.Location = new Point(0, position); + SplitterButton2.Location = new Point(0, position + (splitterButtonStyle == ButtonStyle.SingleImage ? 0 : SplitterButton1.Height)); } } else { - int height = splitterCollapseDistance == CollapseDistance.Collapsed ? 0 : (Panel1Collapsed ? Panel2.ClientRectangle.Bottom - splitterButton2.Height : Panel1.ClientRectangle.Bottom - splitterButton1.Height); + int height = splitterCollapseDistance == CollapseDistance.Collapsed ? 0 : (Panel1Collapsed ? Panel2.ClientRectangle.Bottom - SplitterButton2.Height : Panel1.ClientRectangle.Bottom - SplitterButton1.Height); if (splitterCollapseDistance == CollapseDistance.Collapsed || splitterButtonLocation == ButtonLocation.Panel) { - splitterButton1.Location = new Point(position, height); - splitterButton2.Location = new Point(position, 0); + SplitterButton1.Location = new Point(position, height); + SplitterButton2.Location = new Point(position, 0); } else if (SplitterButtonLocation == ButtonLocation.Panel1) { - splitterButton1.Location = new Point(position, height); - splitterButton2.Location = new Point(position + (splitterButtonStyle == ButtonStyle.SingleImage ? 0 : splitterButton1.Width), height); + SplitterButton1.Location = new Point(position, height); + SplitterButton2.Location = new Point(position + (splitterButtonStyle == ButtonStyle.SingleImage ? 0 : SplitterButton1.Width), height); } else if (SplitterButtonLocation == ButtonLocation.Panel2) { - splitterButton1.Location = new Point(position, 0); - splitterButton2.Location = new Point(position + (splitterButtonStyle == ButtonStyle.SingleImage ? 0 : splitterButton1.Width), 0); + SplitterButton1.Location = new Point(position, 0); + SplitterButton2.Location = new Point(position + (splitterButtonStyle == ButtonStyle.SingleImage ? 0 : SplitterButton1.Width), 0); } } if (splitterCollapseDistance == CollapseDistance.Collapsed || splitterButtonStyle == ButtonStyle.Image) { - splitterButton1.BringToFront(); - splitterButton2.BringToFront(); + SplitterButton1.BringToFront(); + SplitterButton2.BringToFront(); } else if (SplitterButtonStyle == ButtonStyle.SingleImage) { - if (SingleImageCollapsePanel2) - { - if (Panel2Minimized) splitterButton1.BringToFront(); - else splitterButton2.BringToFront(); - } - else - { - if (Panel1Minimized) splitterButton2.BringToFront(); - else splitterButton1.BringToFront(); - } + if (SingleImageCollapsePanel2) SplitterBtnBringToFront(!Panel2Minimized); + else SplitterBtnBringToFront(Panel1Minimized); + } + } + + private void SplitterBtnBringToFront(bool? Panel1Minimized = null) + { + if (Panel1Minimized == null) + { + SplitterButton1.BringToFront(); + SplitterButton2.BringToFront(); } + if ((bool)Panel1Minimized) SplitterButton2.BringToFront(); + else SplitterButton1.BringToFront(); } /// @@ -448,8 +440,8 @@ private void UpdateSplitterButtonsImage() { if (splitterButtonStyle == ButtonStyle.None) return; - splitterButton1.BackgroundImage = Orientation == Orientation.Vertical ? splitterButtonBitmap : bitmapUp; - splitterButton2.BackgroundImage = Orientation == Orientation.Vertical ? bitmapRight : bitmapDown; + SplitterButton1.BackgroundImage = Orientation == Orientation.Vertical ? splitterButtonBitmap : bitmapUp; + SplitterButton2.BackgroundImage = Orientation == Orientation.Vertical ? bitmapRight : bitmapDown; } #endregion @@ -467,14 +459,14 @@ private int GetButtonPosition() if (Orientation == Orientation.Vertical) { position = rect.Top; - if (splitterButtonPosition == ButtonPosition.Center) position = rect.Bottom / 2 - splitterButton1.Height / 2 - offset / 2; - else if (splitterButtonPosition == ButtonPosition.BottomRight) position = rect.Bottom - splitterButton1.Height - offset; + if (splitterButtonPosition == ButtonPosition.Center) position = rect.Bottom / 2 - SplitterButton1.Height / 2 - offset / 2; + else if (splitterButtonPosition == ButtonPosition.BottomRight) position = rect.Bottom - SplitterButton1.Height - offset; } else { position = rect.Left; - if (splitterButtonPosition == ButtonPosition.Center) position = rect.Right / 2 - splitterButton1.Width / 2 - offset / 2; - else if (splitterButtonPosition == ButtonPosition.BottomRight) position = rect.Right - splitterButton1.Width - offset; + if (splitterButtonPosition == ButtonPosition.Center) position = rect.Right / 2 - SplitterButton1.Width / 2 - offset / 2; + else if (splitterButtonPosition == ButtonPosition.BottomRight) position = rect.Right - SplitterButton1.Width - offset; } return position; } diff --git a/PS4CheaterNeo/lib/GroupGridView.dll b/PS4CheaterNeo/lib/GroupGridView.dll index 987ff67..de4de6e 100644 Binary files a/PS4CheaterNeo/lib/GroupGridView.dll and b/PS4CheaterNeo/lib/GroupGridView.dll differ diff --git a/README.md b/README.md index a920c8e..bfc69a1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ PS4CheaterNeo is a program to find game cheat codes, and it is based on [`ps4debug`](https://github.com/jogolden/ps4debug) and [`.Net Framework 4.8`](https://support.microsoft.com/en-us/topic/microsoft-net-framework-4-8-offline-installer-for-windows-9d23f658-3b97-68ab-d013-aa3c3e7495e0). -Currently in `version 1.0.2.8` +Currently in `version 1.0.2.9` ## Table of Contents @@ -40,6 +40,10 @@ Currently in `version 1.0.2.8` * [Pointer finder](#pointer-finder) * [Section](#section) + [Section ID](#section-id) + * [Hotkey](#hotkey) + + [main window hotkey](#main-window-hotkey) + + [query window hotkey](#query-window-hotkey) + + [HexEditor window hotkey](#hexeditor-window-hotkey) * [Option](#option) + [General](#general) + [Cheat](#cheat) @@ -526,6 +530,81 @@ AddrStart  Prot count   SIDv1     SID ``` +## Hotkey [🔼](#table-of-contents) + +- Currently, the hotkeys are hardcoded in the program...(1.0.2.9) + +### main window hotkey +- Control + O +Perform open file +- Control + S +Perform save file +- Control + Q +Open Query window +- Control + H +Open HexView window +- Alt + S +Open Settings window +- Control + A +Perform add address +- Control + R +Perform refresh cheat list +- Alt + E +Perform Collapse or ExpandAll in the CheatGridView, automatically determining the current status +- Alt + L +Set LockEnable to enable or disable, depending on the current button activation status +- Alt + R +Set AutoRefresh to enable or disable, depending on the current button activation status + +### query window hotkey +- Control + G +Perform get processes(retrieve all program lists again) +- Control + P +Perform pause or resume. If the current status is paused, execute resume; otherwise, do the opposite +- Alt + S +Perform the first or next scan +- Alt + U +Perform undo scan +- Alt + R +Perform redo scan +- Control + R +Perform refresh result list +- Control + N +Create a new scan, clearing the current scan results +- Alt + C +Clone the current scan results into a new Query window +- Control + Left: +Collapse the left Split panel +- Control + Right: +Expand the left Split panel +- Control + Up: +Collapse the upper right Split panel +- Control + Down: +Expand the upper right Split panel + +### HexEditor window hotkey +- Control + P +Go to Previous Page +- Control + N +Go to Next Page +- Control + R +Refresh HexBox +- Control + S +Write Modifications to PS4 +- Control + A +Add to Cheat Grid +- F3 +Perform Find, forward or backward depending on whether "Forward" is checked +- Control + Left: +Collapse the left Split panel +- Control + Right: +Expand the left Split panel +- Control + Up: +Collapse the upper right Split panel +- Control + Down: +Expand the upper right Split panel + + ## Option [🔼](#table-of-contents) - Added option window, you can adjust some program settings. (0.9.4.0)