Beispiel #1
0
        private Color getVSColor(IVsUIShell2 uiShell2, __VSSYSCOLOREX color)
        {
            //get the COLORREF structure
            uint win32Color;

            uiShell2.GetVSSysColorEx((int)color, out win32Color);
            //translate it to a managed Color structure
            return(ColorTranslator.FromWin32((int)win32Color));
        }
Beispiel #2
0
 public bool TryGetColor(__VSSYSCOLOREX vsColor, out Color color)
 {
     uint rgb;
     if (ErrorHandler.Succeeded(UIShell.GetVSSysColorEx((int)vsColor, out rgb)))
     {
         color = ColorTranslator.FromWin32(unchecked((int)rgb));
         return true;
     }
     color = Color.Empty;
     return false;
 }
Beispiel #3
0
        public bool TryGetColor(__VSSYSCOLOREX vsColor, out Color color)
        {
            uint rgb;

            if (VSErr.Succeeded(UIShell.GetVSSysColorEx((int)vsColor, out rgb)))
            {
                color = ColorTranslator.FromWin32(unchecked ((int)rgb));
                return(true);
            }
            color = Color.Empty;
            return(false);
        }
Beispiel #4
0
 // call the VS color service
 internal static Color GetColor(IServiceProvider serviceProvider, __VSSYSCOLOREX colorToFetch)
 {
     return(FetchColor(serviceProvider, colorToFetch));
 }
Beispiel #5
0
 // call the VS color service
 internal static Color GetColor(IServiceProvider serviceProvider, __VSSYSCOLOREX colorToFetch) {
   return FetchColor(serviceProvider, colorToFetch);
 }
 public VsSysColor(__VSSYSCOLOREX index)
 {
     m_index = (Int32)index;
 }