Push Changes from Techcrafters Repo
This commit is contained in:
2
uniper_hmi/Infineon.sln.DotSettings
Normal file
2
uniper_hmi/Infineon.sln.DotSettings
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Infineon/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
@@ -1,127 +1,176 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
namespace InfineonHMI.Common
|
namespace InfineonHMI.Common;
|
||||||
|
|
||||||
|
public static class L4ItXmlSerializer
|
||||||
{
|
{
|
||||||
public static class L4ItXmlSerializer
|
/// <summary>
|
||||||
|
/// Serializes an object.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
/// <param name="serializableObject"></param>
|
||||||
|
/// <param name="fileName"></param>
|
||||||
|
/// <param name="encrypt"></param>
|
||||||
|
/// <param name="rootElementName"></param>
|
||||||
|
|
||||||
|
public static void SerializeObject<T>(T serializableObject, string fileName, bool encrypt = false, string rootElementName = null)
|
||||||
{
|
{
|
||||||
/// <summary>
|
if (string.IsNullOrEmpty(fileName))
|
||||||
/// Serializes an object.
|
return;
|
||||||
/// </summary>
|
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
/// <param name="serializableObject"></param>
|
|
||||||
/// <param name="fileName"></param>
|
|
||||||
/// <param name="encrypt"></param>
|
|
||||||
/// <param name="rootElementName"></param>
|
|
||||||
|
|
||||||
public static void SerializeObject<T>(T serializableObject, string fileName, bool encrypt = false, string rootElementName = null)
|
if (serializableObject == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
XmlSerializer serializer;
|
||||||
|
if (rootElementName != null)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(fileName))
|
var xmlRoot = new XmlRootAttribute(rootElementName);
|
||||||
return;
|
serializer = new XmlSerializer(serializableObject.GetType(), xmlRoot);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
serializer = new XmlSerializer(serializableObject.GetType());
|
||||||
|
}
|
||||||
|
|
||||||
if (serializableObject == null)
|
try
|
||||||
|
{
|
||||||
|
var dir = new FileInfo(fileName).DirectoryName;
|
||||||
|
if (dir != null && !Directory.Exists(dir)) // Überprüfen Sie, ob dir nicht null ist, bevor Sie es verwenden
|
||||||
|
Directory.CreateDirectory(dir);
|
||||||
|
|
||||||
|
var xmlDocument = new XmlDocument();
|
||||||
|
using var stream = new MemoryStream();
|
||||||
|
serializer.Serialize(stream, serializableObject);
|
||||||
|
stream.Position = 0;
|
||||||
|
xmlDocument.Load(stream);
|
||||||
|
if (encrypt && false)
|
||||||
|
{
|
||||||
|
//FileEncryption.SaveEncryptedToFile(fileName, xmlDocument.OuterXml);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
xmlDocument.Save(fileName);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.Write(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deserializes an xml file into an object list
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
/// <param name="fileName"></param>
|
||||||
|
/// <param name="decrypt"></param>
|
||||||
|
/// <param name="rootElementName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public static T DeSerializeObject<T>(string fileName, bool decrypt = false, string rootElementName = null)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(fileName) || !File.Exists(fileName)) return default!;
|
||||||
|
|
||||||
|
T objectOut;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string xmlString;
|
||||||
|
if (decrypt && false)
|
||||||
|
{
|
||||||
|
//xmlString = FileEncryption.ReadDecryptedFromFile(fileName)!;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var xmlDocument = new XmlDocument();
|
||||||
|
xmlDocument.Load(fileName);
|
||||||
|
xmlString = xmlDocument.OuterXml;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(xmlString))
|
||||||
|
{
|
||||||
|
// Handle empty xmlString if necessary
|
||||||
|
return default!;
|
||||||
|
}
|
||||||
|
|
||||||
|
using var read = new StringReader(xmlString);
|
||||||
|
var outType = typeof(T);
|
||||||
|
|
||||||
XmlSerializer serializer;
|
XmlSerializer serializer;
|
||||||
if (rootElementName != null)
|
if (rootElementName != null)
|
||||||
{
|
{
|
||||||
var xmlRoot = new XmlRootAttribute(rootElementName);
|
var root = new XmlRootAttribute(rootElementName);
|
||||||
serializer = new XmlSerializer(serializableObject.GetType(), xmlRoot);
|
serializer = new XmlSerializer(outType, root);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
serializer = new XmlSerializer(serializableObject.GetType());
|
serializer = new XmlSerializer(outType);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
using XmlReader reader = new XmlTextReader(read);
|
||||||
{
|
objectOut = (T)serializer.Deserialize(reader)!;
|
||||||
var dir = new FileInfo(fileName).DirectoryName;
|
|
||||||
if (dir != null && !Directory.Exists(dir)) // Überprüfen Sie, ob dir nicht null ist, bevor Sie es verwenden
|
|
||||||
Directory.CreateDirectory(dir);
|
|
||||||
|
|
||||||
var xmlDocument = new XmlDocument();
|
|
||||||
using var stream = new MemoryStream();
|
|
||||||
serializer.Serialize(stream, serializableObject);
|
|
||||||
stream.Position = 0;
|
|
||||||
xmlDocument.Load(stream);
|
|
||||||
if (encrypt && false)
|
|
||||||
{
|
|
||||||
//FileEncryption.SaveEncryptedToFile(fileName, xmlDocument.OuterXml);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
xmlDocument.Save(fileName);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.Write(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Deserializes an xml file into an object list
|
|
||||||
/// </summary>
|
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
/// <param name="fileName"></param>
|
|
||||||
/// <param name="decrypt"></param>
|
|
||||||
/// <param name="rootElementName"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
///
|
|
||||||
///
|
|
||||||
public static T DeSerializeObject<T>(string fileName, bool decrypt = false, string rootElementName = null)
|
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(fileName) || !File.Exists(fileName)) return default!;
|
Console.Write(ex);
|
||||||
|
return default!;
|
||||||
T objectOut;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string xmlString;
|
|
||||||
if (decrypt && false)
|
|
||||||
{
|
|
||||||
//xmlString = FileEncryption.ReadDecryptedFromFile(fileName)!;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var xmlDocument = new XmlDocument();
|
|
||||||
xmlDocument.Load(fileName);
|
|
||||||
xmlString = xmlDocument.OuterXml;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(xmlString))
|
|
||||||
{
|
|
||||||
// Handle empty xmlString if necessary
|
|
||||||
return default!;
|
|
||||||
}
|
|
||||||
|
|
||||||
using var read = new StringReader(xmlString);
|
|
||||||
var outType = typeof(T);
|
|
||||||
|
|
||||||
XmlSerializer serializer;
|
|
||||||
if (rootElementName != null)
|
|
||||||
{
|
|
||||||
var root = new XmlRootAttribute(rootElementName);
|
|
||||||
serializer = new XmlSerializer(outType, root);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
serializer = new XmlSerializer(outType);
|
|
||||||
}
|
|
||||||
|
|
||||||
using XmlReader reader = new XmlTextReader(read);
|
|
||||||
objectOut = (T)serializer.Deserialize(reader)!;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.Write(ex);
|
|
||||||
return default!;
|
|
||||||
}
|
|
||||||
|
|
||||||
return objectOut;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return objectOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Encrypt(string encryptString)
|
||||||
|
{
|
||||||
|
string EncryptionKey = "0ram@1234xxxxxxxxxxtttttuuuuuiiiiio"; //we can change the code converstion key as per our requirement
|
||||||
|
byte[] clearBytes = Encoding.Unicode.GetBytes(encryptString);
|
||||||
|
using (Aes encryptor = Aes.Create())
|
||||||
|
{
|
||||||
|
Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] {
|
||||||
|
0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76
|
||||||
|
});
|
||||||
|
encryptor.Key = pdb.GetBytes(32);
|
||||||
|
encryptor.IV = pdb.GetBytes(16);
|
||||||
|
using (MemoryStream ms = new MemoryStream())
|
||||||
|
{
|
||||||
|
using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateEncryptor(), CryptoStreamMode.Write))
|
||||||
|
{
|
||||||
|
cs.Write(clearBytes, 0, clearBytes.Length);
|
||||||
|
cs.Close();
|
||||||
|
}
|
||||||
|
encryptString = Convert.ToBase64String(ms.ToArray());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return encryptString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Decrypt(string cipherText)
|
||||||
|
{
|
||||||
|
string EncryptionKey = "0ram@1234xxxxxxxxxxtttttuuuuuiiiiio"; //we can change the code converstion key as per our requirement, but the decryption key should be same as encryption key
|
||||||
|
cipherText = cipherText.Replace(" ", "+");
|
||||||
|
byte[] cipherBytes = Convert.FromBase64String(cipherText);
|
||||||
|
using (Aes encryptor = Aes.Create())
|
||||||
|
{
|
||||||
|
Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] {
|
||||||
|
0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76
|
||||||
|
});
|
||||||
|
encryptor.Key = pdb.GetBytes(32);
|
||||||
|
encryptor.IV = pdb.GetBytes(16);
|
||||||
|
using (MemoryStream ms = new MemoryStream())
|
||||||
|
{
|
||||||
|
using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateDecryptor(), CryptoStreamMode.Write))
|
||||||
|
{
|
||||||
|
cs.Write(cipherBytes, 0, cipherBytes.Length);
|
||||||
|
cs.Close();
|
||||||
|
}
|
||||||
|
cipherText = Encoding.Unicode.GetString(ms.ToArray());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cipherText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,11 +6,9 @@
|
|||||||
xmlns:common="clr-namespace:Common"
|
xmlns:common="clr-namespace:Common"
|
||||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit"
|
xmlns:HMIToolkit="clr-namespace:HMIToolkit"
|
||||||
d:DataContext="{d:DesignInstance Type=common:MediaContainerVm, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=common:MediaContainerVm, IsDesignTimeCreatable=True}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d">
|
||||||
Width="Auto"
|
|
||||||
Height="Auto"
|
<UserControl.Resources>
|
||||||
MinWidth="200">
|
|
||||||
<UserControl.Resources>
|
|
||||||
<HMIToolkit:FeedbackToColorConverter x:Key="feedbackConverter" />
|
<HMIToolkit:FeedbackToColorConverter x:Key="feedbackConverter" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
||||||
@@ -19,65 +17,85 @@
|
|||||||
<Style TargetType="UserControl">
|
<Style TargetType="UserControl">
|
||||||
<!-- Property="Background" Value="White" /> -->
|
<!-- Property="Background" Value="White" /> -->
|
||||||
<Setter Property="Height" Value="300" />
|
<Setter Property="Height" Value="300" />
|
||||||
<Setter Property="Width" Value="100" />
|
|
||||||
</Style>
|
</Style>
|
||||||
</d:DesignerProperties.DesignStyle>
|
</d:DesignerProperties.DesignStyle>
|
||||||
|
|
||||||
<Grid Height="Auto">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="25*"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="25*"/>
|
||||||
|
<ColumnDefinition Width="50*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="10*"/>
|
<RowDefinition Height="70"/>
|
||||||
<RowDefinition Height="30*"/>
|
<RowDefinition Height="100"/>
|
||||||
<RowDefinition Height="30*"/>
|
<RowDefinition Height="100"/>
|
||||||
<RowDefinition Height="30*"/>
|
<RowDefinition Height="180"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="White" BorderThickness="2"/>
|
<Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" BorderBrush="White" BorderThickness="2"/>
|
||||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
||||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{Binding SName, Mode=OneWay }" HorizontalAlignment="Center" FontSize="24"/>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" HorizontalContentAlignment="Center" Content="{Binding SName, Mode=OneWay }" FontSize="35"/>
|
||||||
|
|
||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1" Grid.Column="2">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
||||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
||||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Übervoll" HorizontalAlignment="Center" FontSize="16"/>
|
<Label Grid.Row="0" VerticalAlignment="Center" Content="Übervoll" HorizontalContentAlignment="Center" HorizontalAlignment="Center" Width="200" FontSize="30"/>
|
||||||
<RadioButton Margin="5" Grid.Row="1" IsChecked="{Binding Overload}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<RadioButton Margin="5" Grid.Row="1" IsChecked="{Binding Overload}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Column="0" Grid.Row="2">
|
|
||||||
|
<Grid Grid.Column="1" Grid.Row="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
||||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
||||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Voll" HorizontalAlignment="Center" FontSize="16"/>
|
<Label Grid.Row="0" VerticalAlignment="Center" Content="Voll" HorizontalAlignment="Center" FontSize="30"/>
|
||||||
<RadioButton Grid.Row="1" Margin="5" IsChecked="{Binding Full}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<RadioButton Grid.Row="1" Margin="5" IsChecked="{Binding Full}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="3">
|
|
||||||
|
<Grid Grid.Row="1" Grid.Column="0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
||||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
||||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Leer" HorizontalAlignment="Center" FontSize="16"/>
|
<Label Grid.Row="0" VerticalAlignment="Center" Content="Leer" HorizontalAlignment="Center" FontSize="30"/>
|
||||||
<RadioButton Grid.Row="1" Margin="5" IsChecked="{Binding Empty}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<RadioButton Grid.Row="1" Margin="5" IsChecked="{Binding Empty}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Border Grid.Column="1" Grid.Row="1" Grid.RowSpan="3" BorderBrush="White" BorderThickness="1"></Border>
|
<Border Grid.Column="1" Grid.Row="1" BorderBrush="White" BorderThickness="1"/>
|
||||||
<Grid Grid.Column="1" Grid.Row="1" Grid.RowSpan="3">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Button x:Name="btnFill" DataContext="{Binding FillButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="0" Grid.Column="0" Content="Füllen" Margin="5" />
|
|
||||||
<Button x:Name="btnOpen" DataContext="{Binding EmptyButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="1" Grid.Column="0" Content="Leeren" Margin="5" />
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button x:Name="btnOpen"
|
||||||
|
Grid.Column="0"
|
||||||
|
DataContext="{Binding EmptyButton}"
|
||||||
|
Command="{Binding ButtonClickedCommand}"
|
||||||
|
IsEnabled="{Binding XRelease}"
|
||||||
|
Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}"
|
||||||
|
Content="Leeren"
|
||||||
|
Height="100"
|
||||||
|
FontSize="30"/>
|
||||||
|
|
||||||
|
<Button x:Name="btnFill"
|
||||||
|
Grid.Column="1"
|
||||||
|
DataContext="{Binding FillButton}"
|
||||||
|
Command="{Binding ButtonClickedCommand}"
|
||||||
|
IsEnabled="{Binding XRelease}"
|
||||||
|
Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}"
|
||||||
|
Content="Füllen"
|
||||||
|
Height="100"
|
||||||
|
FontSize="30"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -2,31 +2,30 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace Common
|
namespace Common;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für AnalogValue.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MediaContainer : UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
public bool IsReadonly { get; set; }
|
||||||
/// Interaktionslogik für AnalogValue.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class MediaContainer : UserControl
|
|
||||||
{
|
|
||||||
public bool IsReadonly { get; set; }
|
|
||||||
|
|
||||||
public MediaContainer()
|
public MediaContainer()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// Unloaded += OnUnloaded;
|
// Unloaded += OnUnloaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var disposable = DataContext as IDisposable;
|
var disposable = DataContext as IDisposable;
|
||||||
disposable?.Dispose();
|
disposable?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
||||||
{
|
{
|
||||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
||||||
e.Handled = regex.IsMatch(e.Text);
|
e.Handled = regex.IsMatch(e.Text);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
68
uniper_hmi/UniperHMI/Common/PackMLControl.xaml
Normal file
68
uniper_hmi/UniperHMI/Common/PackMLControl.xaml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<UserControl x:Class="Common.PackMLControl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
|
xmlns:HMIToolkit="clr-namespace:HMIToolkit"
|
||||||
|
d:DataContext="{d:DesignInstance Type=common:PackMLControlVM, IsDesignTimeCreatable=True}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Width="Auto"
|
||||||
|
Height="Auto"
|
||||||
|
MinHeight="800"
|
||||||
|
MinWidth="500">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<HMIToolkit:FeedbackToColorConverter x:Key="feedbackConverter"/>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
||||||
|
<!-- Style to see things in the designer-->
|
||||||
|
<d:DesignerProperties.DesignStyle>
|
||||||
|
<Style TargetType="UserControl">
|
||||||
|
<!--<Setter Property="Background" Value="Transparent" />-->
|
||||||
|
<Setter Property="Height" Value="300" />
|
||||||
|
<Setter Property="Width" Value="250" />
|
||||||
|
</Style>
|
||||||
|
</d:DesignerProperties.DesignStyle>
|
||||||
|
|
||||||
|
<Grid Height="Auto">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="250"/>
|
||||||
|
<ColumnDefinition Width="250"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="15*"/>
|
||||||
|
<RowDefinition Height="8*"/>
|
||||||
|
<RowDefinition Height="15*"/>
|
||||||
|
<RowDefinition Height="15*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="15*"/>
|
||||||
|
<RowDefinition Height="15*"/>
|
||||||
|
<RowDefinition Height="15*"/>
|
||||||
|
<RowDefinition Height="15*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="White" BorderThickness="2"/>
|
||||||
|
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{Binding STitle}" HorizontalAlignment="Center" FontSize="44"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" Content="{Binding SCurrentState}" FontSize="32"/>
|
||||||
|
<Border Grid.Row="1" Grid.Column="0" Grid.RowSpan="1" Grid.ColumnSpan="2" BorderBrush="White" BorderThickness="1,1,1,0"></Border>
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" Content="{Binding SCurrentMode}" FontSize="32"/>
|
||||||
|
<Border Grid.Row="2" Grid.Column="0" Grid.RowSpan="1" Grid.ColumnSpan="2" BorderBrush="White" BorderThickness="1,0,1,1"></Border>
|
||||||
|
|
||||||
|
|
||||||
|
<Border Grid.Row="0" Grid.Column="0" Grid.RowSpan="9" Grid.ColumnSpan="2" BorderBrush="White" BorderThickness="1"></Border>
|
||||||
|
<Border Grid.Row="4" Grid.Column="0" Grid.RowSpan="1" Grid.ColumnSpan="2" BorderBrush="White" BorderThickness="2"></Border>
|
||||||
|
|
||||||
|
<Button Visibility="Visible" Grid.Row="3" Grid.Column="0" Content="Produktion" Margin="5" DataContext="{Binding ProdModeButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="3" Grid.Column="1" Content="Manuell" Margin="5" DataContext="{Binding ManualModeButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="5" Grid.Column="0" Content="Clear" Margin="5" DataContext="{Binding ClearButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="5" Grid.Column="1" Content="Reset" Margin="5" DataContext="{Binding ResetButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="6" Grid.Column="0" Content="Abbruch" Margin="5" DataContext="{Binding AbortButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="6" Grid.Column="1" Content="Hold" Margin="5" DataContext="{Binding HoldButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="7" Grid.Column="0" Content="Stop" Margin="5" DataContext="{Binding StopButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="7" Grid.Column="1" Content="Suspend" Margin="5" DataContext="{Binding SuspendButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="8" Grid.Column="0" Content="Unhold" Margin="5" DataContext="{Binding UnholdButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
<Button Visibility="Visible" Grid.Row="8" Grid.Column="1" Content="Unsuspend" Margin="5" DataContext="{Binding UnsuspendButtonVm}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" FontSize="32" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -13,16 +13,15 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace UniperHMI
|
namespace Common;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für WorkingModeSelectionControl.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class PackMLControl : UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
public PackMLControl()
|
||||||
/// Interaktionslogik für ModuleOverviewPage.xaml
|
{
|
||||||
/// </summary>
|
InitializeComponent();
|
||||||
public partial class ModuleOverviewPage : Page
|
}
|
||||||
{
|
|
||||||
public ModuleOverviewPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
201
uniper_hmi/UniperHMI/Common/PackMLControlVm.cs
Normal file
201
uniper_hmi/UniperHMI/Common/PackMLControlVm.cs
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using TwinCAT.TypeSystem;
|
||||||
|
using Heisig.HMI.AdsManager;
|
||||||
|
using HMIToolkit;
|
||||||
|
using InfineonHMI.Common;
|
||||||
|
|
||||||
|
namespace Common;
|
||||||
|
|
||||||
|
public sealed partial class PackMLControlVM : ObservableValidator, IDisposable
|
||||||
|
{
|
||||||
|
|
||||||
|
private IAdsManager _adsManager;
|
||||||
|
private readonly string _variableName;
|
||||||
|
|
||||||
|
[ObservableProperty] private string? sTitle;
|
||||||
|
|
||||||
|
[ObservableProperty] private string? sCurrentMode;
|
||||||
|
|
||||||
|
[ObservableProperty] private string? sCurrentState;
|
||||||
|
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? prodModeButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? manualModeButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? clearButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? resetButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? startButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? abortButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? holdButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? stopButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? suspendButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? unholdButtonVm;
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? unsuspendButtonVm;
|
||||||
|
|
||||||
|
[ObservableProperty] private bool canUserInteract;
|
||||||
|
|
||||||
|
public PackMLControlVM()
|
||||||
|
{
|
||||||
|
SCurrentMode = "Modus: ";
|
||||||
|
SCurrentState = "Aktueller Zustand: ";
|
||||||
|
STitle = "Betriebsart";
|
||||||
|
ProdModeButtonVm = new();
|
||||||
|
ManualModeButtonVm = new();
|
||||||
|
ClearButtonVm= new();
|
||||||
|
ResetButtonVm= new();
|
||||||
|
StartButtonVm = new();
|
||||||
|
AbortButtonVm = new();
|
||||||
|
HoldButtonVm = new();
|
||||||
|
StopButtonVm = new();
|
||||||
|
SuspendButtonVm = new();
|
||||||
|
UnholdButtonVm = new();
|
||||||
|
UnsuspendButtonVm = new();
|
||||||
|
|
||||||
|
var currentUser = Users.getCurrentUser();
|
||||||
|
canUserInteract = currentUser.UserLevel > 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackMLControlVM(IAdsManager adsManager, string variableName)
|
||||||
|
{
|
||||||
|
|
||||||
|
_adsManager = adsManager;
|
||||||
|
_variableName = variableName;
|
||||||
|
STitle = "Betriebsart";
|
||||||
|
|
||||||
|
SCurrentMode = "Modus: ";
|
||||||
|
SCurrentState = "Aktueller Zustand: ";
|
||||||
|
|
||||||
|
ProdModeButtonVm = new(_adsManager, _variableName + ".stBtnProdMode");
|
||||||
|
ManualModeButtonVm = new(_adsManager, _variableName + ".stBtnManualMode");
|
||||||
|
ClearButtonVm = new(_adsManager, _variableName + ".stBtnClear");
|
||||||
|
ResetButtonVm = new(_adsManager, _variableName + ".stBtnReset");
|
||||||
|
StartButtonVm = new(_adsManager, _variableName + ".stBtnStart");
|
||||||
|
AbortButtonVm = new(_adsManager, _variableName + ".stBtnAbort");
|
||||||
|
HoldButtonVm = new(_adsManager, _variableName + ".stBtnHold");
|
||||||
|
StopButtonVm = new(_adsManager, _variableName + ".stBtnStop");
|
||||||
|
SuspendButtonVm = new(_adsManager, _variableName + ".stBtnSuspend");
|
||||||
|
UnholdButtonVm = new(_adsManager, _variableName + ".stBtnUnhold");
|
||||||
|
UnsuspendButtonVm = new(_adsManager, _variableName + ".stBtnUnsuspend");
|
||||||
|
|
||||||
|
_adsManager.Register(_variableName + ".eCurrentState", StateChanged);
|
||||||
|
_adsManager.Register(_variableName + ".eCurrentMode", ModeChanged);
|
||||||
|
|
||||||
|
var currentUser = Users.getCurrentUser();
|
||||||
|
canUserInteract = currentUser.UserLevel > 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StateChanged(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var state = (int)e.Value;
|
||||||
|
var curState = "Aktueller Status: ";
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
curState += "Undefined";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
curState += "Clearing";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
curState += "Stopped";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
curState += "Starting";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
curState += "Idle";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
curState += "Suspended";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
curState += "Execute";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
curState += "Stopping";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
curState += "Aborting";
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
curState += "Aborted";
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
curState += "Holding";
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
curState += "Held";
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
curState += "Unholding";
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
curState += "Suspending";
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
curState += "Unsuspending";
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
curState += "Resetting";
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
curState += "Completing";
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
curState += "Completed";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
curState += "Undefined";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SCurrentState = curState;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ModeChanged(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var curMode = "Aktueller Modus: ";
|
||||||
|
var mode = (int)e.Value;
|
||||||
|
|
||||||
|
switch (mode)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
curMode += "Invalid";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
curMode += "Production";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
curMode += "Maintenance";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
curMode += "Manual";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
curMode += "change_over";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
curMode += "clean";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
curMode += "set up";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
curMode += "empty out";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
curMode += "Invalid";
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SCurrentMode = curMode;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,27 +6,20 @@
|
|||||||
xmlns:local="clr-namespace:Common"
|
xmlns:local="clr-namespace:Common"
|
||||||
d:DataContext="{d:DesignInstance Type=local:ParamControlFloatVm, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=local:ParamControlFloatVm, IsDesignTimeCreatable=True}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
d:DesignWidth="600"
|
||||||
|
d:DesignHeight="120"
|
||||||
Width="Auto"
|
Width="Auto"
|
||||||
Height="Auto">
|
Height="Auto">
|
||||||
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
<Grid Height="70">
|
||||||
<!-- Style to see things in the designer-->
|
|
||||||
<d:DesignerProperties.DesignStyle>
|
|
||||||
<Style TargetType="UserControl">
|
|
||||||
<!-- Property="Background" Value="White" /> -->
|
|
||||||
<Setter Property="Height" Value="40" />
|
|
||||||
<Setter Property="Width" Value="280" />
|
|
||||||
</Style>
|
|
||||||
</d:DesignerProperties.DesignStyle>
|
|
||||||
<Grid Height="Auto">
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="400" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="200" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
||||||
<Label x:Name="tbName" Grid.Column="0" Content="{Binding SName, Mode=OneWay }" Width="200"/>
|
<Label x:Name="tbName" Grid.Column="0" Content="{Binding SName, Mode=OneWay }" FontSize="30" VerticalAlignment="Center"/>
|
||||||
<TextBox x:Name="tbValue" Text="{Binding Value, Mode=TwoWay, StringFormat=N2}" Grid.Column="1" MaxLines="1" Width="80" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
|
<TextBox x:Name="tbValue" Text="{Binding Value, Mode=TwoWay, StringFormat=N2}" Margin="10" Width="Auto" FontSize="30" Grid.Column="1" MaxLines="1" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -2,31 +2,30 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace Common
|
namespace Common;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für AnalogValue.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ParamControlFloat : UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
public bool IsReadonly { get; set; }
|
||||||
/// Interaktionslogik für AnalogValue.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class ParamControlFloat : UserControl
|
|
||||||
{
|
|
||||||
public bool IsReadonly { get; set; }
|
|
||||||
|
|
||||||
public ParamControlFloat()
|
public ParamControlFloat()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// Unloaded += OnUnloaded;
|
// Unloaded += OnUnloaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var disposable = DataContext as IDisposable;
|
var disposable = DataContext as IDisposable;
|
||||||
disposable?.Dispose();
|
disposable?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
||||||
{
|
{
|
||||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
||||||
e.Handled = regex.IsMatch(e.Text);
|
e.Handled = regex.IsMatch(e.Text);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -6,28 +6,21 @@
|
|||||||
xmlns:common="clr-namespace:Common"
|
xmlns:common="clr-namespace:Common"
|
||||||
d:DataContext="{d:DesignInstance Type=common:ParamControlIntVm, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=common:ParamControlIntVm, IsDesignTimeCreatable=True}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
d:DesignWidth="600"
|
||||||
|
d:DesignHeight="120"
|
||||||
Width="Auto"
|
Width="Auto"
|
||||||
Height="Auto">
|
Height="Auto">
|
||||||
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
<Grid Height="70">
|
||||||
<!-- Style to see things in the designer-->
|
|
||||||
<d:DesignerProperties.DesignStyle>
|
|
||||||
<Style TargetType="UserControl">
|
|
||||||
<!-- Property="Background" Value="White" /> -->
|
|
||||||
<Setter Property="Height" Value="40" />
|
|
||||||
<Setter Property="Width" Value="280" />
|
|
||||||
</Style>
|
|
||||||
</d:DesignerProperties.DesignStyle>
|
|
||||||
<Grid Height="Auto">
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="400" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="200" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
||||||
<Label x:Name="tbName" Grid.Column="0" Content="{Binding SName, Mode=OneWay }" Width="200"/>
|
<Label x:Name="tbName" Grid.Column="0" Content="{Binding SName, Mode=OneWay }" FontSize="30" VerticalAlignment="Center"/>
|
||||||
<TextBox x:Name="tbValue" Text="{Binding Value, Mode=TwoWay}" Grid.Column="1" MaxLines="1" Width="80" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
|
<TextBox x:Name="tbValue" Text="{Binding Value, Mode=TwoWay}" Margin="10" Width="Auto" FontSize="30" Grid.Column="1" MaxLines="1" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -2,31 +2,30 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace Common
|
namespace Common;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für AnalogValue.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ParamControlInt : UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
public bool IsReadonly { get; set; }
|
||||||
/// Interaktionslogik für AnalogValue.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class ParamControlInt : UserControl
|
|
||||||
{
|
|
||||||
public bool IsReadonly { get; set; }
|
|
||||||
|
|
||||||
public ParamControlInt()
|
public ParamControlInt()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// Unloaded += OnUnloaded;
|
// Unloaded += OnUnloaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var disposable = DataContext as IDisposable;
|
var disposable = DataContext as IDisposable;
|
||||||
disposable?.Dispose();
|
disposable?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
||||||
{
|
{
|
||||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
||||||
e.Handled = regex.IsMatch(e.Text);
|
e.Handled = regex.IsMatch(e.Text);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
57
uniper_hmi/UniperHMI/Common/User.cs
Normal file
57
uniper_hmi/UniperHMI/Common/User.cs
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace InfineonHMI.Common;
|
||||||
|
|
||||||
|
public static class Users
|
||||||
|
{
|
||||||
|
|
||||||
|
private static User CurrentUser { get; set; }
|
||||||
|
public static ObservableCollection<User> UsersCollection { get; set; }
|
||||||
|
|
||||||
|
public static void setCurrentUser(User u)
|
||||||
|
{
|
||||||
|
CurrentUser = new User(u);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static User getCurrentUser()
|
||||||
|
{
|
||||||
|
if (CurrentUser == null)
|
||||||
|
CurrentUser = new User("undefined", "undef", 0);
|
||||||
|
|
||||||
|
return CurrentUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class User
|
||||||
|
{
|
||||||
|
public string? UserName { get; set; }
|
||||||
|
|
||||||
|
public string PasswordHash { get; set; }
|
||||||
|
|
||||||
|
public int UserLevel { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public User()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public User(User u)
|
||||||
|
{
|
||||||
|
UserName = u.UserName;
|
||||||
|
PasswordHash = u.PasswordHash;
|
||||||
|
UserLevel = u.UserLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User(string name, string hash, int level)
|
||||||
|
{
|
||||||
|
UserName = name;
|
||||||
|
PasswordHash = hash;
|
||||||
|
UserLevel = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
52
uniper_hmi/UniperHMI/Common/UserManagementWindow.xaml
Normal file
52
uniper_hmi/UniperHMI/Common/UserManagementWindow.xaml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<Window x:Class="InfineonHMI.Common.UserManagementWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
|
d:DesignHeight="800" d:DesignWidth="1500"
|
||||||
|
d:DataContext="{d:DesignInstance Type=common:UserManagementWindowVm, IsDesignTimeCreatable=True}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Benutzer anmelden"
|
||||||
|
Icon="../Resources/user.png"
|
||||||
|
Height="800"
|
||||||
|
Width="1500"
|
||||||
|
Background="Black">
|
||||||
|
<Grid Margin="20">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="550"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="400"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="Benutzername:" FontSize="50" Margin="20"/>
|
||||||
|
<ComboBox Grid.Row="0"
|
||||||
|
Grid.Column="1"
|
||||||
|
FontSize="40"
|
||||||
|
Margin="20"
|
||||||
|
ItemsSource="{Binding SavedUsers}" SelectedItem="{Binding SelectedUsername}"/>
|
||||||
|
<Button Grid.Row="0" Grid.Column="2"
|
||||||
|
Margin="20" Content="Löschen" FontSize="40" Command="{Binding DeleteUserCommand}"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Grid.Row="1" Content="Neuer Benutzer: " FontSize="50" Margin="20" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="1" Margin="20" Text="{Binding NewUser}"/>
|
||||||
|
<Button Grid.Row="1" Grid.Column="2" Margin="20" Content="Anmelden" FontSize="40" Command="{Binding LoginCommand}"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Grid.Row="2" Content="Passwort: " FontSize="50" Margin="20" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="2" FontSize="50" Margin="20" Text="{Binding SelectedUserPassword, UpdateSourceTrigger=PropertyChanged}" Foreground="Transparent" Background="Transparent" />
|
||||||
|
<Button Grid.Row="2" Grid.Column="2" Margin="20" Content="Erstellen" FontSize="40" Command="{Binding CreateUserCommand}" IsEnabled="{Binding IsCreateCommandEnabled}"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Grid.Row="3" Content="Passwort wiederholen: " FontSize="50" Margin="20" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="3" FontSize="50" Margin="20" Text="{Binding SelectedUserPasswordWdh, UpdateSourceTrigger=PropertyChanged}" Foreground="Transparent" Background="Transparent"/>
|
||||||
|
|
||||||
|
<Button Grid.Row="5" Grid.Column="2" Height="80" Margin="20" Content="Abmelden" FontSize="40" Command="{Binding LogoffCommand}"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
17
uniper_hmi/UniperHMI/Common/UserManagementWindow.xaml.cs
Normal file
17
uniper_hmi/UniperHMI/Common/UserManagementWindow.xaml.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace InfineonHMI.Common;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Login or change user dialog.
|
||||||
|
/// </summary>
|
||||||
|
public partial class UserManagementWindow
|
||||||
|
{
|
||||||
|
public UserManagementWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Center dialog to MainWindow
|
||||||
|
Owner = Application.Current.MainWindow;
|
||||||
|
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||||
|
}
|
||||||
|
}
|
||||||
213
uniper_hmi/UniperHMI/Common/UserManagementWindowVm.cs
Normal file
213
uniper_hmi/UniperHMI/Common/UserManagementWindowVm.cs
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using Heisig.HMI.AdsManager;
|
||||||
|
using HMIToolkit;
|
||||||
|
using InfineonHMI.Common;
|
||||||
|
using MahApps.Metro.Controls;
|
||||||
|
using Microsoft.Win32;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Drawing.Text;
|
||||||
|
using System.Security;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using TwinCAT.TypeSystem;
|
||||||
|
|
||||||
|
namespace Common;
|
||||||
|
|
||||||
|
public sealed partial class UserManagementWindowVm : ObservableValidator
|
||||||
|
{
|
||||||
|
|
||||||
|
private IAdsManager _adsManager;
|
||||||
|
private readonly string _variableName;
|
||||||
|
|
||||||
|
[ObservableProperty] private string? selectedUsername;
|
||||||
|
|
||||||
|
[ObservableProperty] private string newUser;
|
||||||
|
|
||||||
|
[ObservableProperty] private ObservableCollection<string>? savedUsers;
|
||||||
|
|
||||||
|
private ObservableCollection<User> users;
|
||||||
|
|
||||||
|
private UserManagementWindow dlg = new UserManagementWindow();
|
||||||
|
|
||||||
|
private string selectedUserPassword;
|
||||||
|
|
||||||
|
private string filePath = "C:\\ProgramData\\InfineonHMI_UserData\\Userdata.xml";
|
||||||
|
|
||||||
|
private string selectedUserPasswordWdh;
|
||||||
|
public User CurrentUser { get; set; }
|
||||||
|
public string SelectedUserPassword
|
||||||
|
{
|
||||||
|
get { return selectedUserPassword; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref selectedUserPassword, value);
|
||||||
|
IsCreateCommandEnabled = SelectedUserPasswordWdh.Equals(value) && !string.IsNullOrEmpty(value)&& CurrentUser.UserLevel>0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? SelectedUserPasswordWdh
|
||||||
|
{
|
||||||
|
get { return selectedUserPasswordWdh; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref selectedUserPasswordWdh, value);
|
||||||
|
IsCreateCommandEnabled = SelectedUserPassword.Equals(value) && !string.IsNullOrEmpty(value) && CurrentUser.UserLevel > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ObservableProperty] private bool isCreateCommandEnabled;
|
||||||
|
|
||||||
|
|
||||||
|
public UserManagementWindowVm()
|
||||||
|
{
|
||||||
|
IsCreateCommandEnabled = false;
|
||||||
|
CurrentUser = new("default", "default", 0);
|
||||||
|
users = L4ItXmlSerializer.DeSerializeObject<ObservableCollection<User>>(filePath);
|
||||||
|
savedUsers = new ObservableCollection<string>();
|
||||||
|
foreach (var user in users)
|
||||||
|
{
|
||||||
|
if (user.UserName != null)
|
||||||
|
savedUsers.Add(user.UserName);
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedUserPassword = "";
|
||||||
|
selectedUserPasswordWdh = "";
|
||||||
|
selectedUsername = "";
|
||||||
|
SelectedUserPasswordWdh = "";
|
||||||
|
SelectedUserPassword = "";
|
||||||
|
SelectedUsername = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserManagementWindowVm(User curUser)
|
||||||
|
{
|
||||||
|
IsCreateCommandEnabled = true;
|
||||||
|
if (curUser != null)
|
||||||
|
{
|
||||||
|
CurrentUser = curUser;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CurrentUser = new User("unknown", "default", 100);
|
||||||
|
}
|
||||||
|
users = L4ItXmlSerializer.DeSerializeObject<ObservableCollection<User>>(filePath);
|
||||||
|
savedUsers = new ObservableCollection<string>();
|
||||||
|
if (users == null)
|
||||||
|
{
|
||||||
|
users = new ObservableCollection<User>();
|
||||||
|
users.Add(new User("default", "ssW+1nwLrdWTKi1tkE/pfQ==", 100));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var user in users)
|
||||||
|
{
|
||||||
|
if(user.UserName != null)
|
||||||
|
savedUsers.Add(user.UserName);
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedUserPassword = "";
|
||||||
|
selectedUserPasswordWdh = "";
|
||||||
|
selectedUsername = "";
|
||||||
|
SelectedUserPasswordWdh = "";
|
||||||
|
SelectedUserPassword = "";
|
||||||
|
SelectedUsername = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public User GetCurrentUserLevel()
|
||||||
|
{
|
||||||
|
dlg.DataContext = this;
|
||||||
|
|
||||||
|
dlg.ShowDialog();
|
||||||
|
|
||||||
|
return CurrentUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void Login()
|
||||||
|
{
|
||||||
|
|
||||||
|
User userInFile = new User("default", "default", 0);
|
||||||
|
bool userFound = false;
|
||||||
|
foreach (var user in users)
|
||||||
|
{
|
||||||
|
if (user.UserName.Equals(SelectedUsername))
|
||||||
|
{
|
||||||
|
userInFile = user;
|
||||||
|
userFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (userFound && CheckPassword(userInFile))
|
||||||
|
{
|
||||||
|
CurrentUser = userInFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
dlg.Close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void Logoff()
|
||||||
|
{
|
||||||
|
CurrentUser = new User("default", "default", 0);
|
||||||
|
dlg.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void CreateUser()
|
||||||
|
{
|
||||||
|
if(!SelectedUserPassword.Equals(SelectedUserPasswordWdh))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (users == null)
|
||||||
|
users = new ();
|
||||||
|
var u = new User
|
||||||
|
{
|
||||||
|
UserName = NewUser,
|
||||||
|
PasswordHash = L4ItXmlSerializer.Encrypt(SelectedUserPassword),
|
||||||
|
UserLevel = 100,
|
||||||
|
};
|
||||||
|
|
||||||
|
users.Add(new User(u));
|
||||||
|
SavedUsers.Add(NewUser);
|
||||||
|
|
||||||
|
SelectedUserPassword = "";
|
||||||
|
SelectedUserPasswordWdh = "";
|
||||||
|
|
||||||
|
L4ItXmlSerializer.SerializeObject(users, filePath);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void DeleteUser()
|
||||||
|
{
|
||||||
|
if (SelectedUsername.Equals("default"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
users.Remove(users.First(user => user.UserName.Equals(SelectedUsername)));
|
||||||
|
|
||||||
|
SavedUsers = new ObservableCollection<string>();
|
||||||
|
foreach (var user in users)
|
||||||
|
{
|
||||||
|
SavedUsers.Add(user.UserName);
|
||||||
|
}
|
||||||
|
|
||||||
|
L4ItXmlSerializer.SerializeObject(users, filePath);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool CheckPassword(User user)
|
||||||
|
{
|
||||||
|
var hashcode = L4ItXmlSerializer.Decrypt(user.PasswordHash);
|
||||||
|
if (hashcode.Equals(SelectedUserPassword))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
34
uniper_hmi/UniperHMI/Common/WorkingmodeToColorConverter.cs
Normal file
34
uniper_hmi/UniperHMI/Common/WorkingmodeToColorConverter.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
using System.Diagnostics.Eventing.Reader;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace Common;
|
||||||
|
|
||||||
|
class WorkingmodeToColorConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public Object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (targetType != typeof(System.Windows.Media.Brush))
|
||||||
|
throw new InvalidOperationException("The target must be a brush");
|
||||||
|
|
||||||
|
|
||||||
|
#pragma warning disable CS8604 // Mögliches Nullverweisargument.
|
||||||
|
var selected = (bool)value;
|
||||||
|
#pragma warning restore CS8604 // Mögliches Nullverweisargument.
|
||||||
|
|
||||||
|
if (selected)
|
||||||
|
{
|
||||||
|
return System.Windows.Media.Brushes.LightSeaGreen;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ return DependencyProperty.UnsetValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return DependencyProperty.UnsetValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,32 +2,31 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public class DateTimeToEventTimeConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public class DateTimeToEventTimeConverter : IValueConverter
|
// 599264352000000000 ticks is a date used by beckhoff for events that didnt happen up to this point
|
||||||
{
|
public const long NoTime = 599264352000000000;
|
||||||
// 599264352000000000 ticks is a date used by beckhoff for events that didnt happen up to this point
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
public const long NoTime = 599264352000000000;
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
if (value is DateTime dt)
|
||||||
{
|
{
|
||||||
if (value is DateTime dt)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (dt.Ticks == NoTime)
|
if (dt.Ticks == NoTime)
|
||||||
return "";
|
return "";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CultureInfo cultureInfo = CultureInfo.CurrentCulture;
|
CultureInfo cultureInfo = CultureInfo.CurrentCulture;
|
||||||
return dt.ToString("G", cultureInfo);
|
return dt.ToString("G", cultureInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new InvalidOperationException("Target must be of type DateTime");
|
throw new InvalidOperationException("Target must be of type DateTime");
|
||||||
}
|
}
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
return DependencyProperty.UnsetValue;
|
return DependencyProperty.UnsetValue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für BinaryValveWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class BinaryValveWindow : Window
|
||||||
{
|
{
|
||||||
/// <summary>
|
public BinaryValveWindow()
|
||||||
/// Interaktionslogik für BinaryValveWindow.xaml
|
{
|
||||||
/// </summary>
|
InitializeComponent();
|
||||||
public partial class BinaryValveWindow : Window
|
}
|
||||||
{
|
|
||||||
public BinaryValveWindow()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,23 +1,22 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AnalogMotorControl.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class AnalogMotorControl : UserControl
|
|
||||||
{
|
|
||||||
public AnalogMotorControl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AnalogMotorControl.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class AnalogMotorControl : UserControl
|
||||||
}
|
{
|
||||||
}
|
public AnalogMotorControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,82 +2,81 @@
|
|||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using Heisig.HMI.AdsManager;
|
using Heisig.HMI.AdsManager;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
public sealed partial class AnalogMotorControlVM : ObservableObject
|
||||||
{
|
{
|
||||||
public sealed partial class AnalogMotorControlVM : ObservableObject
|
[ObservableProperty]
|
||||||
{
|
private string sName = "No Name";
|
||||||
[ObservableProperty]
|
|
||||||
private string sName = "No Name";
|
|
||||||
|
|
||||||
public HMIControlButtonVM? AutomaticButton { get; private set; }
|
public HMIControlButtonVM? AutomaticButton { get; private set; }
|
||||||
public HMIControlButtonVM? ManualButton { get; private set; }
|
public HMIControlButtonVM? ManualButton { get; private set; }
|
||||||
public HMIControlButtonVM StartButton { get; private set; }
|
public HMIControlButtonVM StartButton { get; private set; }
|
||||||
public HMIControlButtonVM StopButton { get; private set; }
|
public HMIControlButtonVM StopButton { get; private set; }
|
||||||
public IntlkControlVM? Interlocks { get; private set; }
|
public IntlkControlVM? Interlocks { get; private set; }
|
||||||
public AnalogValueVM? Setpoint { get; private set; }
|
public AnalogValueVM? Setpoint { get; private set; }
|
||||||
public AnalogValueVM? ProcessValue { get; private set; }
|
public AnalogValueVM? ProcessValue { get; private set; }
|
||||||
|
|
||||||
private readonly string? _variableName;
|
private readonly string? _variableName;
|
||||||
|
|
||||||
private IAdsManager? _adsManager;
|
private IAdsManager? _adsManager;
|
||||||
|
|
||||||
public AnalogMotorControlVM()
|
public AnalogMotorControlVM()
|
||||||
{
|
{
|
||||||
AutomaticButton = new HMIControlButtonVM();
|
AutomaticButton = new HMIControlButtonVM();
|
||||||
ManualButton = new HMIControlButtonVM();
|
ManualButton = new HMIControlButtonVM();
|
||||||
StartButton = new HMIControlButtonVM();
|
StartButton = new HMIControlButtonVM();
|
||||||
StopButton = new HMIControlButtonVM();
|
StopButton = new HMIControlButtonVM();
|
||||||
Interlocks = new IntlkControlVM();
|
Interlocks = new IntlkControlVM();
|
||||||
Setpoint = new AnalogValueVM();
|
Setpoint = new AnalogValueVM();
|
||||||
ProcessValue = new AnalogValueVM();
|
ProcessValue = new AnalogValueVM();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AnalogMotorControlVM(IAdsManager adsManager, string variableName)
|
public AnalogMotorControlVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
AutomaticButton = new HMIControlButtonVM(_adsManager, _variableName + ".stAutomaticButton");
|
AutomaticButton = new HMIControlButtonVM(_adsManager, _variableName + ".stAutomaticButton");
|
||||||
ManualButton = new HMIControlButtonVM(_adsManager, _variableName + ".stManualButton");
|
ManualButton = new HMIControlButtonVM(_adsManager, _variableName + ".stManualButton");
|
||||||
StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartButton");
|
StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartButton");
|
||||||
StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopButton");
|
StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopButton");
|
||||||
Interlocks = new IntlkControlVM(_adsManager, _variableName + ".stInterlock");
|
Interlocks = new IntlkControlVM(_adsManager, _variableName + ".stInterlock");
|
||||||
Setpoint = new AnalogValueVM(_adsManager, _variableName + ".stSetpoint", false);
|
Setpoint = new AnalogValueVM(_adsManager, _variableName + ".stSetpoint", false);
|
||||||
ProcessValue = new AnalogValueVM(_adsManager, _variableName + ".stProcessValue", true);
|
ProcessValue = new AnalogValueVM(_adsManager, _variableName + ".stProcessValue", true);
|
||||||
|
|
||||||
|
|
||||||
_adsManager.Register(_variableName + ".sName", NameChanged);
|
_adsManager.Register(_variableName + ".sName", NameChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_adsManager?.Deregister(_variableName + ".sName", NameChanged);
|
_adsManager?.Deregister(_variableName + ".sName", NameChanged);
|
||||||
_adsManager = null;
|
_adsManager = null;
|
||||||
|
|
||||||
AutomaticButton?.Dispose();
|
AutomaticButton?.Dispose();
|
||||||
AutomaticButton = null;
|
AutomaticButton = null;
|
||||||
|
|
||||||
ManualButton?.Dispose();
|
ManualButton?.Dispose();
|
||||||
ManualButton = null;
|
ManualButton = null;
|
||||||
|
|
||||||
StartButton?.Dispose();
|
StartButton?.Dispose();
|
||||||
StartButton = null;
|
StartButton = null;
|
||||||
|
|
||||||
StopButton?.Dispose();
|
StopButton?.Dispose();
|
||||||
StopButton = null;
|
StopButton = null;
|
||||||
|
|
||||||
Interlocks?.Dispose();
|
Interlocks?.Dispose();
|
||||||
Interlocks = null;
|
Interlocks = null;
|
||||||
|
|
||||||
Setpoint?.Dispose();
|
Setpoint?.Dispose();
|
||||||
Setpoint = null;
|
Setpoint = null;
|
||||||
|
|
||||||
ProcessValue?.Dispose();
|
ProcessValue?.Dispose();
|
||||||
ProcessValue = null;
|
ProcessValue = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NameChanged(object? sender, ValueChangedEventArgs e)
|
private void NameChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
SName = (string)e.Value;
|
SName = (string)e.Value;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,32 +2,31 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
public sealed partial class AnalogRangeValidator : ValidationRule
|
||||||
{
|
{
|
||||||
public sealed partial class AnalogRangeValidator : ValidationRule
|
public float Min { get; set; }
|
||||||
{
|
|
||||||
public float Min { get; set; }
|
|
||||||
|
|
||||||
public float Max { get; set; }
|
public float Max { get; set; }
|
||||||
|
|
||||||
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
|
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
|
||||||
{
|
{
|
||||||
float analogValue = 0;
|
float analogValue = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (((string)value).Length > 0)
|
if (((string)value).Length > 0)
|
||||||
analogValue = float.Parse((string)value);
|
analogValue = float.Parse((string)value);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
return new ValidationResult(false, $"Illegal characters or {e.Message}");
|
return new ValidationResult(false, $"Illegal characters or {e.Message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((analogValue < Min) || (analogValue > Max))
|
if ((analogValue < Min) || (analogValue > Max))
|
||||||
return new ValidationResult(false, $"Please enter a value in the range: {Min}-{Max}.");
|
return new ValidationResult(false, $"Please enter a value in the range: {Min}-{Max}.");
|
||||||
|
|
||||||
return ValidationResult.ValidResult;
|
return ValidationResult.ValidResult;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,31 +2,30 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für AnalogValue.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class AnalogValue : UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
public bool IsReadonly { get; set; }
|
||||||
/// Interaktionslogik für AnalogValue.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class AnalogValue : UserControl
|
|
||||||
{
|
|
||||||
public bool IsReadonly { get; set; }
|
|
||||||
|
|
||||||
public AnalogValue()
|
public AnalogValue()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// Unloaded += OnUnloaded;
|
// Unloaded += OnUnloaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var disposable = DataContext as IDisposable;
|
var disposable = DataContext as IDisposable;
|
||||||
disposable?.Dispose();
|
disposable?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
||||||
{
|
{
|
||||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
||||||
e.Handled = regex.IsMatch(e.Text);
|
e.Handled = regex.IsMatch(e.Text);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -13,23 +13,22 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AnalogValveControl.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class AnalogValveControl : UserControl
|
|
||||||
{
|
|
||||||
public AnalogValveControl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AnalogValveControl.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class AnalogValveControl : UserControl
|
||||||
}
|
{
|
||||||
}
|
public AnalogValveControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,82 +2,81 @@
|
|||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using Heisig.HMI.AdsManager;
|
using Heisig.HMI.AdsManager;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
public sealed partial class AnalogValveControlVM : ObservableObject
|
||||||
{
|
{
|
||||||
public sealed partial class AnalogValveControlVM : ObservableObject
|
[ObservableProperty]
|
||||||
{
|
private string sName = "No Name";
|
||||||
[ObservableProperty]
|
|
||||||
private string sName = "No Name";
|
|
||||||
|
|
||||||
public HMIControlButtonVM? AutomaticButton { get; private set; }
|
public HMIControlButtonVM? AutomaticButton { get; private set; }
|
||||||
public HMIControlButtonVM? ManualButton { get; private set; }
|
public HMIControlButtonVM? ManualButton { get; private set; }
|
||||||
public HMIControlButtonVM? OpenButton { get; private set; }
|
public HMIControlButtonVM? OpenButton { get; private set; }
|
||||||
public HMIControlButtonVM? CloseButton { get; private set; }
|
public HMIControlButtonVM? CloseButton { get; private set; }
|
||||||
public IntlkControlVM? Interlocks { get; private set; }
|
public IntlkControlVM? Interlocks { get; private set; }
|
||||||
public AnalogValueVM? Setpoint { get; private set; }
|
public AnalogValueVM? Setpoint { get; private set; }
|
||||||
public AnalogValueVM? ProcessValue { get; private set; }
|
public AnalogValueVM? ProcessValue { get; private set; }
|
||||||
|
|
||||||
private readonly string? _variableName;
|
private readonly string? _variableName;
|
||||||
|
|
||||||
private IAdsManager? _adsManager;
|
private IAdsManager? _adsManager;
|
||||||
|
|
||||||
public AnalogValveControlVM()
|
public AnalogValveControlVM()
|
||||||
{
|
{
|
||||||
AutomaticButton = new HMIControlButtonVM();
|
AutomaticButton = new HMIControlButtonVM();
|
||||||
ManualButton = new HMIControlButtonVM();
|
ManualButton = new HMIControlButtonVM();
|
||||||
OpenButton = new HMIControlButtonVM();
|
OpenButton = new HMIControlButtonVM();
|
||||||
CloseButton = new HMIControlButtonVM();
|
CloseButton = new HMIControlButtonVM();
|
||||||
Interlocks = new IntlkControlVM();
|
Interlocks = new IntlkControlVM();
|
||||||
Setpoint = new AnalogValueVM();
|
Setpoint = new AnalogValueVM();
|
||||||
ProcessValue = new AnalogValueVM();
|
ProcessValue = new AnalogValueVM();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AnalogValveControlVM(IAdsManager adsManager, string variableName)
|
public AnalogValveControlVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
AutomaticButton = new HMIControlButtonVM(_adsManager, _variableName + ".stAutomaticButton");
|
AutomaticButton = new HMIControlButtonVM(_adsManager, _variableName + ".stAutomaticButton");
|
||||||
ManualButton = new HMIControlButtonVM(_adsManager, _variableName + ".stManualButton");
|
ManualButton = new HMIControlButtonVM(_adsManager, _variableName + ".stManualButton");
|
||||||
OpenButton = new HMIControlButtonVM(_adsManager, _variableName + ".stOpenButton");
|
OpenButton = new HMIControlButtonVM(_adsManager, _variableName + ".stOpenButton");
|
||||||
CloseButton = new HMIControlButtonVM(_adsManager, _variableName + ".stCloseButton");
|
CloseButton = new HMIControlButtonVM(_adsManager, _variableName + ".stCloseButton");
|
||||||
Interlocks = new IntlkControlVM(_adsManager, _variableName + ".stInterlock");
|
Interlocks = new IntlkControlVM(_adsManager, _variableName + ".stInterlock");
|
||||||
Setpoint = new AnalogValueVM(_adsManager, _variableName + ".stSetpoint", false);
|
Setpoint = new AnalogValueVM(_adsManager, _variableName + ".stSetpoint", false);
|
||||||
ProcessValue = new AnalogValueVM(_adsManager, _variableName + ".stProcessValue", true);
|
ProcessValue = new AnalogValueVM(_adsManager, _variableName + ".stProcessValue", true);
|
||||||
|
|
||||||
|
|
||||||
_adsManager.Register(_variableName + ".sName", NameChanged);
|
_adsManager.Register(_variableName + ".sName", NameChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_adsManager?.Deregister(_variableName + ".sName", NameChanged);
|
_adsManager?.Deregister(_variableName + ".sName", NameChanged);
|
||||||
_adsManager = null;
|
_adsManager = null;
|
||||||
|
|
||||||
AutomaticButton?.Dispose();
|
AutomaticButton?.Dispose();
|
||||||
AutomaticButton = null;
|
AutomaticButton = null;
|
||||||
|
|
||||||
ManualButton?.Dispose();
|
ManualButton?.Dispose();
|
||||||
ManualButton = null;
|
ManualButton = null;
|
||||||
|
|
||||||
OpenButton?.Dispose();
|
OpenButton?.Dispose();
|
||||||
OpenButton = null;
|
OpenButton = null;
|
||||||
|
|
||||||
CloseButton?.Dispose();
|
CloseButton?.Dispose();
|
||||||
CloseButton = null;
|
CloseButton = null;
|
||||||
|
|
||||||
Interlocks?.Dispose();
|
Interlocks?.Dispose();
|
||||||
Interlocks = null;
|
Interlocks = null;
|
||||||
|
|
||||||
Setpoint?.Dispose();
|
Setpoint?.Dispose();
|
||||||
Setpoint = null;
|
Setpoint = null;
|
||||||
|
|
||||||
ProcessValue?.Dispose();
|
ProcessValue?.Dispose();
|
||||||
ProcessValue = null;
|
ProcessValue = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NameChanged(object? sender, ValueChangedEventArgs e)
|
private void NameChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
SName = (string)e.Value;
|
SName = (string)e.Value;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -20,9 +20,9 @@
|
|||||||
<Setter Property="Width" Value="Auto" />
|
<Setter Property="Width" Value="Auto" />
|
||||||
</Style>
|
</Style>
|
||||||
</d:DesignerProperties.DesignStyle>
|
</d:DesignerProperties.DesignStyle>
|
||||||
|
<Border BorderThickness="2" BorderBrush="White">
|
||||||
<Grid Margin="5">
|
<Grid Margin="5">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="55" />
|
<RowDefinition Height="55" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@@ -72,5 +72,6 @@
|
|||||||
<Button x:Name="btnManual" DataContext="{Binding ManualButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Grid.Row="1" Grid.Column="1" Content="Man" FontSize="35" Height="100" Width="180" Margin="0,-5,0,-5"/>
|
<Button x:Name="btnManual" DataContext="{Binding ManualButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Grid.Row="1" Grid.Column="1" Content="Man" FontSize="35" Height="100" Width="180" Margin="0,-5,0,-5"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -13,23 +13,22 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für BinaryValveControl.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class BinaryValveControl : UserControl
|
|
||||||
{
|
|
||||||
public BinaryValveControl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für BinaryValveControl.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class BinaryValveControl : UserControl
|
||||||
}
|
{
|
||||||
}
|
public BinaryValveControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,67 +4,66 @@ using Heisig.HMI.AdsManager;
|
|||||||
|
|
||||||
// {Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.OpenButton}
|
// {Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.OpenButton}
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
public sealed partial class BinaryValveControlVM : ObservableObject, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class BinaryValveControlVM : ObservableObject, IDisposable
|
[ObservableProperty]
|
||||||
{
|
private string sName = "No Name";
|
||||||
[ObservableProperty]
|
|
||||||
private string sName = "No Name";
|
|
||||||
|
|
||||||
public HMIControlButtonVM? AutomaticButton { get; private set; }
|
public HMIControlButtonVM? AutomaticButton { get; private set; }
|
||||||
public HMIControlButtonVM? ManualButton { get; private set; }
|
public HMIControlButtonVM? ManualButton { get; private set; }
|
||||||
public HMIControlButtonVM OpenButton { get; private set; }
|
public HMIControlButtonVM OpenButton { get; private set; }
|
||||||
public HMIControlButtonVM CloseButton { get; private set; }
|
public HMIControlButtonVM CloseButton { get; private set; }
|
||||||
public IntlkControlVM? Interlocks { get; private set; }
|
public IntlkControlVM? Interlocks { get; private set; }
|
||||||
|
|
||||||
private readonly string? _variableName;
|
private readonly string? _variableName;
|
||||||
|
|
||||||
private IAdsManager? _adsManager;
|
private IAdsManager? _adsManager;
|
||||||
|
|
||||||
public BinaryValveControlVM()
|
public BinaryValveControlVM()
|
||||||
{
|
{
|
||||||
AutomaticButton = new HMIControlButtonVM();
|
AutomaticButton = new HMIControlButtonVM();
|
||||||
ManualButton = new HMIControlButtonVM();
|
ManualButton = new HMIControlButtonVM();
|
||||||
OpenButton = new HMIControlButtonVM();
|
OpenButton = new HMIControlButtonVM();
|
||||||
CloseButton = new HMIControlButtonVM();
|
CloseButton = new HMIControlButtonVM();
|
||||||
Interlocks = new IntlkControlVM();
|
Interlocks = new IntlkControlVM();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BinaryValveControlVM(IAdsManager adsManager, string variableName)
|
public BinaryValveControlVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
AutomaticButton = new HMIControlButtonVM(_adsManager, _variableName + ".stAutomaticButton");
|
AutomaticButton = new HMIControlButtonVM(_adsManager, _variableName + ".stAutomaticButton");
|
||||||
ManualButton = new HMIControlButtonVM(_adsManager, _variableName + ".stManualButton");
|
ManualButton = new HMIControlButtonVM(_adsManager, _variableName + ".stManualButton");
|
||||||
OpenButton = new HMIControlButtonVM(_adsManager, _variableName + ".stOpenButton");
|
OpenButton = new HMIControlButtonVM(_adsManager, _variableName + ".stOpenButton");
|
||||||
CloseButton = new HMIControlButtonVM(_adsManager, _variableName + ".stCloseButton");
|
CloseButton = new HMIControlButtonVM(_adsManager, _variableName + ".stCloseButton");
|
||||||
Interlocks = new IntlkControlVM(_adsManager, _variableName + ".stInterlock");
|
Interlocks = new IntlkControlVM(_adsManager, _variableName + ".stInterlock");
|
||||||
|
|
||||||
_adsManager.Register(_variableName + ".sName", NameChanged);
|
_adsManager.Register(_variableName + ".sName", NameChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_adsManager?.Deregister(_variableName + ".sName", NameChanged);
|
_adsManager?.Deregister(_variableName + ".sName", NameChanged);
|
||||||
_adsManager = null;
|
_adsManager = null;
|
||||||
|
|
||||||
AutomaticButton?.Dispose();
|
AutomaticButton?.Dispose();
|
||||||
AutomaticButton = null;
|
AutomaticButton = null;
|
||||||
|
|
||||||
ManualButton?.Dispose();
|
ManualButton?.Dispose();
|
||||||
ManualButton = null;
|
ManualButton = null;
|
||||||
|
|
||||||
OpenButton?.Dispose();
|
OpenButton?.Dispose();
|
||||||
|
|
||||||
CloseButton?.Dispose();
|
CloseButton?.Dispose();
|
||||||
|
|
||||||
Interlocks?.Dispose();
|
Interlocks?.Dispose();
|
||||||
Interlocks = null;
|
Interlocks = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NameChanged(object? sender, ValueChangedEventArgs e)
|
private void NameChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
SName = (string)e.Value;
|
SName = (string)e.Value;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -3,23 +3,22 @@ using System.Windows;
|
|||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
public class BoolToBrushConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public class BoolToBrushConverter : IValueConverter
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
if (targetType != typeof(Brush))
|
||||||
{
|
throw new InvalidOperationException("The target must be a brush");
|
||||||
if (targetType != typeof(Brush))
|
|
||||||
throw new InvalidOperationException("The target must be a brush");
|
|
||||||
|
|
||||||
bool temp = bool.Parse(value.ToString()!);
|
bool temp = bool.Parse(value.ToString()!);
|
||||||
|
|
||||||
return (temp ? Brushes.DarkGreen : Brushes.DarkRed);
|
return (temp ? Brushes.DarkGreen : Brushes.DarkRed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
return DependencyProperty.UnsetValue;
|
return DependencyProperty.UnsetValue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -3,72 +3,71 @@ using CommunityToolkit.Mvvm.Input;
|
|||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using Heisig.HMI.AdsManager;
|
using Heisig.HMI.AdsManager;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
public sealed partial class HMIControlButtonVM : ObservableObject, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class HMIControlButtonVM : ObservableObject, IDisposable
|
private IAdsManager? _adsManager;
|
||||||
{
|
private readonly string _variableName;
|
||||||
private IAdsManager? _adsManager;
|
|
||||||
private readonly string _variableName;
|
|
||||||
|
|
||||||
// Action triggered when the button is about to be clicked
|
// Action triggered when the button is about to be clicked
|
||||||
public event EventHandler? ButtonClickedStarted;
|
public event EventHandler? ButtonClickedStarted;
|
||||||
|
|
||||||
// Action triggered when the button is done being clicked
|
// Action triggered when the button is done being clicked
|
||||||
public event EventHandler? ButtonClickedEnded;
|
public event EventHandler? ButtonClickedEnded;
|
||||||
|
|
||||||
// Event when button feedback changed
|
// Event when button feedback changed
|
||||||
public event EventHandler? FeedbackChanged;
|
public event EventHandler? FeedbackChanged;
|
||||||
|
|
||||||
// Event when release changed
|
// Event when release changed
|
||||||
public event EventHandler? ReleaseChanged;
|
public event EventHandler? ReleaseChanged;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool xRelease;
|
private bool xRelease;
|
||||||
|
|
||||||
// 0 = none, 1 = active, 2 = pending, 3 = waring, 4 = error
|
// 0 = none, 1 = active, 2 = pending, 3 = waring, 4 = error
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private short iFeedback;
|
private short iFeedback;
|
||||||
|
|
||||||
public HMIControlButtonVM()
|
public HMIControlButtonVM()
|
||||||
{
|
{
|
||||||
_variableName = string.Empty;
|
_variableName = string.Empty;
|
||||||
XRelease = false;
|
XRelease = false;
|
||||||
IFeedback = 4;
|
IFeedback = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HMIControlButtonVM(IAdsManager adsManager, string variableName)
|
public HMIControlButtonVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
|
|
||||||
_adsManager.Register(_variableName + ".xRelease", XReleaseCahnged);
|
_adsManager.Register(_variableName + ".xRelease", XReleaseCahnged);
|
||||||
_adsManager.Register(_variableName + ".iFeedback", IFeedbackChanged);
|
_adsManager.Register(_variableName + ".iFeedback", IFeedbackChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_adsManager?.Deregister(_variableName + ".xRelease", XReleaseCahnged);
|
_adsManager?.Deregister(_variableName + ".xRelease", XReleaseCahnged);
|
||||||
_adsManager?.Deregister(_variableName + ".iFeedback", IFeedbackChanged);
|
_adsManager?.Deregister(_variableName + ".iFeedback", IFeedbackChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void ButtonClicked()
|
private void ButtonClicked()
|
||||||
{
|
{
|
||||||
ButtonClickedStarted?.Invoke(this, EventArgs.Empty);
|
ButtonClickedStarted?.Invoke(this, EventArgs.Empty);
|
||||||
_adsManager?.WriteValue(_variableName + ".xRequest", true);
|
_adsManager?.WriteValue(_variableName + ".xRequest", true);
|
||||||
ButtonClickedEnded?.Invoke(this, EventArgs.Empty);
|
ButtonClickedEnded?.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void XReleaseCahnged(object? sender, ValueChangedEventArgs e)
|
private void XReleaseCahnged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
XRelease = (bool)e.Value;
|
XRelease = (bool)e.Value;
|
||||||
ReleaseChanged?.Invoke(this, EventArgs.Empty);
|
ReleaseChanged?.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void IFeedbackChanged(object? sender, ValueChangedEventArgs e)
|
private void IFeedbackChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
IFeedback = (short)e.Value;
|
IFeedback = (short)e.Value;
|
||||||
FeedbackChanged?.Invoke(this, EventArgs.Empty);
|
FeedbackChanged?.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -13,23 +13,22 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für ProcessIntlkButtonControl.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class IntlkButtonControl : UserControl
|
|
||||||
{
|
|
||||||
public IntlkButtonControl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für ProcessIntlkButtonControl.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class IntlkButtonControl : UserControl
|
||||||
}
|
{
|
||||||
}
|
public IntlkButtonControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,23 +13,22 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für IntlkDetails.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class IntlkDetails : UserControl
|
|
||||||
{
|
|
||||||
public IntlkDetails()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für IntlkDetails.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class IntlkDetails : UserControl
|
||||||
}
|
{
|
||||||
}
|
public IntlkDetails()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,147 +5,146 @@ using System.Windows.Controls;
|
|||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using Heisig.HMI.AdsManager;
|
using Heisig.HMI.AdsManager;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
public sealed partial class IntlkDetailsVM : ObservableObject, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class IntlkDetailsVM : ObservableObject, IDisposable
|
[ObservableProperty]
|
||||||
{
|
private string interlockName;
|
||||||
[ObservableProperty]
|
|
||||||
private string interlockName;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private BitArray interlockStatus;
|
private BitArray interlockStatus;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string[] interlockNames;
|
private string[] interlockNames;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private ListBoxItem[] listBoxItemsLeft;
|
private ListBoxItem[] listBoxItemsLeft;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private ListBoxItem[] listBoxItemsRight;
|
private ListBoxItem[] listBoxItemsRight;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility isVisible;
|
private Visibility isVisible;
|
||||||
|
|
||||||
private readonly BoolToBrushConverter boolToBrushConverter = new();
|
private readonly BoolToBrushConverter boolToBrushConverter = new();
|
||||||
|
|
||||||
private readonly int numIntlksLeftSide;
|
private readonly int numIntlksLeftSide;
|
||||||
private readonly int numIntlksRightSide;
|
private readonly int numIntlksRightSide;
|
||||||
|
|
||||||
private readonly string _variableNameStatus;
|
private readonly string _variableNameStatus;
|
||||||
private readonly string _variableNameNames;
|
private readonly string _variableNameNames;
|
||||||
|
|
||||||
private IAdsManager? _adsManager;
|
private IAdsManager? _adsManager;
|
||||||
|
|
||||||
public IntlkDetailsVM()
|
public IntlkDetailsVM()
|
||||||
{
|
{
|
||||||
interlockName = "Interlocks";
|
interlockName = "Interlocks";
|
||||||
interlockStatus = new BitArray(HMIConstants.NumInterlocks);
|
interlockStatus = new BitArray(HMIConstants.NumInterlocks);
|
||||||
interlockNames = new string[HMIConstants.NumInterlocks];
|
interlockNames = new string[HMIConstants.NumInterlocks];
|
||||||
Array.Fill(interlockNames, "Not used");
|
Array.Fill(interlockNames, "Not used");
|
||||||
|
|
||||||
// Split all interlocks into two parts
|
// Split all interlocks into two parts
|
||||||
numIntlksLeftSide = (int)Math.Ceiling(HMIConstants.NumInterlocks * 0.5);
|
numIntlksLeftSide = (int)Math.Ceiling(HMIConstants.NumInterlocks * 0.5);
|
||||||
numIntlksRightSide = HMIConstants.NumInterlocks - numIntlksLeftSide;
|
numIntlksRightSide = HMIConstants.NumInterlocks - numIntlksLeftSide;
|
||||||
|
|
||||||
listBoxItemsLeft = new ListBoxItem[numIntlksLeftSide];
|
listBoxItemsLeft = new ListBoxItem[numIntlksLeftSide];
|
||||||
listBoxItemsRight = new ListBoxItem[numIntlksRightSide];
|
listBoxItemsRight = new ListBoxItem[numIntlksRightSide];
|
||||||
|
|
||||||
_variableNameStatus = System.String.Empty;
|
_variableNameStatus = System.String.Empty;
|
||||||
_variableNameNames = System.String.Empty;
|
_variableNameNames = System.String.Empty;
|
||||||
|
|
||||||
// CreateContent();
|
// CreateContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntlkDetailsVM(IAdsManager adsManager, string variableNameStatus, string variableNameNames, string intlkName) : this()
|
public IntlkDetailsVM(IAdsManager adsManager, string variableNameStatus, string variableNameNames, string intlkName) : this()
|
||||||
{
|
{
|
||||||
interlockName = intlkName;
|
interlockName = intlkName;
|
||||||
_variableNameStatus = variableNameStatus;
|
_variableNameStatus = variableNameStatus;
|
||||||
_variableNameNames = variableNameNames;
|
_variableNameNames = variableNameNames;
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
|
|
||||||
interlockStatus = new BitArray(HMIConstants.NumInterlocks);
|
interlockStatus = new BitArray(HMIConstants.NumInterlocks);
|
||||||
interlockNames = new string[HMIConstants.NumInterlocks];
|
interlockNames = new string[HMIConstants.NumInterlocks];
|
||||||
|
|
||||||
_adsManager.Register(_variableNameStatus, InterlockStatusChanged);
|
_adsManager.Register(_variableNameStatus, InterlockStatusChanged);
|
||||||
_adsManager.Register(_variableNameNames, InterlockNamesChanged);
|
_adsManager.Register(_variableNameNames, InterlockNamesChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_adsManager?.Deregister(_variableNameStatus, InterlockStatusChanged);
|
_adsManager?.Deregister(_variableNameStatus, InterlockStatusChanged);
|
||||||
_adsManager?.Deregister(_variableNameNames, InterlockNamesChanged);
|
_adsManager?.Deregister(_variableNameNames, InterlockNamesChanged);
|
||||||
|
|
||||||
_adsManager = null;
|
_adsManager = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private void CreateContent()
|
/*private void CreateContent()
|
||||||
{
|
{
|
||||||
// Create left side
|
// Create left side
|
||||||
for (int i = 0; i < HMIConstants.NumInterlocks; i++)
|
for (int i = 0; i < HMIConstants.NumInterlocks; i++)
|
||||||
{
|
{
|
||||||
// Create the stack panel
|
// Create the stack panel
|
||||||
StackPanel stackPanel = new StackPanel
|
StackPanel stackPanel = new StackPanel
|
||||||
{
|
{
|
||||||
Orientation = Orientation.Horizontal
|
Orientation = Orientation.Horizontal
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create the box
|
// Create the box
|
||||||
// <Rectangle Width="10" Height="10" Fill="{Binding Path=InterlockStatus[10], Converter={StaticResource myBoolConverter}}" RadiusX="2" RadiusY="2" Margin="0,2,0,0"/>
|
// <Rectangle Width="10" Height="10" Fill="{Binding Path=InterlockStatus[10], Converter={StaticResource myBoolConverter}}" RadiusX="2" RadiusY="2" Margin="0,2,0,0"/>
|
||||||
Rectangle rectangle = new Rectangle
|
Rectangle rectangle = new Rectangle
|
||||||
{
|
{
|
||||||
Width = 10,
|
Width = 10,
|
||||||
Height = 10,
|
Height = 10,
|
||||||
RadiusX = 2,
|
RadiusX = 2,
|
||||||
RadiusY = 2
|
RadiusY = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create binding
|
// Create binding
|
||||||
Binding binding = new()
|
Binding binding = new()
|
||||||
{
|
{
|
||||||
Source = this,
|
Source = this,
|
||||||
Path = new PropertyPath("InterlockStatus[" + i + "]"),
|
Path = new PropertyPath("InterlockStatus[" + i + "]"),
|
||||||
Converter = boolToBrushConverter,
|
Converter = boolToBrushConverter,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set binding
|
// Set binding
|
||||||
rectangle.SetBinding(Rectangle.FillProperty, binding);
|
rectangle.SetBinding(Rectangle.FillProperty, binding);
|
||||||
|
|
||||||
// Create label
|
// Create label
|
||||||
Label label = new();
|
Label label = new();
|
||||||
binding = new()
|
binding = new()
|
||||||
{
|
{
|
||||||
Source = this,
|
Source = this,
|
||||||
Path = new PropertyPath("InterlockNames[" + i + "]")
|
Path = new PropertyPath("InterlockNames[" + i + "]")
|
||||||
};
|
};
|
||||||
label.SetBinding(Label.ContentProperty, binding);
|
label.SetBinding(Label.ContentProperty, binding);
|
||||||
|
|
||||||
// Add items to stack panel
|
// Add items to stack panel
|
||||||
stackPanel.Children.Add(rectangle);
|
stackPanel.Children.Add(rectangle);
|
||||||
stackPanel.Children.Add(label);
|
stackPanel.Children.Add(label);
|
||||||
|
|
||||||
// Add stack panel to listbox items
|
// Add stack panel to listbox items
|
||||||
ListBoxItem tempListBoxItem = new()
|
ListBoxItem tempListBoxItem = new()
|
||||||
{
|
{
|
||||||
Content = stackPanel
|
Content = stackPanel
|
||||||
};
|
};
|
||||||
if (i < numIntlksLeftSide)
|
if (i < numIntlksLeftSide)
|
||||||
ListBoxItemsLeft[i] = tempListBoxItem;
|
ListBoxItemsLeft[i] = tempListBoxItem;
|
||||||
else
|
else
|
||||||
ListBoxItemsRight[i - numIntlksLeftSide] = tempListBoxItem;
|
ListBoxItemsRight[i - numIntlksLeftSide] = tempListBoxItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
private void InterlockStatusChanged(object? sender, ValueChangedEventArgs e)
|
private void InterlockStatusChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
ushort temp = (ushort)e.Value;
|
ushort temp = (ushort)e.Value;
|
||||||
InterlockStatus = new BitArray(BitConverter.GetBytes(temp));
|
InterlockStatus = new BitArray(BitConverter.GetBytes(temp));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InterlockNamesChanged(object? sender, ValueChangedEventArgs e)
|
private void InterlockNamesChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
InterlockNames = (string[])e.Value;
|
InterlockNames = (string[])e.Value;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -12,16 +12,15 @@ using System.Windows.Media;
|
|||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für IntlkDetailsWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class IntlkDetailsWindow : Window
|
||||||
{
|
{
|
||||||
/// <summary>
|
public IntlkDetailsWindow()
|
||||||
/// Interaktionslogik für IntlkDetailsWindow.xaml
|
{
|
||||||
/// </summary>
|
InitializeComponent();
|
||||||
public partial class IntlkDetailsWindow : Window
|
}
|
||||||
{
|
|
||||||
public IntlkDetailsWindow()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,218 +1,216 @@
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace HMIToolkit
|
namespace HMIToolkit;
|
||||||
|
// PLC - C#
|
||||||
|
// --------
|
||||||
|
// int - short
|
||||||
|
// word - ushort
|
||||||
|
|
||||||
|
// Constants for interaction with data
|
||||||
|
public static class HMIConstants
|
||||||
{
|
{
|
||||||
// PLC - C#
|
public const int StringLength = 81;
|
||||||
// --------
|
public const int NumInterlocks = 16;
|
||||||
// int - short
|
}
|
||||||
// word - ushort
|
|
||||||
|
|
||||||
// Constants for interaction with data
|
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
||||||
public static class HMIConstants
|
public struct HMIAnalogValue
|
||||||
{
|
{
|
||||||
public const int StringLength = 81;
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
||||||
public const int NumInterlocks = 16;
|
public string sName;
|
||||||
}
|
|
||||||
|
// 1 = Ok, 2 = Error
|
||||||
|
public short iStatus;
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
|
||||||
public struct HMIAnalogValue
|
public float rValue;
|
||||||
{
|
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
||||||
public string sName;
|
public string sUnit;
|
||||||
|
|
||||||
// 1 = Ok, 2 = Error
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
public short iStatus;
|
public bool xUsed;
|
||||||
|
}
|
||||||
public float rValue;
|
|
||||||
|
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
||||||
public string sUnit;
|
public struct HMIControlButton
|
||||||
|
{
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
public bool xUsed;
|
public bool xRequest;
|
||||||
}
|
|
||||||
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
public bool xRelease;
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
|
||||||
public struct HMIControlButton
|
public short iFeedback;
|
||||||
{
|
}
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
|
||||||
public bool xRequest;
|
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
public struct HMIInterlock
|
||||||
public bool xRelease;
|
{
|
||||||
|
public ushort wProcessINTLKStatus;
|
||||||
public short iFeedback;
|
|
||||||
}
|
public ushort wSafeyINTLKStatus;
|
||||||
|
|
||||||
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
public ushort wProcessINTLKUsed;
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
|
||||||
public struct HMIInterlock
|
public ushort wSafeyINTLKUsed;
|
||||||
{
|
|
||||||
public ushort wProcessINTLKStatus;
|
// 16 * String(80) = 81 bytes a 16 indexes
|
||||||
|
// combined in one string because reading a two dimensional array is not possible
|
||||||
public ushort wSafeyINTLKStatus;
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = HMIConstants.StringLength * HMIConstants.NumInterlocks)]
|
||||||
|
public byte[] asProcessINTLKName;
|
||||||
public ushort wProcessINTLKUsed;
|
|
||||||
|
// 16 * String(80) = 81 bytes a 16 indexes
|
||||||
public ushort wSafeyINTLKUsed;
|
// combined in one string because reading a two dimensional array is not possible
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = HMIConstants.StringLength * HMIConstants.NumInterlocks)]
|
||||||
// 16 * String(80) = 81 bytes a 16 indexes
|
public byte[] asSafetyINTLKName;
|
||||||
// combined in one string because reading a two dimensional array is not possible
|
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = HMIConstants.StringLength * HMIConstants.NumInterlocks)]
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
public byte[] asProcessINTLKName;
|
public bool xProcessINTLKOk;
|
||||||
|
|
||||||
// 16 * String(80) = 81 bytes a 16 indexes
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
// combined in one string because reading a two dimensional array is not possible
|
public bool xSafetyINTLKOk;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = HMIConstants.StringLength * HMIConstants.NumInterlocks)]
|
}
|
||||||
public byte[] asSafetyINTLKName;
|
|
||||||
|
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
||||||
public bool xProcessINTLKOk;
|
public struct HMIValveData
|
||||||
|
{
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
||||||
public bool xSafetyINTLKOk;
|
public string sName;
|
||||||
}
|
|
||||||
|
public HMIControlButton stAutomaticButton;
|
||||||
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
public HMIControlButton stManualButton;
|
||||||
public struct HMIValveData
|
|
||||||
{
|
public HMIControlButton stOpenButton;
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
|
||||||
public string sName;
|
public HMIControlButton stCloseButton;
|
||||||
|
|
||||||
public HMIControlButton stAutomaticButton;
|
// 1 = Opened, 2 = Opening/Closing, 3 = Closed, 4 = Error
|
||||||
|
public short iStatus;
|
||||||
public HMIControlButton stManualButton;
|
|
||||||
|
// 1 = Automatic mode, 2 = Manual mode
|
||||||
public HMIControlButton stOpenButton;
|
public short iCurrentMode;
|
||||||
|
|
||||||
public HMIControlButton stCloseButton;
|
public HMIInterlock stInterlock;
|
||||||
|
|
||||||
// 1 = Opened, 2 = Opening/Closing, 3 = Closed, 4 = Error
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
public short iStatus;
|
public bool xUsed;
|
||||||
|
}
|
||||||
// 1 = Automatic mode, 2 = Manual mode
|
|
||||||
public short iCurrentMode;
|
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
||||||
|
public struct HMIAnalogValveData
|
||||||
public HMIInterlock stInterlock;
|
{
|
||||||
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
public string sName;
|
||||||
public bool xUsed;
|
|
||||||
}
|
public HMIControlButton stAutomaticButton;
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
public HMIControlButton stManualButton;
|
||||||
public struct HMIAnalogValveData
|
|
||||||
{
|
public HMIControlButton stOpenButton;
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
|
||||||
public string sName;
|
public HMIControlButton stCloseButton;
|
||||||
|
|
||||||
public HMIControlButton stAutomaticButton;
|
// 1 = Opened, 2 = Opening/Closing, 3 = Closed, 4 = Error
|
||||||
|
public short iStatus;
|
||||||
public HMIControlButton stManualButton;
|
|
||||||
|
// 1 = Automatic mode, 2 = Manual mode
|
||||||
public HMIControlButton stOpenButton;
|
public short iCurrentMode;
|
||||||
|
|
||||||
public HMIControlButton stCloseButton;
|
public HMIInterlock stInterlock;
|
||||||
|
|
||||||
// 1 = Opened, 2 = Opening/Closing, 3 = Closed, 4 = Error
|
HMIAnalogValue stSetpoint;
|
||||||
public short iStatus;
|
|
||||||
|
HMIAnalogValue stProcessValue;
|
||||||
// 1 = Automatic mode, 2 = Manual mode
|
|
||||||
public short iCurrentMode;
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
|
public bool xUsed;
|
||||||
public HMIInterlock stInterlock;
|
}
|
||||||
|
|
||||||
HMIAnalogValue stSetpoint;
|
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
||||||
HMIAnalogValue stProcessValue;
|
public struct HMIAnalogMotorData
|
||||||
|
{
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
||||||
public bool xUsed;
|
public string sName;
|
||||||
}
|
|
||||||
|
public HMIControlButton stAutomaticButton;
|
||||||
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
public HMIControlButton stManualButton;
|
||||||
public struct HMIAnalogMotorData
|
|
||||||
{
|
public HMIControlButton stStartButton;
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
|
||||||
public string sName;
|
public HMIControlButton stStopButton;
|
||||||
|
|
||||||
public HMIControlButton stAutomaticButton;
|
// 1 = Opened, 2 = Opening/Closing, 3 = Closed, 4 = Error
|
||||||
|
public short iStatus;
|
||||||
public HMIControlButton stManualButton;
|
|
||||||
|
// 1 = Automatic mode, 2 = Manual mode
|
||||||
public HMIControlButton stStartButton;
|
public short iCurrentMode;
|
||||||
|
|
||||||
public HMIControlButton stStopButton;
|
public HMIAnalogValue stSetpoint;
|
||||||
|
|
||||||
// 1 = Opened, 2 = Opening/Closing, 3 = Closed, 4 = Error
|
public HMIAnalogValue stProcessValue;
|
||||||
public short iStatus;
|
|
||||||
|
public HMIInterlock stInterlock;
|
||||||
// 1 = Automatic mode, 2 = Manual mode
|
|
||||||
public short iCurrentMode;
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
|
public bool xUsed;
|
||||||
public HMIAnalogValue stSetpoint;
|
}
|
||||||
|
|
||||||
public HMIAnalogValue stProcessValue;
|
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
||||||
public HMIInterlock stInterlock;
|
public struct HMIOrpSensorData
|
||||||
|
{
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
||||||
public bool xUsed;
|
public string sName;
|
||||||
}
|
|
||||||
|
// 1 = Ok, 2 = Error
|
||||||
// TwinCAT2 Pack = 1, TwinCAT 3 Pack = 0
|
public short iStatus;
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 0)]
|
|
||||||
public struct HMIOrpSensorData
|
public float rValuePH;
|
||||||
{
|
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = HMIConstants.StringLength)]
|
public float rValueTemp;
|
||||||
public string sName;
|
|
||||||
|
public float rValueORP;
|
||||||
// 1 = Ok, 2 = Error
|
|
||||||
public short iStatus;
|
public float rValueDLI;
|
||||||
|
|
||||||
public float rValuePH;
|
[MarshalAs(UnmanagedType.I1)]
|
||||||
|
public bool xUsed;
|
||||||
public float rValueTemp;
|
}
|
||||||
|
|
||||||
public float rValueORP;
|
static class HMIUtilities
|
||||||
|
{
|
||||||
public float rValueDLI;
|
// Converts the interlock byte array into a string array
|
||||||
|
public static string[] GetInterlockStringArray(byte[] byteArray)
|
||||||
[MarshalAs(UnmanagedType.I1)]
|
{
|
||||||
public bool xUsed;
|
string[] temp = new string[HMIConstants.NumInterlocks];
|
||||||
}
|
int size;
|
||||||
|
|
||||||
static class HMIUtilities
|
// Check if byteArray is of correct size
|
||||||
{
|
if (byteArray.Length != (HMIConstants.StringLength * HMIConstants.NumInterlocks))
|
||||||
// Converts the interlock byte array into a string array
|
return temp;
|
||||||
public static string[] GetInterlockStringArray(byte[] byteArray)
|
|
||||||
{
|
for (int i = 0; i < HMIConstants.NumInterlocks; i++)
|
||||||
string[] temp = new string[HMIConstants.NumInterlocks];
|
{
|
||||||
int size;
|
// Calculate length of string by finding the 0 terminator so the unused bytes get truncated
|
||||||
|
size = Array.IndexOf(byteArray, (byte)0, i * HMIConstants.StringLength) - (i * HMIConstants.StringLength);
|
||||||
// Check if byteArray is of correct size
|
|
||||||
if (byteArray.Length != (HMIConstants.StringLength * HMIConstants.NumInterlocks))
|
// Check if we found a valid 0 terminator
|
||||||
return temp;
|
if (size >= 0)
|
||||||
|
// Build string from byteArray with calculated size
|
||||||
for (int i = 0; i < HMIConstants.NumInterlocks; i++)
|
temp[i] = Encoding.ASCII.GetString(byteArray, i * HMIConstants.StringLength, size);
|
||||||
{
|
else
|
||||||
// Calculate length of string by finding the 0 terminator so the unused bytes get truncated
|
// No valid 0 string terminator was found so return an empty string
|
||||||
size = Array.IndexOf(byteArray, (byte)0, i * HMIConstants.StringLength) - (i * HMIConstants.StringLength);
|
temp[i] = "";
|
||||||
|
}
|
||||||
// Check if we found a valid 0 terminator
|
|
||||||
if (size >= 0)
|
return temp;
|
||||||
// Build string from byteArray with calculated size
|
}
|
||||||
temp[i] = Encoding.ASCII.GetString(byteArray, i * HMIConstants.StringLength, size);
|
|
||||||
else
|
|
||||||
// No valid 0 string terminator was found so return an empty string
|
|
||||||
temp[i] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Anlagenuebersicht.png" />
|
<None Remove="Anlagenuebersicht.png" />
|
||||||
|
<None Remove="Resources\Application.png" />
|
||||||
|
<None Remove="Resources\user.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -35,6 +37,8 @@
|
|||||||
<Resource Include="Anlagenuebersicht.png">
|
<Resource Include="Anlagenuebersicht.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
<Resource Include="Resources\Application.png" />
|
||||||
|
<Resource Include="Resources\user.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -4,12 +4,19 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
xmlns:infineonHmi="clr-namespace:InfineonHMI"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
x:Name="MainControlWindow"
|
x:Name="MainControlWindow"
|
||||||
d:DataContext="{d:DesignInstance Type=uniperHmi:MainWindowVM}"
|
d:DataContext="{d:DesignInstance Type=infineonHmi:MainWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Title="Infineon BiPolar" Height="2100" Width="3820" ResizeMode="NoResize">
|
|
||||||
|
Title="Infineon HMI"
|
||||||
|
Icon="Resources/Application.png"
|
||||||
|
Height="Auto"
|
||||||
|
Width="Auto"
|
||||||
|
ResizeMode="CanResizeWithGrip"
|
||||||
|
WindowState="Maximized"
|
||||||
|
WindowStyle="SingleBorderWindow">
|
||||||
|
|
||||||
<Viewbox Stretch="Fill">
|
<Viewbox Stretch="Fill">
|
||||||
<Grid Width="3840" Height="2100">
|
<Grid Width="3840" Height="2100">
|
||||||
@@ -17,9 +24,11 @@
|
|||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.08*"/>
|
<RowDefinition Height="0.08*"/>
|
||||||
<RowDefinition Height="0.04*"/>
|
<RowDefinition Height="0.04*"/>
|
||||||
<RowDefinition Height="0.04*"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="0.74*"/>
|
<RowDefinition Height="0.74*"/>
|
||||||
<RowDefinition Height="0.10*"/>
|
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="190"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Header line -->
|
<!-- Header line -->
|
||||||
@@ -82,21 +91,27 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Grid.Column="10"
|
<Button Grid.Column="9"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
FontSize="44"
|
FontSize="44"
|
||||||
Content="{Binding ActualUser}"
|
Content="{Binding ActualUser}"
|
||||||
Command="{Binding ChangeUserClickedCommand}"/>
|
Command="{Binding ChangeUserClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Column="12"
|
<Grid Grid.Column="11" Grid.ColumnSpan="3"
|
||||||
Grid.ColumnSpan="2"
|
|
||||||
Margin="10"
|
Margin="10"
|
||||||
FontSize="44"
|
>
|
||||||
Content="Auswahl
Betriebsart"
|
<Grid.RowDefinitions>
|
||||||
Command="{Binding WorkingModeSelectionClickedCommand}"/>
|
<RowDefinition/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Grid.RowSpan="2" BorderBrush="White" BorderThickness="1"/>
|
||||||
|
<Label Grid.Row="0" Content="{Binding SCurrentPackMLState}" FontSize="44"/>
|
||||||
|
<Label Grid.Row="1" Content="{Binding SCurrentPackMLMode}" FontSize="44"/>
|
||||||
|
|
||||||
<Label Grid.Column="1"
|
|
||||||
|
</Grid>
|
||||||
|
<Label Grid.Column="1"
|
||||||
Grid.ColumnSpan="3"
|
Grid.ColumnSpan="3"
|
||||||
Content="BiPolar Randätzer"
|
Content="BiPolar Randätzer"
|
||||||
FontSize="60"
|
FontSize="60"
|
||||||
@@ -110,76 +125,90 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Latest event line -->
|
<!-- Latest event line -->
|
||||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="0,0,0,2">
|
<Border Grid.Row="1" BorderBrush="White" BorderThickness="0,0,0,3" Margin="10 0 10 0">
|
||||||
<Label Content="{Binding EventsPageVM.CurrentEvent.Message}"
|
<Label Content="{Binding EventsPageVM.CurrentEvent.Message}"
|
||||||
FontSize="28"
|
FontSize="28"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Breadcrumb line -->
|
<!-- Breadcrumb line -->
|
||||||
<Label Grid.Row="2"
|
<!-- Currently no used -->
|
||||||
|
<!--<Label Grid.Row="2"
|
||||||
Content="{Binding Breadcrumb}"
|
Content="{Binding Breadcrumb}"
|
||||||
FontSize="28"/>
|
FontSize="28"/>-->
|
||||||
|
|
||||||
<!-- Page frame -->
|
<!-- Page frame -->
|
||||||
<Frame x:Name="MainFrame"
|
<Frame x:Name="MainFrame"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
NavigationUIVisibility="Hidden"
|
NavigationUIVisibility="Hidden"
|
||||||
|
Margin="20 20 10 20"
|
||||||
Content="{Binding CurrentPage}"/>
|
Content="{Binding CurrentPage}"/>
|
||||||
|
|
||||||
<!-- Softkey grid -->
|
<Border Grid.Row="4"
|
||||||
<Grid Grid.Row="4" Margin="20">
|
Margin="10 0 10 0"
|
||||||
|
BorderBrush="White"
|
||||||
|
BorderThickness="0,3,0,0"/>
|
||||||
|
|
||||||
|
<!-- Softkey grid -->
|
||||||
|
<Grid Grid.Row="5" Margin="15 10 20 15">
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<UniformGrid Columns="7" Grid.ColumnSpan="7">
|
|
||||||
<!-- Softkey 1 -->
|
<!-- Softkey 1 -->
|
||||||
<Button Grid.Column="0" Content="Übersicht" FontSize="38" Margin="10"
|
<Button Grid.Column="0"
|
||||||
Command="{Binding OverviewWindowClickedCommand}" />
|
Width="440"
|
||||||
|
Content="Übersicht" FontSize="38" Margin="10"
|
||||||
|
Command="{Binding OverviewWindowClickedCommand}" />
|
||||||
<!-- Command="{Binding AutomaticModeCommand}" -->
|
<!-- Command="{Binding AutomaticModeCommand}" -->
|
||||||
|
|
||||||
<!-- Softkey 2 -->
|
<!-- Softkey 2 -->
|
||||||
<Button Grid.Column="0" Content="Stationen" FontSize="38" Margin="10"
|
<Button IsEnabled="{Binding CanUserChangePageProductionWindow}"
|
||||||
Command="{Binding ProductionWindowClickedCommand}"/>
|
Grid.Column="1" Content="Stationen" FontSize="38" Margin="10"
|
||||||
|
Width="440"
|
||||||
|
Command="{Binding ProductionWindowClickedCommand}"/>
|
||||||
<!-- Command="{Binding ManualModeCommand}" -->
|
<!-- Command="{Binding ManualModeCommand}" -->
|
||||||
|
|
||||||
<!-- Softkey 3 -->
|
<!-- Softkey 3 -->
|
||||||
<Button Grid.Column="0" Content="Protokoll" FontSize="38" Margin="10"
|
<Button Grid.Column="2" Content="Protokoll" FontSize="38" Margin="10"
|
||||||
Command="{Binding ProtocolWindowClickedCommand}" Visibility="Collapsed"/>
|
Command="{Binding ProtocolWindowClickedCommand}" Visibility="Collapsed"/>
|
||||||
|
|
||||||
<!-- Softkey 4 -->
|
<!-- Softkey 4 -->
|
||||||
<Button Grid.Column="0" Content="Rezepte" FontSize="38" Margin="10"
|
<Button IsEnabled="{Binding CanUserChangePageReceipeWindow}"
|
||||||
Command="{Binding ReceipesWindowClickedCommand}" />
|
Grid.Column="3" Content="Rezepte" FontSize="38" Margin="10"
|
||||||
|
Width="440"
|
||||||
|
Command="{Binding ReceipesWindowClickedCommand}" />
|
||||||
<!-- Command="{Binding SettingsWindowCommand}" -->
|
<!-- Command="{Binding SettingsWindowCommand}" -->
|
||||||
|
|
||||||
<!-- Softkey 5 -->
|
<!-- Softkey 5 -->
|
||||||
<Button Grid.Column="0" Content="Trend" FontSize="38" Margin="10"
|
<Button Grid.Column="7" Content="Trend" FontSize="38" Margin="10"
|
||||||
Command="{Binding TrendWindowClickedCommand}" Visibility="Collapsed"/>
|
Command="{Binding TrendWindowClickedCommand}" Visibility="Collapsed"/>
|
||||||
|
|
||||||
<!-- Softkey 6 -->
|
<!-- Softkey 6 -->
|
||||||
<Button Grid.Column="0" Content="Komponenten" FontSize="38" Margin="10"
|
<Button Grid.Column="8" Content="Komponenten" FontSize="38" Margin="10"
|
||||||
Command="{Binding ComponentsWindowClickedCommand}" Visibility="Collapsed"/>
|
Command="{Binding ComponentsWindowClickedCommand}" Visibility="Collapsed"/>
|
||||||
|
|
||||||
<!-- Softkey 7 -->
|
<!-- Softkey 7 -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Softkey 8 -->
|
<!-- Softkey 8 -->
|
||||||
<Button Content="Einstellungen" FontSize="38" Margin="10"
|
<Button Grid.Column="6" Content="Einstellungen" FontSize="38" Margin="10"
|
||||||
Command="{Binding SettingsWindowClickedCommand}" Visibility="Collapsed"/>
|
Command="{Binding SettingsWindowClickedCommand}" Visibility="Collapsed"/>
|
||||||
</UniformGrid>
|
|
||||||
<Button Grid.Column="7" Content="Meldungen" FontSize="38" Margin="10"
|
<Button Grid.Column="7" Content="Meldungen" FontSize="38" Margin="10"
|
||||||
|
Width="450"
|
||||||
Command="{Binding EventsListClickedCommand}"/>
|
Command="{Binding EventsListClickedCommand}"/>
|
||||||
<!-- Softkey 9 -->
|
<!-- Softkey 9 -->
|
||||||
<Button Grid.Column="8" Content="Ack Alarms" FontSize="38" Margin="10"
|
<Button Grid.Column="8"
|
||||||
|
Width="450"
|
||||||
|
Content="Alarm quitieren" FontSize="38" Margin="10"
|
||||||
Command="{Binding AckAlarmsCommand}"/>
|
Command="{Binding AckAlarmsCommand}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,26 +1,32 @@
|
|||||||
using HMIToolkit;
|
using HMIToolkit;
|
||||||
using MahApps.Metro.Controls;
|
using MahApps.Metro.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for MainWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for MainWindow.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class MainWindow
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public MainWindow(MainWindowVM mainWindowVM)
|
public MainWindow(MainWindowVM mainWindowVM)
|
||||||
{
|
{
|
||||||
this.DataContext = mainWindowVM;
|
DataContext = mainWindowVM;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Closed += OnClosedEvent;
|
Loaded += MainWindowLoaded;
|
||||||
}
|
Closed += OnClosedEvent;
|
||||||
|
}
|
||||||
|
|
||||||
private void OnClosedEvent(object? sender, EventArgs e)
|
private void MainWindowLoaded(object sender, System.Windows.RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (DataContext is IDisposable dataContext)
|
var model = (MainWindowVM)DataContext;
|
||||||
dataContext.Dispose();
|
model.ChangeUserClicked();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private void OnClosedEvent(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (DataContext is IDisposable dataContext)
|
||||||
|
dataContext.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,22 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using Common;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using CommunityToolkit.Mvvm.Messaging;
|
using CommunityToolkit.Mvvm.Messaging;
|
||||||
using Heisig.HMI.AdsManager;
|
using Heisig.HMI.AdsManager;
|
||||||
|
using InfineonHMI.Pages.Views;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using InfineonHMI.Common;
|
||||||
using TcEventLoggerAdsProxyLib;
|
using TcEventLoggerAdsProxyLib;
|
||||||
using InfineonHMI.Pages.Views;
|
using TwinCAT.TypeSystem;
|
||||||
|
|
||||||
namespace InfineonHMI;
|
namespace InfineonHMI;
|
||||||
|
|
||||||
public sealed partial class MainWindowVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
|
public sealed partial class MainWindowVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
|
||||||
{
|
{
|
||||||
|
|
||||||
[ObservableProperty] private StringControlButtonVM dummyStringVM;
|
|
||||||
|
|
||||||
[ObservableProperty] private Page currentPage;
|
[ObservableProperty] private Page currentPage;
|
||||||
|
|
||||||
[ObservableProperty] private Visibility statusBarVisible;
|
[ObservableProperty] private Visibility statusBarVisible;
|
||||||
@@ -24,12 +25,35 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
|
|
||||||
[ObservableProperty] private string actualUser;
|
[ObservableProperty] private string actualUser;
|
||||||
|
|
||||||
|
[ObservableProperty] private string sCurrentPackMLMode;
|
||||||
|
|
||||||
|
[ObservableProperty] private string sCurrentPackMLState;
|
||||||
|
|
||||||
|
[ObservableProperty] private bool canUserChangePageProductionWindow;
|
||||||
|
[ObservableProperty] private bool canUserChangePageReceipeWindow;
|
||||||
|
|
||||||
private const string _actualUserPrefix = "Aktueller Benutzer: \n";
|
private const string _actualUserPrefix = "Aktueller Benutzer: \n";
|
||||||
|
|
||||||
private readonly IAdsManager _adsManager;
|
private readonly IAdsManager _adsManager;
|
||||||
private readonly IConfiguration _config;
|
private readonly IConfiguration _config;
|
||||||
private readonly TcEventLogger _eventlogger;
|
private readonly TcEventLogger _eventlogger;
|
||||||
|
|
||||||
|
private User currentUser;
|
||||||
|
|
||||||
|
public User CurrentUser
|
||||||
|
{
|
||||||
|
get { return currentUser; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref currentUser, value);
|
||||||
|
ActualUser = _actualUserPrefix + currentUser.UserName + " lvl: " + currentUser.UserLevel;
|
||||||
|
Users.setCurrentUser(value);
|
||||||
|
|
||||||
|
CanUserChangePageProductionWindow = value.UserLevel == 100;
|
||||||
|
CanUserChangePageReceipeWindow = value.UserLevel == 100;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
// Last active event
|
// Last active event
|
||||||
[ObservableProperty] private string currentActiveEvent = "";
|
[ObservableProperty] private string currentActiveEvent = "";
|
||||||
|
|
||||||
@@ -48,6 +72,8 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
// Settings page viem model
|
// Settings page viem model
|
||||||
SettingsPageVM? _settingsPageVM;
|
SettingsPageVM? _settingsPageVM;
|
||||||
|
|
||||||
|
private PackMLControlVM stMachinePackMLVM;
|
||||||
|
|
||||||
ProductionOverviewPageVM? _productionOverviewPageVM;
|
ProductionOverviewPageVM? _productionOverviewPageVM;
|
||||||
|
|
||||||
private MachineOverviewPageVM? _machineOverviewPageVM;
|
private MachineOverviewPageVM? _machineOverviewPageVM;
|
||||||
@@ -64,9 +90,9 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_config = config;
|
_config = config;
|
||||||
|
|
||||||
|
SCurrentPackMLMode = "Aktueller Modus: ";
|
||||||
|
SCurrentPackMLState = "Aktueller Status: ";
|
||||||
ActualUser = _actualUserPrefix + "---------";
|
ActualUser = _actualUserPrefix + "---------";
|
||||||
// Create dummy string
|
|
||||||
DummyStringVM = new StringControlButtonVM();
|
|
||||||
|
|
||||||
// Create empty page
|
// Create empty page
|
||||||
_emptyPage = new();
|
_emptyPage = new();
|
||||||
@@ -79,9 +105,21 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||||
_messageStack.Push(_currentMessage);
|
_messageStack.Push(_currentMessage);
|
||||||
|
|
||||||
|
stMachinePackMLVM = new(_adsManager, "GVL_SCADA.stMachine.stMachineCmds");
|
||||||
|
|
||||||
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
||||||
|
|
||||||
breadcrumb = "";
|
breadcrumb = "";
|
||||||
|
|
||||||
|
_adsManager.Register("GVL_SCADA.stMachine.stMachineCmds.eCurrentState", StateChanged);
|
||||||
|
_adsManager.Register("GVL_SCADA.stMachine.stMachineCmds.eCurrentMode", ModeChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainWindowVM()
|
||||||
|
{
|
||||||
|
// Only used for design time
|
||||||
|
SCurrentPackMLMode = "Aktueller Modus: ";
|
||||||
|
SCurrentPackMLState = "Aktueller Status: ";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NavigateFromOuterPage(NavigateMessage message, NavigateMessage nextMessage)
|
public void NavigateFromOuterPage(NavigateMessage message, NavigateMessage nextMessage)
|
||||||
@@ -92,6 +130,115 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void StateChanged(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var state = (int)e.Value;
|
||||||
|
var curState = "Aktueller Status: ";
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
curState += "Undefined";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
curState += "Clearing";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
curState += "Stopped";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
curState += "Starting";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
curState += "Idle";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
curState += "Suspended";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
curState += "Execute";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
curState += "Stopping";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
curState += "Aborting";
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
curState += "Aborted";
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
curState += "Holding";
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
curState += "Held";
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
curState += "Unholding";
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
curState += "Suspending";
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
curState += "Unsuspending";
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
curState += "Resetting";
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
curState += "Completing";
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
curState += "Completed";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
curState += "Undefined";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SCurrentPackMLState = curState;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ModeChanged(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var curMode = "Aktueller Modus: ";
|
||||||
|
var mode = (int)e.Value;
|
||||||
|
|
||||||
|
switch (mode)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
curMode += "Invalid";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
curMode += "Production";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
curMode += "Maintenance";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
curMode += "Manual";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
curMode += "change_over";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
curMode += "clean";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
curMode += "set up";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
curMode += "empty out";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
curMode += "Invalid";
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sCurrentPackMLMode = curMode;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void SettingsWindow()
|
private void SettingsWindow()
|
||||||
{
|
{
|
||||||
@@ -102,15 +249,11 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void ChangeUserClicked()
|
public void ChangeUserClicked()
|
||||||
{
|
{
|
||||||
|
var userWindowVm = new UserManagementWindowVm(currentUser);
|
||||||
}
|
CurrentUser = userWindowVm.GetCurrentUserLevel();
|
||||||
|
OverviewWindowClicked();
|
||||||
[RelayCommand]
|
|
||||||
private void WorkingModeSelectionClicked()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
@@ -166,6 +309,10 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void EventsListClicked()
|
public void EventsListClicked()
|
||||||
{
|
{
|
||||||
@@ -183,7 +330,7 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
{
|
{
|
||||||
// Only change page if its a new page type
|
// Only change page if its a new page type
|
||||||
if (CurrentPage.GetType() == message.type)
|
if (CurrentPage.GetType() == message.type)
|
||||||
return;
|
//return;
|
||||||
|
|
||||||
// Push current message
|
// Push current message
|
||||||
if (_currentMessage != null)
|
if (_currentMessage != null)
|
||||||
@@ -255,7 +402,7 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
|
|
||||||
case nameof(HotCoolPlatePage):
|
case nameof(HotCoolPlatePage):
|
||||||
if (_hotCoolplatePageVM == null)
|
if (_hotCoolplatePageVM == null)
|
||||||
_hotCoolplatePageVM = new(_adsManager, "GVL_Config.stHotCoolplateConfig");
|
_hotCoolplatePageVM = new(_adsManager, "directlySetInViewModel");
|
||||||
|
|
||||||
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
||||||
CurrentPage = hotCoolPlatePage;
|
CurrentPage = hotCoolPlatePage;
|
||||||
@@ -293,6 +440,5 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
viewModel.Dispose();
|
viewModel.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
DummyStringVM.Dispose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,135 +4,133 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace InfineonHMI.Model
|
namespace InfineonHMI.Model;
|
||||||
|
|
||||||
|
public enum E_BMS_CONTROL_MODE : short
|
||||||
{
|
{
|
||||||
public enum E_BMS_CONTROL_MODE : short
|
AUTO_REMOTE = 1,
|
||||||
{
|
AUTO_LOCAL = 2,
|
||||||
AUTO_REMOTE = 1,
|
SAFETY_CHECK = 3,
|
||||||
AUTO_LOCAL = 2,
|
CAPACITY_TEST = 4,
|
||||||
SAFETY_CHECK = 3,
|
MANUAL = 5
|
||||||
CAPACITY_TEST = 4,
|
}
|
||||||
MANUAL = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
public class BMSControlModeEntry(E_BMS_CONTROL_MODE mode, string name)
|
public class BMSControlModeEntry(E_BMS_CONTROL_MODE mode, string name)
|
||||||
{
|
{
|
||||||
public E_BMS_CONTROL_MODE eMode = mode;
|
public E_BMS_CONTROL_MODE eMode = mode;
|
||||||
public string Name = name;
|
public string Name = name;
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
|
||||||
return Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum PLCJobenum : short
|
|
||||||
{
|
|
||||||
NONE = 0,
|
|
||||||
SCAN_QR_CODE = 10,
|
|
||||||
VACUUM_ON_ALIGNER = 15,
|
|
||||||
VACUUM_OFF_ALIGNER = 16,
|
|
||||||
VACUUM_ON_ETCHER_1 = 20,
|
|
||||||
VACUUM_ON_ETCHER_2 = 21,
|
|
||||||
VACUUM_OFF_ETCHER_1 = 22,
|
|
||||||
VACUUM_OFF_ETCHER_2 = 23,
|
|
||||||
CHUCK_OPEN_ETCHER_1 = 60,
|
|
||||||
CHUCK_OPEN_ETCHER_2 = 61,
|
|
||||||
CHUCK_CLOSE_ETCHER_1 = 62,
|
|
||||||
CHUCK_CLOSE_ETCHER_2 = 63,
|
|
||||||
}
|
|
||||||
public enum RobotJobenum : short
|
|
||||||
{
|
|
||||||
NONE = 0,
|
|
||||||
PICK_TRAYFEEDER = 10,
|
|
||||||
PLACE_TRAYFEEDER = 11,
|
|
||||||
PUT_ALIGNMENT = 15,
|
|
||||||
PICK_ALIGNMENT = 16,
|
|
||||||
PUT_ETCHER_1 = 20,
|
|
||||||
PUT_ETCHER_2 = 21,
|
|
||||||
PICK_ETCHER_1 = 22,
|
|
||||||
PICK_ETCHER_2 = 23,
|
|
||||||
SWITCH_ETCHER_1 = 24,
|
|
||||||
SWITCH_ETCHER_2 = 25,
|
|
||||||
PUT_HVTEST_HOT = 30,
|
|
||||||
PUT_HVTEST_COLD = 31,
|
|
||||||
PICK_HVTEST_HOT = 32,
|
|
||||||
PICK_HVTEST_COLD = 33,
|
|
||||||
PUT_HOTPLATE = 40,
|
|
||||||
PICK_HOTPLATE = 41,
|
|
||||||
PUT_COOLPLATE = 42,
|
|
||||||
PICK_COOLPLATE = 43,
|
|
||||||
PICK_GRIPPER = 50,
|
|
||||||
PICK_CHUCK_ETCHER_1 = 60,
|
|
||||||
PICK_CHUCK_ETCHER_2 = 61,
|
|
||||||
PUT_CHUCK_ETCHER_1 = 62,
|
|
||||||
PUT_CHUCK_ETCHER_2 = 63,
|
|
||||||
PUT_CHUCK_MAGAZIN = 64,
|
|
||||||
PICK_CHUCK_MAGAZIN = 65,
|
|
||||||
PUT_NIO_STATION = 70,
|
|
||||||
PICK_NIO_STATION = 71,
|
|
||||||
WARMUP = 80
|
|
||||||
}
|
|
||||||
public class PLCJobentry(PLCJobenum job, string name)
|
|
||||||
{
|
|
||||||
public PLCJobenum eJob = job;
|
|
||||||
public string Name = name;
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RobotJobentry(RobotJobenum job, string name)
|
|
||||||
{
|
|
||||||
public RobotJobenum eJob = job;
|
|
||||||
public string Name = name;
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum Stationenum : uint
|
|
||||||
{
|
|
||||||
EINGABE = 1,
|
|
||||||
QRCODE = 2,
|
|
||||||
AUSRICHTEN = 4,
|
|
||||||
AETZEN = 8,
|
|
||||||
HEIZPLATTE = 16,
|
|
||||||
KUEHLPLATTE = 32,
|
|
||||||
HOCHVOLTHEISS = 64,
|
|
||||||
HOCHVOLTKALT = 128,
|
|
||||||
AUSGABE = 256,
|
|
||||||
NIOSTATION = 512
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class StationEntry(Stationenum station, string name)
|
|
||||||
{
|
|
||||||
public Stationenum eStation = station;
|
|
||||||
public string sName = name;
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return sName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class FlowReceipeEntry()
|
|
||||||
{
|
{
|
||||||
public int NodeId { get; set; }
|
return Name;
|
||||||
public UInt16 Priority { get; set; }
|
|
||||||
public required StationEntry Station { get; set; }
|
|
||||||
public UInt16 MaxRetries { get; set; }
|
|
||||||
|
|
||||||
public int NextNodeSuccess { get; set; }
|
|
||||||
public int NextNodeRetry { get; set; }
|
|
||||||
public int NextNodeFail { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum PLCJobenum : short
|
||||||
|
{
|
||||||
|
NONE = 0,
|
||||||
|
SCAN_QR_CODE = 10,
|
||||||
|
VACUUM_ON_ALIGNER = 15,
|
||||||
|
VACUUM_OFF_ALIGNER = 16,
|
||||||
|
VACUUM_ON_ETCHER_1 = 20,
|
||||||
|
VACUUM_ON_ETCHER_2 = 21,
|
||||||
|
VACUUM_OFF_ETCHER_1 = 22,
|
||||||
|
VACUUM_OFF_ETCHER_2 = 23,
|
||||||
|
CHUCK_OPEN_ETCHER_1 = 60,
|
||||||
|
CHUCK_OPEN_ETCHER_2 = 61,
|
||||||
|
CHUCK_CLOSE_ETCHER_1 = 62,
|
||||||
|
CHUCK_CLOSE_ETCHER_2 = 63,
|
||||||
|
}
|
||||||
|
public enum RobotJobenum : short
|
||||||
|
{
|
||||||
|
NONE = 0,
|
||||||
|
PICK_TRAYFEEDER = 10,
|
||||||
|
PLACE_TRAYFEEDER = 11,
|
||||||
|
PUT_ALIGNMENT = 15,
|
||||||
|
PICK_ALIGNMENT = 16,
|
||||||
|
PUT_ETCHER_1 = 20,
|
||||||
|
PUT_ETCHER_2 = 21,
|
||||||
|
PICK_ETCHER_1 = 22,
|
||||||
|
PICK_ETCHER_2 = 23,
|
||||||
|
SWITCH_ETCHER_1 = 24,
|
||||||
|
SWITCH_ETCHER_2 = 25,
|
||||||
|
PUT_HVTEST_HOT = 30,
|
||||||
|
PUT_HVTEST_COLD = 31,
|
||||||
|
PICK_HVTEST_HOT = 32,
|
||||||
|
PICK_HVTEST_COLD = 33,
|
||||||
|
PUT_HOTPLATE = 40,
|
||||||
|
PICK_HOTPLATE = 41,
|
||||||
|
PUT_COOLPLATE = 42,
|
||||||
|
PICK_COOLPLATE = 43,
|
||||||
|
PICK_GRIPPER = 50,
|
||||||
|
PICK_CHUCK_ETCHER_1 = 60,
|
||||||
|
PICK_CHUCK_ETCHER_2 = 61,
|
||||||
|
PUT_CHUCK_ETCHER_1 = 62,
|
||||||
|
PUT_CHUCK_ETCHER_2 = 63,
|
||||||
|
PUT_CHUCK_MAGAZIN = 64,
|
||||||
|
PICK_CHUCK_MAGAZIN = 65,
|
||||||
|
PUT_NIO_STATION = 70,
|
||||||
|
PICK_NIO_STATION = 71,
|
||||||
|
WARMUP = 80
|
||||||
|
}
|
||||||
|
public class PLCJobentry(PLCJobenum job, string name)
|
||||||
|
{
|
||||||
|
public PLCJobenum eJob = job;
|
||||||
|
public string Name = name;
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class RobotJobentry(RobotJobenum job, string name)
|
||||||
|
{
|
||||||
|
public RobotJobenum eJob = job;
|
||||||
|
public string Name = name;
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Stationenum : uint
|
||||||
|
{
|
||||||
|
EINGABE = 1,
|
||||||
|
QRCODE = 2,
|
||||||
|
AUSRICHTEN = 4,
|
||||||
|
AETZEN = 8,
|
||||||
|
HEIZPLATTE = 16,
|
||||||
|
KUEHLPLATTE = 32,
|
||||||
|
HOCHVOLTHEISS = 64,
|
||||||
|
HOCHVOLTKALT = 128,
|
||||||
|
AUSGABE = 256,
|
||||||
|
NIOSTATION = 512
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class StationEntry(Stationenum station, string name)
|
||||||
|
{
|
||||||
|
public Stationenum eStation = station;
|
||||||
|
public string sName = name;
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return sName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class FlowReceipeEntry()
|
||||||
|
{
|
||||||
|
public int NodeId { get; set; }
|
||||||
|
public UInt16 Priority { get; set; }
|
||||||
|
public required StationEntry Station { get; set; }
|
||||||
|
public UInt16 MaxRetries { get; set; }
|
||||||
|
|
||||||
|
public int NextNodeSuccess { get; set; }
|
||||||
|
public int NextNodeRetry { get; set; }
|
||||||
|
public int NextNodeFail { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,18 +2,17 @@
|
|||||||
using CommunityToolkit.Mvvm.Messaging;
|
using CommunityToolkit.Mvvm.Messaging;
|
||||||
using Heisig.HMI.AdsManager;
|
using Heisig.HMI.AdsManager;
|
||||||
|
|
||||||
namespace InfineonHMI.OwnControls
|
namespace InfineonHMI.OwnControls;
|
||||||
|
|
||||||
|
public sealed partial class UnitControlButtonVM : SMUBaseVM
|
||||||
{
|
{
|
||||||
public sealed partial class UnitControlButtonVM : SMUBaseVM
|
public UnitControlButtonVM() : base() { }
|
||||||
{
|
|
||||||
public UnitControlButtonVM() : base() { }
|
|
||||||
|
|
||||||
public UnitControlButtonVM(IAdsManager adsManager, string variableName) : base(adsManager, variableName) { }
|
public UnitControlButtonVM(IAdsManager adsManager, string variableName) : base(adsManager, variableName) { }
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void Clicked()
|
private void Clicked()
|
||||||
{
|
{
|
||||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName, typeof(UnitDetailsControl)));
|
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName, typeof(UnitDetailsControl)));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -4,491 +4,490 @@ using HMIToolkit;
|
|||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using Heisig.HMI.AdsManager;
|
using Heisig.HMI.AdsManager;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class UnitDetailsControlVM : ObservableObject, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class UnitDetailsControlVM : ObservableObject, IDisposable
|
[ObservableProperty]
|
||||||
{
|
private float rVoltage;
|
||||||
[ObservableProperty]
|
|
||||||
private float rVoltage;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private E_COMPONENT_STATUS status;
|
private E_COMPONENT_STATUS status;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private AnalogValueVM pressureNegolytSegmentInVM;
|
private AnalogValueVM pressureNegolytSegmentInVM;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private AnalogValueVM pressureNegolytTankInVM;
|
private AnalogValueVM pressureNegolytTankInVM;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private AnalogValueVM temperatureNegolytTankInVM;
|
private AnalogValueVM temperatureNegolytTankInVM;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private AnalogValueVM pressurePosolytSegmentInVM;
|
private AnalogValueVM pressurePosolytSegmentInVM;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private AnalogValueVM pressurePosolytTankInVM;
|
private AnalogValueVM pressurePosolytTankInVM;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private AnalogValueVM temperaturePosolytTankInVM;
|
private AnalogValueVM temperaturePosolytTankInVM;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool canOpenBothValves;
|
private bool canOpenBothValves;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool canCloseBothValves;
|
private bool canCloseBothValves;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private short feedbackOpenValves;
|
private short feedbackOpenValves;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private short feedbackCloseValves;
|
private short feedbackCloseValves;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool canStartBothPumps;
|
private bool canStartBothPumps;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool canStopBothPumps;
|
private bool canStopBothPumps;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private short feedbackStartPumps;
|
private short feedbackStartPumps;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private short feedbackStopPumps;
|
private short feedbackStopPumps;
|
||||||
|
|
||||||
private float _posolytPumpOnSpeed;
|
private float _posolytPumpOnSpeed;
|
||||||
private float _negolytPumpOnSpeed;
|
private float _negolytPumpOnSpeed;
|
||||||
|
|
||||||
private float valveWindowHorizontalPosition;
|
private float valveWindowHorizontalPosition;
|
||||||
|
|
||||||
private readonly BinaryValveControlVM _valveNegolytVM;
|
private readonly BinaryValveControlVM _valveNegolytVM;
|
||||||
private readonly BinaryValveControlVM _valvePosolytVM;
|
private readonly BinaryValveControlVM _valvePosolytVM;
|
||||||
private readonly AnalogMotorControlVM _pumpNegolytVM;
|
private readonly AnalogMotorControlVM _pumpNegolytVM;
|
||||||
private readonly AnalogMotorControlVM _pumpPosolytVM;
|
private readonly AnalogMotorControlVM _pumpPosolytVM;
|
||||||
|
|
||||||
private BinaryValveWindow? _windowValveNegolyt;
|
private BinaryValveWindow? _windowValveNegolyt;
|
||||||
private BinaryValveWindow? _windowValvePosolyt;
|
private BinaryValveWindow? _windowValvePosolyt;
|
||||||
|
|
||||||
private AnalogMotorWindow? _windowPumpNegolyt;
|
private AnalogMotorWindow? _windowPumpNegolyt;
|
||||||
private AnalogMotorWindow? _windowPumpPosolyt;
|
private AnalogMotorWindow? _windowPumpPosolyt;
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
private readonly string _variableName;
|
private readonly string _variableName;
|
||||||
|
|
||||||
public UnitDetailsControlVM()
|
public UnitDetailsControlVM()
|
||||||
{
|
{
|
||||||
Status = E_COMPONENT_STATUS.OFF;
|
Status = E_COMPONENT_STATUS.OFF;
|
||||||
rVoltage = 0.0f;
|
rVoltage = 0.0f;
|
||||||
_variableName = "";
|
_variableName = "";
|
||||||
|
|
||||||
// Negolyt
|
// Negolyt
|
||||||
PressureNegolytSegmentInVM = new AnalogValueVM();
|
PressureNegolytSegmentInVM = new AnalogValueVM();
|
||||||
PressureNegolytTankInVM = new AnalogValueVM();
|
PressureNegolytTankInVM = new AnalogValueVM();
|
||||||
TemperatureNegolytTankInVM = new AnalogValueVM();
|
TemperatureNegolytTankInVM = new AnalogValueVM();
|
||||||
_valveNegolytVM = new BinaryValveControlVM();
|
_valveNegolytVM = new BinaryValveControlVM();
|
||||||
_pumpNegolytVM = new AnalogMotorControlVM();
|
_pumpNegolytVM = new AnalogMotorControlVM();
|
||||||
|
|
||||||
_windowValveNegolyt = null;
|
_windowValveNegolyt = null;
|
||||||
|
|
||||||
// Posolyt
|
// Posolyt
|
||||||
PressurePosolytSegmentInVM = new AnalogValueVM();
|
PressurePosolytSegmentInVM = new AnalogValueVM();
|
||||||
PressurePosolytTankInVM = new AnalogValueVM();
|
PressurePosolytTankInVM = new AnalogValueVM();
|
||||||
TemperaturePosolytTankInVM = new AnalogValueVM();
|
TemperaturePosolytTankInVM = new AnalogValueVM();
|
||||||
_valvePosolytVM = new BinaryValveControlVM();
|
_valvePosolytVM = new BinaryValveControlVM();
|
||||||
_pumpPosolytVM = new AnalogMotorControlVM();
|
_pumpPosolytVM = new AnalogMotorControlVM();
|
||||||
|
|
||||||
_windowValvePosolyt = null;
|
_windowValvePosolyt = null;
|
||||||
|
|
||||||
valveWindowHorizontalPosition = 10;
|
valveWindowHorizontalPosition = 10;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UnitDetailsControlVM(IAdsManager adsManager, string variableName)
|
public UnitDetailsControlVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
|
|
||||||
|
|
||||||
Status = E_COMPONENT_STATUS.OFF;
|
Status = E_COMPONENT_STATUS.OFF;
|
||||||
rVoltage = 0.0f;
|
rVoltage = 0.0f;
|
||||||
|
|
||||||
|
|
||||||
// Negolyt
|
// Negolyt
|
||||||
PressureNegolytSegmentInVM = new AnalogValueVM(_adsManager, _variableName + ".stP21", true);
|
PressureNegolytSegmentInVM = new AnalogValueVM(_adsManager, _variableName + ".stP21", true);
|
||||||
PressureNegolytTankInVM = new AnalogValueVM(_adsManager, _variableName + ".stP22", true);
|
PressureNegolytTankInVM = new AnalogValueVM(_adsManager, _variableName + ".stP22", true);
|
||||||
TemperatureNegolytTankInVM = new AnalogValueVM(_adsManager, _variableName + ".stT21", true);
|
TemperatureNegolytTankInVM = new AnalogValueVM(_adsManager, _variableName + ".stT21", true);
|
||||||
_valveNegolytVM = new BinaryValveControlVM(_adsManager, _variableName + ".stNS22");
|
_valveNegolytVM = new BinaryValveControlVM(_adsManager, _variableName + ".stNS22");
|
||||||
_valveNegolytVM.OpenButton.FeedbackChanged += OnValveNegolytOpenFeedbackChanged;
|
_valveNegolytVM.OpenButton.FeedbackChanged += OnValveNegolytOpenFeedbackChanged;
|
||||||
_valveNegolytVM.CloseButton.FeedbackChanged += OnValveNegolytCloseFeedbackChanged;
|
_valveNegolytVM.CloseButton.FeedbackChanged += OnValveNegolytCloseFeedbackChanged;
|
||||||
_valveNegolytVM.OpenButton.ReleaseChanged += OnValveNegolytOpenReleaseChanged;
|
_valveNegolytVM.OpenButton.ReleaseChanged += OnValveNegolytOpenReleaseChanged;
|
||||||
_valveNegolytVM.CloseButton.ReleaseChanged += OnValveNegolytCloseReleaseChanged;
|
_valveNegolytVM.CloseButton.ReleaseChanged += OnValveNegolytCloseReleaseChanged;
|
||||||
_pumpNegolytVM = new AnalogMotorControlVM(_adsManager, _variableName + ".stNS21");
|
_pumpNegolytVM = new AnalogMotorControlVM(_adsManager, _variableName + ".stNS21");
|
||||||
_pumpNegolytVM.StartButton.FeedbackChanged += OnPumpNegolytStartFeedbackChanged;
|
_pumpNegolytVM.StartButton.FeedbackChanged += OnPumpNegolytStartFeedbackChanged;
|
||||||
_pumpNegolytVM.StopButton.FeedbackChanged += OnPumpNegolytStopFeedbackChanged;
|
_pumpNegolytVM.StopButton.FeedbackChanged += OnPumpNegolytStopFeedbackChanged;
|
||||||
_pumpNegolytVM.StartButton.ReleaseChanged += OnPumpNegolytStartReleaseChanged;
|
_pumpNegolytVM.StartButton.ReleaseChanged += OnPumpNegolytStartReleaseChanged;
|
||||||
_pumpNegolytVM.StopButton.ReleaseChanged += OnPumpNegolytStopReleaseChanged;
|
_pumpNegolytVM.StopButton.ReleaseChanged += OnPumpNegolytStopReleaseChanged;
|
||||||
|
|
||||||
|
|
||||||
// Posolyt
|
// Posolyt
|
||||||
PressurePosolytSegmentInVM = new AnalogValueVM(_adsManager, _variableName + ".stP11", true);
|
PressurePosolytSegmentInVM = new AnalogValueVM(_adsManager, _variableName + ".stP11", true);
|
||||||
PressurePosolytTankInVM = new AnalogValueVM(_adsManager, _variableName + ".stP12", true);
|
PressurePosolytTankInVM = new AnalogValueVM(_adsManager, _variableName + ".stP12", true);
|
||||||
TemperaturePosolytTankInVM = new AnalogValueVM(_adsManager, _variableName + ".stT11", true);
|
TemperaturePosolytTankInVM = new AnalogValueVM(_adsManager, _variableName + ".stT11", true);
|
||||||
_valvePosolytVM = new BinaryValveControlVM(_adsManager, _variableName + ".stNS12");
|
_valvePosolytVM = new BinaryValveControlVM(_adsManager, _variableName + ".stNS12");
|
||||||
_valvePosolytVM.OpenButton.FeedbackChanged += OnValvePosolytOpenFeedbackChanged;
|
_valvePosolytVM.OpenButton.FeedbackChanged += OnValvePosolytOpenFeedbackChanged;
|
||||||
_valvePosolytVM.CloseButton.FeedbackChanged += OnValvePosolytCloseFeedbackChanged;
|
_valvePosolytVM.CloseButton.FeedbackChanged += OnValvePosolytCloseFeedbackChanged;
|
||||||
_valvePosolytVM.OpenButton.ReleaseChanged += OnValvePosolytOpenReleaseChanged;
|
_valvePosolytVM.OpenButton.ReleaseChanged += OnValvePosolytOpenReleaseChanged;
|
||||||
_valvePosolytVM.CloseButton.ReleaseChanged += OnValvePosolytCloseReleaseChanged;
|
_valvePosolytVM.CloseButton.ReleaseChanged += OnValvePosolytCloseReleaseChanged;
|
||||||
_pumpPosolytVM = new AnalogMotorControlVM(_adsManager, _variableName + ".stNS11");
|
_pumpPosolytVM = new AnalogMotorControlVM(_adsManager, _variableName + ".stNS11");
|
||||||
_pumpPosolytVM.StartButton.FeedbackChanged += OnPumpPosolytStartFeedbackChanged;
|
_pumpPosolytVM.StartButton.FeedbackChanged += OnPumpPosolytStartFeedbackChanged;
|
||||||
_pumpPosolytVM.StopButton.FeedbackChanged += OnPumpPosolytStopFeedbackChanged;
|
_pumpPosolytVM.StopButton.FeedbackChanged += OnPumpPosolytStopFeedbackChanged;
|
||||||
_pumpPosolytVM.StartButton.ReleaseChanged += OnPumpPosolytStartReleaseChanged;
|
_pumpPosolytVM.StartButton.ReleaseChanged += OnPumpPosolytStartReleaseChanged;
|
||||||
_pumpPosolytVM.StopButton.ReleaseChanged += OnPumpPosolytStopReleaseChanged;
|
_pumpPosolytVM.StopButton.ReleaseChanged += OnPumpPosolytStopReleaseChanged;
|
||||||
|
|
||||||
|
|
||||||
// Current status
|
// Current status
|
||||||
_adsManager.Register(_variableName + ".eStatus", StatusChanged);
|
_adsManager.Register(_variableName + ".eStatus", StatusChanged);
|
||||||
_adsManager.Register(_variableName + ".rVoltage", VoltageChanged);
|
_adsManager.Register(_variableName + ".rVoltage", VoltageChanged);
|
||||||
|
|
||||||
|
|
||||||
// Configured pump speed for on
|
// Configured pump speed for on
|
||||||
_adsManager.Register("GVL_CONFIG.rPumpNegolytOnPower", NegolytPumpOnSpeedChanged);
|
_adsManager.Register("GVL_CONFIG.rPumpNegolytOnPower", NegolytPumpOnSpeedChanged);
|
||||||
_adsManager.Register("GVL_CONFIG.rPumpPosolytOnPower", PosolytPumpOnSpeedChanged);
|
_adsManager.Register("GVL_CONFIG.rPumpPosolytOnPower", PosolytPumpOnSpeedChanged);
|
||||||
|
|
||||||
valveWindowHorizontalPosition = 10;
|
valveWindowHorizontalPosition = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NegolytPumpOnSpeedChanged(object? sender, ValueChangedEventArgs e)
|
private void NegolytPumpOnSpeedChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
_negolytPumpOnSpeed = (float)e.Value;
|
_negolytPumpOnSpeed = (float)e.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PosolytPumpOnSpeedChanged(object? sender, ValueChangedEventArgs e)
|
private void PosolytPumpOnSpeedChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
_posolytPumpOnSpeed = (float)e.Value;
|
_posolytPumpOnSpeed = (float)e.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void VoltageChanged(object? sender, ValueChangedEventArgs e)
|
private void VoltageChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
RVoltage = (float)e.Value;
|
RVoltage = (float)e.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
// Dispose all necessary view models
|
// Dispose all necessary view models
|
||||||
// Negolyt
|
// Negolyt
|
||||||
PressureNegolytSegmentInVM.Dispose();
|
PressureNegolytSegmentInVM.Dispose();
|
||||||
PressureNegolytTankInVM.Dispose();
|
PressureNegolytTankInVM.Dispose();
|
||||||
TemperatureNegolytTankInVM.Dispose();
|
TemperatureNegolytTankInVM.Dispose();
|
||||||
_valveNegolytVM.OpenButton.FeedbackChanged -= OnValveNegolytOpenFeedbackChanged;
|
_valveNegolytVM.OpenButton.FeedbackChanged -= OnValveNegolytOpenFeedbackChanged;
|
||||||
_valveNegolytVM.CloseButton.FeedbackChanged -= OnValveNegolytCloseFeedbackChanged;
|
_valveNegolytVM.CloseButton.FeedbackChanged -= OnValveNegolytCloseFeedbackChanged;
|
||||||
_valveNegolytVM.OpenButton.ReleaseChanged -= OnValveNegolytOpenReleaseChanged;
|
_valveNegolytVM.OpenButton.ReleaseChanged -= OnValveNegolytOpenReleaseChanged;
|
||||||
_valveNegolytVM.CloseButton.ReleaseChanged -= OnValveNegolytCloseReleaseChanged;
|
_valveNegolytVM.CloseButton.ReleaseChanged -= OnValveNegolytCloseReleaseChanged;
|
||||||
_valveNegolytVM.Dispose();
|
_valveNegolytVM.Dispose();
|
||||||
_pumpNegolytVM.Dispose();
|
_pumpNegolytVM.Dispose();
|
||||||
|
|
||||||
// Posolyt
|
// Posolyt
|
||||||
PressurePosolytSegmentInVM.Dispose();
|
PressurePosolytSegmentInVM.Dispose();
|
||||||
PressurePosolytTankInVM.Dispose();
|
PressurePosolytTankInVM.Dispose();
|
||||||
TemperaturePosolytTankInVM.Dispose();
|
TemperaturePosolytTankInVM.Dispose();
|
||||||
_valvePosolytVM.OpenButton.FeedbackChanged -= OnValvePosolytOpenFeedbackChanged;
|
_valvePosolytVM.OpenButton.FeedbackChanged -= OnValvePosolytOpenFeedbackChanged;
|
||||||
_valvePosolytVM.CloseButton.FeedbackChanged -= OnValvePosolytCloseFeedbackChanged;
|
_valvePosolytVM.CloseButton.FeedbackChanged -= OnValvePosolytCloseFeedbackChanged;
|
||||||
_valvePosolytVM.OpenButton.ReleaseChanged -= OnValvePosolytOpenReleaseChanged;
|
_valvePosolytVM.OpenButton.ReleaseChanged -= OnValvePosolytOpenReleaseChanged;
|
||||||
_valvePosolytVM.CloseButton.ReleaseChanged -= OnValvePosolytCloseReleaseChanged;
|
_valvePosolytVM.CloseButton.ReleaseChanged -= OnValvePosolytCloseReleaseChanged;
|
||||||
_valvePosolytVM.Dispose();
|
_valvePosolytVM.Dispose();
|
||||||
_pumpPosolytVM.Dispose();
|
_pumpPosolytVM.Dispose();
|
||||||
|
|
||||||
// Deregister variables
|
// Deregister variables
|
||||||
_adsManager?.Deregister(_variableName + ".eStatus", StatusChanged);
|
_adsManager?.Deregister(_variableName + ".eStatus", StatusChanged);
|
||||||
_adsManager?.Deregister(_variableName + ".rVoltage", VoltageChanged);
|
_adsManager?.Deregister(_variableName + ".rVoltage", VoltageChanged);
|
||||||
_adsManager?.Deregister("GVL_CONFIG.rPumpNegolytOnPower", NegolytPumpOnSpeedChanged);
|
_adsManager?.Deregister("GVL_CONFIG.rPumpNegolytOnPower", NegolytPumpOnSpeedChanged);
|
||||||
_adsManager?.Deregister("GVL_CONFIG.rPumpPosolytOnPower", PosolytPumpOnSpeedChanged);
|
_adsManager?.Deregister("GVL_CONFIG.rPumpPosolytOnPower", PosolytPumpOnSpeedChanged);
|
||||||
|
|
||||||
// Destroy windows
|
// Destroy windows
|
||||||
_windowValveNegolyt?.Close();
|
_windowValveNegolyt?.Close();
|
||||||
_windowValvePosolyt?.Close();
|
_windowValvePosolyt?.Close();
|
||||||
_windowPumpNegolyt?.Close();
|
_windowPumpNegolyt?.Close();
|
||||||
_windowPumpPosolyt?.Close();
|
_windowPumpPosolyt?.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StatusChanged(object? sender, ValueChangedEventArgs e)
|
private void StatusChanged(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
Status = (E_COMPONENT_STATUS)((short)e.Value);
|
Status = (E_COMPONENT_STATUS)((short)e.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void ShowValveNegolyt()
|
private void ShowValveNegolyt()
|
||||||
{
|
{
|
||||||
if (_adsManager != null && _windowValveNegolyt == null)
|
if (_adsManager != null && _windowValveNegolyt == null)
|
||||||
{
|
{
|
||||||
_windowValveNegolyt = new() { DataContext = _valveNegolytVM };
|
_windowValveNegolyt = new() { DataContext = _valveNegolytVM };
|
||||||
_windowValveNegolyt.Closed += WindowValveNegolyt_Closed;
|
_windowValveNegolyt.Closed += WindowValveNegolyt_Closed;
|
||||||
_windowValveNegolyt.Show();
|
_windowValveNegolyt.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WindowValveNegolyt_Closed(object? sender, EventArgs e)
|
private void WindowValveNegolyt_Closed(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_windowValveNegolyt!.Close();
|
_windowValveNegolyt!.Close();
|
||||||
_windowValveNegolyt = null;
|
_windowValveNegolyt = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void ShowValvePosolyt()
|
private void ShowValvePosolyt()
|
||||||
{
|
{
|
||||||
if (_adsManager != null && _windowValvePosolyt == null)
|
if (_adsManager != null && _windowValvePosolyt == null)
|
||||||
{
|
{
|
||||||
_windowValvePosolyt = new() { DataContext = _valvePosolytVM };
|
_windowValvePosolyt = new() { DataContext = _valvePosolytVM };
|
||||||
_windowValvePosolyt.Closed += WindowValvePosolyt_Closed;
|
_windowValvePosolyt.Closed += WindowValvePosolyt_Closed;
|
||||||
_windowValvePosolyt.Show();
|
_windowValvePosolyt.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WindowValvePosolyt_Closed(object? sender, EventArgs e)
|
private void WindowValvePosolyt_Closed(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_windowValvePosolyt!.Close();
|
_windowValvePosolyt!.Close();
|
||||||
_windowValvePosolyt = null;
|
_windowValvePosolyt = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void ShowPumpNegolyt()
|
public void ShowPumpNegolyt()
|
||||||
{
|
{
|
||||||
if (_adsManager != null && _windowPumpNegolyt == null)
|
if (_adsManager != null && _windowPumpNegolyt == null)
|
||||||
{
|
{
|
||||||
_windowPumpNegolyt = new() { DataContext = _pumpNegolytVM };
|
_windowPumpNegolyt = new() { DataContext = _pumpNegolytVM };
|
||||||
_windowPumpNegolyt.Closed += WindowPumpNegolyt_Closed;
|
_windowPumpNegolyt.Closed += WindowPumpNegolyt_Closed;
|
||||||
_windowPumpNegolyt.Show();
|
_windowPumpNegolyt.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WindowPumpNegolyt_Closed(object? sender, EventArgs e)
|
private void WindowPumpNegolyt_Closed(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_windowPumpNegolyt!.Close();
|
_windowPumpNegolyt!.Close();
|
||||||
_windowPumpNegolyt = null;
|
_windowPumpNegolyt = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void ShowPumpPosolyt()
|
public void ShowPumpPosolyt()
|
||||||
{
|
{
|
||||||
if (_adsManager != null && _windowPumpPosolyt == null)
|
if (_adsManager != null && _windowPumpPosolyt == null)
|
||||||
{
|
{
|
||||||
_windowPumpPosolyt = new() { DataContext = _pumpPosolytVM };
|
_windowPumpPosolyt = new() { DataContext = _pumpPosolytVM };
|
||||||
_windowPumpPosolyt.Closed += WindowPumpPosolyt_Closed;
|
_windowPumpPosolyt.Closed += WindowPumpPosolyt_Closed;
|
||||||
_windowPumpPosolyt.Show();
|
_windowPumpPosolyt.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void OpenBothValves()
|
private void OpenBothValves()
|
||||||
{
|
{
|
||||||
_valveNegolytVM.OpenButton?.ButtonClickedCommand.Execute(null);
|
_valveNegolytVM.OpenButton?.ButtonClickedCommand.Execute(null);
|
||||||
_valvePosolytVM.OpenButton?.ButtonClickedCommand.Execute(null);
|
_valvePosolytVM.OpenButton?.ButtonClickedCommand.Execute(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void CloseBothValves()
|
private void CloseBothValves()
|
||||||
{
|
{
|
||||||
_valveNegolytVM.CloseButton?.ButtonClickedCommand.Execute(null);
|
_valveNegolytVM.CloseButton?.ButtonClickedCommand.Execute(null);
|
||||||
_valvePosolytVM.CloseButton?.ButtonClickedCommand.Execute(null);
|
_valvePosolytVM.CloseButton?.ButtonClickedCommand.Execute(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValveNegolytOpenFeedbackChanged(object? sender, EventArgs e)
|
private void OnValveNegolytOpenFeedbackChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateOpenFeedback();
|
CalculateOpenFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValvePosolytOpenFeedbackChanged(object? sender, EventArgs e)
|
private void OnValvePosolytOpenFeedbackChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateOpenFeedback();
|
CalculateOpenFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateOpenFeedback()
|
private void CalculateOpenFeedback()
|
||||||
{
|
{
|
||||||
if (_valveNegolytVM?.OpenButton.IFeedback == 1 && _valvePosolytVM?.OpenButton.IFeedback == 1)
|
if (_valveNegolytVM?.OpenButton.IFeedback == 1 && _valvePosolytVM?.OpenButton.IFeedback == 1)
|
||||||
FeedbackOpenValves = 1;
|
FeedbackOpenValves = 1;
|
||||||
else if (_valveNegolytVM?.OpenButton.IFeedback == 0 && _valvePosolytVM?.OpenButton.IFeedback == 0)
|
else if (_valveNegolytVM?.OpenButton.IFeedback == 0 && _valvePosolytVM?.OpenButton.IFeedback == 0)
|
||||||
FeedbackOpenValves = 0;
|
FeedbackOpenValves = 0;
|
||||||
else
|
else
|
||||||
FeedbackOpenValves = 2;
|
FeedbackOpenValves = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValveNegolytCloseFeedbackChanged(object? sender, EventArgs e)
|
private void OnValveNegolytCloseFeedbackChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateCloseFeedback();
|
CalculateCloseFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValvePosolytCloseFeedbackChanged(object? sender, EventArgs e)
|
private void OnValvePosolytCloseFeedbackChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateCloseFeedback();
|
CalculateCloseFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateCloseFeedback()
|
private void CalculateCloseFeedback()
|
||||||
{
|
{
|
||||||
if (_valveNegolytVM?.CloseButton.IFeedback == 1 && _valvePosolytVM?.CloseButton.IFeedback == 1)
|
if (_valveNegolytVM?.CloseButton.IFeedback == 1 && _valvePosolytVM?.CloseButton.IFeedback == 1)
|
||||||
FeedbackCloseValves = 1;
|
FeedbackCloseValves = 1;
|
||||||
else if (_valveNegolytVM?.CloseButton.IFeedback == 0 && _valvePosolytVM?.CloseButton.IFeedback == 0)
|
else if (_valveNegolytVM?.CloseButton.IFeedback == 0 && _valvePosolytVM?.CloseButton.IFeedback == 0)
|
||||||
FeedbackCloseValves = 0;
|
FeedbackCloseValves = 0;
|
||||||
else
|
else
|
||||||
FeedbackCloseValves = 2;
|
FeedbackCloseValves = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValveNegolytOpenReleaseChanged(object? sender, EventArgs e)
|
private void OnValveNegolytOpenReleaseChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateOpenRelease();
|
CalculateOpenRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValvePosolytOpenReleaseChanged(object? sender, EventArgs e)
|
private void OnValvePosolytOpenReleaseChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateOpenRelease();
|
CalculateOpenRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateOpenRelease()
|
private void CalculateOpenRelease()
|
||||||
{
|
{
|
||||||
if (_valvePosolytVM == null || _valveNegolytVM == null)
|
if (_valvePosolytVM == null || _valveNegolytVM == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_valveNegolytVM.OpenButton.XRelease && _valvePosolytVM.OpenButton.XRelease)
|
if (_valveNegolytVM.OpenButton.XRelease && _valvePosolytVM.OpenButton.XRelease)
|
||||||
CanOpenBothValves = true;
|
CanOpenBothValves = true;
|
||||||
else
|
else
|
||||||
CanOpenBothValves = false;
|
CanOpenBothValves = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValveNegolytCloseReleaseChanged(object? sender, EventArgs e)
|
private void OnValveNegolytCloseReleaseChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateCloseRelease();
|
CalculateCloseRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValvePosolytCloseReleaseChanged(object? sender, EventArgs e)
|
private void OnValvePosolytCloseReleaseChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateCloseRelease();
|
CalculateCloseRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateCloseRelease()
|
private void CalculateCloseRelease()
|
||||||
{
|
{
|
||||||
if (_valvePosolytVM == null || _valveNegolytVM == null)
|
if (_valvePosolytVM == null || _valveNegolytVM == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_valveNegolytVM.CloseButton.XRelease && _valvePosolytVM.CloseButton.XRelease)
|
if (_valveNegolytVM.CloseButton.XRelease && _valvePosolytVM.CloseButton.XRelease)
|
||||||
CanCloseBothValves = true;
|
CanCloseBothValves = true;
|
||||||
else
|
else
|
||||||
CanCloseBothValves = false;
|
CanCloseBothValves = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void StartBothPumps()
|
private void StartBothPumps()
|
||||||
{
|
{
|
||||||
if (_adsManager == null || _pumpNegolytVM == null || _pumpPosolytVM == null)
|
if (_adsManager == null || _pumpNegolytVM == null || _pumpPosolytVM == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_pumpNegolytVM.Setpoint.RValue = _negolytPumpOnSpeed;
|
_pumpNegolytVM.Setpoint.RValue = _negolytPumpOnSpeed;
|
||||||
_pumpPosolytVM.Setpoint.RValue = _posolytPumpOnSpeed;
|
_pumpPosolytVM.Setpoint.RValue = _posolytPumpOnSpeed;
|
||||||
|
|
||||||
_pumpNegolytVM.StartButton?.ButtonClickedCommand.Execute(null);
|
_pumpNegolytVM.StartButton?.ButtonClickedCommand.Execute(null);
|
||||||
_pumpPosolytVM.StartButton?.ButtonClickedCommand.Execute(null);
|
_pumpPosolytVM.StartButton?.ButtonClickedCommand.Execute(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void StopBothPumps()
|
private void StopBothPumps()
|
||||||
{
|
{
|
||||||
_pumpNegolytVM.StopButton?.ButtonClickedCommand.Execute(null);
|
_pumpNegolytVM.StopButton?.ButtonClickedCommand.Execute(null);
|
||||||
_pumpPosolytVM.StopButton?.ButtonClickedCommand.Execute(null);
|
_pumpPosolytVM.StopButton?.ButtonClickedCommand.Execute(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateStartRelease()
|
private void CalculateStartRelease()
|
||||||
{
|
{
|
||||||
if (_pumpNegolytVM == null || _pumpPosolytVM == null)
|
if (_pumpNegolytVM == null || _pumpPosolytVM == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_pumpNegolytVM.StartButton.XRelease && _pumpPosolytVM.StartButton.XRelease)
|
if (_pumpNegolytVM.StartButton.XRelease && _pumpPosolytVM.StartButton.XRelease)
|
||||||
CanStartBothPumps = true;
|
CanStartBothPumps = true;
|
||||||
else
|
else
|
||||||
CanStartBothPumps = false;
|
CanStartBothPumps = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculatStopRelease()
|
private void CalculatStopRelease()
|
||||||
{
|
{
|
||||||
if (_pumpNegolytVM == null || _pumpPosolytVM == null)
|
if (_pumpNegolytVM == null || _pumpPosolytVM == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_pumpNegolytVM.StopButton.XRelease && _pumpPosolytVM.StopButton.XRelease)
|
if (_pumpNegolytVM.StopButton.XRelease && _pumpPosolytVM.StopButton.XRelease)
|
||||||
CanStopBothPumps = true;
|
CanStopBothPumps = true;
|
||||||
else
|
else
|
||||||
CanStopBothPumps = false;
|
CanStopBothPumps = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateStartFeedback()
|
private void CalculateStartFeedback()
|
||||||
{
|
{
|
||||||
if (_pumpNegolytVM == null || _pumpPosolytVM == null)
|
if (_pumpNegolytVM == null || _pumpPosolytVM == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_pumpNegolytVM.StartButton.IFeedback == 1 && _pumpPosolytVM.StartButton.IFeedback == 1)
|
if (_pumpNegolytVM.StartButton.IFeedback == 1 && _pumpPosolytVM.StartButton.IFeedback == 1)
|
||||||
FeedbackStartPumps = 1;
|
FeedbackStartPumps = 1;
|
||||||
else if (_pumpNegolytVM.StartButton.IFeedback == 0 && _pumpPosolytVM.StartButton.IFeedback == 0)
|
else if (_pumpNegolytVM.StartButton.IFeedback == 0 && _pumpPosolytVM.StartButton.IFeedback == 0)
|
||||||
FeedbackStartPumps = 0;
|
FeedbackStartPumps = 0;
|
||||||
else
|
else
|
||||||
FeedbackStartPumps = 2;
|
FeedbackStartPumps = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateStopFeedback()
|
private void CalculateStopFeedback()
|
||||||
{
|
{
|
||||||
if (_pumpNegolytVM == null || _pumpPosolytVM == null)
|
if (_pumpNegolytVM == null || _pumpPosolytVM == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_pumpNegolytVM.StopButton.IFeedback == 1 && _pumpPosolytVM.StopButton.IFeedback == 1)
|
if (_pumpNegolytVM.StopButton.IFeedback == 1 && _pumpPosolytVM.StopButton.IFeedback == 1)
|
||||||
FeedbackStopPumps = 1;
|
FeedbackStopPumps = 1;
|
||||||
else if (_pumpNegolytVM.StopButton.IFeedback == 0 && _pumpPosolytVM.StopButton.IFeedback == 0)
|
else if (_pumpNegolytVM.StopButton.IFeedback == 0 && _pumpPosolytVM.StopButton.IFeedback == 0)
|
||||||
FeedbackStopPumps = 0;
|
FeedbackStopPumps = 0;
|
||||||
else
|
else
|
||||||
FeedbackStopPumps = 2;
|
FeedbackStopPumps = 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPumpPosolytStopReleaseChanged(object? sender, EventArgs e)
|
private void OnPumpPosolytStopReleaseChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculatStopRelease();
|
CalculatStopRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPumpPosolytStartReleaseChanged(object? sender, EventArgs e)
|
private void OnPumpPosolytStartReleaseChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateStartRelease();
|
CalculateStartRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPumpPosolytStopFeedbackChanged(object? sender, EventArgs e)
|
private void OnPumpPosolytStopFeedbackChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateStopFeedback();
|
CalculateStopFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPumpPosolytStartFeedbackChanged(object? sender, EventArgs e)
|
private void OnPumpPosolytStartFeedbackChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateStartFeedback();
|
CalculateStartFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPumpNegolytStopReleaseChanged(object? sender, EventArgs e)
|
private void OnPumpNegolytStopReleaseChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculatStopRelease();
|
CalculatStopRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPumpNegolytStartReleaseChanged(object? sender, EventArgs e)
|
private void OnPumpNegolytStartReleaseChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateStartRelease();
|
CalculateStartRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPumpNegolytStopFeedbackChanged(object? sender, EventArgs e)
|
private void OnPumpNegolytStopFeedbackChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateStopFeedback();
|
CalculateStopFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPumpNegolytStartFeedbackChanged(object? sender, EventArgs e)
|
private void OnPumpNegolytStartFeedbackChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CalculateStartFeedback();
|
CalculateStartFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WindowPumpPosolyt_Closed(object? sender, EventArgs e)
|
private void WindowPumpPosolyt_Closed(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_windowPumpPosolyt!.Close();
|
_windowPumpPosolyt!.Close();
|
||||||
_windowPumpPosolyt = null;
|
_windowPumpPosolyt = null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,23 +1,22 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für StringControlButton.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class SMUControlButton : Button
|
|
||||||
{
|
|
||||||
public static readonly DependencyProperty SMUNameProperty = DependencyProperty.Register("SMUName", typeof(string), typeof(SMUControlButton));
|
|
||||||
public String SMUName
|
|
||||||
{
|
|
||||||
get { return (string)GetValue(SMUNameProperty); }
|
|
||||||
set { SetValue(SMUNameProperty, value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SMUControlButton()
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für StringControlButton.xaml
|
||||||
InitializeComponent();
|
/// </summary>
|
||||||
}
|
public partial class SMUControlButton : Button
|
||||||
}
|
{
|
||||||
|
public static readonly DependencyProperty SMUNameProperty = DependencyProperty.Register("SMUName", typeof(string), typeof(SMUControlButton));
|
||||||
|
public String SMUName
|
||||||
|
{
|
||||||
|
get { return (string)GetValue(SMUNameProperty); }
|
||||||
|
set { SetValue(SMUNameProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public SMUControlButton()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für UnitControl.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class UnitDetailsControl : UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
public static readonly DependencyProperty UnitNameProperty = DependencyProperty.Register("UnitName", typeof(string), typeof(UnitDetailsControl));
|
||||||
/// Interaktionslogik für UnitControl.xaml
|
public String UnitName
|
||||||
/// </summary>
|
{
|
||||||
public partial class UnitDetailsControl : UserControl
|
get { return (string)GetValue(UnitNameProperty); }
|
||||||
{
|
set { SetValue(UnitNameProperty, value); }
|
||||||
public static readonly DependencyProperty UnitNameProperty = DependencyProperty.Register("UnitName", typeof(string), typeof(UnitDetailsControl));
|
}
|
||||||
public String UnitName
|
public UnitDetailsControl()
|
||||||
{
|
{
|
||||||
get { return (string)GetValue(UnitNameProperty); }
|
InitializeComponent();
|
||||||
set { SetValue(UnitNameProperty, value); }
|
}
|
||||||
}
|
|
||||||
public UnitDetailsControl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -5,39 +5,44 @@ using Heisig.HMI.AdsManager;
|
|||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using Common;
|
||||||
using InfineonHMI.Model;
|
using InfineonHMI.Model;
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class AlignmentStationPageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class AlignmentStationPageVM : ObservableValidator, IDisposable
|
private readonly string? _variableName;
|
||||||
{
|
|
||||||
private readonly string? _variableName;
|
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty] private PackMLControlVM? alignmentPackMLControlVm;
|
||||||
private BinaryValveControlVM vacuumValveControlVm;
|
|
||||||
|
|
||||||
public AlignmentStationPageVM()
|
[ObservableProperty]
|
||||||
{
|
private BinaryValveControlVM vacuumValveControlVm;
|
||||||
VacuumValveControlVm = new BinaryValveControlVM();
|
|
||||||
}
|
|
||||||
|
|
||||||
public AlignmentStationPageVM(IAdsManager adsManager, string variableName)
|
public AlignmentStationPageVM()
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
VacuumValveControlVm = new BinaryValveControlVM();
|
||||||
_variableName = variableName;
|
AlignmentPackMLControlVm = new();
|
||||||
|
AlignmentPackMLControlVm.STitle = "Ausrichtstation";
|
||||||
|
}
|
||||||
|
|
||||||
VacuumValveControlVm = new BinaryValveControlVM(_adsManager, _variableName + ".stVacuumValve");
|
public AlignmentStationPageVM(IAdsManager adsManager, string variableName)
|
||||||
}
|
{
|
||||||
|
_adsManager = adsManager;
|
||||||
|
_variableName = variableName;
|
||||||
|
|
||||||
|
VacuumValveControlVm = new BinaryValveControlVM(_adsManager, _variableName + ".stVacuumValve");
|
||||||
|
AlignmentPackMLControlVm = new(_adsManager, _variableName + "stStationCmds");
|
||||||
|
AlignmentPackMLControlVm.STitle = "Ausrichtstation";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,94 +1,98 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using Common;
|
||||||
using HMIToolkit;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using Heisig.HMI.AdsManager;
|
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using TwinCAT.TypeSystem;
|
using Heisig.HMI.AdsManager;
|
||||||
using System.Collections.ObjectModel;
|
using HMIToolkit;
|
||||||
|
|
||||||
using InfineonHMI.Model;
|
using InfineonHMI.Model;
|
||||||
namespace InfineonHMI
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using TwinCAT.TypeSystem;
|
||||||
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class EtchingStation1PageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
|
|
||||||
public sealed partial class EtchingStation1PageVM : ObservableValidator, IDisposable
|
[ObservableProperty] private BinaryValveControlVM vacuumValveControlEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private BinaryValveControlVM doorValveControlEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveLeftEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveRightEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private BinaryValveControlVM chuckEjectValveFrontEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private BinaryValveControlVM chuckEjectValveBackEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? chuckUnlockCmdButtonEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? chuckLockCmdButtonEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private HMIControlButtonVM? chuckEjectCmdButtonEtching1Vm;
|
||||||
|
|
||||||
|
[ObservableProperty] private PackMLControlVM? etching1PackMLControlVm;
|
||||||
|
|
||||||
|
private readonly string? _variableName;
|
||||||
|
|
||||||
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
|
public EtchingStation1PageVM()
|
||||||
{
|
{
|
||||||
|
VacuumValveControlEtching1Vm = new BinaryValveControlVM();
|
||||||
|
DoorValveControlEtching1Vm = new BinaryValveControlVM();
|
||||||
|
ChuckUnlockValveLeftEtching1Vm = new BinaryValveControlVM();
|
||||||
|
ChuckUnlockValveRightEtching1Vm = new BinaryValveControlVM();
|
||||||
|
ChuckEjectValveFrontEtching1Vm = new BinaryValveControlVM();
|
||||||
|
ChuckEjectValveBackEtching1Vm = new BinaryValveControlVM();
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM vacuumValveControlEtching1Vm;
|
ChuckUnlockCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||||
|
ChuckLockCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||||
|
ChuckEjectCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM doorValveControlEtching1Vm;
|
Etching1PackMLControlVm = new();
|
||||||
|
Etching1PackMLControlVm.STitle = "Ätzer 1";
|
||||||
|
}
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveLeftEtching1Vm;
|
public EtchingStation1PageVM(IAdsManager adsManager, string variableName)
|
||||||
|
{
|
||||||
|
_adsManager = adsManager;
|
||||||
|
_variableName = variableName;
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveRightEtching1Vm;
|
VacuumValveControlEtching1Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher1.stVacuumValve");
|
||||||
|
DoorValveControlEtching1Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher1.stDoorValve");
|
||||||
|
ChuckUnlockValveLeftEtching1Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher1.stChuckUnlockLeft");
|
||||||
|
ChuckUnlockValveRightEtching1Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher1.stChuckUnlockRight");
|
||||||
|
ChuckEjectValveFrontEtching1Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher1.stChuckEjectFront");
|
||||||
|
ChuckEjectValveBackEtching1Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher1.stChuckEjectBack");
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveFrontEtching1Vm;
|
ChuckUnlockCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, _variableName + ".stEtcher1.stChuckUnlockCmd");
|
||||||
|
ChuckLockCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, _variableName + ".stEtcher1.stChuckLockCmd");
|
||||||
|
ChuckEjectCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, _variableName + ".stEtcher1.stChuckEjectCmd");
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveBackEtching1Vm;
|
Etching1PackMLControlVm = new(_adsManager, _variableName + ".stEtcher1.stStationCmds");
|
||||||
|
Etching1PackMLControlVm.STitle = "Ätzer 1";
|
||||||
[ObservableProperty] private HMIControlButtonVM? chuckUnlockCmdButtonEtching1Vm;
|
}
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? chuckLockCmdButtonEtching1Vm;
|
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? chuckEjectCmdButtonEtching1Vm;
|
|
||||||
|
|
||||||
private readonly string? _variableName;
|
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
|
||||||
|
|
||||||
public EtchingStation1PageVM()
|
|
||||||
{
|
|
||||||
VacuumValveControlEtching1Vm = new BinaryValveControlVM();
|
|
||||||
DoorValveControlEtching1Vm = new BinaryValveControlVM();
|
|
||||||
ChuckUnlockValveLeftEtching1Vm = new BinaryValveControlVM();
|
|
||||||
ChuckUnlockValveRightEtching1Vm = new BinaryValveControlVM();
|
|
||||||
ChuckEjectValveFrontEtching1Vm = new BinaryValveControlVM();
|
|
||||||
ChuckEjectValveBackEtching1Vm = new BinaryValveControlVM();
|
|
||||||
|
|
||||||
ChuckUnlockCmdButtonEtching1Vm = new HMIControlButtonVM();
|
|
||||||
ChuckLockCmdButtonEtching1Vm = new HMIControlButtonVM();
|
|
||||||
ChuckEjectCmdButtonEtching1Vm = new HMIControlButtonVM();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public EtchingStation1PageVM(IAdsManager adsManager, string variableName)
|
|
||||||
{
|
|
||||||
_adsManager = adsManager;
|
|
||||||
_variableName = variableName;
|
|
||||||
|
|
||||||
VacuumValveControlEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stVacuumValve");
|
|
||||||
DoorValveControlEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stDoorValve");
|
|
||||||
ChuckUnlockValveLeftEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockLeft");
|
|
||||||
ChuckUnlockValveRightEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockRight");
|
|
||||||
ChuckEjectValveFrontEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectFront");
|
|
||||||
ChuckEjectValveBackEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectBack");
|
|
||||||
|
|
||||||
ChuckUnlockCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockCmd");
|
|
||||||
ChuckLockCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckLockCmd");
|
|
||||||
ChuckEjectCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectCmd");
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
VacuumValveControlEtching1Vm.Dispose();
|
VacuumValveControlEtching1Vm.Dispose();
|
||||||
DoorValveControlEtching1Vm.Dispose();
|
DoorValveControlEtching1Vm.Dispose();
|
||||||
ChuckUnlockValveLeftEtching1Vm.Dispose();
|
ChuckUnlockValveLeftEtching1Vm.Dispose();
|
||||||
ChuckUnlockValveRightEtching1Vm.Dispose();
|
ChuckUnlockValveRightEtching1Vm.Dispose();
|
||||||
ChuckEjectValveFrontEtching1Vm.Dispose();
|
ChuckEjectValveFrontEtching1Vm.Dispose();
|
||||||
ChuckEjectValveBackEtching1Vm.Dispose();
|
ChuckEjectValveBackEtching1Vm.Dispose();
|
||||||
ChuckUnlockCmdButtonEtching1Vm?.Dispose();
|
ChuckUnlockCmdButtonEtching1Vm?.Dispose();
|
||||||
ChuckUnlockCmdButtonEtching1Vm = null;
|
ChuckUnlockCmdButtonEtching1Vm = null;
|
||||||
ChuckLockCmdButtonEtching1Vm?.Dispose();
|
ChuckLockCmdButtonEtching1Vm?.Dispose();
|
||||||
ChuckLockCmdButtonEtching1Vm = null;
|
ChuckLockCmdButtonEtching1Vm = null;
|
||||||
ChuckLockCmdButtonEtching1Vm?.Dispose();
|
ChuckLockCmdButtonEtching1Vm?.Dispose();
|
||||||
ChuckEjectCmdButtonEtching1Vm = null;
|
ChuckEjectCmdButtonEtching1Vm = null;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -5,88 +5,94 @@ using Heisig.HMI.AdsManager;
|
|||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using Common;
|
||||||
using InfineonHMI.Model;
|
using InfineonHMI.Model;
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class EtchingStation2PageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
|
|
||||||
public sealed partial class EtchingStation2PageVM : ObservableValidator, IDisposable
|
[ObservableProperty] private BinaryValveControlVM vacuumValveControlEtching2Vm;
|
||||||
{
|
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM vacuumValveControlEtching2Vm;
|
[ObservableProperty] private BinaryValveControlVM doorValveControlEtching2Vm;
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM doorValveControlEtching2Vm;
|
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveLeftEtching2Vm;
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveLeftEtching2Vm;
|
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveRightEtching2Vm;
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveRightEtching2Vm;
|
[ObservableProperty] private BinaryValveControlVM chuckEjectValveFrontEtching2Vm;
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveFrontEtching2Vm;
|
[ObservableProperty] private BinaryValveControlVM chuckEjectValveBackEtching2Vm;
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveBackEtching2Vm;
|
[ObservableProperty] private HMIControlButtonVM? chuckUnlockCmdButtonEtching2Vm;
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? chuckUnlockCmdButtonEtching2Vm;
|
[ObservableProperty] private HMIControlButtonVM? chuckLockCmdButtonEtching2Vm;
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? chuckLockCmdButtonEtching2Vm;
|
[ObservableProperty] private HMIControlButtonVM? chuckEjectCmdButtonEtching2Vm;
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? chuckEjectCmdButtonEtching2Vm;
|
[ObservableProperty] private PackMLControlVM? etching2PackMLControlVm;
|
||||||
|
|
||||||
private readonly string? _variableName;
|
private readonly string? _variableName;
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
public EtchingStation2PageVM()
|
public EtchingStation2PageVM()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
VacuumValveControlEtching2Vm = new BinaryValveControlVM();
|
VacuumValveControlEtching2Vm = new BinaryValveControlVM();
|
||||||
DoorValveControlEtching2Vm = new BinaryValveControlVM();
|
DoorValveControlEtching2Vm = new BinaryValveControlVM();
|
||||||
ChuckUnlockValveLeftEtching2Vm = new BinaryValveControlVM();
|
ChuckUnlockValveLeftEtching2Vm = new BinaryValveControlVM();
|
||||||
ChuckUnlockValveRightEtching2Vm = new BinaryValveControlVM();
|
ChuckUnlockValveRightEtching2Vm = new BinaryValveControlVM();
|
||||||
ChuckEjectValveFrontEtching2Vm = new BinaryValveControlVM();
|
ChuckEjectValveFrontEtching2Vm = new BinaryValveControlVM();
|
||||||
ChuckEjectValveBackEtching2Vm = new BinaryValveControlVM();
|
ChuckEjectValveBackEtching2Vm = new BinaryValveControlVM();
|
||||||
|
|
||||||
ChuckUnlockCmdButtonEtching2Vm = new HMIControlButtonVM();
|
ChuckUnlockCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||||
ChuckLockCmdButtonEtching2Vm = new HMIControlButtonVM();
|
ChuckLockCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||||
ChuckEjectCmdButtonEtching2Vm = new HMIControlButtonVM();
|
ChuckEjectCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||||
}
|
|
||||||
|
|
||||||
public EtchingStation2PageVM(IAdsManager adsManager, string variableName)
|
Etching2PackMLControlVm = new();
|
||||||
{
|
Etching2PackMLControlVm.STitle = "Ätzer 2";
|
||||||
_adsManager = adsManager;
|
}
|
||||||
_variableName = variableName;
|
|
||||||
|
public EtchingStation2PageVM(IAdsManager adsManager, string variableName)
|
||||||
|
{
|
||||||
|
_adsManager = adsManager;
|
||||||
|
_variableName = variableName;
|
||||||
|
|
||||||
|
|
||||||
VacuumValveControlEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stVacuumValve");
|
VacuumValveControlEtching2Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher2.stVacuumValve");
|
||||||
DoorValveControlEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stDoorValve");
|
DoorValveControlEtching2Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher2.stDoorValve");
|
||||||
ChuckUnlockValveLeftEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockLeft");
|
ChuckUnlockValveLeftEtching2Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher2.stChuckUnlockLeft");
|
||||||
ChuckUnlockValveRightEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockRight");
|
ChuckUnlockValveRightEtching2Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher2.stChuckUnlockRight");
|
||||||
ChuckEjectValveFrontEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectFront");
|
ChuckEjectValveFrontEtching2Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher2.stChuckEjectFront");
|
||||||
ChuckEjectValveBackEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectBack");
|
ChuckEjectValveBackEtching2Vm = new BinaryValveControlVM(_adsManager, _variableName + ".stEtcher2.stChuckEjectBack");
|
||||||
|
|
||||||
ChuckUnlockCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockCmd");
|
ChuckUnlockCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, _variableName + ".stEtcher2.stChuckUnlockCmd");
|
||||||
ChuckLockCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckLockCmd");
|
ChuckLockCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, _variableName + ".stEtcher2.stChuckLockCmd");
|
||||||
ChuckEjectCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectCmd");
|
ChuckEjectCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, _variableName + ".stEtcher2.stChuckEjectCmd");
|
||||||
|
|
||||||
}
|
Etching2PackMLControlVm = new(_adsManager, _variableName + ".stEtcher2.stStationCmds");
|
||||||
|
Etching2PackMLControlVm.STitle = "Ätzer 2";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
VacuumValveControlEtching2Vm.Dispose();
|
VacuumValveControlEtching2Vm.Dispose();
|
||||||
DoorValveControlEtching2Vm.Dispose();
|
DoorValveControlEtching2Vm.Dispose();
|
||||||
ChuckUnlockValveLeftEtching2Vm.Dispose();
|
ChuckUnlockValveLeftEtching2Vm.Dispose();
|
||||||
ChuckUnlockValveRightEtching2Vm.Dispose();
|
ChuckUnlockValveRightEtching2Vm.Dispose();
|
||||||
ChuckEjectValveFrontEtching2Vm.Dispose();
|
ChuckEjectValveFrontEtching2Vm.Dispose();
|
||||||
ChuckEjectValveBackEtching2Vm.Dispose();
|
ChuckEjectValveBackEtching2Vm.Dispose();
|
||||||
ChuckUnlockCmdButtonEtching2Vm?.Dispose();
|
ChuckUnlockCmdButtonEtching2Vm?.Dispose();
|
||||||
ChuckUnlockCmdButtonEtching2Vm = null;
|
ChuckUnlockCmdButtonEtching2Vm = null;
|
||||||
ChuckLockCmdButtonEtching2Vm?.Dispose();
|
ChuckLockCmdButtonEtching2Vm?.Dispose();
|
||||||
ChuckLockCmdButtonEtching2Vm = null;
|
ChuckLockCmdButtonEtching2Vm = null;
|
||||||
ChuckLockCmdButtonEtching2Vm?.Dispose();
|
ChuckLockCmdButtonEtching2Vm?.Dispose();
|
||||||
ChuckEjectCmdButtonEtching2Vm = null;
|
ChuckEjectCmdButtonEtching2Vm = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -3,47 +3,47 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using TcEventLoggerAdsProxyLib;
|
using TcEventLoggerAdsProxyLib;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public partial class EventData : ObservableObject
|
||||||
{
|
{
|
||||||
public partial class EventData : ObservableObject
|
[ObservableProperty]
|
||||||
{
|
public uint id;
|
||||||
[ObservableProperty]
|
|
||||||
public uint id;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public string? message;
|
public string? message;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public DateTime raised;
|
public DateTime raised;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public DateTime cleared;
|
public DateTime cleared;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public DateTime confirmed;
|
public DateTime confirmed;
|
||||||
};
|
};
|
||||||
|
|
||||||
public sealed partial class EventsPageVM : ObservableObject
|
public sealed partial class EventsPageVM : ObservableObject
|
||||||
{
|
{
|
||||||
public ObservableCollection<EventData> CurrentEvents { get; private set; } = [];
|
public ObservableCollection<EventData> CurrentEvents { get; private set; } = [];
|
||||||
private readonly object _lock = new();
|
private readonly object _lock = new();
|
||||||
|
|
||||||
private readonly TcEventLogger _logger;
|
private readonly TcEventLogger _logger;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private EventData? currentEvent;
|
private EventData? currentEvent;
|
||||||
|
|
||||||
// 599264352000000000 ticks is a date used by beckhoff for events that didnt happen up to this point
|
// 599264352000000000 ticks is a date used by beckhoff for events that didnt happen up to this point
|
||||||
private const long NoTime = 599264352000000000;
|
private const long NoTime = 599264352000000000;
|
||||||
|
|
||||||
|
|
||||||
public EventsPageVM(TcEventLogger logger)
|
public EventsPageVM(TcEventLogger logger)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
|
||||||
_logger.AlarmRaised += SimpleAlarmRaisedEvent;
|
_logger.AlarmRaised += SimpleAlarmRaisedEvent;
|
||||||
_logger.AlarmCleared += SimpleAlarmClearedEvent;
|
_logger.AlarmCleared += SimpleAlarmClearedEvent;
|
||||||
_logger.AlarmConfirmed += SimpleConfirmedAlarmEvent;
|
_logger.AlarmConfirmed += SimpleConfirmedAlarmEvent;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|
||||||
@@ -52,63 +52,62 @@ namespace InfineonHMI
|
|||||||
_logger.Connect("10.103.32.50.1.1");
|
_logger.Connect("10.103.32.50.1.1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GetAllActiveEvents();
|
GetAllActiveEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RebuildCurrentEventsList()
|
private void RebuildCurrentEventsList()
|
||||||
{
|
{
|
||||||
lock (_lock)
|
lock (_lock)
|
||||||
{
|
{
|
||||||
CurrentEvents.Clear();
|
CurrentEvents.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
GetAllActiveEvents();
|
GetAllActiveEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SimpleConfirmedAlarmEvent(TcAlarm alarm, bool remove)
|
private void SimpleConfirmedAlarmEvent(TcAlarm alarm, bool remove)
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SimpleAlarmClearedEvent(TcAlarm alarm, bool remove)
|
private void SimpleAlarmClearedEvent(TcAlarm alarm, bool remove)
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SimpleAlarmRaisedEvent(TcAlarm alarm)
|
private void SimpleAlarmRaisedEvent(TcAlarm alarm)
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GetAllActiveEvents()
|
private void GetAllActiveEvents()
|
||||||
{
|
{
|
||||||
EventData eventData;
|
EventData eventData;
|
||||||
List<EventData> tempEventList = [];
|
List<EventData> tempEventList = [];
|
||||||
|
|
||||||
lock (_lock)
|
lock (_lock)
|
||||||
{
|
{
|
||||||
foreach (var alarm in _logger.ActiveAlarms)
|
foreach (var alarm in _logger.ActiveAlarms)
|
||||||
{
|
{
|
||||||
eventData = new()
|
eventData = new()
|
||||||
{
|
{
|
||||||
Id = alarm.EventId,
|
Id = alarm.EventId,
|
||||||
Message = alarm.GetText(1033),
|
Message = alarm.GetText(1033),
|
||||||
Raised = alarm.TimeRaised,
|
Raised = alarm.TimeRaised,
|
||||||
Cleared = alarm.TimeCleared,
|
Cleared = alarm.TimeCleared,
|
||||||
Confirmed = alarm.TimeConfirmed
|
Confirmed = alarm.TimeConfirmed
|
||||||
};
|
};
|
||||||
|
|
||||||
tempEventList.Add(eventData);
|
tempEventList.Add(eventData);
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerable<EventData> _eventQuery =
|
IEnumerable<EventData> _eventQuery =
|
||||||
from data in tempEventList
|
from data in tempEventList
|
||||||
orderby data.Raised descending
|
orderby data.Raised descending
|
||||||
select data;
|
select data;
|
||||||
|
|
||||||
CurrentEvent = _eventQuery.FirstOrDefault();
|
CurrentEvent = _eventQuery.FirstOrDefault();
|
||||||
CurrentEvents = new ObservableCollection<EventData>(_eventQuery);
|
CurrentEvents = new ObservableCollection<EventData>(_eventQuery);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -5,68 +5,83 @@ using Heisig.HMI.AdsManager;
|
|||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using Common;
|
||||||
using InfineonHMI.Model;
|
using InfineonHMI.Model;
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class HighVoltageStationPageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class HighVoltageStationPageVM : ObservableValidator, IDisposable
|
private readonly string? _variableName;
|
||||||
{
|
|
||||||
private readonly string? _variableName;
|
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty] private PackMLControlVM highVoltageHotPackMLControlVm;
|
||||||
private BinaryValveControlVM doorValveHotControlVm;
|
[ObservableProperty] private PackMLControlVM highVoltageColdPackMLControlVm;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private BinaryValveControlVM testChamberHotValveVm;
|
private BinaryValveControlVM doorValveHotControlVm;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private AnalogValueVM tempSPHotVm;
|
private BinaryValveControlVM testChamberHotValveVm;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private BinaryValveControlVM doorValveColdControlVm;
|
private AnalogValueVM tempSPHotVm;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private BinaryValveControlVM testChamberColdValveVm;
|
private BinaryValveControlVM doorValveColdControlVm;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private AnalogValueVM tempSPColdVm;
|
private BinaryValveControlVM testChamberColdValveVm;
|
||||||
|
|
||||||
public HighVoltageStationPageVM()
|
[ObservableProperty]
|
||||||
{
|
private AnalogValueVM tempSPColdVm;
|
||||||
DoorValveHotControlVm = new BinaryValveControlVM();
|
|
||||||
TestChamberHotValveVm = new BinaryValveControlVM();
|
|
||||||
TempSPHotVm = new AnalogValueVM();
|
|
||||||
|
|
||||||
DoorValveColdControlVm = new BinaryValveControlVM();
|
public HighVoltageStationPageVM()
|
||||||
TestChamberColdValveVm = new BinaryValveControlVM();
|
{
|
||||||
TempSPColdVm = new AnalogValueVM();
|
DoorValveHotControlVm = new BinaryValveControlVM();
|
||||||
}
|
TestChamberHotValveVm = new BinaryValveControlVM();
|
||||||
|
TempSPHotVm = new AnalogValueVM();
|
||||||
|
|
||||||
public HighVoltageStationPageVM(IAdsManager adsManager, string variableName)
|
DoorValveColdControlVm = new BinaryValveControlVM();
|
||||||
{
|
TestChamberColdValveVm = new BinaryValveControlVM();
|
||||||
_adsManager = adsManager;
|
TempSPColdVm = new AnalogValueVM();
|
||||||
_variableName = variableName;
|
|
||||||
|
|
||||||
DoorValveHotControlVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stDoorValve");
|
HighVoltageColdPackMLControlVm = new();
|
||||||
TestChamberHotValveVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stTestChamberValve");
|
HighVoltageHotPackMLControlVm = new();
|
||||||
TempSPHotVm = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stTempSP", false);
|
|
||||||
|
|
||||||
DoorValveColdControlVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stDoorValve");
|
HighVoltageColdPackMLControlVm.STitle = "Hochvoltstation\nKalt";
|
||||||
TestChamberColdValveVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stTestChamberValve");
|
|
||||||
TempSPColdVm = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stTempSP", false);
|
|
||||||
|
|
||||||
}
|
HighVoltageHotPackMLControlVm.STitle = "Hochvoltstation\nHeiß";
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public HighVoltageStationPageVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
DoorValveHotControlVm.Dispose();
|
_adsManager = adsManager;
|
||||||
TestChamberHotValveVm.Dispose();
|
_variableName = variableName;
|
||||||
TempSPHotVm.Dispose();
|
|
||||||
DoorValveColdControlVm.Dispose();
|
DoorValveHotControlVm = new BinaryValveControlVM(_adsManager, _variableName + "Hot.stDoorValve");
|
||||||
TestChamberColdValveVm.Dispose();
|
TestChamberHotValveVm = new BinaryValveControlVM(_adsManager, _variableName + "Hot.stTestChamberValve");
|
||||||
TempSPColdVm.Dispose();
|
TempSPHotVm = new AnalogValueVM(_adsManager, _variableName + "Hot.stTempSP", false);
|
||||||
}
|
|
||||||
}
|
DoorValveColdControlVm = new BinaryValveControlVM(_adsManager, _variableName + "Cold.stDoorValve");
|
||||||
|
TestChamberColdValveVm = new BinaryValveControlVM(_adsManager, _variableName + "Cold.stTestChamberValve");
|
||||||
|
TempSPColdVm = new AnalogValueVM(_adsManager, _variableName + "Cold.stTempSP", false);
|
||||||
|
|
||||||
|
HighVoltageColdPackMLControlVm = new(_adsManager, _variableName + "Cold.stStationCmds");
|
||||||
|
HighVoltageHotPackMLControlVm = new(_adsManager, _variableName + "Hot.stStationCmds");
|
||||||
|
|
||||||
|
HighVoltageColdPackMLControlVm.STitle = "Hochvoltstation\nKalt";
|
||||||
|
|
||||||
|
HighVoltageHotPackMLControlVm.STitle = "Hochvoltstation\nHeiß";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
DoorValveHotControlVm.Dispose();
|
||||||
|
TestChamberHotValveVm.Dispose();
|
||||||
|
TempSPHotVm.Dispose();
|
||||||
|
DoorValveColdControlVm.Dispose();
|
||||||
|
TestChamberColdValveVm.Dispose();
|
||||||
|
TempSPColdVm.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,401 +8,417 @@ using System.Collections.ObjectModel;
|
|||||||
|
|
||||||
using InfineonHMI.Model;
|
using InfineonHMI.Model;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
namespace InfineonHMI
|
using Common;
|
||||||
|
|
||||||
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class HotCoolPlatePageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class HotCoolPlatePageVM : ObservableValidator, IDisposable
|
|
||||||
{
|
|
||||||
|
|
||||||
private const string sPieceOnHotplate1 = ".stHotplate.stPiece1";
|
private const string sPieceOnHotplate1 = ".stHotplate.stPiece1";
|
||||||
private const string sPieceOnHotplate2 = ".stHotplate.stPiece2";
|
private const string sPieceOnHotplate2 = ".stHotplate.stPiece2";
|
||||||
private const string sPieceOnHotplate3 = ".stHotplate.stPiece3";
|
private const string sPieceOnHotplate3 = ".stHotplate.stPiece3";
|
||||||
private const string sPieceOnHotplate4 = ".stHotplate.stPiece4";
|
private const string sPieceOnHotplate4 = ".stHotplate.stPiece4";
|
||||||
private const string sPieceOnHotplate5 = ".stHotplate.stPiece5";
|
private const string sPieceOnHotplate5 = ".stHotplate.stPiece5";
|
||||||
private const string sPieceOnHotplate6 = ".stHotplate.stPiece6";
|
private const string sPieceOnHotplate6 = ".stHotplate.stPiece6";
|
||||||
private const string sPieceOnHotplate7 = ".stHotplate.stPiece7";
|
private const string sPieceOnHotplate7 = ".stHotplate.stPiece7";
|
||||||
private const string sPieceOnHotplate8 = ".stHotplate.stPiece8";
|
private const string sPieceOnHotplate8 = ".stHotplate.stPiece8";
|
||||||
private const string sPieceOnHotplate9 = ".stHotplate.stPiece9";
|
private const string sPieceOnHotplate9 = ".stHotplate.stPiece9";
|
||||||
|
|
||||||
private const string sPieceOnCoolplate1 = ".stCoolplate.stPiece1";
|
private const string sPieceOnCoolplate1 = ".stCoolplate.stPiece1";
|
||||||
private const string sPieceOnCoolplate2 = ".stCoolplate.stPiece2";
|
private const string sPieceOnCoolplate2 = ".stCoolplate.stPiece2";
|
||||||
private const string sPieceOnCoolplate3 = ".stCoolplate.stPiece3";
|
private const string sPieceOnCoolplate3 = ".stCoolplate.stPiece3";
|
||||||
private const string sPieceOnCoolplate4 = ".stCoolplate.stPiece4";
|
private const string sPieceOnCoolplate4 = ".stCoolplate.stPiece4";
|
||||||
private const string sPieceOnCoolplate5 = ".stCoolplate.stPiece5";
|
private const string sPieceOnCoolplate5 = ".stCoolplate.stPiece5";
|
||||||
private const string sPieceOnCoolplate6 = ".stCoolplate.stPiece6";
|
private const string sPieceOnCoolplate6 = ".stCoolplate.stPiece6";
|
||||||
private const string sPieceOnCoolplate7 = ".stCoolplate.stPiece7";
|
private const string sPieceOnCoolplate7 = ".stCoolplate.stPiece7";
|
||||||
private const string sPieceOnCoolplate8 = ".stCoolplate.stPiece8";
|
private const string sPieceOnCoolplate8 = ".stCoolplate.stPiece8";
|
||||||
private const string sPieceOnCoolplate9 = ".stCoolplate.stPiece9";
|
private const string sPieceOnCoolplate9 = ".stCoolplate.stPiece9";
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
private readonly string? _variableName;
|
private readonly string? _variableName;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty] private PackMLControlVM? hotplatePackMLControlVm;
|
||||||
private AnalogValueVM hotPlateTargetTemperature;
|
[ObservableProperty] private PackMLControlVM? coolplatePackMLControlVm;
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private AnalogValueVM hotPlateActualTemperature;
|
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? enableHotPlateButtonVm;
|
[ObservableProperty]
|
||||||
|
private AnalogValueVM hotPlateTargetTemperature;
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? disableHotPlateButtonVm;
|
[ObservableProperty]
|
||||||
|
private AnalogValueVM hotPlateActualTemperature;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty] private HMIControlButtonVM? enableHotPlateButtonVm;
|
||||||
private AnalogValueVM coolPlateTargetTemperature;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty] private HMIControlButtonVM? disableHotPlateButtonVm;
|
||||||
private AnalogValueVM coolPlateActualTemperature;
|
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? enableCoolPlateButtonVm;
|
[ObservableProperty]
|
||||||
|
private AnalogValueVM coolPlateTargetTemperature;
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? disableCoolPlateButtonVm;
|
[ObservableProperty]
|
||||||
|
private AnalogValueVM coolPlateActualTemperature;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty] private HMIControlButtonVM? enableCoolPlateButtonVm;
|
||||||
private Visibility hotPlateVisibility1;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty] private HMIControlButtonVM? disableCoolPlateButtonVm;
|
||||||
private Visibility hotPlateVisibility2;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility hotPlateVisibility3;
|
private Visibility hotPlateVisibility1;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility hotPlateVisibility4;
|
private Visibility hotPlateVisibility2;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility hotPlateVisibility5;
|
private Visibility hotPlateVisibility3;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility hotPlateVisibility6;
|
private Visibility hotPlateVisibility4;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility hotPlateVisibility7;
|
private Visibility hotPlateVisibility5;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility hotPlateVisibility8;
|
private Visibility hotPlateVisibility6;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility hotPlateVisibility9;
|
private Visibility hotPlateVisibility7;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility1;
|
private Visibility hotPlateVisibility8;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility2;
|
private Visibility hotPlateVisibility9;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility3;
|
private Visibility coolPlateVisibility1;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility4;
|
private Visibility coolPlateVisibility2;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility5;
|
private Visibility coolPlateVisibility3;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility6;
|
private Visibility coolPlateVisibility4;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility7;
|
private Visibility coolPlateVisibility5;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility8;
|
private Visibility coolPlateVisibility6;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility9;
|
private Visibility coolPlateVisibility7;
|
||||||
|
|
||||||
public HotCoolPlatePageVM()
|
[ObservableProperty]
|
||||||
|
private Visibility coolPlateVisibility8;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private Visibility coolPlateVisibility9;
|
||||||
|
|
||||||
|
public HotCoolPlatePageVM()
|
||||||
|
{
|
||||||
|
EnableHotPlateButtonVm = new HMIControlButtonVM();
|
||||||
|
DisableHotPlateButtonVm = new HMIControlButtonVM();
|
||||||
|
|
||||||
|
EnableCoolPlateButtonVm = new HMIControlButtonVM();
|
||||||
|
DisableCoolPlateButtonVm = new HMIControlButtonVM();
|
||||||
|
|
||||||
|
HotPlateActualTemperature = new AnalogValueVM();
|
||||||
|
HotPlateTargetTemperature = new AnalogValueVM();
|
||||||
|
|
||||||
|
CoolPlateActualTemperature = new AnalogValueVM();
|
||||||
|
CoolPlateTargetTemperature = new AnalogValueVM();
|
||||||
|
|
||||||
|
HotplatePackMLControlVm = new();
|
||||||
|
CoolplatePackMLControlVm = new();
|
||||||
|
|
||||||
|
HotplatePackMLControlVm.STitle = "Heizplatte";
|
||||||
|
CoolplatePackMLControlVm.STitle = "Kühlplatte";
|
||||||
|
|
||||||
|
}
|
||||||
|
public HotCoolPlatePageVM(IAdsManager adsManager, string variableName)
|
||||||
|
{
|
||||||
|
_adsManager = adsManager;
|
||||||
|
_variableName = variableName;
|
||||||
|
|
||||||
|
EnableHotPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stHotplate.stEnableBtn");
|
||||||
|
DisableHotPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stHotplate.stDisableBtn");
|
||||||
|
|
||||||
|
EnableCoolPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stCoolplate.stEnableBtn");
|
||||||
|
DisableCoolPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stCoolplate.stDisableBtn");
|
||||||
|
|
||||||
|
HotPlateActualTemperature = new AnalogValueVM(_adsManager, _variableName + ".stHotplate.stPV", true);
|
||||||
|
CoolPlateActualTemperature = new AnalogValueVM(_adsManager, _variableName + ".stCoolplate.stPV", true);
|
||||||
|
|
||||||
|
HotPlateTargetTemperature = new AnalogValueVM(_adsManager, _variableName + ".stHotplate.stSetpoint", false);
|
||||||
|
CoolPlateTargetTemperature = new AnalogValueVM(_adsManager, _variableName + ".stCoolplate.stSetpoint", false);
|
||||||
|
|
||||||
|
HotplatePackMLControlVm = new();
|
||||||
|
CoolplatePackMLControlVm = new();
|
||||||
|
|
||||||
|
HotplatePackMLControlVm.STitle = "Heizplatte";
|
||||||
|
CoolplatePackMLControlVm.STitle = "Kühlplatte";
|
||||||
|
|
||||||
|
_adsManager.Register(sPieceOnHotplate1, HotplatePiece1Changed);
|
||||||
|
_adsManager.Register(sPieceOnHotplate2, HotplatePiece2Changed);
|
||||||
|
_adsManager.Register(sPieceOnHotplate3, HotplatePiece3Changed);
|
||||||
|
_adsManager.Register(sPieceOnHotplate4, HotplatePiece4Changed);
|
||||||
|
_adsManager.Register(sPieceOnHotplate5, HotplatePiece5Changed);
|
||||||
|
_adsManager.Register(sPieceOnHotplate6, HotplatePiece6Changed);
|
||||||
|
_adsManager.Register(sPieceOnHotplate7, HotplatePiece7Changed);
|
||||||
|
_adsManager.Register(sPieceOnHotplate8, HotplatePiece8Changed);
|
||||||
|
_adsManager.Register(sPieceOnHotplate9, HotplatePiece9Changed);
|
||||||
|
|
||||||
|
_adsManager.Register(sPieceOnCoolplate1, CoolplatePiece1Changed);
|
||||||
|
_adsManager.Register(sPieceOnCoolplate2, CoolplatePiece2Changed);
|
||||||
|
_adsManager.Register(sPieceOnCoolplate3, CoolplatePiece3Changed);
|
||||||
|
_adsManager.Register(sPieceOnCoolplate4, CoolplatePiece4Changed);
|
||||||
|
_adsManager.Register(sPieceOnCoolplate5, CoolplatePiece5Changed);
|
||||||
|
_adsManager.Register(sPieceOnCoolplate6, CoolplatePiece6Changed);
|
||||||
|
_adsManager.Register(sPieceOnCoolplate7, CoolplatePiece7Changed);
|
||||||
|
_adsManager.Register(sPieceOnCoolplate8, CoolplatePiece8Changed);
|
||||||
|
_adsManager.Register(sPieceOnCoolplate9, CoolplatePiece9Changed);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HotplatePiece1Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
EnableHotPlateButtonVm = new HMIControlButtonVM();
|
HotPlateVisibility1 = Visibility.Visible;
|
||||||
DisableHotPlateButtonVm = new HMIControlButtonVM();
|
|
||||||
|
|
||||||
EnableCoolPlateButtonVm = new HMIControlButtonVM();
|
|
||||||
DisableCoolPlateButtonVm = new HMIControlButtonVM();
|
|
||||||
|
|
||||||
HotPlateActualTemperature = new AnalogValueVM();
|
|
||||||
HotPlateTargetTemperature = new AnalogValueVM();
|
|
||||||
|
|
||||||
CoolPlateActualTemperature = new AnalogValueVM();
|
|
||||||
CoolPlateTargetTemperature = new AnalogValueVM();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public HotCoolPlatePageVM(IAdsManager adsManager, string variableName)
|
else
|
||||||
{
|
|
||||||
_adsManager = adsManager;
|
|
||||||
_variableName = variableName;
|
|
||||||
|
|
||||||
EnableHotPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stHotplate.stEnableBtn");
|
|
||||||
DisableHotPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stHotplate.stDisableBtn");
|
|
||||||
|
|
||||||
EnableCoolPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stCoolplate.stEnableBtn");
|
|
||||||
DisableCoolPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stCoolplate.stDisableBtn");
|
|
||||||
|
|
||||||
HotPlateActualTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHotplate.stPV", true);
|
|
||||||
CoolPlateActualTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stCoolplate.stPV", true);
|
|
||||||
|
|
||||||
HotPlateTargetTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHotplate.stSetpoint", false);
|
|
||||||
CoolPlateTargetTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stCoolplate.stSetpoint", false);
|
|
||||||
|
|
||||||
_adsManager.Register(sPieceOnHotplate1, HotplatePiece1Changed);
|
|
||||||
_adsManager.Register(sPieceOnHotplate2, HotplatePiece2Changed);
|
|
||||||
_adsManager.Register(sPieceOnHotplate3, HotplatePiece3Changed);
|
|
||||||
_adsManager.Register(sPieceOnHotplate4, HotplatePiece4Changed);
|
|
||||||
_adsManager.Register(sPieceOnHotplate5, HotplatePiece5Changed);
|
|
||||||
_adsManager.Register(sPieceOnHotplate6, HotplatePiece6Changed);
|
|
||||||
_adsManager.Register(sPieceOnHotplate7, HotplatePiece7Changed);
|
|
||||||
_adsManager.Register(sPieceOnHotplate8, HotplatePiece8Changed);
|
|
||||||
_adsManager.Register(sPieceOnHotplate9, HotplatePiece9Changed);
|
|
||||||
|
|
||||||
_adsManager.Register(sPieceOnCoolplate1, CoolplatePiece1Changed);
|
|
||||||
_adsManager.Register(sPieceOnCoolplate2, CoolplatePiece2Changed);
|
|
||||||
_adsManager.Register(sPieceOnCoolplate3, CoolplatePiece3Changed);
|
|
||||||
_adsManager.Register(sPieceOnCoolplate4, CoolplatePiece4Changed);
|
|
||||||
_adsManager.Register(sPieceOnCoolplate5, CoolplatePiece5Changed);
|
|
||||||
_adsManager.Register(sPieceOnCoolplate6, CoolplatePiece6Changed);
|
|
||||||
_adsManager.Register(sPieceOnCoolplate7, CoolplatePiece7Changed);
|
|
||||||
_adsManager.Register(sPieceOnCoolplate8, CoolplatePiece8Changed);
|
|
||||||
_adsManager.Register(sPieceOnCoolplate9, CoolplatePiece9Changed);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HotplatePiece1Changed(object? sender, ValueChangedEventArgs e)
|
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility1 = Visibility.Hidden;
|
||||||
{
|
|
||||||
HotPlateVisibility1 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility1 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void HotplatePiece2Changed(object? sender, ValueChangedEventArgs e)
|
}
|
||||||
|
private void HotplatePiece2Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility2 = Visibility.Visible;
|
||||||
{
|
|
||||||
HotPlateVisibility2 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility2 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void HotplatePiece3Changed(object? sender, ValueChangedEventArgs e)
|
else
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility2 = Visibility.Hidden;
|
||||||
{
|
|
||||||
HotPlateVisibility3 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility3 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void HotplatePiece4Changed(object? sender, ValueChangedEventArgs e)
|
}
|
||||||
|
private void HotplatePiece3Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility3 = Visibility.Visible;
|
||||||
{
|
|
||||||
HotPlateVisibility4 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility4 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void HotplatePiece5Changed(object? sender, ValueChangedEventArgs e)
|
else
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility3 = Visibility.Hidden;
|
||||||
{
|
|
||||||
HotPlateVisibility5 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility5 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void HotplatePiece6Changed(object? sender, ValueChangedEventArgs e)
|
}
|
||||||
|
private void HotplatePiece4Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility4 = Visibility.Visible;
|
||||||
{
|
|
||||||
HotPlateVisibility6 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility6 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void HotplatePiece7Changed(object? sender, ValueChangedEventArgs e)
|
else
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility4 = Visibility.Hidden;
|
||||||
{
|
|
||||||
HotPlateVisibility7 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility7 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void HotplatePiece8Changed(object? sender, ValueChangedEventArgs e)
|
}
|
||||||
|
private void HotplatePiece5Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility5 = Visibility.Visible;
|
||||||
{
|
|
||||||
HotPlateVisibility8 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility8 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void HotplatePiece9Changed(object? sender, ValueChangedEventArgs e)
|
else
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
HotPlateVisibility5 = Visibility.Hidden;
|
||||||
{
|
|
||||||
HotPlateVisibility9 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HotPlateVisibility9 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
private void HotplatePiece6Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
|
{
|
||||||
|
HotPlateVisibility6 = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HotPlateVisibility6 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void HotplatePiece7Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
|
{
|
||||||
|
HotPlateVisibility7 = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HotPlateVisibility7 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void HotplatePiece8Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
|
{
|
||||||
|
HotPlateVisibility8 = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HotPlateVisibility8 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void HotplatePiece9Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
|
{
|
||||||
|
HotPlateVisibility9 = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HotPlateVisibility9 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void CoolplatePiece1Changed(object? sender, ValueChangedEventArgs e)
|
private void CoolplatePiece1Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility1 = Visibility.Visible;
|
||||||
{
|
|
||||||
CoolPlateVisibility1 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility1 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void CoolplatePiece2Changed(object? sender, ValueChangedEventArgs e)
|
else
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility1 = Visibility.Hidden;
|
||||||
{
|
|
||||||
CoolPlateVisibility2 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility2 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void CoolplatePiece3Changed(object? sender, ValueChangedEventArgs e)
|
}
|
||||||
|
private void CoolplatePiece2Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility2 = Visibility.Visible;
|
||||||
{
|
|
||||||
CoolPlateVisibility3 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility3 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void CoolplatePiece4Changed(object? sender, ValueChangedEventArgs e)
|
else
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility2 = Visibility.Hidden;
|
||||||
{
|
|
||||||
CoolPlateVisibility4 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility4 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void CoolplatePiece5Changed(object? sender, ValueChangedEventArgs e)
|
}
|
||||||
|
private void CoolplatePiece3Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility3 = Visibility.Visible;
|
||||||
{
|
|
||||||
CoolPlateVisibility5 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility5 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void CoolplatePiece6Changed(object? sender, ValueChangedEventArgs e)
|
else
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility3 = Visibility.Hidden;
|
||||||
{
|
|
||||||
CoolPlateVisibility6 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility6 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void CoolplatePiece7Changed(object? sender, ValueChangedEventArgs e)
|
}
|
||||||
|
private void CoolplatePiece4Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility4 = Visibility.Visible;
|
||||||
{
|
|
||||||
CoolPlateVisibility7 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility7 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void CoolplatePiece8Changed(object? sender, ValueChangedEventArgs e)
|
else
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility4 = Visibility.Hidden;
|
||||||
{
|
|
||||||
CoolPlateVisibility8 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility8 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void CoolplatePiece9Changed(object? sender, ValueChangedEventArgs e)
|
}
|
||||||
|
private void CoolplatePiece5Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
{
|
{
|
||||||
if ((bool)e.Value)
|
CoolPlateVisibility5 = Visibility.Visible;
|
||||||
{
|
|
||||||
CoolPlateVisibility9 = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CoolPlateVisibility9 = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CoolPlateVisibility5 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void CoolplatePiece6Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
|
{
|
||||||
|
CoolPlateVisibility6 = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CoolPlateVisibility6 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void CoolplatePiece7Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
|
{
|
||||||
|
CoolPlateVisibility7 = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CoolPlateVisibility7 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void CoolplatePiece8Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
|
{
|
||||||
|
CoolPlateVisibility8 = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CoolPlateVisibility8 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void CoolplatePiece9Changed(object? sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.Value)
|
||||||
|
{
|
||||||
|
CoolPlateVisibility9 = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CoolPlateVisibility9 = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
HotPlateActualTemperature.Dispose();
|
HotPlateActualTemperature.Dispose();
|
||||||
HotPlateTargetTemperature.Dispose();
|
HotPlateTargetTemperature.Dispose();
|
||||||
CoolPlateActualTemperature.Dispose();
|
CoolPlateActualTemperature.Dispose();
|
||||||
CoolPlateTargetTemperature.Dispose();
|
CoolPlateTargetTemperature.Dispose();
|
||||||
|
|
||||||
EnableCoolPlateButtonVm?.Dispose();
|
EnableCoolPlateButtonVm?.Dispose();
|
||||||
EnableCoolPlateButtonVm = null;
|
EnableCoolPlateButtonVm = null;
|
||||||
EnableHotPlateButtonVm?.Dispose();
|
EnableHotPlateButtonVm?.Dispose();
|
||||||
EnableHotPlateButtonVm = null;
|
EnableHotPlateButtonVm = null;
|
||||||
DisableCoolPlateButtonVm?.Dispose();
|
DisableCoolPlateButtonVm?.Dispose();
|
||||||
DisableCoolPlateButtonVm = null;
|
DisableCoolPlateButtonVm = null;
|
||||||
DisableHotPlateButtonVm?.Dispose();
|
DisableHotPlateButtonVm?.Dispose();
|
||||||
DisableHotPlateButtonVm = null;
|
DisableHotPlateButtonVm = null;
|
||||||
_adsManager?.Deregister(sPieceOnHotplate1, HotplatePiece1Changed);
|
_adsManager?.Deregister(sPieceOnHotplate1, HotplatePiece1Changed);
|
||||||
_adsManager?.Deregister(sPieceOnHotplate2, HotplatePiece2Changed);
|
_adsManager?.Deregister(sPieceOnHotplate2, HotplatePiece2Changed);
|
||||||
_adsManager?.Deregister(sPieceOnHotplate3, HotplatePiece3Changed);
|
_adsManager?.Deregister(sPieceOnHotplate3, HotplatePiece3Changed);
|
||||||
_adsManager?.Deregister(sPieceOnHotplate4, HotplatePiece4Changed);
|
_adsManager?.Deregister(sPieceOnHotplate4, HotplatePiece4Changed);
|
||||||
_adsManager?.Deregister(sPieceOnHotplate5, HotplatePiece5Changed);
|
_adsManager?.Deregister(sPieceOnHotplate5, HotplatePiece5Changed);
|
||||||
_adsManager?.Deregister(sPieceOnHotplate6, HotplatePiece6Changed);
|
_adsManager?.Deregister(sPieceOnHotplate6, HotplatePiece6Changed);
|
||||||
_adsManager?.Deregister(sPieceOnHotplate7, HotplatePiece7Changed);
|
_adsManager?.Deregister(sPieceOnHotplate7, HotplatePiece7Changed);
|
||||||
_adsManager?.Deregister(sPieceOnHotplate8, HotplatePiece8Changed);
|
_adsManager?.Deregister(sPieceOnHotplate8, HotplatePiece8Changed);
|
||||||
_adsManager?.Deregister(sPieceOnHotplate9, HotplatePiece9Changed);
|
_adsManager?.Deregister(sPieceOnHotplate9, HotplatePiece9Changed);
|
||||||
|
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate1, CoolplatePiece1Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate1, CoolplatePiece1Changed);
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate2, CoolplatePiece2Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate2, CoolplatePiece2Changed);
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate3, CoolplatePiece3Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate3, CoolplatePiece3Changed);
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate4, CoolplatePiece4Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate4, CoolplatePiece4Changed);
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate5, CoolplatePiece5Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate5, CoolplatePiece5Changed);
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate6, CoolplatePiece6Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate6, CoolplatePiece6Changed);
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate7, CoolplatePiece7Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate7, CoolplatePiece7Changed);
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate8, CoolplatePiece8Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate8, CoolplatePiece8Changed);
|
||||||
_adsManager?.Deregister(sPieceOnCoolplate9, CoolplatePiece9Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate9, CoolplatePiece9Changed);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,8 @@ using Microsoft.Extensions.Configuration;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using Common;
|
||||||
|
using InfineonHMI.Common;
|
||||||
using TcEventLoggerAdsProxyLib;
|
using TcEventLoggerAdsProxyLib;
|
||||||
|
|
||||||
namespace InfineonHMI;
|
namespace InfineonHMI;
|
||||||
@@ -17,12 +19,63 @@ public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient
|
|||||||
|
|
||||||
[ObservableProperty] private Page currentDetailPage;
|
[ObservableProperty] private Page currentDetailPage;
|
||||||
|
|
||||||
|
[ObservableProperty] private PackMLControlVM machinePackMLControlVM;
|
||||||
|
|
||||||
|
public bool CanUserChangePageAlignment
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanUserChangePageEtching1
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageEtching2
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageHighVoltage
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageHotCoolplate
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageKukaRobot
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageMediaCabinet
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageNIOStation
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageProductionOverview
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageReceipe
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel == 100; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangePageTrayFeeder
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
public bool CanUserChangeMachineState
|
||||||
|
{
|
||||||
|
get { return currentUser.UserLevel > 50; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private readonly IAdsManager _adsManager;
|
private readonly IAdsManager _adsManager;
|
||||||
private readonly IConfiguration _config;
|
private readonly IConfiguration _config;
|
||||||
|
|
||||||
|
private User currentUser;
|
||||||
// Last active event
|
// Last active event
|
||||||
[ObservableProperty] private string currentActiveEvent = "";
|
[ObservableProperty] private string currentActiveEvent = "";
|
||||||
|
|
||||||
@@ -60,6 +113,10 @@ public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient
|
|||||||
public MachineOverviewPageVM()
|
public MachineOverviewPageVM()
|
||||||
{
|
{
|
||||||
// default ctor
|
// default ctor
|
||||||
|
MachinePackMLControlVM = new();
|
||||||
|
MachinePackMLControlVM.STitle = "Betriebszustand\n Gesamtanlage";
|
||||||
|
|
||||||
|
currentUser = Users.getCurrentUser();
|
||||||
}
|
}
|
||||||
public MachineOverviewPageVM(IAdsManager adsManager, IConfiguration config,MainWindowVM mainVm, ProductionOverviewPageVM prodVm, TcEventLogger eventLogger)
|
public MachineOverviewPageVM(IAdsManager adsManager, IConfiguration config,MainWindowVM mainVm, ProductionOverviewPageVM prodVm, TcEventLogger eventLogger)
|
||||||
{
|
{
|
||||||
@@ -70,6 +127,10 @@ public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient
|
|||||||
// Create dummy string
|
// Create dummy string
|
||||||
DummyStringVM = new StringControlButtonVM();
|
DummyStringVM = new StringControlButtonVM();
|
||||||
|
|
||||||
|
currentUser = Users.getCurrentUser();
|
||||||
|
MachinePackMLControlVM = new(_adsManager, "GVL_SCADA.stMachine.stMachineCmds");
|
||||||
|
|
||||||
|
MachinePackMLControlVM.STitle = "Betriebszustand\n Gesamtanlage";
|
||||||
// Create empty page
|
// Create empty page
|
||||||
_emptyPage = new();
|
_emptyPage = new();
|
||||||
|
|
||||||
@@ -79,6 +140,22 @@ public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient
|
|||||||
|
|
||||||
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
||||||
|
|
||||||
|
//CanUserChangePageAlignment = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageEtching1 = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageEtching2 = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageHighVoltage = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageHotCoolplate = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageKukaRobot = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageMediaCabinet = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageNIOStation = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageProductionOverview = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangePageReceipe = currentUser.UserLevel == 100;
|
||||||
|
//CanUserChangePageTrayFeeder = currentUser.UserLevel > 50;
|
||||||
|
//CanUserChangeMachineState = currentUser.UserLevel > 50;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -202,56 +279,56 @@ public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient
|
|||||||
{
|
{
|
||||||
case nameof(TrayFeederPage):
|
case nameof(TrayFeederPage):
|
||||||
if (_trayFeederPageVm == null)
|
if (_trayFeederPageVm == null)
|
||||||
_trayFeederPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
_trayFeederPageVm = new(_adsManager, "GVL_SCADA.stMachine.TrayFeeder"); //In and Out ist set directly in ViewModel
|
||||||
|
|
||||||
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
|
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
|
||||||
CurrentDetailPage = trayFeederPage;
|
CurrentDetailPage = trayFeederPage;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(AlignmentStationPage):
|
case nameof(AlignmentStationPage):
|
||||||
// Create seetings page view model only once
|
// Create seetings page view model only once
|
||||||
if (_alignmentStationPageVM == null)
|
if (_alignmentStationPageVM == null)
|
||||||
_alignmentStationPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stAligner");
|
_alignmentStationPageVM = new(_adsManager, "GVL_SCADA.stMachine.stAligner");
|
||||||
|
|
||||||
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
|
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
|
||||||
CurrentDetailPage = settingsPage;
|
CurrentDetailPage = settingsPage;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(EtchingStation1Page):
|
case nameof(EtchingStation1Page):
|
||||||
if (_etchingStation1PageVm == null)
|
if (_etchingStation1PageVm == null)
|
||||||
_etchingStation1PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher1");
|
_etchingStation1PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher1");
|
||||||
|
|
||||||
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
|
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
|
||||||
CurrentDetailPage = etchingStation1Page;
|
CurrentDetailPage = etchingStation1Page;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(EtchingStation2Page):
|
case nameof(EtchingStation2Page):
|
||||||
if (_etchingStation2PageVm == null)
|
if (_etchingStation2PageVm == null)
|
||||||
_etchingStation2PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher2");
|
_etchingStation2PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher2");
|
||||||
|
|
||||||
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
|
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
|
||||||
CurrentDetailPage = etchingStation2Page;
|
CurrentDetailPage = etchingStation2Page;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(HighVoltageStationPage):
|
case nameof(HighVoltageStationPage):
|
||||||
if (_highVoltageStationPageVm == null)
|
if (_highVoltageStationPageVm == null)
|
||||||
_highVoltageStationPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
_highVoltageStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stHVTester"); // Hot/Cold is Set directly in VM
|
||||||
|
|
||||||
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
|
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
|
||||||
CurrentDetailPage = highVoltageStationPage;
|
CurrentDetailPage = highVoltageStationPage;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(HotCoolPlatePage):
|
case nameof(HotCoolPlatePage):
|
||||||
if (_hotCoolplatePageVM == null)
|
if (_hotCoolplatePageVM == null)
|
||||||
_hotCoolplatePageVM = new(_adsManager, "GVL_Config.stMachine");
|
_hotCoolplatePageVM = new(_adsManager, "GVL_SCADA.stMachine"); //".stHotplate /.stCoolplate is set directly in VM
|
||||||
|
|
||||||
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
||||||
CurrentDetailPage = hotCoolPlatePage;
|
CurrentDetailPage = hotCoolPlatePage;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(NIOStationPage):
|
case nameof(NIOStationPage):
|
||||||
if (_nioStationPageVm == null)
|
if (_nioStationPageVm == null)
|
||||||
_nioStationPageVm = new(_adsManager, "GVL_Config.stMachine.stNOK");
|
_nioStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stNOK");
|
||||||
|
|
||||||
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
|
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
|
||||||
CurrentDetailPage = nIOStationPage;
|
CurrentDetailPage = nIOStationPage;
|
||||||
@@ -260,17 +337,17 @@ public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient
|
|||||||
case nameof(KukaRobotPage):
|
case nameof(KukaRobotPage):
|
||||||
// Create page view model only once
|
// Create page view model only once
|
||||||
if (_kukaRobotPageVM == null)
|
if (_kukaRobotPageVM == null)
|
||||||
_kukaRobotPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stKukaRobot");
|
_kukaRobotPageVM = new(_adsManager); // Variablenames are set directly in Viewmodel
|
||||||
|
|
||||||
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
||||||
CurrentDetailPage = kukaRobotPage;
|
CurrentDetailPage = kukaRobotPage;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(MediaCabinetPage):
|
case nameof(MediaCabinetPage):
|
||||||
if (_mediaCabinetPageVM == null)
|
if (_mediaCabinetPageVM == null)
|
||||||
_mediaCabinetPageVM = new(_adsManager, "GVL_Config.stMachine");
|
_mediaCabinetPageVM = new(_adsManager, "GVL_SCADA.stMachine.stMediaCabinet"); //TODO not Implemented on PLC yet
|
||||||
|
|
||||||
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
|
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
|
||||||
CurrentDetailPage = mediaCabinetPage;
|
CurrentDetailPage = mediaCabinetPage;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -8,74 +8,90 @@ using System.Collections.ObjectModel;
|
|||||||
using Common;
|
using Common;
|
||||||
using InfineonHMI.Model;
|
using InfineonHMI.Model;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class MediaCabinetPageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class MediaCabinetPageVM : ObservableValidator, IDisposable
|
|
||||||
{
|
|
||||||
|
|
||||||
private IAdsManager _adsManager;
|
private IAdsManager _adsManager;
|
||||||
private string? _variableName;
|
private string? _variableName;
|
||||||
|
|
||||||
[ObservableProperty] private MediaContainerVm container1Vm;
|
[ObservableProperty] private MediaContainerVm container1Vm;
|
||||||
[ObservableProperty] private MediaContainerVm container2Vm;
|
[ObservableProperty] private MediaContainerVm container2Vm;
|
||||||
[ObservableProperty] private MediaContainerVm container3Vm;
|
[ObservableProperty] private MediaContainerVm container3Vm;
|
||||||
[ObservableProperty] private MediaContainerVm container4Vm;
|
[ObservableProperty] private MediaContainerVm container4Vm;
|
||||||
[ObservableProperty] private MediaContainerVm container5Vm;
|
[ObservableProperty] private MediaContainerVm container5Vm;
|
||||||
[ObservableProperty] private MediaContainerVm container6Vm;
|
[ObservableProperty] private MediaContainerVm container6Vm;
|
||||||
[ObservableProperty] private MediaContainerVm container7Vm;
|
[ObservableProperty] private MediaContainerVm container7Vm;
|
||||||
[ObservableProperty] private MediaContainerVm container8Vm;
|
[ObservableProperty] private MediaContainerVm container8Vm;
|
||||||
[ObservableProperty] private MediaContainerVm container9Vm;
|
[ObservableProperty] private MediaContainerVm container9Vm;
|
||||||
|
[ObservableProperty] private MediaContainerVm container10Vm;
|
||||||
|
[ObservableProperty] private MediaContainerVm container11Vm;
|
||||||
|
[ObservableProperty] private MediaContainerVm container12Vm;
|
||||||
|
|
||||||
|
|
||||||
public MediaCabinetPageVM(IAdsManager adsManager, string variableName)
|
public MediaCabinetPageVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
|
|
||||||
Container1Vm = new MediaContainerVm(adsManager, variableName + ".stContainer1");
|
Container1Vm = new MediaContainerVm(adsManager, variableName + ".stContainer1");
|
||||||
Container2Vm = new MediaContainerVm(adsManager, variableName + ".stContainer2");
|
Container2Vm = new MediaContainerVm(adsManager, variableName + ".stContainer2");
|
||||||
Container3Vm = new MediaContainerVm(adsManager, variableName + ".stContainer3");
|
Container3Vm = new MediaContainerVm(adsManager, variableName + ".stContainer3");
|
||||||
Container4Vm = new MediaContainerVm(adsManager, variableName + ".stContainer4");
|
Container4Vm = new MediaContainerVm(adsManager, variableName + ".stContainer4");
|
||||||
Container5Vm = new MediaContainerVm(adsManager, variableName + ".stContainer5");
|
Container5Vm = new MediaContainerVm(adsManager, variableName + ".stContainer5");
|
||||||
Container6Vm = new MediaContainerVm(adsManager, variableName + ".stContainer6");
|
Container6Vm = new MediaContainerVm(adsManager, variableName + ".stContainer6");
|
||||||
Container7Vm = new MediaContainerVm(adsManager, variableName + ".stContainer7");
|
Container7Vm = new MediaContainerVm(adsManager, variableName + ".stContainer7");
|
||||||
Container8Vm = new MediaContainerVm(adsManager, variableName + ".stContainer8");
|
Container8Vm = new MediaContainerVm(adsManager, variableName + ".stContainer8");
|
||||||
Container9Vm = new MediaContainerVm(adsManager, variableName + ".stContainer9");
|
Container9Vm = new MediaContainerVm(adsManager, variableName + ".stContainer9");
|
||||||
|
Container10Vm = new MediaContainerVm(adsManager, variableName + ".stContainer10");
|
||||||
|
Container11Vm = new MediaContainerVm(adsManager, variableName + ".stContainer11");
|
||||||
|
Container12Vm = new MediaContainerVm(adsManager, variableName + ".stContainer12");
|
||||||
|
|
||||||
Container1Vm.SName = "Container1";
|
Container1Vm.SName = "Container1";
|
||||||
Container2Vm.SName = "Container2";
|
Container2Vm.SName = "Container2";
|
||||||
Container3Vm.SName = "Container3";
|
Container3Vm.SName = "Container3";
|
||||||
Container4Vm.SName = "Container4";
|
Container4Vm.SName = "Container4";
|
||||||
Container5Vm.SName = "Container5";
|
Container5Vm.SName = "Container5";
|
||||||
Container6Vm.SName = "Container6";
|
Container6Vm.SName = "Container6";
|
||||||
Container7Vm.SName = "Container7";
|
Container7Vm.SName = "Container7";
|
||||||
Container8Vm.SName = "Container8";
|
Container8Vm.SName = "Container8";
|
||||||
Container9Vm.SName = "Container9";
|
Container9Vm.SName = "Container9";
|
||||||
|
Container10Vm.SName = "Container10";
|
||||||
}
|
Container11Vm.SName = "Container11";
|
||||||
|
Container12Vm.SName = "Container12";
|
||||||
public MediaCabinetPageVM()
|
|
||||||
{
|
|
||||||
Container1Vm = new MediaContainerVm();
|
|
||||||
Container2Vm = new MediaContainerVm();
|
|
||||||
Container3Vm = new MediaContainerVm();
|
|
||||||
Container4Vm = new MediaContainerVm();
|
|
||||||
Container5Vm = new MediaContainerVm();
|
|
||||||
Container6Vm = new MediaContainerVm();
|
|
||||||
Container7Vm = new MediaContainerVm();
|
|
||||||
Container8Vm = new MediaContainerVm();
|
|
||||||
Container9Vm = new MediaContainerVm();
|
|
||||||
|
|
||||||
|
|
||||||
Container1Vm.SName = "Container1";
|
}
|
||||||
Container2Vm.SName = "Container2";
|
|
||||||
Container3Vm.SName = "Container3";
|
public MediaCabinetPageVM()
|
||||||
Container4Vm.SName = "Container4";
|
{
|
||||||
Container5Vm.SName = "Container5";
|
Container1Vm = new MediaContainerVm();
|
||||||
Container6Vm.SName = "Container6";
|
Container2Vm = new MediaContainerVm();
|
||||||
Container7Vm.SName = "Container7";
|
Container3Vm = new MediaContainerVm();
|
||||||
Container8Vm.SName = "Container8";
|
Container4Vm = new MediaContainerVm();
|
||||||
Container9Vm.SName = "Container9";
|
Container5Vm = new MediaContainerVm();
|
||||||
|
Container6Vm = new MediaContainerVm();
|
||||||
|
Container7Vm = new MediaContainerVm();
|
||||||
|
Container8Vm = new MediaContainerVm();
|
||||||
|
Container9Vm = new MediaContainerVm();
|
||||||
|
Container10Vm = new MediaContainerVm();
|
||||||
|
Container11Vm = new MediaContainerVm();
|
||||||
|
Container12Vm = new MediaContainerVm();
|
||||||
|
|
||||||
|
|
||||||
|
Container1Vm.SName = "Container1";
|
||||||
|
Container2Vm.SName = "Container2";
|
||||||
|
Container3Vm.SName = "Container3";
|
||||||
|
Container4Vm.SName = "Container4";
|
||||||
|
Container5Vm.SName = "Container5";
|
||||||
|
Container6Vm.SName = "Container6";
|
||||||
|
Container7Vm.SName = "Container7";
|
||||||
|
Container8Vm.SName = "Container8";
|
||||||
|
Container9Vm.SName = "Container9";
|
||||||
|
Container10Vm.SName = "Container10";
|
||||||
|
Container11Vm.SName = "Container11";
|
||||||
|
Container12Vm.SName = "Container12";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -85,24 +101,26 @@ namespace InfineonHMI
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
|
||||||
Container1Vm.Dispose();
|
Container1Vm.Dispose();
|
||||||
Container2Vm.Dispose();
|
Container2Vm.Dispose();
|
||||||
Container3Vm.Dispose();
|
Container3Vm.Dispose();
|
||||||
Container4Vm.Dispose();
|
Container4Vm.Dispose();
|
||||||
Container5Vm.Dispose();
|
Container5Vm.Dispose();
|
||||||
Container6Vm.Dispose();
|
Container6Vm.Dispose();
|
||||||
Container7Vm.Dispose();
|
Container7Vm.Dispose();
|
||||||
Container8Vm.Dispose();
|
Container8Vm.Dispose();
|
||||||
Container9Vm.Dispose();
|
Container9Vm.Dispose();
|
||||||
|
Container10Vm.Dispose();
|
||||||
|
Container11Vm.Dispose();
|
||||||
|
Container12Vm.Dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -5,55 +5,62 @@ using Heisig.HMI.AdsManager;
|
|||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using Common;
|
||||||
using InfineonHMI.Model;
|
using InfineonHMI.Model;
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class NIOStationPageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class NIOStationPageVM : ObservableValidator, IDisposable
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
private readonly string? _variableName;
|
private readonly string? _variableName;
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM clampDiagValveVm;
|
[ObservableProperty] private BinaryValveControlVM clampDiagValveVm;
|
||||||
|
|
||||||
[ObservableProperty] private BinaryValveControlVM clampAcrossValveVm;
|
[ObservableProperty] private BinaryValveControlVM clampAcrossValveVm;
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM clampCmdButtonVm;
|
[ObservableProperty] private HMIControlButtonVM clampCmdButtonVm;
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM unclampCmdButtonVm;
|
[ObservableProperty] private HMIControlButtonVM unclampCmdButtonVm;
|
||||||
|
|
||||||
public NIOStationPageVM()
|
[ObservableProperty] private PackMLControlVM? nIOStationPackMLControlVm;
|
||||||
{
|
|
||||||
ClampDiagValveVm = new BinaryValveControlVM();
|
|
||||||
ClampAcrossValveVm = new BinaryValveControlVM();
|
|
||||||
ClampCmdButtonVm = new HMIControlButtonVM();
|
|
||||||
UnclampCmdButtonVm = new HMIControlButtonVM();
|
|
||||||
}
|
|
||||||
|
|
||||||
public NIOStationPageVM(IAdsManager adsManager, string variableName)
|
|
||||||
{
|
|
||||||
_adsManager = adsManager;
|
|
||||||
_variableName = variableName;
|
|
||||||
|
|
||||||
ClampDiagValveVm = new BinaryValveControlVM(_adsManager, _variableName + ".stClampDiagValve");
|
|
||||||
ClampAcrossValveVm = new BinaryValveControlVM(_adsManager, _variableName + ".stClampAcrossValve");
|
|
||||||
ClampCmdButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stClampCmd");
|
|
||||||
UnclampCmdButtonVm = new HMIControlButtonVM(_adsManager, _variableName + "stUnclampCmd");
|
|
||||||
|
|
||||||
|
|
||||||
}
|
public NIOStationPageVM()
|
||||||
|
{
|
||||||
|
ClampDiagValveVm = new BinaryValveControlVM();
|
||||||
|
ClampAcrossValveVm = new BinaryValveControlVM();
|
||||||
|
ClampCmdButtonVm = new HMIControlButtonVM();
|
||||||
|
UnclampCmdButtonVm = new HMIControlButtonVM();
|
||||||
|
NIOStationPackMLControlVm = new();
|
||||||
|
NIOStationPackMLControlVm.STitle = "NIO Station";
|
||||||
|
|
||||||
public void Dispose()
|
}
|
||||||
{
|
|
||||||
ClampDiagValveVm.Dispose();
|
public NIOStationPageVM(IAdsManager adsManager, string variableName)
|
||||||
ClampAcrossValveVm.Dispose();
|
{
|
||||||
ClampCmdButtonVm.Dispose();
|
_adsManager = adsManager;
|
||||||
UnclampCmdButtonVm.Dispose();
|
_variableName = variableName;
|
||||||
}
|
|
||||||
|
ClampDiagValveVm = new BinaryValveControlVM(_adsManager, _variableName + ".stClampDiagValve");
|
||||||
|
ClampAcrossValveVm = new BinaryValveControlVM(_adsManager, _variableName + ".stClampAcrossValve");
|
||||||
|
ClampCmdButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stClampCmd");
|
||||||
|
UnclampCmdButtonVm = new HMIControlButtonVM(_adsManager, _variableName + "stUnclampCmd");
|
||||||
|
|
||||||
|
NIOStationPackMLControlVm = new(_adsManager, _variableName + ".stStationCmds");
|
||||||
|
NIOStationPackMLControlVm.STitle = "NIO Station";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
ClampDiagValveVm.Dispose();
|
||||||
|
ClampAcrossValveVm.Dispose();
|
||||||
|
ClampCmdButtonVm.Dispose();
|
||||||
|
UnclampCmdButtonVm.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ using Microsoft.Extensions.Configuration;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using InfineonHMI.Common;
|
||||||
using TcEventLoggerAdsProxyLib;
|
using TcEventLoggerAdsProxyLib;
|
||||||
|
|
||||||
namespace InfineonHMI;
|
namespace InfineonHMI;
|
||||||
@@ -23,6 +24,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
private readonly IConfiguration _config;
|
private readonly IConfiguration _config;
|
||||||
private readonly TcEventLogger _eventlogger;
|
private readonly TcEventLogger _eventlogger;
|
||||||
|
|
||||||
|
private User currentUser;
|
||||||
|
|
||||||
// Last active event
|
// Last active event
|
||||||
[ObservableProperty] private string currentActiveEvent = "";
|
[ObservableProperty] private string currentActiveEvent = "";
|
||||||
@@ -60,6 +62,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
public ProductionOverviewPageVM()
|
public ProductionOverviewPageVM()
|
||||||
{
|
{
|
||||||
// default ctor
|
// default ctor
|
||||||
|
currentUser = Users.getCurrentUser();
|
||||||
}
|
}
|
||||||
public ProductionOverviewPageVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger, NavigateMessage? message = null)
|
public ProductionOverviewPageVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger, NavigateMessage? message = null)
|
||||||
{
|
{
|
||||||
@@ -67,7 +70,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
_config = config;
|
_config = config;
|
||||||
// Create dummy string
|
// Create dummy string
|
||||||
DummyStringVM = new StringControlButtonVM();
|
DummyStringVM = new StringControlButtonVM();
|
||||||
|
currentUser = Users.getCurrentUser();
|
||||||
// Create empty page
|
// Create empty page
|
||||||
_emptyPage = new();
|
_emptyPage = new();
|
||||||
|
|
||||||
@@ -209,7 +212,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
{
|
{
|
||||||
case nameof(TrayFeederPage):
|
case nameof(TrayFeederPage):
|
||||||
if (_trayFeederPageVm == null)
|
if (_trayFeederPageVm == null)
|
||||||
_trayFeederPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
_trayFeederPageVm = new(_adsManager, "GVL_SCADA.stMachine.TrayFeeder"); //In and Out ist set directly in ViewModel
|
||||||
|
|
||||||
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
|
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
|
||||||
CurrentDetailPage = trayFeederPage;
|
CurrentDetailPage = trayFeederPage;
|
||||||
@@ -218,7 +221,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
case nameof(AlignmentStationPage):
|
case nameof(AlignmentStationPage):
|
||||||
// Create seetings page view model only once
|
// Create seetings page view model only once
|
||||||
if (_alignmentStationPageVM == null)
|
if (_alignmentStationPageVM == null)
|
||||||
_alignmentStationPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stAligner");
|
_alignmentStationPageVM = new(_adsManager, "GVL_SCADA.stMachine.stAligner");
|
||||||
|
|
||||||
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
|
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
|
||||||
CurrentDetailPage = settingsPage;
|
CurrentDetailPage = settingsPage;
|
||||||
@@ -226,7 +229,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
|
|
||||||
case nameof(EtchingStation1Page):
|
case nameof(EtchingStation1Page):
|
||||||
if (_etchingStation1PageVm == null)
|
if (_etchingStation1PageVm == null)
|
||||||
_etchingStation1PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher1");
|
_etchingStation1PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher1");
|
||||||
|
|
||||||
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
|
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
|
||||||
CurrentDetailPage = etchingStation1Page;
|
CurrentDetailPage = etchingStation1Page;
|
||||||
@@ -234,7 +237,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
|
|
||||||
case nameof(EtchingStation2Page):
|
case nameof(EtchingStation2Page):
|
||||||
if (_etchingStation2PageVm == null)
|
if (_etchingStation2PageVm == null)
|
||||||
_etchingStation2PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher2");
|
_etchingStation2PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher2");
|
||||||
|
|
||||||
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
|
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
|
||||||
CurrentDetailPage = etchingStation2Page;
|
CurrentDetailPage = etchingStation2Page;
|
||||||
@@ -242,7 +245,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
|
|
||||||
case nameof(HighVoltageStationPage):
|
case nameof(HighVoltageStationPage):
|
||||||
if (_highVoltageStationPageVm == null)
|
if (_highVoltageStationPageVm == null)
|
||||||
_highVoltageStationPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
_highVoltageStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stHVTester"); // Hot/Cold is Set directly in VM
|
||||||
|
|
||||||
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
|
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
|
||||||
CurrentDetailPage = highVoltageStationPage;
|
CurrentDetailPage = highVoltageStationPage;
|
||||||
@@ -250,7 +253,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
|
|
||||||
case nameof(HotCoolPlatePage):
|
case nameof(HotCoolPlatePage):
|
||||||
if (_hotCoolplatePageVM == null)
|
if (_hotCoolplatePageVM == null)
|
||||||
_hotCoolplatePageVM = new(_adsManager, "GVL_Config.stMachine");
|
_hotCoolplatePageVM = new(_adsManager, "GVL_SCADA.stMachine"); //".stHotplate /.stCoolplate is set directly in VM
|
||||||
|
|
||||||
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
||||||
CurrentDetailPage = hotCoolPlatePage;
|
CurrentDetailPage = hotCoolPlatePage;
|
||||||
@@ -258,7 +261,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
|
|
||||||
case nameof(NIOStationPage):
|
case nameof(NIOStationPage):
|
||||||
if (_nioStationPageVm == null)
|
if (_nioStationPageVm == null)
|
||||||
_nioStationPageVm = new(_adsManager, "GVL_Config.stMachine.stNOK");
|
_nioStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stNOK");
|
||||||
|
|
||||||
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
|
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
|
||||||
CurrentDetailPage = nIOStationPage;
|
CurrentDetailPage = nIOStationPage;
|
||||||
@@ -267,7 +270,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
case nameof(KukaRobotPage):
|
case nameof(KukaRobotPage):
|
||||||
// Create page view model only once
|
// Create page view model only once
|
||||||
if (_kukaRobotPageVM == null)
|
if (_kukaRobotPageVM == null)
|
||||||
_kukaRobotPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stKukaRobot");
|
_kukaRobotPageVM = new(_adsManager); // Variablenames are set directly in Viewmodel
|
||||||
|
|
||||||
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
||||||
CurrentDetailPage = kukaRobotPage;
|
CurrentDetailPage = kukaRobotPage;
|
||||||
@@ -275,7 +278,7 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
|
|||||||
|
|
||||||
case nameof(MediaCabinetPage):
|
case nameof(MediaCabinetPage):
|
||||||
if (_mediaCabinetPageVM == null)
|
if (_mediaCabinetPageVM == null)
|
||||||
_mediaCabinetPageVM = new(_adsManager, "GVL_Config.stMachine");
|
_mediaCabinetPageVM = new(_adsManager, "GVL_SCADA.stMachine.stMediaCabinet"); //TODO not Implemented on PLC yet
|
||||||
|
|
||||||
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
|
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
|
||||||
CurrentDetailPage = mediaCabinetPage;
|
CurrentDetailPage = mediaCabinetPage;
|
||||||
|
|||||||
@@ -413,6 +413,13 @@ public sealed partial class ReceipePageVM : ObservableValidator, IDisposable
|
|||||||
SendDataToPLC();
|
SendDataToPLC();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
public void LoadFromPlc()
|
||||||
|
{
|
||||||
|
//ReadDataFromPLC();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void ReadReceipeFile()
|
public void ReadReceipeFile()
|
||||||
{
|
{
|
||||||
@@ -710,21 +717,21 @@ public sealed partial class ReceipePageVM : ObservableValidator, IDisposable
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine", CameraProgramsVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.iCameraprograms", CameraProgramsVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine", ChucksVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.iChucks", ChucksVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine", GripperVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.iGripper", GripperVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine", PermissibleBeamParamDeviationsVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.rBeamDeviation", PermissibleBeamParamDeviationsVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine", DiameterVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.rDiameter", DiameterVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine", ThicknessVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.rThickness", ThicknessVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine", TimeIntervallBeamCheckVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.rTimeIntervalBeamCheck", TimeIntervallBeamCheckVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rRestingTime", RestingTimeHotplateVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rRestingTime", RestingTimeHotplateVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rTemp", TargetTemperatureHotplateVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rTemp", TargetTemperatureHotplateVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rRestingTime", RestingTimeCoolplateVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rRestingTime", RestingTimeCoolplateVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rTemp", TargetTemperatureCoolplateVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rTemp", TargetTemperatureCoolplateVm.Value);
|
||||||
|
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.uiNumRobotPos", NumberRobotPositionsVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.uiNumRobotPos", NumberRobotPositionsVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.rRadialPosLowerWaterJet", RadialPosLowerWaterJetVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.rRadialPosLowerWaterJet", RadialPosLowerWaterJetVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.rChuckRPM", ChuckRpmVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.rChuckRPM", ChuckRpmVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestVoltage", HvtestVoltageVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestVoltage", HvtestVoltageVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rMaxTestCurrent", HvmaxTestCurrentVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rMaxTestCurrent", HvmaxTestCurrentVm.Value);
|
||||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rRampTime", HvrampTimeVm.Value);
|
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rRampTime", HvrampTimeVm.Value);
|
||||||
@@ -739,6 +746,123 @@ public sealed partial class ReceipePageVM : ObservableValidator, IDisposable
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//private void ReadDataFromPLC()
|
||||||
|
//{
|
||||||
|
// var val = _adsManager.ReadValue("GVL_Scheduler.MAX_RECIPE_NODES");
|
||||||
|
// maxFlowNodes = (val == null) ? 10 : (int)val; ;
|
||||||
|
// val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||||
|
// maxEtcherRobotPositions = (val == null) ? 10 : (int)val;
|
||||||
|
// val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||||
|
// maxTrayPositions = (val == null) ? 20 : (int)val;
|
||||||
|
|
||||||
|
// for (var i = 0; i < maxTrayPositions && i < TrayPositions.Count; i++)
|
||||||
|
// {
|
||||||
|
// TrayPositions[i].PosX = GetFloat(_adsManager.ReadValue("GVL_SCADA.stMachine.stTray.arPosX[" + i + "]"));
|
||||||
|
// TrayPositions[i].PosY = GetFloat(_adsManager.ReadValue("GVL_SCADA.stMachine.stTray.arPosY[" + i + "]"));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// var trayPosCountToPlc = TrayPositions.Count < maxTrayPositions ? TrayPositions.Count : maxTrayPositions;
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stTray.iPosCnt", trayPosCountToPlc);
|
||||||
|
|
||||||
|
// for (var i = 0; i < maxEtcherRobotPositions && i < EtcherRobotSteps.Count; i++)
|
||||||
|
// {
|
||||||
|
// EtcherRobotSteps[i].PosX= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosX"));
|
||||||
|
// EtcherRobotSteps[i].PosY= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosY"));
|
||||||
|
// EtcherRobotSteps[i].PosZ= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosZ"));
|
||||||
|
// EtcherRobotSteps[i].AngleAlpha= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rAngleAlpha"));
|
||||||
|
// EtcherRobotSteps[i].MoveSpeed= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rMoveSpeed"));
|
||||||
|
// EtcherRobotSteps[i].Delay = GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rDelay"));
|
||||||
|
// EtcherRobotSteps[i].Medium = GetUShort(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].uiMedium"));
|
||||||
|
// EtcherRobotSteps[i].WaterFromBelow= GetShort(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromBelow"));
|
||||||
|
// EtcherRobotSteps[i].WaterFromAbove = GetShort(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromAbove"));
|
||||||
|
|
||||||
|
|
||||||
|
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosX"));
|
||||||
|
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosY"));
|
||||||
|
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosZ"));
|
||||||
|
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rAngleAlpha"));
|
||||||
|
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rMoveSpeed"));
|
||||||
|
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rDelay"));
|
||||||
|
// _adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].uiMedium"));
|
||||||
|
// _adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromBelow"));
|
||||||
|
// _adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromAbove"));
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// for (var i = 0; (i < maxFlowNodes && i < FlowReceipeEntries.Count); i++)
|
||||||
|
// {
|
||||||
|
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].Priority);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].Station.eStation);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].MaxRetries);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeSuccess);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeRetry);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeFail);
|
||||||
|
|
||||||
|
// }
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.uiNodeCnt", FlowNodeCountVm.Value);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine", CameraProgramsVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine", ChucksVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine", GripperVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine", PermissibleBeamParamDeviationsVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine", DiameterVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine", ThicknessVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine", TimeIntervallBeamCheckVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rRestingTime", RestingTimeHotplateVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rTemp", TargetTemperatureHotplateVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rRestingTime", RestingTimeCoolplateVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rTemp", TargetTemperatureCoolplateVm.Value);
|
||||||
|
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.uiNumRobotPos", NumberRobotPositionsVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.rRadialPosLowerWaterJet", RadialPosLowerWaterJetVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.rChuckRPM", ChuckRpmVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestVoltage", HvtestVoltageVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rMaxTestCurrent", HvmaxTestCurrentVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rRampTime", HvrampTimeVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestFrequency", HvtestFrequencyVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.uiPolarity", HvpolarityVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestPresN2", HvtestPressureN2Vm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rN2PrePurgeTime", Hvn2PrePurgeTimeVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.uiNumRetries", HvnumRetriesVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestTemp", HvtestTemperatureVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestOkVoltage", HvTestOkVoltageVm.Value);
|
||||||
|
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestOkCurrent", HvTestOkCurrentVm.Value);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//private short GetShort(object? value)
|
||||||
|
//{
|
||||||
|
// if (value != null)
|
||||||
|
// return (short)value;
|
||||||
|
|
||||||
|
// return -1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//private UInt16 GetUShort(object? value)
|
||||||
|
//{
|
||||||
|
// if (value != null)
|
||||||
|
// return (UInt16)value;
|
||||||
|
|
||||||
|
// return 0;
|
||||||
|
//}
|
||||||
|
|
||||||
|
private bool GetBool(object? value)
|
||||||
|
{
|
||||||
|
if (value != null)
|
||||||
|
return (bool)value;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
private float GetFloat(object? value)
|
||||||
|
{
|
||||||
|
if (value != null)
|
||||||
|
return (float)value;
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -5,38 +5,48 @@ using Heisig.HMI.AdsManager;
|
|||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using Common;
|
||||||
using InfineonHMI.Model;
|
using InfineonHMI.Model;
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public sealed partial class TrayFeederPageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
public sealed partial class TrayFeederPageVM : ObservableValidator, IDisposable
|
private readonly string? _variableName;
|
||||||
{
|
|
||||||
private readonly string? _variableName;
|
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
public TrayFeederPageVM()
|
[ObservableProperty] private PackMLControlVM? trayfeederOutPackMLControlVm;
|
||||||
{
|
[ObservableProperty] private PackMLControlVM? trayfeederInPackMLControlVm;
|
||||||
|
|
||||||
}
|
public TrayFeederPageVM()
|
||||||
|
{
|
||||||
|
TrayfeederInPackMLControlVm = new();
|
||||||
|
TrayfeederOutPackMLControlVm = new();
|
||||||
|
TrayfeederInPackMLControlVm.STitle = "Trayfeeder IN";
|
||||||
|
TrayfeederOutPackMLControlVm.STitle = "Trayfeeder OUT";
|
||||||
|
}
|
||||||
|
|
||||||
public TrayFeederPageVM(IAdsManager adsManager, string variableName)
|
public TrayFeederPageVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
|
|
||||||
|
|
||||||
}
|
TrayfeederInPackMLControlVm = new(_adsManager, _variableName + "In.stStationCmds");
|
||||||
|
TrayfeederOutPackMLControlVm = new(_adsManager, _variableName + "Out.stStationCmds");
|
||||||
|
|
||||||
|
TrayfeederInPackMLControlVm.STitle = "Trayfeeder IN";
|
||||||
|
TrayfeederOutPackMLControlVm.STitle = "Trayfeeder OUT";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -4,33 +4,41 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.AlignmentStationPage"
|
xmlns:HMIToolkit="clr-namespace:HMIToolkit"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
|
x:Class="InfineonHMI.AlignmentStationPage"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:AlignmentStationPageVM}}"
|
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:AlignmentStationPageVM}}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="1554" d:DesignWidth="3390"
|
||||||
Title="AlignmentStationPage" FontSize="40">
|
Title="AlignmentStationPage" FontSize="40">
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="20">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Alignment Station" VerticalAlignment="Top" HorizontalAlignment="Left" />
|
|
||||||
|
|
||||||
<HMIToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="center" VerticalAlignment="Center" DataContext="{Binding Path=VacuumValveControlVm}"/>
|
<Label Grid.Row="0" Grid.Column="0" Content="Ausrichtstation" VerticalAlignment="Top" HorizontalAlignment="Left" />
|
||||||
|
|
||||||
|
<HMIToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding Path=VacuumValveControlVm}"/>
|
||||||
|
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding AlignmentPackMLControlVm}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class AlignmentStationPage : Page
|
|
||||||
{
|
|
||||||
public AlignmentStationPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class AlignmentStationPage : Page
|
||||||
}
|
{
|
||||||
}
|
public AlignmentStationPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,12 +5,13 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=local:EtchingStation1PageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=local:EtchingStation1PageVM, IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="1554" d:DesignWidth="3390"
|
||||||
Title="EtchingStationPage">
|
Title="EtchingStationPage">
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="20">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@@ -32,18 +33,19 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Etching Station 1" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="35" />
|
<Label Grid.Row="0" Grid.Column="0" Content="Ätzstation 1" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40" />
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding VacuumValveControlEtching1Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding VacuumValveControlEtching1Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveControlEtching1Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveControlEtching1Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveLeftEtching1Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveLeftEtching1Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveRightEtching1Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="4" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveRightEtching1Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveFrontEtching1Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="4" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveFrontEtching1Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveBackEtching1Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="4" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveBackEtching1Vm}"/>
|
||||||
|
|
||||||
<Button Grid.Row="1" Grid.Column="3" Content="Teller Entriegeln" DataContext="{Binding ChuckUnlockCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30" />
|
<Button Grid.Row="1" Grid.Column="3" Content="Teller Entriegeln" DataContext="{Binding ChuckUnlockCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30" />
|
||||||
<Button Grid.Row="2" Grid.Column="3" Content="Teller Verriegeln" DataContext="{Binding ChuckLockCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
<Button Grid.Row="2" Grid.Column="3" Content="Teller Verriegeln" DataContext="{Binding ChuckLockCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||||
<Button Grid.Row="3" Grid.Column="3" Content="Teller Auswerfen" DataContext="{Binding ChuckEjectCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
<Button Grid.Row="3" Grid.Column="3" Content="Teller Auswerfen" DataContext="{Binding ChuckEjectCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||||
|
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding Etching1PackMLControlVm}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class EtchingStation1Page : Page
|
|
||||||
{
|
|
||||||
public EtchingStation1Page()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class EtchingStation1Page : Page
|
||||||
}
|
{
|
||||||
}
|
public EtchingStation1Page()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,12 +5,13 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=local:EtchingStation2PageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=local:EtchingStation2PageVM, IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="1554" d:DesignWidth="3390"
|
||||||
Title="EtchingStationPage">
|
Title="EtchingStationPage">
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="20">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@@ -32,17 +33,18 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Etching Station 2" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="35" />
|
<Label Grid.Row="0" Grid.Column="0" Content="Ätzstation 2" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40" />
|
||||||
|
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding VacuumValveControlEtching2Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding VacuumValveControlEtching2Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveControlEtching2Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveControlEtching2Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveLeftEtching2Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveLeftEtching2Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveRightEtching2Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="4" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveRightEtching2Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveFrontEtching2Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="4" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveFrontEtching2Vm}"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveBackEtching2Vm}"/>
|
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="4" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveBackEtching2Vm}"/>
|
||||||
|
|
||||||
<Button Grid.Row="1" Grid.Column="3" Content="Teller Entriegeln" DataContext="{Binding ChuckUnlockCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
<Button Grid.Row="1" Grid.Column="3" Content="Teller Entriegeln" DataContext="{Binding ChuckUnlockCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||||
<Button Grid.Row="2" Grid.Column="3" Content="Teller Verriegeln" DataContext="{Binding ChuckLockCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
<Button Grid.Row="2" Grid.Column="3" Content="Teller Verriegeln" DataContext="{Binding ChuckLockCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||||
<Button Grid.Row="3" Grid.Column="3" Content="Teller Auswerfen" DataContext="{Binding ChuckEjectCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
<Button Grid.Row="3" Grid.Column="3" Content="Teller Auswerfen" DataContext="{Binding ChuckEjectCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding Etching2PackMLControlVm}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class EtchingStation2Page : Page
|
|
||||||
{
|
|
||||||
public EtchingStation2Page()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class EtchingStation2Page : Page
|
||||||
}
|
{
|
||||||
}
|
public EtchingStation2Page()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,24 +5,28 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=local:HighVoltageStationPageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=local:HighVoltageStationPageVM, IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="1554" d:DesignWidth="3390"
|
||||||
Title="High Voltage Test Station">
|
Title="High Voltage Test Station">
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="20">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
@@ -30,23 +34,26 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Hochvolt Test Station Heiß" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="35"/>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Hochvolt Test Stationen" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40" />
|
||||||
<Label Grid.Row="0" Grid.Column="3" Content="Hochvolt Test Station Kalt" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="35"/>
|
|
||||||
<Border Grid.Row="0" Grid.Column="2" Grid.RowSpan="9" BorderBrush="White" BorderThickness="0,0,1,0"></Border>
|
|
||||||
<Border Grid.Row="0" Grid.Column="3" Grid.RowSpan="9" BorderBrush="White" BorderThickness="1,0,0,0"></Border>
|
|
||||||
|
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveHotControlVm }"/>
|
<Label Grid.Row="0" Grid.Column="0" Content="Hochvolt Test Station Heiß" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="30"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="3" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveColdControlVm }"/>
|
<Label Grid.Row="0" Grid.Column="5" Content="Hochvolt Test Station Kalt" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="30"/>
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding TestChamberHotValveVm }"/>
|
|
||||||
<hmiToolkit:BinaryValveControl Grid.Column="4" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding TestChamberColdValveVm }"/>
|
<Border Grid.Row="0" Grid.Column="4" Grid.RowSpan="9" BorderBrush="White" BorderThickness="2,0,0,0" Margin="20 0 20 0 "/> <!--<Border Grid.Row="0" Grid.Column="4" Grid.RowSpan="9" BorderBrush="White" BorderThickness="1,0,0,0"></Border>-->
|
||||||
|
|
||||||
|
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="2" Margin="10" Grid.RowSpan="4" VerticalAlignment="Center" DataContext="{Binding DoorValveHotControlVm }"/>
|
||||||
|
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="2" Margin="10" Grid.RowSpan="4" VerticalAlignment="Center" DataContext="{Binding TestChamberHotValveVm }"/>
|
||||||
|
<hmiToolkit:BinaryValveControl Grid.Column="5" Grid.Row="2" Margin="10" Grid.RowSpan="4" VerticalAlignment="Center" DataContext="{Binding DoorValveColdControlVm }"/>
|
||||||
|
<hmiToolkit:BinaryValveControl Grid.Column="6" Grid.Row="2" Margin="10" Grid.RowSpan="4" VerticalAlignment="Center" DataContext="{Binding TestChamberColdValveVm }"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Grid.Row="1" FontSize="40" Content="Solltemperatur" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5"/>
|
||||||
|
<hmiToolkit:AnalogValue Grid.Column="1" Grid.Row="1" Height="60" Width="260" HorizontalAlignment="Left" Margin="5" VerticalAlignment="Center" DataContext="{Binding TempSPHotVm}"/>
|
||||||
|
<Label Grid.Column="5" Grid.Row="1" FontSize="40" Content="Solltemperatur" VerticalAlignment="Center" Margin="5"/>
|
||||||
|
<hmiToolkit:AnalogValue Grid.Column="6" Grid.Row="1" Height="60" Width="260" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TempSPColdVm}"/>
|
||||||
|
|
||||||
<Label Grid.Column="2" Grid.Row="1" FontSize="40" Content="Solltemperatur" HorizontalAlignment="left" Margin="5"/>
|
<common:PackMLControl Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding HighVoltageHotPackMLControlVm}"/>
|
||||||
<hmiToolkit:AnalogValue Grid.Column="2" Grid.Row="1" Height="60" Width="260" HorizontalAlignment="Left" Margin="60" VerticalAlignment="Center" DataContext="{Binding TempSPHotVm}"/>
|
<common:PackMLControl Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding HighVoltageColdPackMLControlVm}"/>
|
||||||
<Label Grid.Column="5" Grid.Row="1" FontSize="40" Content="Solltemperatur" Margin="5"/>
|
|
||||||
<hmiToolkit:AnalogValue Grid.Column="5" Grid.Row="1" Height="60" Width="260" Margin="60" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TempSPColdVm}"/>
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
</Grid>
|
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class HighVoltageStationPage : Page
|
|
||||||
{
|
|
||||||
public HighVoltageStationPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class HighVoltageStationPage : Page
|
||||||
}
|
{
|
||||||
}
|
public HighVoltageStationPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,18 +4,22 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=local:HotCoolPlatePageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=local:HotCoolPlatePageVM, IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="1554" d:DesignWidth="3390"
|
||||||
Title="HotCoolPlatePage">
|
Title="HotCoolPlatePage">
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="20">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@@ -31,31 +35,33 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.Row="0" Grid.RowSpan="9" Grid.Column="4" BorderBrush="WhiteSmoke" BorderThickness="2,0,0,0" />
|
<Border Grid.Row="0" Grid.RowSpan="9" Grid.Column="5" BorderBrush="WhiteSmoke" BorderThickness="2,0,0,0" />
|
||||||
<Border Grid.Row="0" Grid.RowSpan="9" Grid.Column="3" BorderBrush="WhiteSmoke" BorderThickness="0,0,2,0" />
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" FontSize="35" Content="Heizplatte" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
|
<Label Grid.Row="0" Grid.Column="0" FontSize="35" Content="Heizplatte" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
|
||||||
<Label Grid.Row="0" Grid.Column="4" FontSize="35" Content="Kühlplatte" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
|
<Label Grid.Row="0" Grid.Column="6" FontSize="35" Content="Kühlplatte" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
|
||||||
|
|
||||||
|
|
||||||
<Button Grid.Row="0" Grid.Column="1" Content="Einschalten" DataContext="{Binding EnableHotPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
<Button Grid.Row="0" Grid.Column="1" Content="Einschalten" DataContext="{Binding EnableHotPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||||
<Button Grid.Row="0" Grid.Column="2" Content="Ausschalten" DataContext="{Binding DisableHotPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
<Button Grid.Row="0" Grid.Column="2" Content="Ausschalten" DataContext="{Binding DisableHotPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||||
|
|
||||||
<Button Grid.Row="0" Grid.Column="5" Content="Einschalten" DataContext="{Binding EnableCoolPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
<Button Grid.Row="0" Grid.Column="7" Content="Einschalten" DataContext="{Binding EnableCoolPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||||
<Button Grid.Row="0" Grid.Column="6" Content="Ausschalten" DataContext="{Binding DisableCoolPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
<Button Grid.Row="0" Grid.Column="8" Content="Ausschalten" DataContext="{Binding DisableCoolPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||||
|
|
||||||
|
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding HotplatePackMLControlVm}"/>
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="9" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding CoolplatePackMLControlVm}"/>
|
||||||
|
|
||||||
<Label Grid.Row="2" Grid.Column="0" FontSize="35" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
<Label Grid.Row="2" Grid.Column="0" FontSize="35" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||||
<Label Grid.Row="2" Grid.Column="4" FontSize="35" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
<Label Grid.Row="2" Grid.Column="6" FontSize="35" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||||
|
|
||||||
<Label Grid.Row="1" Grid.Column="1" FontSize="40" Content="Temperatur Soll" VerticalAlignment="Top" HorizontalAlignment="Center"/>
|
<Label Grid.Row="1" Grid.Column="1" Content="Temperatur Soll" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="35"/>
|
||||||
<HMIToolkit:AnalogValue Grid.Column="1" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding HotPlateTargetTemperature}"/>
|
<HMIToolkit:AnalogValue Grid.Column="1" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding HotPlateTargetTemperature}"/>
|
||||||
<Label Grid.Row="1" Grid.Column="2" Content="Temperatur Ist" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40" />
|
<Label Grid.Row="1" Grid.Column="2" Content="Temperatur Ist" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="35" />
|
||||||
<HMIToolkit:AnalogValue Grid.Column="2" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding HotPlateActualTemperature}"/>
|
<HMIToolkit:AnalogValue Grid.Column="2" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding HotPlateActualTemperature}"/>
|
||||||
<Label Grid.Row="1" Grid.Column="5" Content="Temperatur Soll" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40"/>
|
<Label Grid.Row="1" Grid.Column="7" Content="Temperatur Soll" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="35"/>
|
||||||
<HMIToolkit:AnalogValue Grid.Column="5" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding CoolPlateTargetTemperature}"/>
|
<HMIToolkit:AnalogValue Grid.Column="7" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding CoolPlateTargetTemperature}"/>
|
||||||
<Label Grid.Row="1" Grid.Column="6" Content="Temperatur Ist" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40"/>
|
<Label Grid.Row="1" Grid.Column="8" Content="Temperatur Ist" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="35"/>
|
||||||
<HMIToolkit:AnalogValue Grid.Column="6" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding CoolPlateActualTemperature}"/>
|
<HMIToolkit:AnalogValue Grid.Column="8" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding CoolPlateActualTemperature}"/>
|
||||||
<Ellipse Grid.Column="0" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="0" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="2" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="2" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
@@ -75,24 +81,24 @@
|
|||||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
||||||
<Ellipse Grid.Column="2" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="2" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
||||||
|
|
||||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
|
||||||
<Ellipse Grid.Column="5" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
|
||||||
<Ellipse Grid.Column="6" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="6" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="4" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="7" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="5" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="8" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="7" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="5" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="8" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="6" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="6" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility1}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="7" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="5" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility2}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="8" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="6" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility3}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="6" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility1}" VerticalAlignment="Center" Width="120"/>
|
||||||
<Ellipse Grid.Column="4" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility4}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="7" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility2}" VerticalAlignment="Center" Width="120"/>
|
||||||
<Ellipse Grid.Column="5" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility5}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="8" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility3}" VerticalAlignment="Center" Width="120"/>
|
||||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility6}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility4}" VerticalAlignment="Center" Width="120"/>
|
||||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility7}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="7" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility5}" VerticalAlignment="Center" Width="120"/>
|
||||||
<Ellipse Grid.Column="5" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="8" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility6}" VerticalAlignment="Center" Width="120"/>
|
||||||
<Ellipse Grid.Column="6" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
<Ellipse Grid.Column="6" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility7}" VerticalAlignment="Center" Width="120"/>
|
||||||
|
<Ellipse Grid.Column="7" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
||||||
|
<Ellipse Grid.Column="8" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class HotCoolPlatePage : Page
|
|
||||||
{
|
|
||||||
public HotCoolPlatePage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class HotCoolPlatePage : Page
|
||||||
}
|
{
|
||||||
}
|
public HotCoolPlatePage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,166 +4,202 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=local:KukaRobotPageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=local:KukaRobotPageVM, IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="1600" d:DesignWidth="3800"
|
||||||
Title="KukaRobotPage">
|
Title="KukaRobotPage">
|
||||||
|
|
||||||
|
<Page.Resources>
|
||||||
|
<Style x:Name="RobotLabelStyle" x:Key="RobotLabelStyle" TargetType="Label">
|
||||||
|
<Setter Property="FontSize" Value="40"/>
|
||||||
|
<Setter Property="Margin" Value="5"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="RobotComboStyle" TargetType="ComboBox" BasedOn="{StaticResource MahApps.Styles.ComboBox}">
|
||||||
|
<Setter Property="FontSize" Value="40"/>
|
||||||
|
<Setter Property="Margin" Value="10"/>
|
||||||
|
<Setter Property="Height" Value="120"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="RobotTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource MahApps.Styles.TextBox}">
|
||||||
|
<Setter Property="FontSize" Value="40"/>
|
||||||
|
<Setter Property="Margin" Value="10"/>
|
||||||
|
<Setter Property="Height" Value="120"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="TextAlignment" Value="Right"/>
|
||||||
|
<Setter Property="MaxLines" Value="1"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</Page.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="750"/>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="40" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="500"/>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="40"/>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="500"/>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="40"/>
|
||||||
|
<ColumnDefinition Width="400"/>
|
||||||
|
<ColumnDefinition Width="360"/>
|
||||||
|
<ColumnDefinition Width="320"/>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition Height="250"/>
|
||||||
<RowDefinition />
|
<RowDefinition Height="250"/>
|
||||||
<RowDefinition />
|
<RowDefinition Height="250"/>
|
||||||
<RowDefinition />
|
<RowDefinition Height="250"/>
|
||||||
<RowDefinition />
|
<RowDefinition Height="250"/>
|
||||||
<RowDefinition />
|
<RowDefinition Height="250"/>
|
||||||
<RowDefinition />
|
<RowDefinition Height="50"/>
|
||||||
<RowDefinition />
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,1,4" Margin="5,5,0,5"/>
|
<StackPanel Grid.Row="0" Grid.Column="0">
|
||||||
<Border Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,1,4" Margin="0,5,0,5"/>
|
<Label Content="Roboter Jobnummer" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
<Border Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,1,4" Margin="0,5,0,5"/>
|
<ComboBox IsEnabled="{Binding CanChangeRobotJob}" ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding SelectedRobotJob}" Style="{StaticResource RobotComboStyle}"/>
|
||||||
<Border Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,4,4" Margin="0,5,5,5"/>
|
</StackPanel>
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Roboter Jobnummer" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" />
|
<StackPanel Grid.Row="0" Grid.Column="2">
|
||||||
<ComboBox Grid.Row="0" Grid.Column="1" Margin="10,15" IsEnabled="{Binding CanChangeRobotJob}" ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding SelectedRobotJob}"/>
|
<Label Content="Roboter aktiver Job " Style="{StaticResource RobotLabelStyle}"/>
|
||||||
<Label Grid.Row="0" Grid.Column="2" Content="Roboter aktiver Job " VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" />
|
<ComboBox ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding RobotJobActiveValue}" IsReadOnly="True" IsEnabled="False" Style="{StaticResource RobotComboStyle}"/>
|
||||||
<ComboBox Grid.Row="0" Grid.Column="3" Margin="10,15" ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding RobotJobActiveValue}" IsReadOnly="True" IsEnabled="False" />
|
</StackPanel>
|
||||||
<ComboBox Grid.Row="0" Grid.Column="5" Margin="10,15" ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding RobotJobFinishedValue}" IsReadOnly="True" IsEnabled="False"/>
|
|
||||||
<Label Grid.Row="0" Grid.Column="4" Content="Roboter Job fertig " VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" />
|
|
||||||
|
|
||||||
<Button Grid.Row="0" Grid.Column="6" Command="{Binding StartRobotJobCommand}" Content="Start" Margin="10,15,10,15" />
|
<StackPanel Grid.Row="0" Grid.Column="4">
|
||||||
<Button Grid.Row="0" Grid.Column="7" Command="{Binding AbortRobotJobCommand}" Content="Abbruch" Margin="10,15,15,15" />
|
<Label Content="Roboter Job fertig " Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding RobotJobFinishedValue}" IsReadOnly="True" IsEnabled="False" Style="{StaticResource RobotComboStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="0" Grid.Column="6" Grid.RowSpan="2">
|
||||||
|
<Label Content="Roboter Job" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<Button Height="120" Command="{Binding StartRobotJobCommand}" Content="Start" Margin="10" FontSize="30"/>
|
||||||
|
<Button Height="120" Command="{Binding AbortRobotJobCommand}" Content="Abbruch" Margin="10" FontSize="30" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Row="1" Grid.Column="0">
|
||||||
|
<Label Content="Greiferseite für Job:" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeJobGrippSide}" Text="{Binding JobGrippSide}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="1" Grid.Column="2">
|
||||||
|
<Label FontSize="40" Content="Greifertyp:" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeJobGrippType}" Text="{Binding JobGrippType}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="1" Grid.Column="4">
|
||||||
|
<Label Content="Drehteller Magazinplatz:" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeChuckMagazinPlace}" Text="{Binding ChuckMagazinPlace}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="2" Grid.Column="0">
|
||||||
|
<Label Content="Teiledicke in mm: " Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangePieceThickness}" Text="{Binding PieceThickness}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="3" Grid.Column="0">
|
||||||
|
<Label Content="Angefragter Sps Job :" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding PLCJobs}" SelectedItem="{Binding SelectedPLCJob}" IsReadOnly="True" IsEnabled="False" Style="{StaticResource RobotComboStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="2" Grid.Column="2">
|
||||||
|
<Label Content="Offset Abholen in mm (X):" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_X}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="2" Grid.Column="4">
|
||||||
|
<Label Content="Offset Abholen in mm (Y):" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_Y}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="3" Grid.Column="2">
|
||||||
|
<Label Content="Offset Ablegen in mm (X):" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_X}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="3" Grid.Column="4">
|
||||||
|
<Label Content="Offset Ablegen in mm (Y):" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_Y}" Style="{StaticResource RobotTextBoxStyle}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="4" Grid.Column="2">
|
||||||
|
<Label Content="Offset NIO Abholen in mm (X):" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_X}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="4" Grid.Column="4">
|
||||||
|
<Label Content="Offset NIO Abholen in mm (Y):" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_Y}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="5" Grid.Column="2">
|
||||||
|
<Label Content="Offset NIO Ablegen in mm (X):" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_X}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4" Margin="5" />
|
<StackPanel Grid.Row="5" Grid.Column="4">
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Greiferseite für Job:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
<Label Content="Offset NIO Ablegen in mm (Y):" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" IsEnabled="{Binding CanChangeJobGrippSide}" Text="{Binding JobGrippSide}" MaxLines="1" Margin="10,15,15,15" TextAlignment="Right"/>
|
<TextBox IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_Y}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="4" Grid.Column="0">
|
||||||
|
<Label Content="Platz Heizplatte (1-9)" Style="{StaticResource RobotLabelStyle}" />
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeHotPlateIndex}" Text="{Binding HotplateIndex}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="5" Grid.Column="0">
|
||||||
|
<Label Content="Platz Kühlplatte (1-9)" Style="{StaticResource RobotLabelStyle}"/>
|
||||||
|
<TextBox IsEnabled="{Binding CanChangeCoolPlateIndex}" Text="{Binding CoolplateIndex}" Style="{StaticResource RobotTextBoxStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="4" Width="Auto" Margin="20 20 0 20" DataContext="{Binding KukaRobotPackMLControlVm}"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="3" Grid.Column="6" Grid.ColumnSpan="2" Content="Magazinbelegung:" Style="{StaticResource RobotLabelStyle}" VerticalAlignment="Bottom" />
|
||||||
|
|
||||||
|
<Border Grid.Column="6" Grid.Row="4" Grid.RowSpan="3" Grid.ColumnSpan="3" BorderBrush="White" BorderThickness="4">
|
||||||
|
<Grid >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="10"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="10"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="80"/>
|
||||||
|
<RowDefinition Height="180"/>
|
||||||
|
<RowDefinition Height="10"/>
|
||||||
|
<RowDefinition Height="80"/>
|
||||||
|
<RowDefinition Height="180"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
|
||||||
<Border Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4" Margin="5" />
|
<Label Grid.Row="0" Grid.Column="0" Content="Tellerplatz 1" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="35" />
|
||||||
<Label Grid.Row="1" Grid.Column="2" Content="Greifertyp:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
<Ellipse Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="3" IsEnabled="{Binding CanChangeJobGrippType}" Text="{Binding JobGrippType}" MaxLines="1" Margin="10,15,15,15" TextAlignment="Right"/>
|
<Ellipse Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace1}" VerticalAlignment="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="2" Content="Tellerplatz 2" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="35" />
|
||||||
|
<Ellipse Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center"/>
|
||||||
|
<Ellipse Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace2}" VerticalAlignment="Center" />
|
||||||
|
|
||||||
<Border Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4" Margin="5" />
|
<Label Grid.Row="0" Grid.Column="4" Content="Tellerplatz 3" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="35" />
|
||||||
<Label Grid.Row="1" Grid.Column="4" Content="Drehteller Magazinplatz:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
<Ellipse Grid.Column="4" Grid.Row="1" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="5" IsEnabled="{Binding CanChangeChuckMagazinPlace}" Text="{Binding ChuckMagazinPlace}" MaxLines="1" Margin="10,15,15,15" TextAlignment="Right"/>
|
<Ellipse Grid.Column="4" Grid.Row="1" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace3}" VerticalAlignment="Center" />
|
||||||
|
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="Tellerplatz 4" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="35" />
|
||||||
|
<Ellipse Grid.Column="0" Grid.Row="4" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center"/>
|
||||||
|
<Ellipse Grid.Column="0" Grid.Row="4" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace4}" VerticalAlignment="Center" />
|
||||||
|
|
||||||
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,4,4" Margin="5,5,5,5"/>
|
<Label Grid.Row="3" Grid.Column="2" Content="Tellerplatz 5" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="35" />
|
||||||
<Label Grid.Row="2" Grid.Column="0" Content="Teiledicke in mm: " VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
<Ellipse Grid.Column="2" Grid.Row="4" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center"/>
|
||||||
<TextBox Grid.Row="2" Grid.Column="1" IsEnabled="{Binding CanChangePieceThickness}" Text="{Binding PieceThickness}" MaxLines="1" Margin="10,15,15,15" TextAlignment="Right"/>
|
<Ellipse Grid.Column="2" Grid.Row="4" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace5}" VerticalAlignment="Center" />
|
||||||
|
|
||||||
|
<Label Grid.Row="3" Grid.Column="4" Content="Tellerplatz 6" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="35" />
|
||||||
<Border Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,4,4" Margin="5,5,5,5"/>
|
<Ellipse Grid.Column="4" Grid.Row="4" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center"/>
|
||||||
<Label Grid.Row="3" Grid.Column="0" Content="Angefragter Sps Job :" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" />
|
<Ellipse Grid.Column="4" Grid.Row="4" HorizontalAlignment="Center" Height="150" Width="150" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace6}" VerticalAlignment="Center"/>
|
||||||
<ComboBox Grid.Row="3" Grid.Column="1" Margin="10,15,15,15" ItemsSource="{Binding PLCJobs}" SelectedItem="{Binding SelectedPLCJob}" IsReadOnly="True" IsEnabled="False"/>
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
<Border Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,4,4" Margin="5,5,5,5"/>
|
|
||||||
<Label Grid.Row="4" Grid.Column="0" Content="Aktueller Status der Statemachine" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" />
|
|
||||||
<ComboBox Grid.Row="4" Grid.Column="1" Margin="10,15,15,10" ItemsSource="{Binding StatemachineStates}" SelectedItem="{Binding ActiveState}" IsReadOnly="True" />
|
|
||||||
<Button Grid.Row="5" Grid.Column="0" Command="{Binding ClearStateCommand}" Content="Clear" Margin="15,15,10,15" />
|
|
||||||
<Button Grid.Row="5" Grid.Column="1" Command="{Binding ResetStateCommand}" Content="Reset" Margin="10,15,15,15" />
|
|
||||||
|
|
||||||
<Border Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,1,1" Margin="5,5,0,0"/>
|
|
||||||
<Border Grid.Row="2" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,4,1" Margin="0,5,5,0"/>
|
|
||||||
<Label Grid.Row="2" Grid.Column="2" Content="Offset Abholen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
|
||||||
<Label Grid.Row="2" Grid.Column="4" Content="Offset Abholen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_Y}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_X}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
|
||||||
<Border Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,1" Margin="5,0,0,0"/>
|
|
||||||
<Border Grid.Row="3" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,1" Margin="0,0,5,0"/>
|
|
||||||
<Label Grid.Row="3" Grid.Column="2" Content="Offset Ablegen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
|
||||||
<Label Grid.Row="3" Grid.Column="4" Content="Offset Ablegen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
||||||
<TextBox Grid.Row="3" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_Y}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
|
||||||
<TextBox Grid.Row="3" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_X}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
|
||||||
|
|
||||||
<Border Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,1" Margin="5,0,0,0"/>
|
|
||||||
<Border Grid.Row="4" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,1" Margin="0,0,5,0"/>
|
|
||||||
<Label Grid.Row="4" Grid.Column="2" Content="Offset NIO Abholen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
|
||||||
<Label Grid.Row="4" Grid.Column="4" Content="Offset NIO Abholen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_Y}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_X}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
|
||||||
|
|
||||||
<Border Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,4" Margin="5,0,0,5"/>
|
|
||||||
<Border Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,4" Margin="0,0,5,5"/>
|
|
||||||
<Label Grid.Row="5" Grid.Column="2" Content="Offset NIO Ablegen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
|
||||||
<Label Grid.Row="5" Grid.Column="4" Content="Offset NIO Ablegen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
||||||
<TextBox Grid.Row="5" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_Y}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
|
||||||
<TextBox Grid.Row="5" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_X}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Border Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,4,1" Margin="5,5,5,0"/>
|
|
||||||
<Border Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,4,4" Margin="5,0,5,5"/>
|
|
||||||
<Label Grid.Row="6" Grid.Column="0" Content="Platz Heizplatte (1-9)" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,5,0,0" />
|
|
||||||
<Label Grid.Row="7" Grid.Column="0" Content="Platz Kühlplatte (1-9)" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,5"/>
|
|
||||||
<TextBox Grid.Row="6" Grid.Column="1" IsEnabled="{Binding CanChangeHotPlateIndex}" Text="{Binding HotplateIndex}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
|
||||||
<TextBox Grid.Row="7" Grid.Column="1" IsEnabled="{Binding CanChangeCoolPlateIndex}" Text="{Binding CoolplateIndex}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
|
||||||
|
|
||||||
<Label Grid.Row="6" Grid.Column="3" Content="Magazinbelegung: " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
|
||||||
|
|
||||||
|
|
||||||
<Grid Grid.Column ="4" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="4" >
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Tellerplatz 1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
|
||||||
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2" Content="Tellerplatz 2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
|
||||||
<Label Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" Content="Tellerplatz 3" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
|
||||||
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="Tellerplatz 4" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
|
||||||
<Label Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="2" Content="Tellerplatz 5" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
|
||||||
<Label Grid.Row="3" Grid.Column="6" Grid.ColumnSpan="2" Content="Tellerplatz 6" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
|
||||||
|
|
||||||
<Ellipse Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
|
||||||
<Ellipse Grid.Column="3" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
|
||||||
<Ellipse Grid.Column="6" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
|
||||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
|
||||||
<Ellipse Grid.Column="3" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
|
||||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
|
||||||
<Ellipse Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace1}" VerticalAlignment="Center" Width="80"/>
|
|
||||||
<Ellipse Grid.Column="3" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace2}" VerticalAlignment="Center" Width="80"/>
|
|
||||||
<Ellipse Grid.Column="6" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace3}" VerticalAlignment="Center" Width="80"/>
|
|
||||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace4}" VerticalAlignment="Center" Width="80"/>
|
|
||||||
<Ellipse Grid.Column="3" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace5}" VerticalAlignment="Center" Width="80"/>
|
|
||||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace6}" VerticalAlignment="Center" Width="80"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class KukaRobotPage : Page
|
|
||||||
{
|
|
||||||
public KukaRobotPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class KukaRobotPage : Page
|
||||||
}
|
{
|
||||||
}
|
public KukaRobotPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,103 +4,125 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=uniperHmi:MachineOverviewPageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=uniperHmi:MachineOverviewPageVM, IsDesignTimeCreatable=True}"
|
||||||
Title="Production Overview">
|
Title="Production Overview">
|
||||||
|
|
||||||
<Viewbox Stretch="none">
|
<Grid Width="3840" Height="1554">
|
||||||
<Grid Width="3840" Height="1650">
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.12*"/>
|
<ColumnDefinition Width="450"/>
|
||||||
<ColumnDefinition Width="0.93*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Column="0" Margin="25 0 0 0">
|
<Image Grid.Column="1" Source="/Anlagenuebersicht.png" Stretch="Fill" Height="1504" Width="1936"/>
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Button Grid.Row="0"
|
|
||||||
Margin="5"
|
|
||||||
FontSize="36"
|
|
||||||
FontFamily="Arial"
|
|
||||||
Content="Trayfeeder
Ein-/Ausgabe"
|
|
||||||
Command="{Binding TrayfeederPageClickedCommand}"/>
|
|
||||||
|
|
||||||
<Button Grid.Row="1"
|
|
||||||
Margin="5"
|
|
||||||
FontSize="39"
|
|
||||||
Content="Ausrichtstation"
|
|
||||||
Command="{Binding AlignerPageClickedCommand}"/>
|
|
||||||
|
|
||||||
<Button Grid.Row="2"
|
|
||||||
Margin="5"
|
|
||||||
FontSize="36"
|
|
||||||
Content="Ätzer 1"
|
|
||||||
Command="{Binding Etching1PageClickedCommand}"/>
|
|
||||||
|
|
||||||
<Button Grid.Row="3"
|
|
||||||
Margin="5"
|
|
||||||
FontSize="36"
|
|
||||||
Content="Ätzer 2"
|
|
||||||
Command="{Binding Etching2PageClickedCommand}"/>
|
|
||||||
|
|
||||||
<Button Grid.Row="4"
|
|
||||||
Margin="5"
|
|
||||||
FontSize="36"
|
|
||||||
Content="HV Test"
|
|
||||||
Command="{Binding HVTestPageClickedCommand}"/>
|
|
||||||
|
|
||||||
<Button Grid.Row="5"
|
|
||||||
Margin="5"
|
|
||||||
FontSize="36"
|
|
||||||
Content="Heiz-
/Kühlplatte"
|
|
||||||
Command="{Binding HotCoolplatePageClickedCommand}"/>
|
|
||||||
|
|
||||||
<Button Grid.Row="6"
|
|
||||||
Margin="5"
|
|
||||||
FontSize="36"
|
|
||||||
Content="NOK Station"
|
|
||||||
Command="{Binding NIOStationPageClickedCommand}"/>
|
|
||||||
|
|
||||||
<Border Grid.Row="7"
|
|
||||||
BorderBrush="White"
|
|
||||||
BorderThickness="0,5,0,0"/>
|
|
||||||
|
|
||||||
<Button Grid.Row="7"
|
|
||||||
Margin="5,15,5,5"
|
|
||||||
FontSize="36" Content="Kuka Roboter"
|
|
||||||
Command="{Binding KukaPageClickedCommand}"/>
|
|
||||||
|
|
||||||
<Button Grid.Row="8"
|
|
||||||
Margin="5"
|
|
||||||
FontSize="36"
|
|
||||||
FontFamily="Arial"
|
|
||||||
Content="Medienschrank"
|
|
||||||
Command="{Binding MediaCabinetPageClickedCommand}"/>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
<!-- DETAIL PAGE -->
|
<!-- DETAIL PAGE -->
|
||||||
|
|
||||||
|
|
||||||
<Frame x:Name="DetailFrame"
|
<Frame x:Name="DetailFrame"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
NavigationUIVisibility="Hidden"
|
NavigationUIVisibility="Hidden"
|
||||||
Content="{Binding CurrentDetailPage}"/>
|
Content="{Binding CurrentDetailPage}"/>
|
||||||
|
|
||||||
<Image Grid.Column="1" Source="/Anlagenuebersicht.png" Stretch="Fill" Height="1504" Width="1936"/>
|
<Grid Grid.Column="0">
|
||||||
<Button Command="{Binding TrayfeederPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2203,572,820,780"/>
|
<Grid.RowDefinitions>
|
||||||
<Button Command="{Binding KukaPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1822,610,1380,780"/>
|
<RowDefinition Height="Auto" />
|
||||||
<Button Command="{Binding Etching1PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1480,819,1749,644" RenderTransformOrigin="0.5,0.5">
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageTrayFeeder}" Grid.Row="0"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="36"
|
||||||
|
FontFamily="Arial"
|
||||||
|
Content="Trayfeeder
Ein-/Ausgabe"
|
||||||
|
Command="{Binding TrayfeederPageClickedCommand}"/>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageAlignment}"
|
||||||
|
Grid.Row="1"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="39"
|
||||||
|
Content="Ausrichtstation"
|
||||||
|
Command="{Binding AlignerPageClickedCommand}"/>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageEtching1}"
|
||||||
|
Grid.Row="2"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="36"
|
||||||
|
Content="Ätzer 1"
|
||||||
|
Command="{Binding Etching1PageClickedCommand}"/>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageEtching2}"
|
||||||
|
Grid.Row="3"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="36"
|
||||||
|
Content="Ätzer 2"
|
||||||
|
Command="{Binding Etching2PageClickedCommand}"/>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageHighVoltage}"
|
||||||
|
Grid.Row="4"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="36"
|
||||||
|
Content="HV Test"
|
||||||
|
Command="{Binding HVTestPageClickedCommand}"/>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageHotCoolplate}"
|
||||||
|
Grid.Row="5"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="36"
|
||||||
|
Content="Heiz-
/Kühlplatte"
|
||||||
|
Command="{Binding HotCoolplatePageClickedCommand}"/>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageNIOStation}"
|
||||||
|
Grid.Row="6"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="36"
|
||||||
|
Content="NOK Station"
|
||||||
|
Command="{Binding NIOStationPageClickedCommand}"/>
|
||||||
|
|
||||||
|
<Border Grid.Row="7"
|
||||||
|
Margin="5"
|
||||||
|
BorderBrush="White"
|
||||||
|
BorderThickness="0,5,0,0"/>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageKukaRobot}"
|
||||||
|
Grid.Row="8"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="36" Content="Kuka Roboter"
|
||||||
|
Command="{Binding KukaPageClickedCommand}"/>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageMediaCabinet}"
|
||||||
|
Grid.Row="9"
|
||||||
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
|
FontSize="36"
|
||||||
|
FontFamily="Arial"
|
||||||
|
Content="Medienschrank"
|
||||||
|
Command="{Binding MediaCabinetPageClickedCommand}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageTrayFeeder}"
|
||||||
|
Command="{Binding TrayfeederPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2203,572,820,780"/>
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageKukaRobot}"
|
||||||
|
Command="{Binding KukaPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1822,610,1380,780"/>
|
||||||
|
<Button IsEnabled="{Binding CanUserChangePageEtching1}"
|
||||||
|
Command="{Binding Etching1PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1480,819,1749,644" RenderTransformOrigin="0.5,0.5">
|
||||||
<Button.RenderTransform>
|
<Button.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<ScaleTransform/>
|
<ScaleTransform/>
|
||||||
@@ -109,7 +131,8 @@
|
|||||||
</TransformGroup>
|
</TransformGroup>
|
||||||
</Button.RenderTransform>
|
</Button.RenderTransform>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding Etching2PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1431,473,1770,971" RenderTransformOrigin="0.5,0.5">
|
<Button IsEnabled="{Binding CanUserChangePageEtching2}"
|
||||||
|
Command="{Binding Etching2PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1431,473,1770,971" RenderTransformOrigin="0.5,0.5">
|
||||||
<Button.RenderTransform>
|
<Button.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<ScaleTransform/>
|
<ScaleTransform/>
|
||||||
@@ -118,7 +141,8 @@
|
|||||||
</TransformGroup>
|
</TransformGroup>
|
||||||
</Button.RenderTransform>
|
</Button.RenderTransform>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding HVTestPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1706,183,1472,1202" RenderTransformOrigin="0.5,0.5">
|
<Button IsEnabled="{Binding CanUserChangePageHighVoltage}"
|
||||||
|
Command="{Binding HVTestPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1706,183,1472,1202" RenderTransformOrigin="0.5,0.5">
|
||||||
<Button.RenderTransform>
|
<Button.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<ScaleTransform/>
|
<ScaleTransform/>
|
||||||
@@ -127,7 +151,8 @@
|
|||||||
</TransformGroup>
|
</TransformGroup>
|
||||||
</Button.RenderTransform>
|
</Button.RenderTransform>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding HotCoolplatePageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2039,316,1175,1106" RenderTransformOrigin="0.5,0.5">
|
<Button IsEnabled="{Binding CanUserChangePageHotCoolplate}"
|
||||||
|
Command="{Binding HotCoolplatePageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2039,316,1175,1106" RenderTransformOrigin="0.5,0.5">
|
||||||
<Button.RenderTransform>
|
<Button.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<ScaleTransform/>
|
<ScaleTransform/>
|
||||||
@@ -136,9 +161,11 @@
|
|||||||
</TransformGroup>
|
</TransformGroup>
|
||||||
</Button.RenderTransform>
|
</Button.RenderTransform>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding MediaCabinetPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="878,565,2350,641"/>
|
<Button IsEnabled="{Binding CanUserChangePageMediaCabinet}"
|
||||||
|
Command="{Binding MediaCabinetPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="878,565,2350,641"/>
|
||||||
|
|
||||||
<Button Command="{Binding AlignerPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1633,1048,1594,474" RenderTransformOrigin="0.5,0.5">
|
<Button IsEnabled="{Binding CanUserChangePageAlignment}"
|
||||||
|
Command="{Binding AlignerPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1633,1048,1594,474" RenderTransformOrigin="0.5,0.5">
|
||||||
<Button.RenderTransform>
|
<Button.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<ScaleTransform/>
|
<ScaleTransform/>
|
||||||
@@ -148,7 +175,8 @@
|
|||||||
</TransformGroup>
|
</TransformGroup>
|
||||||
</Button.RenderTransform>
|
</Button.RenderTransform>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding NIOStationPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1707,932,1543,601" RenderTransformOrigin="0.5,0.5">
|
<Button IsEnabled="{Binding CanUserChangePageNIOStation}"
|
||||||
|
Command="{Binding NIOStationPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1707,932,1543,601" RenderTransformOrigin="0.5,0.5">
|
||||||
<Button.RenderTransform>
|
<Button.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<ScaleTransform/>
|
<ScaleTransform/>
|
||||||
@@ -158,6 +186,11 @@
|
|||||||
</TransformGroup>
|
</TransformGroup>
|
||||||
</Button.RenderTransform>
|
</Button.RenderTransform>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<common:PackMLControl Margin="20 7 10 5"
|
||||||
|
IsEnabled="{Binding CanUserInteract}"
|
||||||
|
Grid.Column="1"
|
||||||
|
DataContext="{Binding MachinePackMLControlVM}" HorizontalAlignment="Left" VerticalAlignment="Top" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Viewbox>
|
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MachineOverviewPage : Page
|
public partial class MachineOverviewPage : Page
|
||||||
{
|
{
|
||||||
public MachineOverviewPage()
|
public MachineOverviewPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// Unloaded += OnUnloaded;
|
// Unloaded += OnUnloaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var disposable = DataContext as IDisposable;
|
|
||||||
disposable?.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -20,19 +20,20 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="2*"/>
|
<RowDefinition Height="4*"/>
|
||||||
<RowDefinition Height="33*" />
|
<RowDefinition Height="30*" />
|
||||||
<RowDefinition Height="33*" />
|
<RowDefinition Height="30*" />
|
||||||
<RowDefinition Height="33*" />
|
<RowDefinition Height="33*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Mediacabinet Page" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
<Label Grid.Row="0" Grid.Column="0" Content="Mediacabinet Page" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="35" />
|
||||||
|
|
||||||
<common:MediaContainer Grid.Row="1" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container1Vm}"/>
|
<common:MediaContainer Grid.Row="1" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container1Vm}"/>
|
||||||
<common:MediaContainer Grid.Row="2" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container2Vm}"/>
|
<common:MediaContainer Grid.Row="2" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container2Vm}"/>
|
||||||
<common:MediaContainer Grid.Row="3" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container3Vm}"/>
|
<common:MediaContainer Grid.Row="3" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container3Vm}"/>
|
||||||
|
|
||||||
|
|
||||||
<common:MediaContainer Grid.Row="1" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container4Vm}"/>
|
|
||||||
|
<common:MediaContainer Grid.Row="1" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container4Vm}"/>
|
||||||
<common:MediaContainer Grid.Row="2" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container5Vm}"/>
|
<common:MediaContainer Grid.Row="2" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container5Vm}"/>
|
||||||
<common:MediaContainer Grid.Row="3" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container6Vm}"/>
|
<common:MediaContainer Grid.Row="3" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container6Vm}"/>
|
||||||
|
|
||||||
@@ -41,5 +42,9 @@
|
|||||||
<common:MediaContainer Grid.Row="2" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container8Vm}"/>
|
<common:MediaContainer Grid.Row="2" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container8Vm}"/>
|
||||||
<common:MediaContainer Grid.Row="3" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container9Vm}"/>
|
<common:MediaContainer Grid.Row="3" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container9Vm}"/>
|
||||||
|
|
||||||
|
<common:MediaContainer Grid.Row="1" Grid.Column="3" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container10Vm}"/>
|
||||||
|
<common:MediaContainer Grid.Row="2" Grid.Column="3" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container11Vm}"/>
|
||||||
|
<common:MediaContainer Grid.Row="3" Grid.Column="3" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container12Vm}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class MediaCabinetPage : Page
|
|
||||||
{
|
|
||||||
public MediaCabinetPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class MediaCabinetPage : Page
|
||||||
}
|
{
|
||||||
}
|
public MediaCabinetPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,13 +4,15 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.NIOStationPage"
|
xmlns:HMIToolkit="clr-namespace:HMIToolkit"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
|
x:Class="InfineonHMI.NIOStationPage"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:NIOStationPageVM}}"
|
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:NIOStationPageVM}}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="1554" d:DesignWidth="3390"
|
||||||
Title="NIOStationPage">
|
Title="NIOStationPage">
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="20">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@@ -31,16 +33,16 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="NOK Station" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40" />
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="NIO Station" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
|
||||||
<HMIToolkit:BinaryValveControl DataContext="{Binding ClampDiagValveVm}" Grid.Column="0" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
<HMIToolkit:BinaryValveControl DataContext="{Binding ClampDiagValveVm}" Grid.Column="0" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
||||||
<HMIToolkit:BinaryValveControl DataContext="{Binding ClampAcrossValveVm}" Grid.Column="1" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
<HMIToolkit:BinaryValveControl DataContext="{Binding ClampAcrossValveVm}" Grid.Column="1" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
||||||
|
|
||||||
<Button Grid.Row="1" Grid.Column="2" Content="Tray Fixieren" DataContext="{Binding ClampCmdButtonVm}" HorizontalAlignment="Center" Width="180" Height="60" />
|
<Button Grid.Row="1" Grid.Column="2" Content="Tray Fixieren" DataContext="{Binding ClampCmdButtonVm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30" />
|
||||||
<Button Grid.Row="2" Grid.Column="2" Content="Tray Lösen" DataContext="{Binding UnclampCmdButtonVm}" HorizontalAlignment="Center" Width="180" Height="60" />
|
<Button Grid.Row="2" Grid.Column="2" Content="Tray Lösen" DataContext="{Binding UnclampCmdButtonVm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30" />
|
||||||
|
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding NIOStationPackMLControlVm}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class NIOStationPage : Page
|
|
||||||
{
|
|
||||||
public NIOStationPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class NIOStationPage : Page
|
||||||
}
|
{
|
||||||
}
|
public NIOStationPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,80 +8,91 @@
|
|||||||
d:DataContext="{d:DesignInstance Type=uniperHmi:ProductionOverviewPageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=uniperHmi:ProductionOverviewPageVM, IsDesignTimeCreatable=True}"
|
||||||
Title="Production Overview">
|
Title="Production Overview">
|
||||||
|
|
||||||
<Viewbox Stretch="none">
|
|
||||||
<Grid Width="3840" Height="1650">
|
<Grid Width="3840" Height="1554">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.12*"/>
|
<ColumnDefinition Width="450"/>
|
||||||
<ColumnDefinition Width="0.93*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Column="0" Margin="25 0 0 0">
|
<Grid Grid.Column="0" >
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Button Grid.Row="0"
|
<Button Grid.Row="0"
|
||||||
Margin="5"
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
FontSize="36"
|
FontSize="36"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
Content="Trayfeeder
Ein-/Ausgabe"
|
Content="Trayfeeder
Ein-/Ausgabe"
|
||||||
Command="{Binding TrayfeederPageClickedCommand}"/>
|
Command="{Binding TrayfeederPageClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Row="1"
|
<Button Grid.Row="1"
|
||||||
|
Height="160"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
FontSize="39"
|
FontSize="39"
|
||||||
Content="Ausrichtstation"
|
Content="Ausrichtstation"
|
||||||
Command="{Binding AlignerPageClickedCommand}"/>
|
Command="{Binding AlignerPageClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Row="2"
|
<Button Grid.Row="2"
|
||||||
|
Height="160"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
FontSize="36"
|
FontSize="36"
|
||||||
Content="Ätzer 1"
|
Content="Ätzer 1"
|
||||||
Command="{Binding Etching1PageClickedCommand}"/>
|
Command="{Binding Etching1PageClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Row="3"
|
<Button Grid.Row="3"
|
||||||
|
Height="160"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
FontSize="36"
|
FontSize="36"
|
||||||
Content="Ätzer 2"
|
Content="Ätzer 2"
|
||||||
Command="{Binding Etching2PageClickedCommand}"/>
|
Command="{Binding Etching2PageClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Row="4"
|
<Button Grid.Row="4"
|
||||||
|
Height="160"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
FontSize="36"
|
FontSize="36"
|
||||||
Content="HV Test"
|
Content="HV Test"
|
||||||
Command="{Binding HVTestPageClickedCommand}"/>
|
Command="{Binding HVTestPageClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Row="5"
|
<Button Grid.Row="5"
|
||||||
|
Height="160"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
FontSize="36"
|
FontSize="36"
|
||||||
Content="Heiz-
/Kühlplatte"
|
Content="Heiz-
/Kühlplatte"
|
||||||
Command="{Binding HotCoolplatePageClickedCommand}"/>
|
Command="{Binding HotCoolplatePageClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Row="6"
|
<Button Grid.Row="6"
|
||||||
|
Height="160"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
FontSize="36"
|
FontSize="36"
|
||||||
Content="NOK Station"
|
Content="NOK Station"
|
||||||
Command="{Binding NIOStationPageClickedCommand}"/>
|
Command="{Binding NIOStationPageClickedCommand}"/>
|
||||||
|
|
||||||
<Border Grid.Row="7"
|
<Border Grid.Row="7"
|
||||||
BorderBrush="White"
|
Margin="5"
|
||||||
BorderThickness="0,5,0,0"/>
|
BorderBrush="White"
|
||||||
|
BorderThickness="0,5,0,0"/>
|
||||||
|
|
||||||
<Button Grid.Row="7"
|
<Button Grid.Row="8"
|
||||||
Margin="5,15,5,5"
|
Height="160"
|
||||||
|
Margin="5"
|
||||||
FontSize="36" Content="Kuka Roboter"
|
FontSize="36" Content="Kuka Roboter"
|
||||||
Command="{Binding KukaPageClickedCommand}"/>
|
Command="{Binding KukaPageClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Row="8"
|
<Button Grid.Row="9"
|
||||||
|
Height="160"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
FontSize="36"
|
FontSize="36"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
@@ -96,5 +107,4 @@
|
|||||||
Content="{Binding CurrentDetailPage}"/>
|
Content="{Binding CurrentDetailPage}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Viewbox>
|
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class ProductionOverviewPage : Page
|
|
||||||
{
|
|
||||||
public ProductionOverviewPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class ProductionOverviewPage : Page
|
||||||
}
|
{
|
||||||
}
|
public ProductionOverviewPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,19 @@
|
|||||||
xmlns:common="clr-namespace:Common"
|
xmlns:common="clr-namespace:Common"
|
||||||
d:DataContext="{d:DesignInstance Type=uniperHmi:ReceipePageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=uniperHmi:ReceipePageVM, IsDesignTimeCreatable=True}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="1900" d:DesignWidth="3800">
|
d:DesignHeight="1554" d:DesignWidth="3840">
|
||||||
|
|
||||||
<Page.Resources>
|
<Page.Resources>
|
||||||
<CollectionViewSource x:Key="FlowStations" Source="{Binding FlowStationsVm}"></CollectionViewSource>
|
<CollectionViewSource x:Key="FlowStations" Source="{Binding FlowStationsVm}"/>
|
||||||
|
<Style x:Key="Foo" TargetType="DataGridCell">
|
||||||
|
<Setter Property="FontSize" Value="30"/>
|
||||||
|
</Style>
|
||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="33*"/>
|
<ColumnDefinition Width="0.25*"/>
|
||||||
<ColumnDefinition Width="33*"/>
|
<ColumnDefinition Width="0.25*"/>
|
||||||
<ColumnDefinition Width="17*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="17*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -40,34 +42,40 @@
|
|||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal">
|
||||||
<Button Grid.Row="0" x:Name="BtnReadReceipeFile"
|
<Button Grid.Row="0" x:Name="BtnReadReceipeFile"
|
||||||
Content="Rezept aus Datei Laden"
|
Content="Rezept aus Datei Laden"
|
||||||
Width="120"
|
Width="450" Height="140" FontSize="30"
|
||||||
Command="{Binding ReadReceipeFileCommand}"
|
Command="{Binding ReadReceipeFileCommand}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Margin="10"/>
|
Margin="10"/>
|
||||||
|
|
||||||
<Button Grid.Row="0" x:Name="BtnWriteReceipeFile"
|
<Button Grid.Row="0" x:Name="BtnWriteReceipeFile"
|
||||||
Content="Rezept speichern"
|
Content="Rezept speichern"
|
||||||
Width="120"
|
Width="450" Height="140" FontSize="30"
|
||||||
Command="{Binding WriteReceipeFileCommand}"
|
Command="{Binding WriteReceipeFileCommand}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Margin="10"/>
|
Margin="10"/>
|
||||||
<Button Grid.Row="0" x:Name="BtnWriteToPlc"
|
<Button Grid.Row="0" x:Name="BtnWriteToPlc"
|
||||||
Content="Sende Daten an SPS"
|
Content="Sende Daten an SPS"
|
||||||
Width="120"
|
Width="450" Height="140" FontSize="30"
|
||||||
Command="{Binding WriteToPlcCommand}"
|
Command="{Binding WriteToPlcCommand}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Margin="10"/>
|
Margin="10"/>
|
||||||
|
<Button Grid.Row="0" x:Name="BtnReadToPlc"
|
||||||
|
Content="Lese Daten von SPS"
|
||||||
|
Width="450" Height="140" FontSize="30"
|
||||||
|
Command="{Binding ReadFromPlcCommand}"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Margin="10"
|
||||||
|
Visibility ="Collapsed"
|
||||||
|
/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Label Grid.Column="0" Grid.Row="1" Content="Allgemein: " VerticalAlignment="Center" FontSize="24"></Label>
|
<Label Grid.Column="0" Grid.Row="1" Content="Allgemein: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding CameraProgramsVm}"/>
|
<common:ParamControlInt Grid.Column="0" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding CameraProgramsVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChucksVm}"/>
|
<common:ParamControlInt Grid.Column="0" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChucksVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding GripperVm}"/>
|
<common:ParamControlInt Grid.Column="0" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding GripperVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding DiameterVm}"/>
|
<common:ParamControlFloat Grid.Column="0" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding DiameterVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ThicknessVm}"/>
|
<common:ParamControlFloat Grid.Column="0" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ThicknessVm}"/>
|
||||||
|
|
||||||
@@ -88,8 +96,8 @@
|
|||||||
<Label Grid.Column="1" Grid.Row="1" Content="Hochvolt Parameter: " VerticalAlignment="Center" FontSize="24"></Label>
|
<Label Grid.Column="1" Grid.Row="1" Content="Hochvolt Parameter: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvmaxTestCurrentVm}"/>
|
<common:ParamControlFloat Grid.Column="1" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvmaxTestCurrentVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding Hvn2PrePurgeTimeVm}"/>
|
<common:ParamControlFloat Grid.Column="1" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding Hvn2PrePurgeTimeVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvnumRetriesVm}"/>
|
<common:ParamControlInt Grid.Column="1" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvnumRetriesVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="5" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvpolarityVm}"/>
|
<common:ParamControlInt Grid.Column="1" Grid.Row="5" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvpolarityVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvrampTimeVm}"/>
|
<common:ParamControlFloat Grid.Column="1" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvrampTimeVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestFrequencyVm}"/>
|
<common:ParamControlFloat Grid.Column="1" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestFrequencyVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="8" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkCurrentVm}"/>
|
<common:ParamControlFloat Grid.Column="1" Grid.Row="8" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkCurrentVm}"/>
|
||||||
@@ -98,21 +106,58 @@
|
|||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestVoltageVm}"/>
|
<common:ParamControlFloat Grid.Column="1" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestVoltageVm}"/>
|
||||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestPressureN2Vm}"/>
|
<common:ParamControlFloat Grid.Column="1" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestPressureN2Vm}"/>
|
||||||
|
|
||||||
<Label Grid.Column="1" Grid.Row="14" Content="Durchlaufrezept Tabelle"></Label>
|
<Label Grid.Column="1" Grid.Row="14" Content="Traypositionen" FontSize="35"></Label>
|
||||||
<Grid Grid.Column="1" Grid.Row="15" Grid.RowSpan="6">
|
<Grid Grid.Column="1" Grid.Row="15" Grid.RowSpan="5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.8*"/>
|
||||||
|
<ColumnDefinition Width="0.2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<DataGrid Grid.Column="0" ItemsSource="{Binding TrayPositions}"
|
||||||
|
SelectedItem="{Binding SelectedTrayPosition}"
|
||||||
|
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30" >
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="Pos Nr." Binding="{Binding PosId}"/>
|
||||||
|
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}" Width="170"/>
|
||||||
|
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}" Width="170"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Vertical">
|
||||||
|
<Button Content="+" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding AddTrayPositionCommand}" IsEnabled="{Binding CanAddTrayPosition}"/>
|
||||||
|
<Button Content="-" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding RemoveTrayPositionCommand}" IsEnabled="{Binding CanRemoveTrayPosition}"/>
|
||||||
|
<Button Content="↑" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding TrayPositionUpCommand}"/>
|
||||||
|
<Button Content="↓" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding TrayPositionDownCommand}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Label Grid.Column="2" Grid.Row="1" Content="Durchlaufrezept Tabelle" FontSize="30"/>
|
||||||
|
<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="90*"/>
|
<ColumnDefinition Width="90*"/>
|
||||||
<ColumnDefinition Width="10*"/>
|
<ColumnDefinition Width="10*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DataGrid Grid.Column="0" ItemsSource="{Binding FlowReceipeEntries}"
|
<DataGrid Grid.Column="0" ItemsSource="{Binding FlowReceipeEntries}"
|
||||||
SelectedItem="{Binding SelectedFlowReceipeEntry, UpdateSourceTrigger=PropertyChanged}"
|
SelectedItem="{Binding SelectedFlowReceipeEntry, UpdateSourceTrigger=PropertyChanged}"
|
||||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30">
|
||||||
|
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Header="NodeID" Binding="{Binding NodeId}"/>
|
<DataGridTextColumn Header="NodeID" Binding="{Binding NodeId}"/>
|
||||||
<DataGridTextColumn Header="Priorität" Binding="{Binding Priority}"/>
|
<DataGridTextColumn Header="Prio" Binding="{Binding Priority}"/>
|
||||||
<DataGridComboBoxColumn Header="Station"
|
<DataGridComboBoxColumn Header="Station"
|
||||||
ItemsSource="{Binding Source={StaticResource FlowStations}}"
|
ItemsSource="{Binding Source={StaticResource FlowStations}}"
|
||||||
SelectedValueBinding="{Binding Station, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True}"/>
|
SelectedValueBinding="{Binding Station, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True}">
|
||||||
|
<DataGridComboBoxColumn.ElementStyle>
|
||||||
|
<Style TargetType="ComboBox">
|
||||||
|
<Setter Property="FontSize" Value="30"/>
|
||||||
|
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridComboBoxColumn.ElementStyle>
|
||||||
|
<DataGridComboBoxColumn.EditingElementStyle>
|
||||||
|
<Style TargetType="ComboBox">
|
||||||
|
<Setter Property="FontSize" Value="30"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridComboBoxColumn.EditingElementStyle>
|
||||||
|
</DataGridComboBoxColumn>
|
||||||
<DataGridTextColumn Header="Max. Wdh." Binding="{Binding MaxRetries}"/>
|
<DataGridTextColumn Header="Max. Wdh." Binding="{Binding MaxRetries}"/>
|
||||||
<DataGridTextColumn Header="Nächste Node" Binding="{Binding NextNodeSuccess}"/>
|
<DataGridTextColumn Header="Nächste Node" Binding="{Binding NextNodeSuccess}"/>
|
||||||
<DataGridTextColumn Header="Nächste Node bei Wdh." Binding="{Binding NextNodeRetry}"/>
|
<DataGridTextColumn Header="Nächste Node bei Wdh." Binding="{Binding NextNodeRetry}"/>
|
||||||
@@ -130,38 +175,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Label Grid.Column="2" Grid.Row="1" Content="Traypositionen" FontSize="24"></Label>
|
<Label Grid.Column="2" Grid.Row="9" Content="Ätzschritte Mecademic Roboter" FontSize="30"></Label>
|
||||||
<Grid Grid.Column="2" Grid.Row="1" Grid.RowSpan="6">
|
<Grid Grid.Column="2" Grid.ColumnSpan="1" Grid.Row="10" Grid.RowSpan="7">
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="80*"/>
|
|
||||||
<ColumnDefinition Width="20*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<DataGrid Grid.Column="0" ItemsSource="{Binding TrayPositions}"
|
|
||||||
SelectedItem="{Binding SelectedTrayPosition}"
|
|
||||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
|
||||||
<DataGrid.Columns>
|
|
||||||
<DataGridTextColumn Header="Pos Nr." Binding="{Binding PosId}"/>
|
|
||||||
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}"/>
|
|
||||||
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}"></DataGridTextColumn>
|
|
||||||
</DataGrid.Columns>
|
|
||||||
</DataGrid>
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Vertical">
|
|
||||||
<Button Content="+" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding AddTrayPositionCommand}" IsEnabled="{Binding CanAddTrayPosition}"></Button>
|
|
||||||
<Button Content="-" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding RemoveTrayPositionCommand}" IsEnabled="{Binding CanRemoveTrayPosition}"></Button>
|
|
||||||
<Button Content="↑" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding TrayPositionUpCommand}"></Button>
|
|
||||||
<Button Content="↓" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding TrayPositionDownCommand}"></Button>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Label Grid.Column="2" Grid.Row="9" Content="Ätzschritte Mecademic Roboter"></Label>
|
|
||||||
<Grid Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="10" Grid.RowSpan="7">
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="90*"/>
|
<ColumnDefinition Width="90*"/>
|
||||||
<ColumnDefinition Width="10*"/>
|
<ColumnDefinition Width="10*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DataGrid Grid.Column="0" ItemsSource="{Binding EtcherRobotSteps}"
|
<DataGrid Grid.Column="0" ItemsSource="{Binding EtcherRobotSteps}"
|
||||||
SelectedItem="{Binding SelectedEtchRobotStep, UpdateSourceTrigger=PropertyChanged}"
|
SelectedItem="{Binding SelectedEtchRobotStep, UpdateSourceTrigger=PropertyChanged}"
|
||||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}"/>
|
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}"/>
|
||||||
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}"/>
|
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}"/>
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI.Pages.Views
|
namespace InfineonHMI.Pages.Views;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Receipes Overview Page
|
||||||
|
/// </summary>
|
||||||
|
public partial class ReceipePage : Page
|
||||||
{
|
{
|
||||||
/// <summary>
|
public ReceipePage()
|
||||||
/// Receipes Overview Page
|
|
||||||
/// </summary>
|
|
||||||
public partial class ReceipePage : Page
|
|
||||||
{
|
{
|
||||||
public ReceipePage()
|
InitializeComponent();
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,17 +4,22 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
|
xmlns:common="clr-namespace:Common"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=local:TrayFeederPageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=local:TrayFeederPageVM, IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="1554" d:DesignWidth="3390"
|
||||||
Title="Trayfeeder">
|
Title="Trayfeeder">
|
||||||
|
|
||||||
<Grid>
|
<Grid Margin="20">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
@@ -27,7 +32,10 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="TrayFeederPage" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
<Label Grid.Row="0" Grid.Column="0" Content="TrayFeederPage" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40"/>
|
||||||
|
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding TrayfeederInPackMLControlVm}"/>
|
||||||
|
<common:PackMLControl Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding TrayfeederOutPackMLControlVm}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaktionslogik für AutomaticModePage.xaml
|
/// Interaktionslogik für AutomaticModePage.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TrayFeederPage : Page
|
public partial class TrayFeederPage : Page
|
||||||
{
|
{
|
||||||
public TrayFeederPage()
|
public TrayFeederPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
BIN
uniper_hmi/UniperHMI/Resources/application.png
Normal file
BIN
uniper_hmi/UniperHMI/Resources/application.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
BIN
uniper_hmi/UniperHMI/Resources/user.png
Normal file
BIN
uniper_hmi/UniperHMI/Resources/user.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
@@ -3,7 +3,6 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
|
||||||
xmlns:local="clr-namespace:InfineonHMI"
|
xmlns:local="clr-namespace:InfineonHMI"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800"
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für SettingsPageView.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class SettingsPage : Page
|
|
||||||
{
|
|
||||||
public SettingsPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
/// <summary>
|
||||||
{
|
/// Interaktionslogik für SettingsPageView.xaml
|
||||||
var disposable = DataContext as IDisposable;
|
/// </summary>
|
||||||
disposable?.Dispose();
|
public partial class SettingsPage : Page
|
||||||
}
|
{
|
||||||
}
|
public SettingsPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Unloaded += OnUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUnloaded(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var disposable = DataContext as IDisposable;
|
||||||
|
disposable?.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,119 +7,118 @@ using TwinCAT.Ads.TypeSystem;
|
|||||||
using TwinCAT.TypeSystem;
|
using TwinCAT.TypeSystem;
|
||||||
using Heisig.HMI.AdsManager;
|
using Heisig.HMI.AdsManager;
|
||||||
|
|
||||||
namespace InfineonHMI
|
namespace InfineonHMI;
|
||||||
|
|
||||||
|
public partial class SettingsEntry : ObservableObject
|
||||||
{
|
{
|
||||||
public partial class SettingsEntry : ObservableObject
|
[ObservableProperty]
|
||||||
{
|
private string name = "";
|
||||||
[ObservableProperty]
|
|
||||||
private string name = "";
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string instancePath = "";
|
private string instancePath = "";
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string? dataType;
|
private string? dataType;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Object? value;
|
private Object? value;
|
||||||
|
|
||||||
public ObservableCollection<SettingsEntry> SubEntries { get; set; } = [];
|
public ObservableCollection<SettingsEntry> SubEntries { get; set; } = [];
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility visibility = Visibility.Collapsed;
|
private Visibility visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
private readonly IAdsManager _adsManager;
|
private readonly IAdsManager _adsManager;
|
||||||
|
|
||||||
public SettingsEntry(IAdsManager adsManager)
|
public SettingsEntry(IAdsManager adsManager)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnValueChanging(object? oldValue, object? newValue)
|
partial void OnValueChanging(object? oldValue, object? newValue)
|
||||||
{
|
{
|
||||||
if (newValue == null)
|
if (newValue == null)
|
||||||
{
|
{
|
||||||
newValue = oldValue;
|
newValue = oldValue;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_adsManager.WriteValue(InstancePath, newValue);
|
_adsManager.WriteValue(InstancePath, newValue);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
newValue = oldValue;
|
newValue = oldValue;
|
||||||
Debug.WriteLine("Value {0} could not be written to {1}", newValue, InstancePath);
|
Debug.WriteLine("Value {0} could not be written to {1}", newValue, InstancePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class SettingsPageVM : ObservableObject, IDisposable
|
public partial class SettingsPageVM : ObservableObject, IDisposable
|
||||||
{
|
{
|
||||||
public ObservableCollection<SettingsEntry> RootItem { get; private set; } = [];
|
public ObservableCollection<SettingsEntry> RootItem { get; private set; } = [];
|
||||||
|
|
||||||
private readonly IAdsManager _adsManager;
|
private readonly IAdsManager _adsManager;
|
||||||
|
|
||||||
private readonly string _variableName;
|
private readonly string _variableName;
|
||||||
|
|
||||||
public SettingsPageVM(IAdsManager adsManager, string variableName)
|
public SettingsPageVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
|
|
||||||
_adsManager.Register(_variableName, ConfigChangedEvent);
|
_adsManager.Register(_variableName, ConfigChangedEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ConfigChangedEvent(object? sender, ValueChangedEventArgs e)
|
private void ConfigChangedEvent(object? sender, ValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
App.Current.Invoke(CreateSettingsTree);
|
App.Current.Invoke(CreateSettingsTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateSettingsTree()
|
private void CreateSettingsTree()
|
||||||
{
|
{
|
||||||
ISymbolLoader? symbolLoader = _adsManager.GetSymbolLoader();
|
ISymbolLoader? symbolLoader = _adsManager.GetSymbolLoader();
|
||||||
|
|
||||||
if (symbolLoader == null)
|
if (symbolLoader == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Symbol configSymbol = (Symbol)symbolLoader.Symbols[_variableName];
|
Symbol configSymbol = (Symbol)symbolLoader.Symbols[_variableName];
|
||||||
SettingsEntry entry = GetSymbol(configSymbol);
|
SettingsEntry entry = GetSymbol(configSymbol);
|
||||||
RootItem.Add(entry);
|
RootItem.Add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
private SettingsEntry GetSymbol(Symbol symbol)
|
private SettingsEntry GetSymbol(Symbol symbol)
|
||||||
{
|
{
|
||||||
// Create Symbol
|
// Create Symbol
|
||||||
SettingsEntry entry = new(_adsManager)
|
SettingsEntry entry = new(_adsManager)
|
||||||
{
|
{
|
||||||
Name = symbol.InstanceName,
|
Name = symbol.InstanceName,
|
||||||
InstancePath = symbol.InstancePath,
|
InstancePath = symbol.InstancePath,
|
||||||
DataType = symbol.DataType?.Name
|
DataType = symbol.DataType?.Name
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check if symbol has sub symbols
|
// Check if symbol has sub symbols
|
||||||
if (!symbol.IsPrimitiveType)
|
if (!symbol.IsPrimitiveType)
|
||||||
{
|
{
|
||||||
foreach (Symbol subSymbol in symbol.SubSymbols.Cast<Symbol>())
|
foreach (Symbol subSymbol in symbol.SubSymbols.Cast<Symbol>())
|
||||||
{
|
{
|
||||||
entry.SubEntries.Add(GetSymbol(subSymbol));
|
entry.SubEntries.Add(GetSymbol(subSymbol));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
entry.Visibility = Visibility.Visible;
|
entry.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
entry.Value = symbol.ReadValue();
|
entry.Value = symbol.ReadValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_adsManager?.Deregister(_variableName, ConfigChangedEvent);
|
_adsManager?.Deregister(_variableName, ConfigChangedEvent);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
63
uniper_hmi_old/.gitattributes
vendored
63
uniper_hmi_old/.gitattributes
vendored
@@ -1,63 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# Set default behavior to automatically normalize line endings.
|
|
||||||
###############################################################################
|
|
||||||
* text=auto
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Set default behavior for command prompt diff.
|
|
||||||
#
|
|
||||||
# This is need for earlier builds of msysgit that does not have it on by
|
|
||||||
# default for csharp files.
|
|
||||||
# Note: This is only used by command line
|
|
||||||
###############################################################################
|
|
||||||
#*.cs diff=csharp
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Set the merge driver for project and solution files
|
|
||||||
#
|
|
||||||
# Merging from the command prompt will add diff markers to the files if there
|
|
||||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
|
||||||
# the diff markers are never inserted). Diff markers may cause the following
|
|
||||||
# file extensions to fail to load in VS. An alternative would be to treat
|
|
||||||
# these files as binary and thus will always conflict and require user
|
|
||||||
# intervention with every merge. To do so, just uncomment the entries below
|
|
||||||
###############################################################################
|
|
||||||
#*.sln merge=binary
|
|
||||||
#*.csproj merge=binary
|
|
||||||
#*.vbproj merge=binary
|
|
||||||
#*.vcxproj merge=binary
|
|
||||||
#*.vcproj merge=binary
|
|
||||||
#*.dbproj merge=binary
|
|
||||||
#*.fsproj merge=binary
|
|
||||||
#*.lsproj merge=binary
|
|
||||||
#*.wixproj merge=binary
|
|
||||||
#*.modelproj merge=binary
|
|
||||||
#*.sqlproj merge=binary
|
|
||||||
#*.wwaproj merge=binary
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# behavior for image files
|
|
||||||
#
|
|
||||||
# image files are treated as binary by default.
|
|
||||||
###############################################################################
|
|
||||||
#*.jpg binary
|
|
||||||
#*.png binary
|
|
||||||
#*.gif binary
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# diff behavior for common document formats
|
|
||||||
#
|
|
||||||
# Convert binary document formats to text before diffing them. This feature
|
|
||||||
# is only available from the command line. Turn it on by uncommenting the
|
|
||||||
# entries below.
|
|
||||||
###############################################################################
|
|
||||||
#*.doc diff=astextplain
|
|
||||||
#*.DOC diff=astextplain
|
|
||||||
#*.docx diff=astextplain
|
|
||||||
#*.DOCX diff=astextplain
|
|
||||||
#*.dot diff=astextplain
|
|
||||||
#*.DOT diff=astextplain
|
|
||||||
#*.pdf diff=astextplain
|
|
||||||
#*.PDF diff=astextplain
|
|
||||||
#*.rtf diff=astextplain
|
|
||||||
#*.RTF diff=astextplain
|
|
||||||
367
uniper_hmi_old/.gitignore
vendored
367
uniper_hmi_old/.gitignore
vendored
@@ -1,367 +0,0 @@
|
|||||||
## Ignore Visual Studio temporary files, build results, and
|
|
||||||
## files generated by popular Visual Studio add-ons.
|
|
||||||
##
|
|
||||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
|
||||||
|
|
||||||
# User-specific files
|
|
||||||
*.rsuser
|
|
||||||
*.suo
|
|
||||||
*.user
|
|
||||||
*.userosscache
|
|
||||||
*.sln.docstates
|
|
||||||
|
|
||||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
|
||||||
*.userprefs
|
|
||||||
|
|
||||||
# Testproject folders
|
|
||||||
AdsSessionTest/
|
|
||||||
HMI_Export/
|
|
||||||
|
|
||||||
# Mono auto generated files
|
|
||||||
mono_crash.*
|
|
||||||
|
|
||||||
# Build results
|
|
||||||
[Dd]ebug/
|
|
||||||
[Dd]ebugPublic/
|
|
||||||
[Rr]elease/
|
|
||||||
[Rr]eleases/
|
|
||||||
x64/
|
|
||||||
x86/
|
|
||||||
[Ww][Ii][Nn]32/
|
|
||||||
[Aa][Rr][Mm]/
|
|
||||||
[Aa][Rr][Mm]64/
|
|
||||||
bld/
|
|
||||||
[Bb]in/
|
|
||||||
[Oo]bj/
|
|
||||||
[Oo]ut/
|
|
||||||
[Ll]og/
|
|
||||||
[Ll]ogs/
|
|
||||||
|
|
||||||
# Visual Studio 2015/2017 cache/options directory
|
|
||||||
.vs/
|
|
||||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
|
||||||
#wwwroot/
|
|
||||||
|
|
||||||
# Visual Studio 2017 auto generated files
|
|
||||||
Generated\ Files/
|
|
||||||
|
|
||||||
# MSTest test Results
|
|
||||||
[Tt]est[Rr]esult*/
|
|
||||||
[Bb]uild[Ll]og.*
|
|
||||||
|
|
||||||
# NUnit
|
|
||||||
*.VisualState.xml
|
|
||||||
TestResult.xml
|
|
||||||
nunit-*.xml
|
|
||||||
|
|
||||||
# Build Results of an ATL Project
|
|
||||||
[Dd]ebugPS/
|
|
||||||
[Rr]eleasePS/
|
|
||||||
dlldata.c
|
|
||||||
|
|
||||||
# Benchmark Results
|
|
||||||
BenchmarkDotNet.Artifacts/
|
|
||||||
|
|
||||||
# .NET Core
|
|
||||||
project.lock.json
|
|
||||||
project.fragment.lock.json
|
|
||||||
artifacts/
|
|
||||||
|
|
||||||
# ASP.NET Scaffolding
|
|
||||||
ScaffoldingReadMe.txt
|
|
||||||
|
|
||||||
# StyleCop
|
|
||||||
StyleCopReport.xml
|
|
||||||
|
|
||||||
# Files built by Visual Studio
|
|
||||||
*_i.c
|
|
||||||
*_p.c
|
|
||||||
*_h.h
|
|
||||||
*.ilk
|
|
||||||
*.meta
|
|
||||||
*.obj
|
|
||||||
*.iobj
|
|
||||||
*.pch
|
|
||||||
*.pdb
|
|
||||||
*.ipdb
|
|
||||||
*.pgc
|
|
||||||
*.pgd
|
|
||||||
*.rsp
|
|
||||||
*.sbr
|
|
||||||
*.tlb
|
|
||||||
*.tli
|
|
||||||
*.tlh
|
|
||||||
*.tmp
|
|
||||||
*.tmp_proj
|
|
||||||
*_wpftmp.csproj
|
|
||||||
*.log
|
|
||||||
*.vspscc
|
|
||||||
*.vssscc
|
|
||||||
.builds
|
|
||||||
*.pidb
|
|
||||||
*.svclog
|
|
||||||
*.scc
|
|
||||||
|
|
||||||
# Chutzpah Test files
|
|
||||||
_Chutzpah*
|
|
||||||
|
|
||||||
# Visual C++ cache files
|
|
||||||
ipch/
|
|
||||||
*.aps
|
|
||||||
*.ncb
|
|
||||||
*.opendb
|
|
||||||
*.opensdf
|
|
||||||
*.sdf
|
|
||||||
*.cachefile
|
|
||||||
*.VC.db
|
|
||||||
*.VC.VC.opendb
|
|
||||||
|
|
||||||
# Visual Studio profiler
|
|
||||||
*.psess
|
|
||||||
*.vsp
|
|
||||||
*.vspx
|
|
||||||
*.sap
|
|
||||||
|
|
||||||
# Visual Studio Trace Files
|
|
||||||
*.e2e
|
|
||||||
|
|
||||||
# TFS 2012 Local Workspace
|
|
||||||
$tf/
|
|
||||||
|
|
||||||
# Guidance Automation Toolkit
|
|
||||||
*.gpState
|
|
||||||
|
|
||||||
# ReSharper is a .NET coding add-in
|
|
||||||
_ReSharper*/
|
|
||||||
*.[Rr]e[Ss]harper
|
|
||||||
*.DotSettings.user
|
|
||||||
|
|
||||||
# TeamCity is a build add-in
|
|
||||||
_TeamCity*
|
|
||||||
|
|
||||||
# DotCover is a Code Coverage Tool
|
|
||||||
*.dotCover
|
|
||||||
|
|
||||||
# AxoCover is a Code Coverage Tool
|
|
||||||
.axoCover/*
|
|
||||||
!.axoCover/settings.json
|
|
||||||
|
|
||||||
# Coverlet is a free, cross platform Code Coverage Tool
|
|
||||||
coverage*.json
|
|
||||||
coverage*.xml
|
|
||||||
coverage*.info
|
|
||||||
|
|
||||||
# Visual Studio code coverage results
|
|
||||||
*.coverage
|
|
||||||
*.coveragexml
|
|
||||||
|
|
||||||
# NCrunch
|
|
||||||
_NCrunch_*
|
|
||||||
.*crunch*.local.xml
|
|
||||||
nCrunchTemp_*
|
|
||||||
|
|
||||||
# MightyMoose
|
|
||||||
*.mm.*
|
|
||||||
AutoTest.Net/
|
|
||||||
|
|
||||||
# Web workbench (sass)
|
|
||||||
.sass-cache/
|
|
||||||
|
|
||||||
# Installshield output folder
|
|
||||||
[Ee]xpress/
|
|
||||||
|
|
||||||
# DocProject is a documentation generator add-in
|
|
||||||
DocProject/buildhelp/
|
|
||||||
DocProject/Help/*.HxT
|
|
||||||
DocProject/Help/*.HxC
|
|
||||||
DocProject/Help/*.hhc
|
|
||||||
DocProject/Help/*.hhk
|
|
||||||
DocProject/Help/*.hhp
|
|
||||||
DocProject/Help/Html2
|
|
||||||
DocProject/Help/html
|
|
||||||
|
|
||||||
# Click-Once directory
|
|
||||||
publish/
|
|
||||||
|
|
||||||
# Publish Web Output
|
|
||||||
*.[Pp]ublish.xml
|
|
||||||
*.azurePubxml
|
|
||||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
|
||||||
# but database connection strings (with potential passwords) will be unencrypted
|
|
||||||
*.pubxml
|
|
||||||
*.publishproj
|
|
||||||
|
|
||||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
|
||||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
|
||||||
# in these scripts will be unencrypted
|
|
||||||
PublishScripts/
|
|
||||||
|
|
||||||
# NuGet Packages
|
|
||||||
*.nupkg
|
|
||||||
# NuGet Symbol Packages
|
|
||||||
*.snupkg
|
|
||||||
# The packages folder can be ignored because of Package Restore
|
|
||||||
**/[Pp]ackages/*
|
|
||||||
# except build/, which is used as an MSBuild target.
|
|
||||||
!**/[Pp]ackages/build/
|
|
||||||
# Uncomment if necessary however generally it will be regenerated when needed
|
|
||||||
#!**/[Pp]ackages/repositories.config
|
|
||||||
# NuGet v3's project.json files produces more ignorable files
|
|
||||||
*.nuget.props
|
|
||||||
*.nuget.targets
|
|
||||||
|
|
||||||
# Microsoft Azure Build Output
|
|
||||||
csx/
|
|
||||||
*.build.csdef
|
|
||||||
|
|
||||||
# Microsoft Azure Emulator
|
|
||||||
ecf/
|
|
||||||
rcf/
|
|
||||||
|
|
||||||
# Windows Store app package directories and files
|
|
||||||
AppPackages/
|
|
||||||
BundleArtifacts/
|
|
||||||
Package.StoreAssociation.xml
|
|
||||||
_pkginfo.txt
|
|
||||||
*.appx
|
|
||||||
*.appxbundle
|
|
||||||
*.appxupload
|
|
||||||
|
|
||||||
# Visual Studio cache files
|
|
||||||
# files ending in .cache can be ignored
|
|
||||||
*.[Cc]ache
|
|
||||||
# but keep track of directories ending in .cache
|
|
||||||
!?*.[Cc]ache/
|
|
||||||
|
|
||||||
# Others
|
|
||||||
ClientBin/
|
|
||||||
~$*
|
|
||||||
*~
|
|
||||||
*.dbmdl
|
|
||||||
*.dbproj.schemaview
|
|
||||||
*.jfm
|
|
||||||
*.pfx
|
|
||||||
*.publishsettings
|
|
||||||
orleans.codegen.cs
|
|
||||||
|
|
||||||
# Including strong name files can present a security risk
|
|
||||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
|
||||||
#*.snk
|
|
||||||
|
|
||||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
|
||||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
|
||||||
#bower_components/
|
|
||||||
|
|
||||||
# RIA/Silverlight projects
|
|
||||||
Generated_Code/
|
|
||||||
|
|
||||||
# Backup & report files from converting an old project file
|
|
||||||
# to a newer Visual Studio version. Backup files are not needed,
|
|
||||||
# because we have git ;-)
|
|
||||||
_UpgradeReport_Files/
|
|
||||||
Backup*/
|
|
||||||
UpgradeLog*.XML
|
|
||||||
UpgradeLog*.htm
|
|
||||||
ServiceFabricBackup/
|
|
||||||
*.rptproj.bak
|
|
||||||
|
|
||||||
# SQL Server files
|
|
||||||
*.mdf
|
|
||||||
*.ldf
|
|
||||||
*.ndf
|
|
||||||
|
|
||||||
# Business Intelligence projects
|
|
||||||
*.rdl.data
|
|
||||||
*.bim.layout
|
|
||||||
*.bim_*.settings
|
|
||||||
*.rptproj.rsuser
|
|
||||||
*- [Bb]ackup.rdl
|
|
||||||
*- [Bb]ackup ([0-9]).rdl
|
|
||||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
|
||||||
|
|
||||||
# Microsoft Fakes
|
|
||||||
FakesAssemblies/
|
|
||||||
|
|
||||||
# GhostDoc plugin setting file
|
|
||||||
*.GhostDoc.xml
|
|
||||||
|
|
||||||
# Node.js Tools for Visual Studio
|
|
||||||
.ntvs_analysis.dat
|
|
||||||
node_modules/
|
|
||||||
|
|
||||||
# Visual Studio 6 build log
|
|
||||||
*.plg
|
|
||||||
|
|
||||||
# Visual Studio 6 workspace options file
|
|
||||||
*.opt
|
|
||||||
|
|
||||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
|
||||||
*.vbw
|
|
||||||
|
|
||||||
# Visual Studio LightSwitch build output
|
|
||||||
**/*.HTMLClient/GeneratedArtifacts
|
|
||||||
**/*.DesktopClient/GeneratedArtifacts
|
|
||||||
**/*.DesktopClient/ModelManifest.xml
|
|
||||||
**/*.Server/GeneratedArtifacts
|
|
||||||
**/*.Server/ModelManifest.xml
|
|
||||||
_Pvt_Extensions
|
|
||||||
|
|
||||||
# Paket dependency manager
|
|
||||||
.paket/paket.exe
|
|
||||||
paket-files/
|
|
||||||
|
|
||||||
# FAKE - F# Make
|
|
||||||
.fake/
|
|
||||||
|
|
||||||
# CodeRush personal settings
|
|
||||||
.cr/personal
|
|
||||||
|
|
||||||
# Python Tools for Visual Studio (PTVS)
|
|
||||||
__pycache__/
|
|
||||||
*.pyc
|
|
||||||
|
|
||||||
# Cake - Uncomment if you are using it
|
|
||||||
# tools/**
|
|
||||||
# !tools/packages.config
|
|
||||||
|
|
||||||
# Tabs Studio
|
|
||||||
*.tss
|
|
||||||
|
|
||||||
# Telerik's JustMock configuration file
|
|
||||||
*.jmconfig
|
|
||||||
|
|
||||||
# BizTalk build output
|
|
||||||
*.btp.cs
|
|
||||||
*.btm.cs
|
|
||||||
*.odx.cs
|
|
||||||
*.xsd.cs
|
|
||||||
|
|
||||||
# OpenCover UI analysis results
|
|
||||||
OpenCover/
|
|
||||||
|
|
||||||
# Azure Stream Analytics local run output
|
|
||||||
ASALocalRun/
|
|
||||||
|
|
||||||
# MSBuild Binary and Structured Log
|
|
||||||
*.binlog
|
|
||||||
|
|
||||||
# NVidia Nsight GPU debugger configuration file
|
|
||||||
*.nvuser
|
|
||||||
|
|
||||||
# MFractors (Xamarin productivity tool) working folder
|
|
||||||
.mfractor/
|
|
||||||
|
|
||||||
# Local History for Visual Studio
|
|
||||||
.localhistory/
|
|
||||||
|
|
||||||
# BeatPulse healthcheck temp database
|
|
||||||
healthchecksdb
|
|
||||||
|
|
||||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
|
||||||
MigrationBackup/
|
|
||||||
|
|
||||||
# Ionide (cross platform F# VS Code tools) working folder
|
|
||||||
.ionide/
|
|
||||||
|
|
||||||
# Fody - auto-generated XML schema
|
|
||||||
FodyWeavers.xsd
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"AdsAdress":"10.103.32.50.1.1","AdsPort":851,"ReconnectIntervalMS":1000,"OnlineChangeCntVar":"TWinCAT_SystemInfoVarList._AppInfo.OnlineChangeCnt"}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 18
|
|
||||||
VisualStudioVersion = 18.2.11415.280
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InfineonHMI", "UniperHMI\InfineonHMI.csproj", "{8D725B27-1242-4C66-ACD8-45F02098C7D3}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {13973C5F-C164-4478-A4B1-1694557CC459}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
# Uniper
|
|
||||||
Uniper maintenance hmi project.
|
|
||||||
|
|
||||||
# Gitflow
|
|
||||||
1. A develop branch is created from main
|
|
||||||
2. A release branch is created from develop
|
|
||||||
3. Feature branches are created from develop
|
|
||||||
4. When a feature is complete it is merged into the develop branch
|
|
||||||
5. When the release branch is done it is merged into develop and main
|
|
||||||
6. If an issue in main is detected a hotfix branch is created from main
|
|
||||||
7. Once the hotfix is complete it is merged to both develop and main
|
|
||||||
|
|
||||||
## Start new feature
|
|
||||||
```
|
|
||||||
git flow feature start feature_branch
|
|
||||||
```
|
|
||||||
oder
|
|
||||||
```
|
|
||||||
git checkout develop
|
|
||||||
git checkout -b feature_branch
|
|
||||||
```
|
|
||||||
|
|
||||||
## Finish a feature
|
|
||||||
```
|
|
||||||
git flow feature finish feature_branch
|
|
||||||
```
|
|
||||||
oder
|
|
||||||
```
|
|
||||||
git checkout develop
|
|
||||||
git merge feature_branch
|
|
||||||
```
|
|
||||||
|
|
||||||
## Making a release
|
|
||||||
```
|
|
||||||
git flow release start 0.1.0
|
|
||||||
```
|
|
||||||
oder
|
|
||||||
```
|
|
||||||
git checkout develop
|
|
||||||
git checkout -b release/0.1.0
|
|
||||||
```
|
|
||||||
|
|
||||||
## Finishing a release
|
|
||||||
```
|
|
||||||
git flow release finish '0.1.0'
|
|
||||||
```
|
|
||||||
oder
|
|
||||||
```
|
|
||||||
git checkout main
|
|
||||||
git merge release/0.1.0
|
|
||||||
```
|
|
||||||
|
|
||||||
## Starting a Hotfix
|
|
||||||
```
|
|
||||||
git flow hotfix start hotfix_branch
|
|
||||||
```
|
|
||||||
oder
|
|
||||||
```
|
|
||||||
git checkout main
|
|
||||||
git checkout -b hotfix_branch
|
|
||||||
```
|
|
||||||
|
|
||||||
## Finishing a Hotfix
|
|
||||||
```
|
|
||||||
git flow hotfix finish hotfix_branch
|
|
||||||
```
|
|
||||||
oder
|
|
||||||
```
|
|
||||||
git checkout main
|
|
||||||
git merge hotfix_branch
|
|
||||||
git checkout develop
|
|
||||||
git merge hotfix_branch
|
|
||||||
git branch -D hotfix_branch
|
|
||||||
```
|
|
||||||
|
|
||||||
## Workflow example
|
|
||||||
```
|
|
||||||
git checkout main
|
|
||||||
git checkout -b develop
|
|
||||||
git checkout -b feature_branch
|
|
||||||
# work happens on feature branch
|
|
||||||
git checkout develop
|
|
||||||
git merge feature_branch
|
|
||||||
git checkout main
|
|
||||||
git merge develop
|
|
||||||
git branch -d feature_branch
|
|
||||||
```
|
|
||||||
|
|
||||||
## Hotfix example
|
|
||||||
```
|
|
||||||
git checkout main
|
|
||||||
git checkout -b hotfix_branch
|
|
||||||
# work is done commits are added to the hotfix_branch
|
|
||||||
git checkout develop
|
|
||||||
git merge hotfix_branch
|
|
||||||
git checkout main
|
|
||||||
git merge hotfix_branch
|
|
||||||
```
|
|
||||||
BIN
uniper_hmi_old/UniperHMI/3rdParty/AdsManager.dll
vendored
BIN
uniper_hmi_old/UniperHMI/3rdParty/AdsManager.dll
vendored
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 123 KiB |
@@ -1,17 +0,0 @@
|
|||||||
<Application x:Class="InfineonHMI.App"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="clr-namespace:InfineonHMI">
|
|
||||||
<Application.Resources>
|
|
||||||
<!-- MahApps Metro style themes -->
|
|
||||||
<ResourceDictionary>
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
|
||||||
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
|
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
|
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
|
|
||||||
<!-- Theme setting -->
|
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Dark.Blue.xaml" />
|
|
||||||
</ResourceDictionary.MergedDictionaries>
|
|
||||||
</ResourceDictionary>
|
|
||||||
</Application.Resources>
|
|
||||||
</Application>
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
using System.Windows;
|
|
||||||
using Heisig.HMI.AdsManager;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
|
||||||
using TcEventLoggerAdsProxyLib;
|
|
||||||
|
|
||||||
namespace InfineonHMI;
|
|
||||||
|
|
||||||
public partial class App : Application
|
|
||||||
{
|
|
||||||
public static IHost? AppHost { get; private set; }
|
|
||||||
|
|
||||||
public App()
|
|
||||||
{
|
|
||||||
AppHost = Host.CreateDefaultBuilder()
|
|
||||||
.ConfigureServices((hostContext, services) =>
|
|
||||||
{
|
|
||||||
services.AddSingleton<MainWindow>();
|
|
||||||
services.AddSingleton<MainWindowVM>();
|
|
||||||
services.AddSingleton<IAdsManager, AdsManager>();
|
|
||||||
services.AddSingleton<TcEventLogger>();
|
|
||||||
})
|
|
||||||
.Build();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async void OnStartup(StartupEventArgs e)
|
|
||||||
{
|
|
||||||
await AppHost!.StartAsync();
|
|
||||||
|
|
||||||
var startupForm = AppHost.Services.GetRequiredService<MainWindow>();
|
|
||||||
startupForm.Show();
|
|
||||||
|
|
||||||
base.OnStartup(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async void OnExit(ExitEventArgs e)
|
|
||||||
{
|
|
||||||
await AppHost!.StopAsync();
|
|
||||||
|
|
||||||
base.OnExit(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
using System.Windows;
|
|
||||||
|
|
||||||
[assembly: ThemeInfo(
|
|
||||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
|
||||||
//(used if a resource is not found in the page,
|
|
||||||
// or application resource dictionaries)
|
|
||||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
|
||||||
//(used if a resource is not found in the page,
|
|
||||||
// app, or any theme specific resource dictionaries)
|
|
||||||
)]
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Xml;
|
|
||||||
using System.Xml.Serialization;
|
|
||||||
|
|
||||||
namespace InfineonHMI.Common
|
|
||||||
{
|
|
||||||
public static class L4ItXmlSerializer
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Serializes an object.
|
|
||||||
/// </summary>
|
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
/// <param name="serializableObject"></param>
|
|
||||||
/// <param name="fileName"></param>
|
|
||||||
/// <param name="encrypt"></param>
|
|
||||||
/// <param name="rootElementName"></param>
|
|
||||||
|
|
||||||
public static void SerializeObject<T>(T serializableObject, string fileName, bool encrypt = false, string rootElementName = null)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(fileName))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (serializableObject == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
XmlSerializer serializer;
|
|
||||||
if (rootElementName != null)
|
|
||||||
{
|
|
||||||
var xmlRoot = new XmlRootAttribute(rootElementName);
|
|
||||||
serializer = new XmlSerializer(serializableObject.GetType(), xmlRoot);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
serializer = new XmlSerializer(serializableObject.GetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var dir = new FileInfo(fileName).DirectoryName;
|
|
||||||
if (dir != null && !Directory.Exists(dir)) // Überprüfen Sie, ob dir nicht null ist, bevor Sie es verwenden
|
|
||||||
Directory.CreateDirectory(dir);
|
|
||||||
|
|
||||||
var xmlDocument = new XmlDocument();
|
|
||||||
using var stream = new MemoryStream();
|
|
||||||
serializer.Serialize(stream, serializableObject);
|
|
||||||
stream.Position = 0;
|
|
||||||
xmlDocument.Load(stream);
|
|
||||||
if (encrypt && false)
|
|
||||||
{
|
|
||||||
//FileEncryption.SaveEncryptedToFile(fileName, xmlDocument.OuterXml);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
xmlDocument.Save(fileName);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.Write(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Deserializes an xml file into an object list
|
|
||||||
/// </summary>
|
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
/// <param name="fileName"></param>
|
|
||||||
/// <param name="decrypt"></param>
|
|
||||||
/// <param name="rootElementName"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
///
|
|
||||||
///
|
|
||||||
public static T DeSerializeObject<T>(string fileName, bool decrypt = false, string rootElementName = null)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(fileName) || !File.Exists(fileName)) return default!;
|
|
||||||
|
|
||||||
T objectOut;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string xmlString;
|
|
||||||
if (decrypt && false)
|
|
||||||
{
|
|
||||||
//xmlString = FileEncryption.ReadDecryptedFromFile(fileName)!;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var xmlDocument = new XmlDocument();
|
|
||||||
xmlDocument.Load(fileName);
|
|
||||||
xmlString = xmlDocument.OuterXml;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(xmlString))
|
|
||||||
{
|
|
||||||
// Handle empty xmlString if necessary
|
|
||||||
return default!;
|
|
||||||
}
|
|
||||||
|
|
||||||
using var read = new StringReader(xmlString);
|
|
||||||
var outType = typeof(T);
|
|
||||||
|
|
||||||
XmlSerializer serializer;
|
|
||||||
if (rootElementName != null)
|
|
||||||
{
|
|
||||||
var root = new XmlRootAttribute(rootElementName);
|
|
||||||
serializer = new XmlSerializer(outType, root);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
serializer = new XmlSerializer(outType);
|
|
||||||
}
|
|
||||||
|
|
||||||
using XmlReader reader = new XmlTextReader(read);
|
|
||||||
objectOut = (T)serializer.Deserialize(reader)!;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.Write(ex);
|
|
||||||
return default!;
|
|
||||||
}
|
|
||||||
|
|
||||||
return objectOut;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
<UserControl x:Class="Common.MediaContainer"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:common="clr-namespace:Common"
|
|
||||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit"
|
|
||||||
d:DataContext="{d:DesignInstance Type=common:MediaContainerVm, IsDesignTimeCreatable=True}"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Width="Auto"
|
|
||||||
Height="Auto"
|
|
||||||
MinWidth="200">
|
|
||||||
<UserControl.Resources>
|
|
||||||
<HMIToolkit:FeedbackToColorConverter x:Key="feedbackConverter" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
|
||||||
<!-- Style to see things in the designer-->
|
|
||||||
<d:DesignerProperties.DesignStyle>
|
|
||||||
<Style TargetType="UserControl">
|
|
||||||
<!-- Property="Background" Value="White" /> -->
|
|
||||||
<Setter Property="Height" Value="300" />
|
|
||||||
<Setter Property="Width" Value="100" />
|
|
||||||
</Style>
|
|
||||||
</d:DesignerProperties.DesignStyle>
|
|
||||||
|
|
||||||
<Grid Height="Auto">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition/>
|
|
||||||
<ColumnDefinition/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="10*"/>
|
|
||||||
<RowDefinition Height="30*"/>
|
|
||||||
<RowDefinition Height="30*"/>
|
|
||||||
<RowDefinition Height="30*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="White" BorderThickness="2"/>
|
|
||||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{Binding SName, Mode=OneWay }" HorizontalAlignment="Center" FontSize="24"/>
|
|
||||||
|
|
||||||
<Grid Grid.Row="1">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
|
||||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
|
||||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Übervoll" HorizontalAlignment="Center" FontSize="16"/>
|
|
||||||
<RadioButton Margin="5" Grid.Row="1" IsChecked="{Binding Overload}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
||||||
</Grid>
|
|
||||||
<Grid Grid.Column="0" Grid.Row="2">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
|
||||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
|
||||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Voll" HorizontalAlignment="Center" FontSize="16"/>
|
|
||||||
<RadioButton Grid.Row="1" Margin="5" IsChecked="{Binding Full}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
||||||
</Grid>
|
|
||||||
<Grid Grid.Row="3">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
|
||||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
|
||||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Leer" HorizontalAlignment="Center" FontSize="16"/>
|
|
||||||
<RadioButton Grid.Row="1" Margin="5" IsChecked="{Binding Empty}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Border Grid.Column="1" Grid.Row="1" Grid.RowSpan="3" BorderBrush="White" BorderThickness="1"></Border>
|
|
||||||
<Grid Grid.Column="1" Grid.Row="1" Grid.RowSpan="3">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Button x:Name="btnFill" DataContext="{Binding FillButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="0" Grid.Column="0" Content="Füllen" Margin="5" />
|
|
||||||
<Button x:Name="btnOpen" DataContext="{Binding EmptyButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="1" Grid.Column="0" Content="Leeren" Margin="5" />
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace Common
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaktionslogik für AnalogValue.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class MediaContainer : UserControl
|
|
||||||
{
|
|
||||||
public bool IsReadonly { get; set; }
|
|
||||||
|
|
||||||
public MediaContainer()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
// Unloaded += OnUnloaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUnloaded(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var disposable = DataContext as IDisposable;
|
|
||||||
disposable?.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
|
||||||
{
|
|
||||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
|
||||||
e.Handled = regex.IsMatch(e.Text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using TwinCAT.TypeSystem;
|
|
||||||
using Heisig.HMI.AdsManager;
|
|
||||||
using HMIToolkit;
|
|
||||||
|
|
||||||
namespace Common;
|
|
||||||
|
|
||||||
public sealed partial class MediaContainerVm : ObservableValidator, IDisposable
|
|
||||||
{
|
|
||||||
|
|
||||||
private IAdsManager? _adsManager;
|
|
||||||
private string? _variableName;
|
|
||||||
|
|
||||||
[ObservableProperty] private string? sName = "No Name";
|
|
||||||
|
|
||||||
[ObservableProperty] private bool empty = false;
|
|
||||||
|
|
||||||
[ObservableProperty] private bool full = false;
|
|
||||||
|
|
||||||
[ObservableProperty] private bool overload = false;
|
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? emptyButton;
|
|
||||||
|
|
||||||
[ObservableProperty] private HMIControlButtonVM? fillButton;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MediaContainerVm()
|
|
||||||
{
|
|
||||||
sName = "No Name";
|
|
||||||
EmptyButton = new HMIControlButtonVM();
|
|
||||||
FillButton = new HMIControlButtonVM();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public MediaContainerVm(IAdsManager adsManager, string variableName)
|
|
||||||
{
|
|
||||||
_adsManager = adsManager;
|
|
||||||
_variableName = variableName;
|
|
||||||
|
|
||||||
sName = "No Name";
|
|
||||||
|
|
||||||
EmptyButton = new HMIControlButtonVM(_adsManager, _variableName + ".stEmptyButton");
|
|
||||||
FillButton = new HMIControlButtonVM(_adsManager, _variableName + ".stFillButton");
|
|
||||||
_adsManager.Register(_variableName + ".xEmpty", EmptyChanged);
|
|
||||||
_adsManager.Register(_variableName + ".xFull", FullChanged);
|
|
||||||
_adsManager.Register(_variableName + ".xOverload", OverloadChanged);
|
|
||||||
|
|
||||||
}
|
|
||||||
private void EmptyChanged(object? sender, ValueChangedEventArgs e)
|
|
||||||
{
|
|
||||||
Empty = (bool)e.Value;
|
|
||||||
}
|
|
||||||
private void FullChanged(object? sender, ValueChangedEventArgs e)
|
|
||||||
{
|
|
||||||
Full = (bool)e.Value;
|
|
||||||
}
|
|
||||||
private void OverloadChanged(object? sender, ValueChangedEventArgs e)
|
|
||||||
{
|
|
||||||
Overload = (bool)e.Value;
|
|
||||||
}
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
EmptyButton?.Dispose();
|
|
||||||
EmptyButton = null;
|
|
||||||
FillButton?.Dispose();
|
|
||||||
FillButton = null;
|
|
||||||
|
|
||||||
_adsManager?.Deregister(_variableName + ".xEmpty", EmptyChanged);
|
|
||||||
_adsManager?.Deregister(_variableName + ".xFull", FullChanged);
|
|
||||||
_adsManager?.Deregister(_variableName + ".xOverload", OverloadChanged);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<UserControl x:Class="Common.ParamControlFloat"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:Common"
|
|
||||||
d:DataContext="{d:DesignInstance Type=local:ParamControlFloatVm, IsDesignTimeCreatable=True}"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Width="Auto"
|
|
||||||
Height="Auto">
|
|
||||||
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
|
||||||
<!-- Style to see things in the designer-->
|
|
||||||
<d:DesignerProperties.DesignStyle>
|
|
||||||
<Style TargetType="UserControl">
|
|
||||||
<!-- Property="Background" Value="White" /> -->
|
|
||||||
<Setter Property="Height" Value="40" />
|
|
||||||
<Setter Property="Width" Value="280" />
|
|
||||||
</Style>
|
|
||||||
</d:DesignerProperties.DesignStyle>
|
|
||||||
<Grid Height="Auto">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
|
||||||
<Label x:Name="tbName" Grid.Column="0" Content="{Binding SName, Mode=OneWay }" Width="200"/>
|
|
||||||
<TextBox x:Name="tbValue" Text="{Binding Value, Mode=TwoWay, StringFormat=N2}" Grid.Column="1" MaxLines="1" Width="80" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user