mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2025-02-16 22:08:26 +00:00
Choose when to end the thread
This commit is contained in:
parent
72cce64583
commit
894e53ea07
4 changed files with 6 additions and 6 deletions
|
@ -104,9 +104,9 @@ namespace Toolbox.Library
|
|||
}
|
||||
|
||||
private Thread Thread;
|
||||
public void ReloadTextureIcons()
|
||||
public void ReloadTextureIcons(bool CanAbortThread)
|
||||
{
|
||||
if (Thread != null && Thread.IsAlive)
|
||||
if (Thread != null && Thread.IsAlive && CanAbortThread)
|
||||
Thread.Abort();
|
||||
|
||||
Thread = new Thread((ThreadStart)(() =>
|
||||
|
@ -166,9 +166,9 @@ namespace Toolbox.Library
|
|||
this.Refresh();
|
||||
}
|
||||
|
||||
public void ReloadTextureIcons(ISingleTextureIconLoader textureIcon)
|
||||
public void ReloadTextureIcons(ISingleTextureIconLoader textureIcon, bool CanAbortThread)
|
||||
{
|
||||
if (Thread != null && Thread.IsAlive)
|
||||
if (Thread != null && Thread.IsAlive && CanAbortThread)
|
||||
Thread.Abort();
|
||||
|
||||
Thread = new Thread((ThreadStart)(() =>
|
||||
|
|
|
@ -670,7 +670,7 @@ namespace Toolbox.Library.Forms
|
|||
|
||||
public void LoadGenericTextureIcons(ISingleTextureIconLoader iconTex) {
|
||||
treeViewCustom1.SingleTextureIcons.Add(iconTex);
|
||||
treeViewCustom1.ReloadTextureIcons(iconTex);
|
||||
treeViewCustom1.ReloadTextureIcons(iconTex, false);
|
||||
}
|
||||
|
||||
private void nodeSizeCB_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
@ -694,7 +694,7 @@ namespace Toolbox.Library.Forms
|
|||
|
||||
treeViewCustom1.ItemHeight = Size;
|
||||
treeViewCustom1.ReloadImages(Size, Size);
|
||||
treeViewCustom1.ReloadTextureIcons();
|
||||
treeViewCustom1.ReloadTextureIcons(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue