Beispiel #1
0
 internal static void DisposeCache()
 {
     lock (wcInternalSyncObject)
     {
         for (NativeWindow.WindowClass class2 = cache; class2 != null; class2 = class2.next)
         {
             class2.UnregisterClass();
         }
     }
 }
Beispiel #2
0
            internal static NativeWindow.WindowClass Create(string className, int classStyle)
            {
                lock (wcInternalSyncObject)
                {
                    NativeWindow.WindowClass cache = NativeWindow.WindowClass.cache;
                    if (className != null)
                    {
                        goto Label_003F;
                    }
                    while ((cache != null) && ((cache.className != null) || (cache.classStyle != classStyle)))
                    {
                        cache = cache.next;
                    }
                    goto Label_0050;
Label_0038:
                    cache = cache.next;
Label_003F:
                    if ((cache != null) && !className.Equals(cache.className))
                    {
                        goto Label_0038;
                    }
Label_0050:
                    if (cache == null)
                    {
                        cache = new NativeWindow.WindowClass(className, classStyle)
                        {
                            next = NativeWindow.WindowClass.cache
                        };
                        NativeWindow.WindowClass.cache = cache;
                    }
                    else if (!cache.registered)
                    {
                        cache.RegisterClass();
                    }
                    return(cache);
                }
            }
 internal static NativeWindow.WindowClass Create(string className, int classStyle)
 {
     lock (wcInternalSyncObject)
     {
         NativeWindow.WindowClass cache = NativeWindow.WindowClass.cache;
         if (className != null)
         {
             goto Label_003F;
         }
         while ((cache != null) && ((cache.className != null) || (cache.classStyle != classStyle)))
         {
             cache = cache.next;
         }
         goto Label_0050;
     Label_0038:
         cache = cache.next;
     Label_003F:
         if ((cache != null) && !className.Equals(cache.className))
         {
             goto Label_0038;
         }
     Label_0050:
         if (cache == null)
         {
             cache = new NativeWindow.WindowClass(className, classStyle) {
                 next = NativeWindow.WindowClass.cache
             };
             NativeWindow.WindowClass.cache = cache;
         }
         else if (!cache.registered)
         {
             cache.RegisterClass();
         }
         return cache;
     }
 }