Skip to content

Commit

Permalink
Search will now select games at bottom of list too.
Browse files Browse the repository at this point in the history
Added hidden shortcut CTRL+P which will turn on a property that copies the packagename of selected games to the clipboard.
  • Loading branch information
harryeffinpotter committed Jul 10, 2021
1 parent 9ccf781 commit 5e235c5
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 8 deletions.
3 changes: 3 additions & 0 deletions App.config
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
<setting name="CurrentGamename" serializeAs="String">
<value />
</setting>
<setting name="PackageNameToCB" serializeAs="String">
<value>False</value>
</setting>
</AndroidSideloader.Properties.Settings>
<AndroidADB.Sideloader.Properties.Settings>
<setting name="checkForUpdates" serializeAs="String">
Expand Down
35 changes: 29 additions & 6 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,13 @@ private async void restorebutton_Click(object sender, EventArgs e)
Thread t1 = new Thread(() =>
{
if (path.Contains("data"))
output += ADB.RunAdbCommandToString($"push \"{path}\" /sdcard/Android/");
else
output += ADB.RunAdbCommandToString($"push \"{path}\" /sdcard/Android/data/");
{
output += ADB.RunAdbCommandToString($"push \"{path}\" /sdcard/Android/");
}
else
{
output += ADB.RunAdbCommandToString($"push \"{path}\" /sdcard/Android/data/");
}
});
t1.IsBackground = true;
t1.Start();
Expand Down Expand Up @@ -1555,7 +1559,21 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
label4.Visible = true;
searchTextBox.Focus();
}
return base.ProcessCmdKey(ref msg, keyData);
if (keyData == (Keys.Control | Keys.P))
{
DialogResult dialogResult = MessageBox.Show("Do you wish to copy Package Name of games selected from list to clipboard?", "Copy package to clipboard?", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
Properties.Settings.Default.PackageNameToCB = true;
Properties.Settings.Default.Save();
}
if (dialogResult == DialogResult.No)
{
Properties.Settings.Default.PackageNameToCB = false;
Properties.Settings.Default.Save();
}
}
return base.ProcessCmdKey(ref msg, keyData);
}
private void searchTextBox_TextChanged(object sender, EventArgs e)
{
Expand All @@ -1567,13 +1585,15 @@ private void searchTextBox_TextChanged(object sender, EventArgs e)
ListViewItem foundItem = gamesListView.FindItemWithText(searchTextBox.Text, true, 0, true);
if (foundItem != null)
{
foundItem.Selected = true;
gamesListView.TopItem = foundItem;
if (foundItem == gamesListView.TopItem)
{
gamesListView.TopItem.Selected = true;

}
else
gamesListView.SelectedItems.Clear();
foundItem.Selected = true;

if (searchTextBox.Text.Length == 0)
gamesListView.SelectedItems.Clear();
Expand All @@ -1590,15 +1610,18 @@ private void searchTextBox_TextChanged(object sender, EventArgs e)

public void gamesListView_SelectedIndexChanged(object sender, EventArgs e)
{

if (gamesListView.SelectedItems.Count < 1)
return;
string CurrentPackageName = gamesListView.SelectedItems[gamesListView.SelectedItems.Count - 1].SubItems[SideloaderRCLONE.PackageNameIndex].Text;
string CurrentReleaseName = gamesListView.SelectedItems[gamesListView.SelectedItems.Count - 1].SubItems[SideloaderRCLONE.ReleaseNameIndex].Text;

taa = CurrentPackageName;
if(Properties.Settings.Default.PackageNameToCB)
Clipboard.SetText(CurrentPackageName);

string ImagePath = $"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.jpg";
string NotePath = $"{SideloaderRCLONE.NotesFolder}\\{CurrentReleaseName}.txt";

if (gamesPictureBox.BackgroundImage != null)
gamesPictureBox.BackgroundImage.Dispose();
if (File.Exists(ImagePath))
Expand Down
12 changes: 12 additions & 0 deletions Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,8 @@
<Setting Name="CurrentGamename" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="PackageNameToCB" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
2 changes: 1 addition & 1 deletion Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Updater
public static string Repostory { get; set; }
private static string RawGitHubUrl;
private static string GitHubUrl;
static readonly public string LocalVersion = "2.1.3";
static readonly public string LocalVersion = "2.1.3.1";
public static string currentVersion = string.Empty;
public static string changelog = string.Empty;

Expand Down
40 changes: 40 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

2.1.3.1

= Fixed issue where if using Quick Search and game was near bottom of list it wouldn't be selected.
+ Added hidden CTRL+P shortcut that copies the packagename of selected game to clipboard (for ease of finding OBB/Save folders or adding images for games).

2.1.3
+ Added Quicksearch
+ Added shortcut (CTRL+F) to open Quicksearch
+ Crashlog window can now open folder directory with crashlog if user selects NO.
+ Get APK from device will now open folder where APK is extracted automatically after extraction.
+ Added timestamps to Dialogbox
+ Added pictures for all current titles.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEKjgtlwMyrpVu4TGfx/Rql1VoczcFAmDp024ACgkQx/Rql1Vo
czcYvA/9EqVDtGRprPp2q/K+NPTPmMPmtsoiRNU/LEDmkwiEOCcRoPNwnLbRFz7S
uoM7Trh05aquLgadTVQmoPLZriJPYwUUT5KBJBso1UT5fVyJ5bkfh6+MBQqxOx2j
YDyqFHdPVQL6QqMQig/XEoyJIWaqHPD60DR0I63E5GOK88cbxPBD94KEQDNhXvcO
mcJXwr9TmyEqOT5IgsoIfOwMQotB+MnrMO7bSFitpl8sAcxSMpoURz/KOAdR8+f8
K+OwUTNzuI01C+WRNa9xOhxSp7rRhYoPoNZgxR1/3NOMtNeSU4dEPOk7n/hpEnDS
MM8DtXIZJ0o26Oo+uL60a61zxUZ1P1w8ks/IGEG3nzqc5b1Fh0LilgBzUtwh1eEs
g9LcXKALwStJbfYFTzpjhKDQfUlGFRZUSE52BFCcZ4MlgIjbR5buVF4l+QfnR6BW
PGW50NoTsA/U+Yqxg5xRXRkyKc9+wBFJj3r4dISNJj8psqzbtKgvodjJbMqKmJjL
ZE0lWp2bx/DP19IZjn5FVRzBSqYfBmilyLRx53syNmpDQQ1l2v1YdgXLxcbeL4JO
f2nfjyMTM2BrEztpevNb2s4oKm5zYjUCNxmJy1PUCt0RBMNCBKPVRa9KEE/se5UU
ZDbqfFJx1oqL1vcLH9CNTIhiA2Ar2SJEtBzB0GutoYkIdGo8dJY=
=dYs/
-----END PGP SIGNATURE-----









-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.3
2.1.3.1

0 comments on commit 5e235c5

Please sign in to comment.