020f4b83fb
- Correzione TextBox Nesting encrypted string in modo che il tasto Home porti all'inizio della stringa - Correzione LicenceBox che ora torna in primo piano quando, passando da una finestra all'altra, si riattiva la finestra di LicenseManager
56 lines
1.9 KiB
VB.net
56 lines
1.9 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class LicenceBoxV
|
|
|
|
Private WithEvents m_LicenceBoxVM As LicenceBoxVM
|
|
|
|
Sub New(Owner As Window, LicenceBoxVM As LicenceBoxVM)
|
|
MyBase.New()
|
|
' This call is required by the designer.
|
|
InitializeComponent()
|
|
Me.DataContext = LicenceBoxVM
|
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
|
m_LicenceBoxVM = LicenceBoxVM
|
|
End Sub
|
|
|
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_LicenceBoxVM.m_CloseWindow
|
|
Me.DataContext = Nothing
|
|
Me.DialogResult = bDialogResult
|
|
End Sub
|
|
|
|
'Private Sub LicenceBoxV_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
|
' Me.Owner = Application.Current.MainWindow
|
|
|
|
' InfoLbl.Text = CType(Map.refSearchLicencePageVM.Row.Item, Licence).LicFile
|
|
|
|
' '' Inizializzo liste opzioni
|
|
' 'LoadOptions(1, m_Option1)
|
|
' 'LoadOptions(2, m_Option2)
|
|
|
|
' DownloadBtn.Content = "Download"
|
|
' ExitBtn.Content = "Close"
|
|
'End Sub
|
|
|
|
Private Sub DownloadBtn_Click(sender As Object, e As RoutedEventArgs) Handles DownloadBtn.Click
|
|
Dim lines As String() = InfoLbl.Text.Split(New String() {Environment.NewLine},
|
|
StringSplitOptions.None)
|
|
IO.File.WriteAllLines(IO.Path.ChangeExtension(CType(Map.refSearchLicencePageVM.Row.Item, Licence).File, ".lic"),
|
|
lines, Text.Encoding.UTF8)
|
|
MessageBox.Show("Licenza scaricata correttamente")
|
|
End Sub
|
|
|
|
'Private Sub Window_Activated(sender As Object, e As EventArgs)
|
|
' Dim Window As Window = DirectCast(sender, Window)
|
|
' Window.Topmost = True
|
|
'End Sub
|
|
|
|
'Private Sub Window_Deactivated(sender As Object, e As EventArgs)
|
|
' Dim Window As Window = DirectCast(sender, Window)
|
|
' Window.Topmost = False
|
|
'End Sub
|
|
|
|
End Class
|
|
|