Class TcoDialog
Provides standard dialog to interact with the user.
Inherited Members
Namespace: PlcDocu.TcoCore
Assembly: TcoCoreConnector.dll
Syntax
public abstract class TcoDialog : TcoDialogBase
Examples
answer := _dialog
.Show()
.WithType(eDialogType.Question)
.WithCaption('Ready to go?')
.WithText('We are about to start the inspection sequence. Do we go ahead?')
.WithYesNo()
.Answer;
IF (answer = TcoCore.eDialogAnswer.Yes) THEN
seq.CompleteStep();
ELSIF(answer = TcoCore.eDialogAnswer.No) THEN
_sequence1Task.Restore();
END_IF;
TcOpen.Inxton.TcoAppDomain.Current.Builder
.SetPlcDialogs(DialogProxyServiceWpf.Create(new[] { App.Plc.MAIN._exampleContext }))
Constructors
| Improve this Doc View SourceTcoDialog()
Prevents creating instance of this class via public constructor
Declaration
public TcoDialog()
Fields
| Improve this Doc View Source_answer
Declaration
public short _answer
Field Value
| Type | Description |
|---|---|
| System.Int16 |
_caption
Declaration
public object _caption
Field Value
| Type | Description |
|---|---|
| System.Object |
_dialogType
Declaration
public short _dialogType
Field Value
| Type | Description |
|---|---|
| System.Int16 |
_hasCancel
Declaration
public object _hasCancel
Field Value
| Type | Description |
|---|---|
| System.Object |
_hasNo
Declaration
public object _hasNo
Field Value
| Type | Description |
|---|---|
| System.Object |
_hasOK
Declaration
public object _hasOK
Field Value
| Type | Description |
|---|---|
| System.Object |
_hasYes
Declaration
public object _hasYes
Field Value
| Type | Description |
|---|---|
| System.Object |
_text
Declaration
public object _text
Field Value
| Type | Description |
|---|---|
| System.Object |
Methods
| Improve this Doc View SourceShow()
Shows the dialog.
important
In order for the dialog to be displayed to the user user application must initialized in the user application. How to set up the observer in a WPF see `TcOpen.Inxton.TcoCore.Wpf.DialogProxyService`.
Declaration
[IgnoreReflection]
public dynamic Show()
Returns
| Type | Description |
|---|---|
| System.Object | Plc type ITcoDialogFormat; Twin type: |
WithCaption(Object)
Sets the caption of the dialog window.
Declaration
[IgnoreReflection]
public dynamic WithCaption(dynamic inCaption)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | inCaption | Plc type : STRING [VAR_INPUT]; Twin type : Vortex.Connector.ValueTypes.OnlinerString
|
Returns
| Type | Description |
|---|---|
| System.Object | Plc type ITcoDialogAnswer; Twin type: |
WithOk()
Sets that the OK button should be available in the dialog prompt.
Declaration
[IgnoreReflection]
public dynamic WithOk()
Returns
| Type | Description |
|---|---|
| System.Object | Plc type ITcoDialogAnswer; Twin type: |
WithText(Object)
Sets the text of the dialog window.
Declaration
[IgnoreReflection]
public dynamic WithText(dynamic inText)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | inText | Plc type : STRING [VAR_INPUT]; Twin type : Vortex.Connector.ValueTypes.OnlinerString
|
Returns
| Type | Description |
|---|---|
| System.Object | Plc type ITcoDialogAnswer; Twin type: |
WithYesNo()
Sets that the Yes and No buttons should be available in the dialog prompt.
Declaration
[IgnoreReflection]
public dynamic WithYesNo()
Returns
| Type | Description |
|---|---|
| System.Object | Plc type ITcoDialogAnswer; Twin type: |
WithYesNoCancel()
Sets that the Yes, No and Cancel buttons should be available in the dialog prompt.
Declaration
[IgnoreReflection]
public dynamic WithYesNoCancel()
Returns
| Type | Description |
|---|---|
| System.Object | Plc type ITcoDialogAnswer; Twin type: |