ME3Explorer.Texplorer2.CloseForm C# (CSharp) Method

CloseForm() private method

private CloseForm ( bool cleanup, bool unsaved ) : void
cleanup bool
unsaved bool
return void
        private void CloseForm(bool cleanup, bool unsaved)
        {
            cancelling = false;
            // KFreon: Wait for stuff, if necessary
            if (cleanup)
            {
                if (!unsaved)
                    while (!StatusLabel.Text.ToLowerInvariant().Contains("cancelled"))
                        System.Threading.Thread.Sleep(100);

                // KFreon: Regenerate modified thumbnails if necessary
                for (int i = 0; i < ChangedTextures.Count; i++)
                {
                    TreeTexInfo tex = Tree.GetTex(ChangedTextures[i]);
                    RegenerateThumbnail(tex, ChangedTextures[i], true);
                }


                // KFreon: Reset Search
                if (Search != null)
                {
                    Search.Close();
                    Search.Dispose();
                }
            }
            this.Invoke(new Action(() => this.Close()));
        }
Texplorer2