C# Class Opc.Ua.Client.Controls.GuiUtils

A class that provide various common utility functions and shared resources.
Inheritance: System.Windows.Forms.UserControl
Afficher le fichier Open project: OPCFoundation/UA-.NET Class Usage Examples

Méthodes publiques

Свойство Type Description
ImageList System.Windows.Forms.ImageList

Méthodes publiques

Méthode Description
AddToTrustedStore ( ApplicationConfiguration configuration, X509Certificate2 certificate ) : void

Adds the certificate to the Trusted Certificate Store

CheckApplicationInstanceCertificate ( ApplicationConfiguration configuration ) : X509Certificate2

Creates an application instance certificate if one does not already exist.

CheckApplicationInstanceCertificate ( ApplicationConfiguration configuration, ushort keySize, bool interactive, bool updateFile ) : X509Certificate2

Creates an application instance certificate if one does not already exist.

ConfigureFirewall ( ApplicationConfiguration configuration, bool interactive ) : void

Configures the firewall.

DeleteApplicationInstanceCertificate ( ApplicationConfiguration configuration ) : void

Deletes an existing application instance certificate.

DisplayUaTcpImplementation ( Form form, ApplicationConfiguration configuration ) : void

Displays the UA-TCP configuration in the form.

DoStartupChecks ( string configSectionName, ApplicationType applicationType, string defaultConfigFile, bool interactive ) : ApplicationConfiguration

Does any configuration checks before starting up.

EditValue ( Session session, object value ) : object

Displays a dialog that allows a use to edit a value.

EditValue ( Session session, object value, NodeId datatypeId, int valueRank ) : object

Displays a dialog that allows a use to edit a value.

GetDefaultValue ( NodeId datatypeId, int valueRank ) : object

Returns a default value for the data type.

GetTargetIcon ( Session session, NodeClass nodeClass, ExpandedNodeId typeDefinitionId ) : string

Returns to display icon for the target of a reference.

GetTargetIcon ( Session session, ReferenceDescription reference ) : string

Returns to display icon for the target of a reference.

GuiUtils ( ) : System

Initializes a new instance of the GuiUtils class.

HandleCertificateValidationError ( Form caller, CertificateValidator validator, CertificateValidationEventArgs e ) : void

Handles a certificate validation error.

HandleException ( string caption, MethodBase method, Exception e ) : void

Displays the details of an exception.

LoadConfiguration ( string configSectionName, ApplicationType applicationType, string defaultConfigFile, bool interactive ) : ApplicationConfiguration

Does any configuration checks before starting up.

OverrideUaTcpImplementation ( ApplicationConfiguration configuration ) : void

Uses the command line to override the UA TCP implementation specified in the configuration.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Méthode Description
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

Method Details

AddToTrustedStore() public static méthode

Adds the certificate to the Trusted Certificate Store
public static AddToTrustedStore ( ApplicationConfiguration configuration, X509Certificate2 certificate ) : void
configuration ApplicationConfiguration The application's configuration which specifies the location of the TrustedStore.
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The certificate to register.
Résultat void

CheckApplicationInstanceCertificate() public static méthode

Creates an application instance certificate if one does not already exist.
public static CheckApplicationInstanceCertificate ( ApplicationConfiguration configuration ) : X509Certificate2
configuration ApplicationConfiguration
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2

CheckApplicationInstanceCertificate() public static méthode

Creates an application instance certificate if one does not already exist.
public static CheckApplicationInstanceCertificate ( ApplicationConfiguration configuration, ushort keySize, bool interactive, bool updateFile ) : X509Certificate2
configuration ApplicationConfiguration
keySize ushort
interactive bool
updateFile bool
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2

ConfigureFirewall() public static méthode

Configures the firewall.
public static ConfigureFirewall ( ApplicationConfiguration configuration, bool interactive ) : void
configuration ApplicationConfiguration The configuration.
interactive bool if set to true if the user should be prompted.
Résultat void

DeleteApplicationInstanceCertificate() public static méthode

Deletes an existing application instance certificate.
public static DeleteApplicationInstanceCertificate ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration The configuration instance that stores the configurable information for a UA application.
Résultat void

DisplayUaTcpImplementation() public static méthode

Displays the UA-TCP configuration in the form.
public static DisplayUaTcpImplementation ( Form form, ApplicationConfiguration configuration ) : void
form System.Windows.Forms.Form The form to display the UA-TCP configuration.
configuration ApplicationConfiguration The configuration instance that stores the configurable information for a UA application.
Résultat void

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Résultat void

DoStartupChecks() public static méthode

Does any configuration checks before starting up.
public static DoStartupChecks ( string configSectionName, ApplicationType applicationType, string defaultConfigFile, bool interactive ) : ApplicationConfiguration
configSectionName string
applicationType ApplicationType
defaultConfigFile string
interactive bool
Résultat ApplicationConfiguration

EditValue() public static méthode

Displays a dialog that allows a use to edit a value.
public static EditValue ( Session session, object value ) : object
session Session
value object
Résultat object

EditValue() public static méthode

Displays a dialog that allows a use to edit a value.
public static EditValue ( Session session, object value, NodeId datatypeId, int valueRank ) : object
session Session
value object
datatypeId NodeId
valueRank int
Résultat object

GetDefaultValue() public static méthode

Returns a default value for the data type.
public static GetDefaultValue ( NodeId datatypeId, int valueRank ) : object
datatypeId NodeId
valueRank int
Résultat object

GetTargetIcon() public static méthode

Returns to display icon for the target of a reference.
public static GetTargetIcon ( Session session, NodeClass nodeClass, ExpandedNodeId typeDefinitionId ) : string
session Session
nodeClass NodeClass
typeDefinitionId ExpandedNodeId
Résultat string

GetTargetIcon() public static méthode

Returns to display icon for the target of a reference.
public static GetTargetIcon ( Session session, ReferenceDescription reference ) : string
session Session
reference ReferenceDescription
Résultat string

GuiUtils() public méthode

Initializes a new instance of the GuiUtils class.
public GuiUtils ( ) : System
Résultat System

HandleCertificateValidationError() public static méthode

Handles a certificate validation error.
public static HandleCertificateValidationError ( Form caller, CertificateValidator validator, CertificateValidationEventArgs e ) : void
caller System.Windows.Forms.Form The caller's text is used as the caption of the shown to provide details about the error.
validator CertificateValidator The validator (not used).
e CertificateValidationEventArgs The instance event arguments provided when a certificate validation error occurs.
Résultat void

HandleException() public static méthode

Displays the details of an exception.
public static HandleException ( string caption, MethodBase method, Exception e ) : void
caption string
method System.Reflection.MethodBase
e System.Exception
Résultat void

LoadConfiguration() public static méthode

Does any configuration checks before starting up.
public static LoadConfiguration ( string configSectionName, ApplicationType applicationType, string defaultConfigFile, bool interactive ) : ApplicationConfiguration
configSectionName string
applicationType ApplicationType
defaultConfigFile string
interactive bool
Résultat ApplicationConfiguration

OverrideUaTcpImplementation() public static méthode

Uses the command line to override the UA TCP implementation specified in the configuration.
public static OverrideUaTcpImplementation ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration The configuration instance that stores the configurable information for a UA application. ///
Résultat void

Property Details

ImageList public_oe property

The list of icon images.
public ImageList,System.Windows.Forms ImageList
Résultat System.Windows.Forms.ImageList