Disable trim button after trimming

This commit is contained in:
StudentBlake 2021-10-30 20:58:13 -04:00
parent b7e66a38a0
commit e39c37f78d

View file

@ -1345,11 +1345,13 @@ namespace XCI_Explorer
{
if (MessageBox.Show("Trim XCI?", "XCI Explorer", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
using CenterWinDialog centerInner = new CenterWinDialog(this);
if (!isTrimmed())
{
FileStream fileStream = new FileStream(TB_File.Text, FileMode.Open, FileAccess.Write);
fileStream.SetLength((long)UsedSize);
fileStream.Close();
B_TrimXCI.Enabled = false;
MessageBox.Show("Done.");
string[] array = new string[5]
{
@ -1378,10 +1380,6 @@ namespace XCI_Explorer
}
TB_UsedSpace.Text = $"{num3:0.##} {array[num2]}";
}
else
{
MessageBox.Show("No trimming needed!");
}
}
}
else