
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports System.Windows.Forms
Imports DevExpress.ExpressApp.Utils

Public Class HTMLMailTemplateVC
    Inherits ViewController

    Public Sub New()
        MyBase.New()

        'This call is required by the Component Designer.
        InitializeComponent()
        RegisterActions(components)

    End Sub

    Private Sub aCopyProperty_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCopyProperty.Execute
        Try
            Dim _DetailView As DetailView = TryCast(View, DetailView)
            Dim _HTMLMailTemplate As HTMLMailTemplate = TryCast(_DetailView.CurrentObject, HTMLMailTemplate)
            If _HTMLMailTemplate.ContactsProperties IsNot Nothing Then
                Dim _copy As String = String.Format("{{{0}}}", _HTMLMailTemplate.ContactsProperties)
                Clipboard.Clear()
                '  Clipboard.SetText(_copy)
                Clipboard.SetData(DataFormats.Text, CType(_copy, String))
            End If
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain"))
        End Try

    End Sub



End Class
