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)); }
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; }
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); }
// call the VS color service internal static Color GetColor(IServiceProvider serviceProvider, __VSSYSCOLOREX colorToFetch) { return(FetchColor(serviceProvider, colorToFetch)); }
// 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; }