IVsFontAndColorStorage2 Arabirim

Tanım

Bir VSPackage 'ın, kayıt defteri yazı tipi ve renk girişlerini yönetmesine izin verir.

public interface class IVsFontAndColorStorage2
public interface class IVsFontAndColorStorage2
__interface IVsFontAndColorStorage2
[System.Runtime.InteropServices.Guid("1EE6C79A-B763-42E6-AC95-FD0CC00DE315")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsFontAndColorStorage2
[<System.Runtime.InteropServices.Guid("1EE6C79A-B763-42E6-AC95-FD0CC00DE315")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsFontAndColorStorage2 = interface
Public Interface IVsFontAndColorStorage2
Türetilmiş
Öznitelikler

Açıklamalar

Visual StudioOrtam, bu arabirimin bir uygulamasını sağlar. Bu arabirim, bir VSPackage 'ın kayıt defteri yazı tipi ve renk girişlerini yönetmesine olanak tanır. Bu arabirimi arabirimiyle birlikte kullanın IVsFontAndColorStorage .

Uygulayanlara Notlar

COM programcıları, IVsFontAndColorStorage2 QueryService(Guid, Guid, IntPtr) hizmet kimliği SID_SVSFONTANDCOLORSTORAGE2 ve arabirim kimliği IID_IVsFontAndColorStorage2ile çağırarak bir arabirim elde edebilir:

CComPtr<IVsFontAndColorStorage2>  pStorage;  
hr = pSP->QueryService(SID_SVsFontAndColorStorage2, IID_IVsFontAndColorStorage2, (void**)&pStorage);  
VSASSERT(SUCCEEDED(hr), "IVsFontAndColorStorage2 not provided");  

Yönetilen kod kullanılarak geliştirilen VSPackages, IVsFontAndColorStorage2 GetService(Type) SVsFontAndColorStorage2bağımsız değişkeniyle çağırarak bir arabirim elde edebilir:

IVsFontAndColorStorage2 store=null;  
store=GetService(typeof(SVsFontAndColorStorage2)) as IVsFontAndColorStorage2;  
if (store == null ){  
    throw new ApplicationException("Unable to obtain IVsFontAndColorStorage2 Interface");  
}  

Yöntemler

RevertAllItemsToDefault()

Tüm kayıt defteri yazı tipi ve renk girdilerini varsayılan değerlere döndürür.

RevertFontToDefault()

Tüm kayıt defteri yazı tipi girdilerini varsayılan değerlere döndürür.

RevertItemToDefault(String)

Belirtilen kayıt defteri yazı tipini veya renk girişini varsayılan değerine döndürür.

Şunlara uygulanır