C# Класс Opc.Ua.Client.Controls.GuiUtils

A class that provide various common utility functions and shared resources.
Наследование: System.Windows.Forms.UserControl
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ImageList System.Windows.Forms.ImageList

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

Приватные методы

Метод Описание
InitializeComponent ( ) : void

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

Описание методов

AddToTrustedStore() публичный статический Метод

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.
Результат void

CheckApplicationInstanceCertificate() публичный статический Метод

Creates an application instance certificate if one does not already exist.
public static CheckApplicationInstanceCertificate ( ApplicationConfiguration configuration ) : X509Certificate2
configuration ApplicationConfiguration
Результат System.Security.Cryptography.X509Certificates.X509Certificate2

CheckApplicationInstanceCertificate() публичный статический Метод

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
Результат System.Security.Cryptography.X509Certificates.X509Certificate2

ConfigureFirewall() публичный статический Метод

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.
Результат void

DeleteApplicationInstanceCertificate() публичный статический Метод

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.
Результат void

DisplayUaTcpImplementation() публичный статический Метод

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.
Результат void

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

DoStartupChecks() публичный статический Метод

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
Результат ApplicationConfiguration

EditValue() публичный статический Метод

Displays a dialog that allows a use to edit a value.
public static EditValue ( Session session, object value ) : object
session Session
value object
Результат object

EditValue() публичный статический Метод

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
Результат object

GetDefaultValue() публичный статический Метод

Returns a default value for the data type.
public static GetDefaultValue ( NodeId datatypeId, int valueRank ) : object
datatypeId NodeId
valueRank int
Результат object

GetTargetIcon() публичный статический Метод

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
Результат string

GetTargetIcon() публичный статический Метод

Returns to display icon for the target of a reference.
public static GetTargetIcon ( Session session, ReferenceDescription reference ) : string
session Session
reference ReferenceDescription
Результат string

GuiUtils() публичный Метод

Initializes a new instance of the GuiUtils class.
public GuiUtils ( ) : System
Результат System

HandleCertificateValidationError() публичный статический Метод

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.
Результат void

HandleException() публичный статический Метод

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
Результат void

LoadConfiguration() публичный статический Метод

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
Результат ApplicationConfiguration

OverrideUaTcpImplementation() публичный статический Метод

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. ///
Результат void

Описание свойств

ImageList публичное свойство

The list of icon images.
public ImageList,System.Windows.Forms ImageList
Результат System.Windows.Forms.ImageList