mirror of
https://github.com/StudentBlake/XCI-Explorer
synced 2024-11-25 13:40:16 +00:00
Disable trim button after trimming
This commit is contained in:
parent
b7e66a38a0
commit
e39c37f78d
1 changed files with 2 additions and 4 deletions
|
@ -1345,11 +1345,13 @@ namespace XCI_Explorer
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("Trim XCI?", "XCI Explorer", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
if (MessageBox.Show("Trim XCI?", "XCI Explorer", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
|
using CenterWinDialog centerInner = new CenterWinDialog(this);
|
||||||
if (!isTrimmed())
|
if (!isTrimmed())
|
||||||
{
|
{
|
||||||
FileStream fileStream = new FileStream(TB_File.Text, FileMode.Open, FileAccess.Write);
|
FileStream fileStream = new FileStream(TB_File.Text, FileMode.Open, FileAccess.Write);
|
||||||
fileStream.SetLength((long)UsedSize);
|
fileStream.SetLength((long)UsedSize);
|
||||||
fileStream.Close();
|
fileStream.Close();
|
||||||
|
B_TrimXCI.Enabled = false;
|
||||||
MessageBox.Show("Done.");
|
MessageBox.Show("Done.");
|
||||||
string[] array = new string[5]
|
string[] array = new string[5]
|
||||||
{
|
{
|
||||||
|
@ -1378,10 +1380,6 @@ namespace XCI_Explorer
|
||||||
}
|
}
|
||||||
TB_UsedSpace.Text = $"{num3:0.##} {array[num2]}";
|
TB_UsedSpace.Text = $"{num3:0.##} {array[num2]}";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBox.Show("No trimming needed!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue