Add ReloadUserTiles method and update IsAutoLogon property
- Added ReloadUserTiles method to CredentialProviderBase to notify LogonUI of tile modifications. - Introduced private field isAutoLogon in CredentialTile. - Updated IsAutoLogon property in CredentialTile to use a backing field and call ReloadUserTiles on set. - Corrected typo in XML documentation for CreateParentWindowHwnd method.
This commit is contained in:
@@ -114,6 +114,14 @@ namespace Lithnet.CredentialProvider
|
|||||||
/// Gets a value that indicates if the credential provider should show a generic tile. That is, a tile that is not associated with a specific user.
|
/// Gets a value that indicates if the credential provider should show a generic tile. That is, a tile that is not associated with a specific user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract bool ShouldIncludeGenericTile();
|
public abstract bool ShouldIncludeGenericTile();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Notifies LogonUI that one of more of the tile items has been modified, and should be reloaded
|
||||||
|
/// </summary>
|
||||||
|
public void ReloadUserTiles()
|
||||||
|
{
|
||||||
|
this.NotifyHostOfTileCollectionChange();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds additional user tiles to the collection, and notifies LogonUI that new tiles are available
|
/// Adds additional user tiles to the collection, and notifies LogonUI that new tiles are available
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace Lithnet.CredentialProvider
|
|||||||
private protected ICredentialProviderCredentialEvents2 events2;
|
private protected ICredentialProviderCredentialEvents2 events2;
|
||||||
|
|
||||||
private protected ControlCollection controls;
|
private protected ControlCollection controls;
|
||||||
|
private bool isAutoLogon;
|
||||||
|
|
||||||
protected CredentialTile(CredentialProviderBase credentialProvider)
|
protected CredentialTile(CredentialProviderBase credentialProvider)
|
||||||
{
|
{
|
||||||
@@ -37,7 +38,16 @@ namespace Lithnet.CredentialProvider
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value that indicates if the user should be automatically logged on when the tile is selected. The tile must also have IsDefault set to true.
|
/// Gets a value that indicates if the user should be automatically logged on when the tile is selected. The tile must also have IsDefault set to true.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsAutoLogon { get; set; }
|
public bool IsAutoLogon
|
||||||
|
{
|
||||||
|
get => this.isAutoLogon;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.isAutoLogon = value;
|
||||||
|
this.CredentialProvider.ReloadUserTiles();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating if this should be the default time
|
/// Gets a value indicating if this should be the default time
|
||||||
@@ -87,7 +97,7 @@ namespace Lithnet.CredentialProvider
|
|||||||
/// Gets the HWND of the parent of the credential provider, and notifies LogonUI or CredUI that we need to create a Window
|
/// Gets the HWND of the parent of the credential provider, and notifies LogonUI or CredUI that we need to create a Window
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A HWND to the parentobject</returns>
|
/// <returns>A HWND to the parentobject</returns>
|
||||||
/// <exception cref="InvalidOperationException">The method was called before the host has advised that is ready to rpovide events</exception>
|
/// <exception cref="InvalidOperationException">The method was called before the host has advised that is ready to provide events</exception>
|
||||||
/// <exception cref="COMException">The request to obtain the parent window HWND failed</exception>
|
/// <exception cref="COMException">The request to obtain the parent window HWND failed</exception>
|
||||||
public IntPtr CreateParentWindowHwnd()
|
public IntPtr CreateParentWindowHwnd()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user