예제 #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));
        }
예제 #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;
 }
예제 #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);
        }
예제 #4
0
 // call the VS color service
 internal static Color GetColor(IServiceProvider serviceProvider, __VSSYSCOLOREX colorToFetch)
 {
     return(FetchColor(serviceProvider, colorToFetch));
 }
예제 #5
0
파일: VSHelpers.cs 프로젝트: PavelPZ/REW
 // 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;
 }