Пример #1
0
 private void CloseAllHandles()
 {
     try
     {
         foreach (KeyValuePair <string, IntPtr> themeHandle in this.themeHandles)
         {
             UXTheme.CloseThemeData(themeHandle.Value);
         }
         this.themeHandles.Clear();
         if (this.vistaExplorerThemeOwner == null)
         {
             return;
         }
         this.vistaExplorerThemeOwner.Dispose();
         this.vistaExplorerThemeOwner = (Control)null;
     }
     catch
     {
     }
 }
Пример #2
0
        /// <summary>
        /// closes all currently opened HTheme handles
        /// </summary>
        private void CloseAllHandles()
        {
            try
            {
                //release all htheme handles
                foreach (KeyValuePair <string, IntPtr> pair in this.themeHandles)
                {
                    UXTheme.CloseThemeData(pair.Value);
                }

                this.themeHandles.Clear();

                if (this.vistaExplorerThemeOwner != null)
                {
                    this.vistaExplorerThemeOwner.Dispose();
                    this.vistaExplorerThemeOwner = null;
                }
            }
            catch
            {
            }
        }