Esempio n. 1
0
        private void MainForm_Shown(object sender, EventArgs e)
        {
            ShowEULA();

            #region show the tutorial dialog

            if (Settings.Default.ShowFirstRunScreenV2)
            {
                this.Activate();
                DisplayTutorial();
            }

            #endregion show the tutorial dialog

            #region check for updates
            var updateChecker = new UpdateChecker(IsSafeToPrompt);
            updateChecker.CheckForUpdate();
            #endregion check for updates

            #region Preload some things (disabled)

            /* don't do this until we can verify that it actually helps
            Thread jitter = new Thread(() =>
            {
                var wmp = new GenericPlayerControl();
                /*
                foreach (var type in Assembly.Load("MyHavyAssembly, Version=1.8.2008.8, Culture=neutral, PublicKeyToken=8744b20f8da049e3").GetTypes())
                {
                    foreach (var method in type.GetMethods(BindingFlags.DeclaredOnly |
                                        BindingFlags.NonPublic |
                                        BindingFlags.Public | BindingFlags.Instance |
                                        BindingFlags.Static))
                    {
                        System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(method.MethodHandle);
                    }
                }
            });
            jitter.SetApartmentState(ApartmentState.STA);
            jitter.Priority = ThreadPriority.Lowest;
            jitter.Start();
            */

            #endregion Preload some things (disabled)
        }