Example #1
0
        /// <summary>
        /// Function to hide the splash screen.
        /// </summary>
        private async Task HideSplashAsync()
        {
            if (_splash == null)
            {
                return;
            }

            await _splash.FadeAsync(false, 16);

            _splash.Dispose();
            _splash = null;
        }
Example #2
0
        /// <summary>Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.ApplicationContext" /> and optionally releases the managed resources.</summary>
        /// <param name="disposing">
        /// <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources. </param>
        protected override void Dispose(bool disposing)
        {
            AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve;

            ToolPlugInService    toolPlugIns    = Interlocked.Exchange(ref _toolPlugIns, null);
            ContentPlugInService contentPlugIns = Interlocked.Exchange(ref _contentPlugIns, null);
            GraphicsContext      context        = Interlocked.Exchange(ref _graphicsContext, null);
            GorgonMefPlugInCache pluginCache    = Interlocked.Exchange(ref _pluginCache, null);
            FormMain             mainForm       = Interlocked.Exchange(ref _mainForm, null);
            FormSplash           splash         = Interlocked.Exchange(ref _splash, null);

            toolPlugIns?.Dispose();
            contentPlugIns?.Dispose();
            context?.Dispose();
            pluginCache?.Dispose();
            mainForm?.Dispose();
            splash?.Dispose();

            base.Dispose(disposing);
        }
Example #3
0
 /// <summary>
 /// Function to show the splash screen for our application boot up procedure.
 /// </summary>
 private async Task ShowSplashAsync()
 {
     _splash = new FormSplash();
     _splash.Show();
     await _splash.FadeAsync(true, 16);
 }