forked from DNN-Connect/DNN-Translator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HtmlKeyEdit.xaml.vb
29 lines (23 loc) · 1.55 KB
/
HtmlKeyEdit.xaml.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Imports DotNetNuke.Translator.ViewModel
Public Class HtmlKeyEdit
Inherits Window
Private Sub HtmlKeyView_DataContextChanged(sender As Object, e As System.Windows.DependencyPropertyChangedEventArgs) Handles Me.DataContextChanged
'teOriginalText.ContentHtml = System.Web.HttpUtility.HtmlDecode(CType(Me.DataContext, HtmlKeyViewModel).ResourceKey.OriginalValue)
'teTargetText.ContentHtml = System.Web.HttpUtility.HtmlDecode(CType(Me.DataContext, HtmlKeyViewModel).ResourceKey.TargetValue)
teOriginalText.ContentHtml = CType(Me.DataContext, HtmlKeyViewModel).ResourceKey.OriginalValue
teTargetText.ContentHtml = CType(Me.DataContext, HtmlKeyViewModel).ResourceKey.TargetValue
CType(Me.DataContext, HtmlKeyViewModel).HasChanges = False
End Sub
'Private Sub teTargetText_TextChanged(sender As Object, e As System.EventArgs) Handles teTargetText.SourceUpdated
' CType(Me.DataContext, HtmlKeyViewModel).ResourceKey.TargetValue = System.Web.HttpUtility.HtmlEncode(teTargetText.ContentHtml)
'End Sub
Private Sub cmdOk_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles cmdOk.Click
'CType(Me.DataContext, HtmlKeyViewModel).ResourceKey.TargetValue = System.Web.HttpUtility.HtmlEncode(teTargetText.ContentHtml)
CType(Me.DataContext, HtmlKeyViewModel).ResourceKey.TargetValue = teTargetText.ContentHtml
CType(Me.DataContext, HtmlKeyViewModel).SaveChanges()
Me.Close()
End Sub
Private Sub cmdCancel_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles cmdCancel.Click
Me.Close()
End Sub
End Class