Skip to content

Commit

Permalink
Fixed a bug with Removable Storage
Browse files Browse the repository at this point in the history
  • Loading branch information
RetroDriven committed Sep 24, 2022
1 parent 8695183 commit 96d383d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
8 changes: 4 additions & 4 deletions CoreSelector.Designer.cs

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

23 changes: 15 additions & 8 deletions CoreSelector.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Net;
using pannella.analoguepocket;
using System.Text.Json;
using System.Windows.Forms;

namespace Pocket_Updater
{
Expand All @@ -10,7 +11,7 @@ public partial class CoreSelector : Form

private SettingsManager _settingsManager;
private WebClient WebClient;
// private PocketCoreUpdater _updater;
// private PocketCoreUpdater _updater;
public string Current_Dir { get; set; }
public string updateFile { get; set; }

Expand Down Expand Up @@ -41,21 +42,26 @@ public CoreSelector()

foreach (Core core in _cores)
{
if(_settingsManager.GetCoreSettings(core.name) != null)
if (_settingsManager.GetCoreSettings(core.name) != null)
{
coresList.Items.Add(core, !_settingsManager.GetCoreSettings(core.name).skip);
}
else
else
{
coresList.Items.Add(core, true);
}

}
}

private void CoreSelector_Load(object sender, EventArgs e)
{

/*
if (coresList.CheckedIndices.Count > 1)
{
checkBox_All.Checked = false;
}
*/
}

private void button1_Click(object sender, EventArgs e)
Expand All @@ -64,7 +70,7 @@ private void button1_Click(object sender, EventArgs e)
_readChecklist();
_settingsManager.SaveSettings();
MessageBox.Show("Core Selection Has Been Saved!", "Cores Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
Button_Save.Enabled=true;
Button_Save.Enabled = true;
Close();
}

Expand Down Expand Up @@ -121,7 +127,7 @@ public void Download_Json()

private void checkBox_All_CheckedChanged(object sender, EventArgs e)
{
if (checkBox_All.Checked)
if (checkBox_All.Checked)
{
int length = coresList.Items.Count;

Expand All @@ -135,14 +141,15 @@ private void checkBox_All_CheckedChanged(object sender, EventArgs e)
}
else
{

int length = coresList.Items.Count;

for (int le = 0; le < length; le++)
{
coresList.SetSelected(le, false);
coresList.SetItemChecked(le, false);
}

checkBox_All.Checked = false;

}
Expand Down
2 changes: 1 addition & 1 deletion Form1.Designer.cs

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

2 changes: 1 addition & 1 deletion Pocket_Updater.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Version>1.2.0</Version>
<Version>1.2.1</Version>
<RootNamespace>Pocket_Updater</RootNamespace>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
9 changes: 7 additions & 2 deletions Update_Pocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,13 @@ public void PopulateDrives()

comboBox1.Items.Add(d.Name.Remove(3));
}
comboBox1.SelectedIndex = 0;
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
//comboBox1.SelectedIndex = 0;
//comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
if (comboBox1.Items.Count != 0)
{
comboBox1.SelectedIndex = 0;
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
}
}
}
catch { MessageBox.Show("Error retrieving Drive Information", "Error!"); }
Expand Down

0 comments on commit 96d383d

Please sign in to comment.