AFSelectAuthentication.ShowDialog Method (IWin32Window, PIServer, Boolean, Boolean, Boolean)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Show the prompt to select PIAuthenticationMode to
connect to a PIServer.
Namespace: OSIsoft.AF.UI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static PIAuthenticationMode? ShowDialog( IWin32Window owner, PIServer server, bool allowPIUser = true, bool allowWinUser = true, bool failMessage = false )
Public Shared Function ShowDialog ( owner As IWin32Window, server As PIServer, Optional allowPIUser As Boolean = true, Optional allowWinUser As Boolean = true, Optional failMessage As Boolean = false ) As PIAuthenticationMode? Dim owner As IWin32Window Dim server As PIServer Dim allowPIUser As Boolean Dim allowWinUser As Boolean Dim failMessage As Boolean Dim returnValue As PIAuthenticationMode? returnValue = AFSelectAuthentication.ShowDialog(owner, server, allowPIUser, allowWinUser, failMessage)
public: static Nullable<PIAuthenticationMode> ShowDialog( IWin32Window^ owner, PIServer^ server, bool allowPIUser = true, bool allowWinUser = true, bool failMessage = false )
static member ShowDialog : owner : IWin32Window * server : PIServer * ?allowPIUser : bool * ?allowWinUser : bool * ?failMessage : bool (* Defaults: let _allowPIUser = defaultArg allowPIUser true let _allowWinUser = defaultArg allowWinUser true let _failMessage = defaultArg failMessage false *) -> Nullable<PIAuthenticationMode>
Parameters
- owner
- Type: System.Windows.FormsIWin32Window
The owner window for the dialog box. - server
- Type: OSIsoft.AF.PIPIServer
The PIServer for the requested login credential. - allowPIUser (Optional)
- Type: SystemBoolean
If , then the PIUserAuthentication is allowed as an authentication mode. - allowWinUser (Optional)
- Type: SystemBoolean
If , then the WindowsAuthentication is allowed as an authentication mode. - failMessage (Optional)
- Type: SystemBoolean
If , the description in the dialog will indicate that a failed login attempt has occurred.
Return Value
Type: NullablePIAuthenticationModeReturns if the dialog was canceled. Otherwise, a PIAuthenticationMode is returned based upon the information provided in the dialog.