LibS7Adv/PLCControl.xaml.cs

35 lines
904 B
C#

using CommunityToolkit.Mvvm.Input;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Text.Json.Serialization;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Threading;
using Siemens.Simatic.Simulation.Runtime;
using CommunityToolkit.Mvvm.ComponentModel;
using static System.Runtime.InteropServices.JavaScript.JSType;
using System.Windows;
namespace LibS7Adv
{
/// <summary>
/// Interaction logic for PLCControl.xaml
/// </summary>
///
public partial class PLCControl : UserControl
{
public PLCControl()
{
InitializeComponent();
this.Loaded += OnLoaded;
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
if (DataContext != null && DataContext is PLCViewModel viewModel)
viewModel.ucLoaded();
}
}
}