Esempio n. 1
0
 private static void RegisterAutoGeneratedProxies()
 {
     ObjectRefProxy.Register(typeof(IAnimationInterpolator), typeof(AnimationInterpolatorProxyFactory));
     ObjectRefProxy.Register(typeof(IAnimationManager), typeof(AnimationManagerProxyFactory));
     ObjectRefProxy.Register(typeof(IAnimationObject), typeof(AnimationObjectProxyFactory));
     ObjectRefProxy.Register(typeof(IAnimationStoryboard), typeof(AnimationStoryboardProxyFactory));
     ObjectRefProxy.Register(typeof(IAnimationTimer), typeof(AnimationTimerProxyFactory));
     ObjectRefProxy.Register(typeof(IAnimationTransition), typeof(AnimationTransitionProxyFactory));
     ObjectRefProxy.Register(typeof(IAnimationTransitionFactory), typeof(AnimationTransitionFactoryProxyFactory));
     ObjectRefProxy.Register(typeof(IAnimationTransitionLibrary), typeof(AnimationTransitionLibraryProxyFactory));
     ObjectRefProxy.Register(typeof(IAnimationVariable), typeof(AnimationVariableProxyFactory));
     ObjectRefProxy.Register(typeof(IObjectRefEnumerable), typeof(ObjectRefEnumerableProxyFactory));
     ObjectRefProxy.Register(typeof(IObjectRefEnumerator), typeof(ObjectRefEnumeratorProxyFactory));
     ObjectRefProxy.Register(typeof(IPropertyBag2), typeof(PropertyBag2ProxyFactory));
     ObjectRefProxy.Register(typeof(IStringEnumerable), typeof(StringEnumerableProxyFactory));
     ObjectRefProxy.Register(typeof(IStringEnumerator), typeof(StringEnumeratorProxyFactory));
     ObjectRefProxy.Register(typeof(IValueRef <>), typeof(ValueRefProxyFactory <>));
     ObjectRefProxy.Register(typeof(IBitmapBrush), typeof(BitmapBrushProxyFactory));
     ObjectRefProxy.Register(typeof(IBrush), typeof(BrushProxyFactory));
     ObjectRefProxy.Register(typeof(IDCRenderTarget), typeof(DCRenderTargetProxyFactory));
     ObjectRefProxy.Register(typeof(IDevice), typeof(DeviceProxyFactory));
     ObjectRefProxy.Register(typeof(IDevice1), typeof(Device1ProxyFactory));
     ObjectRefProxy.Register(typeof(IDevice2), typeof(Device2ProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceBitmap), typeof(DeviceBitmapProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceBitmapRenderTarget), typeof(DeviceBitmapRenderTargetProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceContext), typeof(DeviceContextProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceContext1), typeof(DeviceContext1ProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceContext2), typeof(DeviceContext2ProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceResource), typeof(DeviceResourceProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceResourceFactory), typeof(DeviceResourceFactoryProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceResourceFactory1), typeof(DeviceResourceFactory1ProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceResourceFactory2), typeof(DeviceResourceFactory2ProxyFactory));
     ObjectRefProxy.Register(typeof(IDeviceResourceFactory3), typeof(DeviceResourceFactory3ProxyFactory));
     ObjectRefProxy.Register(typeof(IDirect2DFactory), new Direct2DFactoryProxyFactory());
     ObjectRefProxy.Register(typeof(IDirect2DFactory1), new Direct2DFactory1ProxyFactory());
     ObjectRefProxy.Register(typeof(IDirect2DObject), typeof(Direct2DObjectProxyFactory));
     ObjectRefProxy.Register(typeof(IDirect2DResource), typeof(Direct2DResourceProxyFactory));
     ObjectRefProxy.Register(typeof(IDrawingContext), typeof(DrawingContextProxyFactory));
     ObjectRefProxy.Register(typeof(IDrawingContext1), typeof(DrawingContext1ProxyFactory));
     ObjectRefProxy.Register(typeof(IDrawingContext2), typeof(DrawingContext2ProxyFactory));
     ObjectRefProxy.Register(typeof(IDrawingContext3), typeof(DrawingContext3ProxyFactory));
     ObjectRefProxy.Register(typeof(IDrawingStateBlock), typeof(DrawingStateBlockProxyFactory));
     ObjectRefProxy.Register(typeof(IDrawingStateBlock1), typeof(DrawingStateBlock1ProxyFactory));
     ObjectRefProxy.Register(typeof(IEllipseGeometry), typeof(EllipseGeometryProxyFactory));
     ObjectRefProxy.Register(typeof(IGeometry), typeof(GeometryProxyFactory));
     ObjectRefProxy.Register(typeof(IGeometryFactory), typeof(GeometryFactoryProxyFactory));
     ObjectRefProxy.Register(typeof(IGeometryFactory1), typeof(GeometryFactory1ProxyFactory));
     ObjectRefProxy.Register(typeof(IGeometryGroup), typeof(GeometryGroupProxyFactory));
     ObjectRefProxy.Register(typeof(IGeometryRealization), typeof(GeometryRealizationProxyFactory));
     ObjectRefProxy.Register(typeof(IGeometrySink), typeof(GeometrySinkProxyFactory));
     ObjectRefProxy.Register(typeof(IGradientBrush), typeof(GradientBrushProxyFactory));
     ObjectRefProxy.Register(typeof(IGradientStopCollection), typeof(GradientStopCollectionProxyFactory));
     ObjectRefProxy.Register(typeof(IHwndRenderTarget), typeof(HwndRenderTargetProxyFactory));
     ObjectRefProxy.Register(typeof(ILayer), typeof(LayerProxyFactory));
     ObjectRefProxy.Register(typeof(ILinearGradientBrush), typeof(LinearGradientBrushProxyFactory));
     ObjectRefProxy.Register(typeof(IMesh), typeof(MeshProxyFactory));
     ObjectRefProxy.Register(typeof(IPathGeometry), typeof(PathGeometryProxyFactory));
     ObjectRefProxy.Register(typeof(IPathGeometry1), typeof(PathGeometry1ProxyFactory));
     ObjectRefProxy.Register(typeof(IRadialGradientBrush), typeof(RadialGradientBrushProxyFactory));
     ObjectRefProxy.Register(typeof(IRectangleGeometry), typeof(RectangleGeometryProxyFactory));
     ObjectRefProxy.Register(typeof(IRenderTarget), typeof(RenderTargetProxyFactory));
     ObjectRefProxy.Register(typeof(IRoundedRectangleGeometry), typeof(RoundedRectangleGeometryProxyFactory));
     ObjectRefProxy.Register(typeof(ISimplifiedGeometrySink), typeof(SimplifiedGeometrySinkProxyFactory));
     ObjectRefProxy.Register(typeof(ISolidColorBrush), typeof(SolidColorBrushProxyFactory));
     ObjectRefProxy.Register(typeof(IStrokeStyle), typeof(StrokeStyleProxyFactory));
     ObjectRefProxy.Register(typeof(IStrokeStyle1), typeof(StrokeStyle1ProxyFactory));
     ObjectRefProxy.Register(typeof(ITessellationSink), typeof(TessellationSinkProxyFactory));
     ObjectRefProxy.Register(typeof(ITransformedGeometry), typeof(TransformedGeometryProxyFactory));
     ObjectRefProxy.Register(typeof(IDirectWriteFactory), new DirectWriteFactoryProxyFactory());
     ObjectRefProxy.Register(typeof(IDirectWriteGdiInterop), typeof(DirectWriteGdiInteropProxyFactory));
     ObjectRefProxy.Register(typeof(IDirectWriteObject), typeof(DirectWriteObjectProxyFactory));
     ObjectRefProxy.Register(typeof(IFont), typeof(FontProxyFactory));
     ObjectRefProxy.Register(typeof(IFontCollection), typeof(FontCollectionProxyFactory));
     ObjectRefProxy.Register(typeof(IFontFamily), typeof(FontFamilyProxyFactory));
     ObjectRefProxy.Register(typeof(IFontList), typeof(FontListProxyFactory));
     ObjectRefProxy.Register(typeof(IInlineObject), typeof(InlineObjectProxyFactory));
     ObjectRefProxy.Register(typeof(ILocalizedStrings), typeof(LocalizedStringsProxyFactory));
     ObjectRefProxy.Register(typeof(ITextFormat), typeof(TextFormatProxyFactory));
     ObjectRefProxy.Register(typeof(ITextLayout), typeof(TextLayoutProxyFactory));
     ObjectRefProxy.Register(typeof(ITextRenderingParams), typeof(TextRenderingParamsProxyFactory));
     ObjectRefProxy.Register(typeof(ITypography), typeof(TypographyProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiAdapter), typeof(DxgiAdapterProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiAdapter1), typeof(DxgiAdapter1ProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiDevice), typeof(DxgiDeviceProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiDevice1), typeof(DxgiDevice1ProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiDeviceSubObject), typeof(DxgiDeviceSubObjectProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiFactory), typeof(DxgiFactoryProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiFactory1), typeof(DxgiFactory1ProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiKeyedMutex), typeof(DxgiKeyedMutexProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiObject), typeof(DxgiObjectProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiOutput), typeof(DxgiOutputProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiResource), typeof(DxgiResourceProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiSurface), typeof(DxgiSurfaceProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiSurface1), typeof(DxgiSurface1ProxyFactory));
     ObjectRefProxy.Register(typeof(IDxgiSwapChain), typeof(DxgiSwapChainProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmap), new BitmapProxyFactory());
     ObjectRefProxy.Register(typeof(IBitmap <>), typeof(BitmapProxyFactory <>));
     ObjectRefProxy.Register(typeof(IBitmap <ColorAlpha8>), new BitmapProxyFactory <ColorAlpha8>());
     ObjectRefProxy.Register(typeof(IBitmap <ColorBgra32>), new BitmapProxyFactory <ColorBgra32>());
     ObjectRefProxy.Register(typeof(IBitmap <ColorPbgra32>), new BitmapProxyFactory <ColorPbgra32>());
     ObjectRefProxy.Register(typeof(IBitmapCodecInfo), typeof(BitmapCodecInfoProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmapDecoder), typeof(BitmapDecoderProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmapDecoderInfo), typeof(BitmapDecoderInfoProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmapEncoder), typeof(BitmapEncoderProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmapEncoderInfo), typeof(BitmapEncoderInfoProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmapFrameDecode), typeof(BitmapFrameDecodeProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmapFrameEncode), typeof(BitmapFrameEncodeProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmapLock), new BitmapLockProxyFactory());
     ObjectRefProxy.Register(typeof(IBitmapLock <>), typeof(BitmapLockProxyFactory <>));
     ObjectRefProxy.Register(typeof(IBitmapLock <ColorAlpha8>), new BitmapLockProxyFactory <ColorAlpha8>());
     ObjectRefProxy.Register(typeof(IBitmapLock <ColorBgra32>), new BitmapLockProxyFactory <ColorBgra32>());
     ObjectRefProxy.Register(typeof(IBitmapLock <ColorPbgra32>), new BitmapLockProxyFactory <ColorPbgra32>());
     ObjectRefProxy.Register(typeof(IBitmapSource), typeof(BitmapSourceProxyFactory));
     ObjectRefProxy.Register(typeof(IBitmapSource <>), typeof(BitmapSourceProxyFactory <>));
     ObjectRefProxy.Register(typeof(IBitmapSource <ColorAlpha8>), new BitmapSourceProxyFactory <ColorAlpha8>());
     ObjectRefProxy.Register(typeof(IBitmapSource <ColorBgra32>), new BitmapSourceProxyFactory <ColorBgra32>());
     ObjectRefProxy.Register(typeof(IBitmapSource <ColorPbgra32>), new BitmapSourceProxyFactory <ColorPbgra32>());
     ObjectRefProxy.Register(typeof(IColorContext), typeof(ColorContextProxyFactory));
     ObjectRefProxy.Register(typeof(IDevelopRaw), typeof(DevelopRawProxyFactory));
     ObjectRefProxy.Register(typeof(IExifColorSpaceColorContext), typeof(ExifColorSpaceColorContextProxyFactory));
     ObjectRefProxy.Register(typeof(IFastMetadataEncoder), typeof(FastMetadataEncoderProxyFactory));
     ObjectRefProxy.Register(typeof(IFormatConverterInfo), typeof(FormatConverterInfoProxyFactory));
     ObjectRefProxy.Register(typeof(IImagingComponentInfo), typeof(ImagingComponentInfoProxyFactory));
     ObjectRefProxy.Register(typeof(IImagingFactory), typeof(ImagingFactoryProxyFactory));
     ObjectRefProxy.Register(typeof(IImagingObject), typeof(ImagingObjectProxyFactory));
     ObjectRefProxy.Register(typeof(IMetadataQueryReader), typeof(MetadataQueryReaderProxyFactory));
     ObjectRefProxy.Register(typeof(IMetadataQueryWriter), typeof(MetadataQueryWriterProxyFactory));
     ObjectRefProxy.Register(typeof(IPalette), typeof(PaletteProxyFactory));
     ObjectRefProxy.Register(typeof(IPixelFormatInfo), typeof(PixelFormatInfoProxyFactory));
     ObjectRefProxy.Register(typeof(IPixelFormatInfo2), typeof(PixelFormatInfo2ProxyFactory));
     ObjectRefProxy.Register(typeof(IProfileColorContext), typeof(ProfileColorContextProxyFactory));
     ObjectRefProxy.Register(typeof(IProgressiveLevelControl), typeof(ProgressiveLevelControlProxyFactory));
     ObjectRefProxy.Register(typeof(IAllocator), typeof(AllocatorProxyFactory));
     ObjectRefProxy.Register(typeof(IBuffer), typeof(BufferProxyFactory));
     ObjectRefProxy.Register(typeof(IBufferLock), typeof(BufferLockProxyFactory));
     ObjectRefProxy.Register(typeof(IBufferSource), typeof(BufferSourceProxyFactory));
     ObjectRefProxy.Register(typeof(IMemoryManager), typeof(MemoryManagerProxyFactory));
     ObjectRefProxy.Register(typeof(IMemoryObject), typeof(MemoryObjectProxyFactory));
     ObjectRefProxy.Register(typeof(IVirtualMemory), typeof(VirtualMemoryProxyFactory));
     ObjectRefProxy.Register(typeof(IVirtualMemoryAllocator), typeof(VirtualMemoryAllocatorProxyFactory));
     ObjectRefProxy.Register(typeof(IDispatcher), typeof(DispatcherProxyFactory));
     ObjectRefProxy.Register(typeof(ISynchronizationContext), new SynchronizationContextProxyFactory());
 }
