Example #1
0
        /// <summary>
        /// Called when the HUD is no longer needed. Returns success for the modal result.
        /// </summary>
        public static void Finish()
        {
            if (currentInstance == null)
            {
                return;
            }

            lock (instanceLock)
            {
                if (currentInstance.InvokeRequired)
                {
                    currentInstance.Invoke((Action)(() => currentInstance.DoFinish()));
                }
                else
                {
                    currentInstance.DoFinish();
                }
            }
        }