6e4645875b
- Tpa funzionante
42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
using System.ComponentModel;
|
|
|
|
namespace EgtCNCPLCComm
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindowV.xaml
|
|
/// </summary>
|
|
public partial class MainWindowV : Window
|
|
{
|
|
MainWindowVM _MainWindowVM;
|
|
public MainWindowV()
|
|
{
|
|
InitializeComponent();
|
|
_MainWindowVM = new MainWindowVM();
|
|
this.DataContext = _MainWindowVM;
|
|
this.Closing += MainWindowV_Closing;
|
|
}
|
|
|
|
public void MainWindowV_Closing(object sender, CancelEventArgs e)
|
|
{
|
|
// Handle closing logic, set e.Cancel as needed
|
|
if (_MainWindowVM.Connected)
|
|
_MainWindowVM.Tpa.remObject.OnClose();
|
|
}
|
|
}
|
|
|
|
}
|