Esempio n. 2
0
        private void StartPart2(string mutexName, string[] remainingArgs)
        {
            IAnimationService animationService;

            Memory.Initialize();
            CultureInfo info = AppSettings.Instance.UI.Language.Value;

            Thread.CurrentThread.CurrentUICulture     = info;
            CultureInfo.DefaultThreadCurrentUICulture = info;
            AppSettings.Instance.UI.Language.Value    = info;
            PdnResources.Culture = info;
            AppSettings.Instance.UI.ErrorFlagsAtStartup.Value = AppSettings.Instance.UI.ErrorFlags.Value;
            UIUtil.IsGetMouseMoveScreenPointsEnabled          = AppSettings.Instance.UI.EnableSmoothMouseInput.Value;
            if (!OS.VerifyFrameworkVersion(4, 6, 0, OS.FrameworkProfile.Full))
            {
                string message = PdnResources.GetString("Error.FXRequirement");
                MessageBoxUtil.ErrorBox(null, message);
                string fxurl = "http://www.microsoft.com/en-us/download/details.aspx?id=40773";
                () => ShellUtil.LaunchUrl2(null, fxurl).Eval <bool>().Observe();
            }
            else if (!OS.VerifyWindowsVersion(6, 1, 1))
            {
                string str4 = PdnResources.GetString("Error.OSRequirement");
                MessageBoxUtil.ErrorBox(null, str4);
            }
            else if (!Processor.IsFeaturePresent(ProcessorFeature.SSE))
            {
                string str5 = PdnResources.GetString("Error.SSERequirement");
                MessageBoxUtil.ErrorBox(null, str5);
            }
            else
            {
                string str;
                if (MultithreadedWorkItemDispatcher.IsSingleThreadForced && PdnInfo.IsFinalBuild)
                {
                    throw new PaintDotNet.InternalErrorException("MultithreadedWorkItemDispatcher.IsSingleThreadForced shouldn't be true for Final builds!");
                }
                if (RefTrackedObject.IsFullRefTrackingEnabled && PdnInfo.IsFinalBuild)
                {
                    throw new PaintDotNet.InternalErrorException("Full ref tracking should not be enabled for non-expiring builds!");
                }
                PaintDotNet.Base.AssemblyServices.RegisterProxies();
                PaintDotNet.Core.AssemblyServices.RegisterProxies();
                PaintDotNet.Framework.AssemblyServices.RegisterProxies();
                ObjectRefProxy.CloseRegistration();
                remainingArgs = TryRemoveArg(remainingArgs, "/showCrashLog=", out str);
                if (!string.IsNullOrWhiteSpace(str))
                {
                    DialogResult?nullable = null;
                    try
                    {
                        string fullPath = Path.GetFullPath(str);
                        if (File.Exists(fullPath))
                        {
                            nullable = new DialogResult?(CrashManager.ShowCrashLogDialog(fullPath));
                        }
                    }
                    catch (Exception exception)
                    {
                        try
                        {
                            MessageBox.Show(exception.ToString(), null, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                        }
                        catch (Exception exception2)
                        {
                            Environment.FailFast(null, exception2);
                        }
                    }
                    DialogResult?nullable2 = nullable;
                    DialogResult oK        = DialogResult.OK;
                    if ((((DialogResult)nullable2.GetValueOrDefault()) == oK) ? nullable2.HasValue : false)
                    {
                        string[] args = new string[] { "/sleep=1000" };
                        StartNewInstance(null, false, args);
                    }
                }
                else
                {
                    string str2;
                    AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Startup.OnCurrentDomainUnhandledException);
                    Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException, true);
                    Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException, false);
                    Application.ThreadException += new ThreadExceptionEventHandler(Startup.OnApplicationThreadException);
                    this.canUseCrashDialog       = true;
                    remainingArgs = TryRemoveArg(remainingArgs, "/test", out str2);
                    if (str2 != null)
                    {
                        PdnInfo.IsTestMode = true;
                    }
                    SingleInstanceManager disposeMe = new SingleInstanceManager(mutexName);
                    animationService = null;
                    try
                    {
                        DirectWriteFactory.DefaultDirectWriteSettingsController defaultDirectWriteSettingsController;
                        DrawingContext.DefaultDrawingContextSettingsController  defaultDrawingContextSettingsController;
                        IDisposable               updatesServiceShutdown;
                        IUpdatesServiceHost       updatesServiceHost;
                        PdnSynchronizationContext pdnSyncContext;
                        if (!disposeMe.IsFirstInstance)
                        {
                            disposeMe.FocusFirstInstance();
                            foreach (string str7 in remainingArgs)
                            {
                                disposeMe.SendInstanceMessage(str7, 30);
                            }
                            disposeMe.Dispose();
                            disposeMe = null;
                        }
                        else
                        {
                            CleanupService.Initialize();
                            ResourcesService.Initialize();
                            UserFilesService.Initialize();
                            UserPalettesService.Initialize();
                            animationService           = AnimationService.Initialize();
                            animationService.IsEnabled = true;
                            Document.Initialize(PdnInfo.Version);
                            Layer.Initialize(PdnResources.GetString("Layer.BackgroundLayer.DefaultName"));
                            Effect.SetDefaultServiceProviderValueFactory(effect => new ServiceProviderForEffects());
                            defaultDirectWriteSettingsController = DirectWriteFactory.GetDefaultSettingsController();
                            defaultDirectWriteSettingsController.DefaultCulture = AppSettings.Instance.UI.Language.Value;
                            AppSettings.Instance.UI.Language.ValueChangedT     += (sender, e) => (defaultDirectWriteSettingsController.DefaultCulture = e.NewValue);
                            AeroColors.CurrentScheme = AppSettings.Instance.UI.AeroColorScheme.Value;
                            AppSettings.Instance.UI.AeroColorScheme.ValueChangedT += (sender, e) => (AeroColors.CurrentScheme = e.NewValue);
                            defaultDrawingContextSettingsController = DrawingContext.GetDefaultSettingsController();
                            defaultDrawingContextSettingsController.DefaultTextAntialiasMode = AppSettings.Instance.UI.DefaultTextAntialiasMode.Value;
                            AppSettings.Instance.UI.DefaultTextAntialiasMode.ValueChangedT  += delegate(object sender, ValueChangedEventArgs <TextAntialiasMode> e) {
                                defaultDrawingContextSettingsController.DefaultTextAntialiasMode = e.NewValue;
                                foreach (Form form in Application.OpenForms)
                                {
                                    form.PerformLayoutRecursiveDepthFirst("TextAntialiasMode");
                                    form.Invalidate(true);
                                }
                            };
                            defaultDrawingContextSettingsController.DefaultTextRenderingMode = AppSettings.Instance.UI.DefaultTextRenderingMode.Value;
                            AppSettings.Instance.UI.DefaultTextRenderingMode.ValueChangedT  += delegate(object sender, ValueChangedEventArgs <TextRenderingMode> e) {
                                defaultDrawingContextSettingsController.DefaultTextRenderingMode = e.NewValue;
                                foreach (Form form in Application.OpenForms)
                                {
                                    form.PerformLayoutRecursiveDepthFirst("TextRenderingMode");
                                    form.Invalidate(true);
                                }
                            };
                            PaintDotNet.IndirectUI.ControlInfo.Initialize(Assembly.GetExecutingAssembly());
                            PdnBaseForm.SetStaticHelpRequestedHandler(delegate(object sender, HelpEventArgs e) {
                                HelpService.Instance.ShowHelp(sender as IWin32Window);
                                e.Handled = true;
                            });
                            Control control = new Control();
                            SynchronizationContext current = SynchronizationContext.Current;
                            PdnSynchronizationContextController controller = PdnSynchronizationContext.Install(new WaitForMultipleObjectsExDelegate(WaitHelper.WaitForMultipleObjectsEx), new SleepExDelegate(WaitHelper.SleepEx));
                            pdnSyncContext         = controller.Instance;
                            this.mainForm          = new MainForm(remainingArgs);
                            updatesServiceHost     = this.mainForm.CreateUpdatesServiceHost();
                            updatesServiceShutdown = null;
                            EventHandler initUpdatesOnShown = null;
                            initUpdatesOnShown = delegate(object sender, EventArgs e) {
                                this.mainForm.Shown   -= initUpdatesOnShown;
                                updatesServiceShutdown = UpdatesService.Initialize(updatesServiceHost);
                            };
                            this.mainForm.Shown += initUpdatesOnShown;
                            this.mainForm.SingleInstanceManager = disposeMe;
                            disposeMe = null;
                            int num        = (int)Math.Floor((double)8.3333333333333339);
                            int intervalMs = (int)Math.Floor((double)50.0);
                            using (AnimationTimerUpdateThread timerThread = new AnimationTimerUpdateThread(intervalMs, false))
                            {
                                < > c__DisplayClass20_1 class_3;