Push Changes from other Github

This commit is contained in:
2026-03-09 10:52:42 +01:00
parent c7306e8217
commit ff9add4081
48 changed files with 1857 additions and 1443 deletions

View File

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Reactive.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using InfineonHMI.Model;
namespace InfineonHMI.Common
{
public sealed partial class FlowStationsViewModelBase : ObservableValidator, IChangeTrackingEx
{
private ObservableCollection<StationEntry> initFlowStations = new();
[ObservableProperty]
private ObservableCollection<StationEntry> flowStations = new ObservableCollection<StationEntry>();
public void AcceptChanges()
{
initFlowStations = new(FlowStations);
}
public bool IsChanged => !initFlowStations.Equals(FlowStations);
public void DiscardChanges()
{
FlowStations = new(initFlowStations);
}
}
public sealed partial class FlowReceipe : ObservableValidator, IChangeTrackingEx
{
private ObservableCollection<FlowReceipeEntry> initEntries = new();
[ObservableProperty] private ObservableCollection<FlowReceipeEntry> flowReceipeEntries;
public void AcceptChanges()
{
initEntries = new(FlowReceipeEntries);
}
public bool IsChanged => !FlowReceipeEntries.Equals(initEntries);
public void DiscardChanges()
{
FlowReceipeEntries = new(initEntries);
}
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace InfineonHMI.Common
{
public interface IChangeTrackingEx : IChangeTracking
{
void DiscardChanges();
}
}

View File

@@ -19,7 +19,7 @@ public static class L4ItXmlSerializer
/// <param name="encrypt"></param> /// <param name="encrypt"></param>
/// <param name="rootElementName"></param> /// <param name="rootElementName"></param>
public static void SerializeObject<T>(T serializableObject, string fileName, bool encrypt = false, string rootElementName = null) public static void SerializeObject<T>(T serializableObject, string fileName, bool encrypt = false, string? rootElementName = null)
{ {
if (string.IsNullOrEmpty(fileName)) if (string.IsNullOrEmpty(fileName))
return; return;
@@ -73,7 +73,7 @@ public static class L4ItXmlSerializer
/// <returns></returns> /// <returns></returns>
/// ///
/// ///
public static T DeSerializeObject<T>(string fileName, bool decrypt = false, string rootElementName = null) public static T DeSerializeObject<T>(string fileName, bool decrypt = false, string? rootElementName = null)
{ {
if (string.IsNullOrEmpty(fileName) || !File.Exists(fileName)) return default!; if (string.IsNullOrEmpty(fileName) || !File.Exists(fileName)) return default!;

View File

@@ -44,7 +44,7 @@
<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" HorizontalContentAlignment="Center" HorizontalAlignment="Center" Width="200" FontSize="30"/> <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" IsEnabled="False"/>
</Grid> </Grid>
<Grid Grid.Column="1" Grid.Row="1"> <Grid Grid.Column="1" Grid.Row="1">
@@ -55,7 +55,7 @@
<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="30"/> <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" IsEnabled="False"/>
</Grid> </Grid>
<Grid Grid.Row="1" Grid.Column="0"> <Grid Grid.Row="1" Grid.Column="0">
@@ -66,7 +66,7 @@
<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="30"/> <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" IsEnabled="False"/>
</Grid> </Grid>
<Border Grid.Column="1" Grid.Row="1" BorderBrush="White" BorderThickness="1"/> <Border Grid.Column="1" Grid.Row="1" BorderBrush="White" BorderThickness="1"/>

View File

@@ -17,10 +17,9 @@
<ColumnDefinition Width="200" /> <ColumnDefinition Width="200" />
</Grid.ColumnDefinitions> </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 }" FontSize="30" VerticalAlignment="Center"/> <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}" Margin="10" Width="Auto" FontSize="30" Grid.Column="1" MaxLines="1" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" /> <TextBox x:Name="tbValue" Text="{Binding Value, Mode=TwoWay, StringFormat=N2, UpdateSourceTrigger=PropertyChanged}" Margin="10" Width="Auto" FontSize="30" Grid.Column="1" MaxLines="1" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
</Grid> </Grid>
</UserControl> </UserControl>

View File

@@ -23,9 +23,4 @@ public partial class ParamControlFloat : UserControl
disposable?.Dispose(); disposable?.Dispose();
} }
private void NumberValidation(object sender, TextCompositionEventArgs e)
{
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
e.Handled = regex.IsMatch(e.Text);
}
} }

View File

@@ -1,27 +1,39 @@
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using System.ComponentModel.DataAnnotations; using InfineonHMI.Common;
using TwinCAT.TypeSystem;
using Heisig.HMI.AdsManager;
namespace Common; namespace Common;
public sealed partial class ParamControlFloatVm : ObservableValidator, IDisposable public sealed partial class ParamControlFloatVm : ObservableValidator, IDisposable, IChangeTrackingEx
{ {
private float initValue;
[ObservableProperty] [ObservableProperty]
private string sName; private string sName;
[ObservableProperty] [ObservableProperty]
private float value; private float value;
public ParamControlFloatVm() public ParamControlFloatVm()
{ {
SName = "No Name:"; SName = "No Name:";
Value = 0.0f; Value = 0.0f;
initValue = Value;
} }
public void Dispose() public void Dispose()
{ {
} }
public void AcceptChanges()
{
initValue = Value;
}
public bool IsChanged => initValue != Value;
public void DiscardChanges()
{
Value = initValue;
}
} }

View File

@@ -17,9 +17,8 @@
<ColumnDefinition Width="200" /> <ColumnDefinition Width="200" />
</Grid.ColumnDefinitions> </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 }" FontSize="30" VerticalAlignment="Center"/>
<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, UpdateSourceTrigger=PropertyChanged}" Margin="10" Width="Auto" FontSize="30" Grid.Column="1" MaxLines="1" 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>

View File

@@ -1,28 +1,38 @@
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using System.ComponentModel.DataAnnotations; using InfineonHMI.Common;
using TwinCAT.TypeSystem;
using Heisig.HMI.AdsManager;
namespace Common; namespace Common;
public sealed partial class ParamControlIntVm : ObservableValidator, IDisposable public sealed partial class ParamControlIntVm : ObservableValidator, IDisposable, IChangeTrackingEx
{ {
[ObservableProperty] private int initValue;
private string sName;
[ObservableProperty] [ObservableProperty] private string sName;
private int value;
[ObservableProperty] private int value;
public ParamControlIntVm()
{
SName = "No Name:";
Value = 0;
}
public void Dispose() public ParamControlIntVm()
{ {
} SName = "No Name:";
Value = 0;
initValue = Value;
}
public void Dispose()
{
}
public void AcceptChanges()
{
initValue = Value;
}
public bool IsChanged => initValue != Value;
public void DiscardChanges()
{
Value = initValue;
}
} }

View File

@@ -90,6 +90,7 @@ public sealed partial class UserManagementWindowVm : ObservableValidator
} }
else else
{ {
// Todo: For Deployment, set Userlevel to 0 if default!
CurrentUser = new User("unknown", "default", 100); CurrentUser = new User("unknown", "default", 100);
} }
users = L4ItXmlSerializer.DeSerializeObject<ObservableCollection<User>>(filePath); users = L4ItXmlSerializer.DeSerializeObject<ObservableCollection<User>>(filePath);

View File

@@ -0,0 +1,36 @@
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
namespace HMIToolkit;
public class BoolToVisibilityConverter<T> : IValueConverter
{
public BoolToVisibilityConverter(T trueValue, T falseValue)
{
True = trueValue;
False = falseValue;
}
public T True { get; set; }
public T False { get; set; }
public virtual object? Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value is bool && ((bool)value) ? True : False;
}
public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return DependencyProperty.UnsetValue;
}
}
public sealed class BoolToVisibilityConverter : BoolToVisibilityConverter<Visibility>
{
public BoolToVisibilityConverter() :
base(Visibility.Visible, Visibility.Hidden)
{ }
}

View File

@@ -15,7 +15,9 @@
<ItemGroup> <ItemGroup>
<None Remove="Anlagenuebersicht.png" /> <None Remove="Anlagenuebersicht.png" />
<None Remove="Resources\Application.png" /> <None Remove="Resources\Application.png" />
<None Remove="Resources\Check.png" />
<None Remove="Resources\user.png" /> <None Remove="Resources\user.png" />
<None Remove="Resources\X.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -38,7 +40,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource> </Resource>
<Resource Include="Resources\Application.png" /> <Resource Include="Resources\Application.png" />
<Resource Include="Resources\Check.png" />
<Resource Include="Resources\user.png" /> <Resource Include="Resources\user.png" />
<Resource Include="Resources\X.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -164,13 +164,6 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- Softkey 1 --> <!-- Softkey 1 -->
<Button Grid.Column="0"
Width="440"
Content="Übersicht" FontSize="38" Margin="10"
Command="{Binding OverviewWindowClickedCommand}" />
<!-- Command="{Binding AutomaticModeCommand}" -->
<!-- Softkey 2 -->
<Button IsEnabled="{Binding CanUserChangePageProductionWindow}" <Button IsEnabled="{Binding CanUserChangePageProductionWindow}"
Grid.Column="1" Content="Stationen" FontSize="38" Margin="10" Grid.Column="1" Content="Stationen" FontSize="38" Margin="10"
Width="440" Width="440"
@@ -208,7 +201,7 @@
<!-- Softkey 9 --> <!-- Softkey 9 -->
<Button Grid.Column="8" <Button Grid.Column="8"
Width="450" Width="450"
Content="Alarm quitieren" FontSize="38" Margin="10" Content="Alarm quittieren" FontSize="38" Margin="10"
Command="{Binding AckAlarmsCommand}"/> Command="{Binding AckAlarmsCommand}"/>
</Grid> </Grid>

View File

@@ -22,7 +22,9 @@ public partial class MainWindow
{ {
var model = (MainWindowVM)DataContext; var model = (MainWindowVM)DataContext;
model.ChangeUserClicked(); model.ChangeUserClicked();
} model.ShowOverview();
}
private void OnClosedEvent(object? sender, EventArgs e) private void OnClosedEvent(object? sender, EventArgs e)
{ {

View File

@@ -16,8 +16,16 @@ namespace InfineonHMI;
public sealed partial class MainWindowVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable public sealed partial class MainWindowVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
{ {
private const string _actualUserPrefix = "Aktueller Benutzer: \n";
[ObservableProperty] private Page currentPage; private readonly IAdsManager _adsManager;
private readonly IConfiguration _config;
private readonly TcEventLogger _eventlogger;
private User currentUser;
// Last active event
[ObservableProperty] private string currentActiveEvent = "";
[ObservableProperty] private Page currentPage;
[ObservableProperty] private Visibility statusBarVisible; [ObservableProperty] private Visibility statusBarVisible;
@@ -30,16 +38,9 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
[ObservableProperty] private string sCurrentPackMLState; [ObservableProperty] private string sCurrentPackMLState;
[ObservableProperty] private bool canUserChangePageProductionWindow; [ObservableProperty] private bool canUserChangePageProductionWindow;
[ObservableProperty] private bool canUserChangePageReceipeWindow; [ObservableProperty] private bool canUserChangePageReceipeWindow;
private const string _actualUserPrefix = "Aktueller Benutzer: \n";
private readonly IAdsManager _adsManager;
private readonly IConfiguration _config;
private readonly TcEventLogger _eventlogger;
private User currentUser;
public User CurrentUser public User CurrentUser
{ {
get { return currentUser; } get { return currentUser; }
@@ -54,10 +55,8 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
} }
} }
// Last active event
[ObservableProperty] private string currentActiveEvent = "";
private readonly object _lock = new(); //private readonly object _lock = new();
// Empty page // Empty page
private readonly Page _emptyPage; private readonly Page _emptyPage;
@@ -76,12 +75,9 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
ProductionOverviewPageVM? _productionOverviewPageVM; ProductionOverviewPageVM? _productionOverviewPageVM;
private MachineOverviewPageVM? _machineOverviewPageVM;
// Hot Coolplate page view model // Hot Coolplate page view model
HotCoolPlatePageVM? _hotCoolplatePageVM; HotCoolPlatePageVM? _hotCoolplatePageVM;
// Kuka Robot page view model // Kuka Robot page view model
ReceipePageVM? _receipePageVM; ReceipePageVM? _receipePageVM;
@@ -234,10 +230,16 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
} }
sCurrentPackMLMode = curMode; SCurrentPackMLMode = curMode;
} }
public void ShowOverview()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(OverviewPage));
Navigate(message, nextMessage);
}
[RelayCommand] [RelayCommand]
private void SettingsWindow() private void SettingsWindow()
@@ -253,16 +255,7 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
{ {
var userWindowVm = new UserManagementWindowVm(currentUser); var userWindowVm = new UserManagementWindowVm(currentUser);
CurrentUser = userWindowVm.GetCurrentUserLevel(); CurrentUser = userWindowVm.GetCurrentUserLevel();
OverviewWindowClicked(); ProductionWindowClicked();
}
[RelayCommand]
private void OverviewWindowClicked()
{
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config[""]!, typeof(MachineOverviewPage));
Receive(message);
} }
[RelayCommand] [RelayCommand]
@@ -363,14 +356,6 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
CurrentPage = productionOverviewPage; CurrentPage = productionOverviewPage;
break; break;
case nameof(MachineOverviewPage):
_machineOverviewPageVM?.Dispose();
_machineOverviewPageVM = new MachineOverviewPageVM(_adsManager, _config,this, new ProductionOverviewPageVM(_adsManager, _config, _eventlogger), _eventlogger);
MachineOverviewPage machineOverviewPage = new() { DataContext = _machineOverviewPageVM };
CurrentPage = machineOverviewPage;
break;
case nameof(EventsPage): case nameof(EventsPage):
#pragma warning disable MVVMTK0034 // Direct field reference to [ObservableProperty] backing field #pragma warning disable MVVMTK0034 // Direct field reference to [ObservableProperty] backing field
EventsPage eventsPage = new() { DataContext = _eventsPageVM }; EventsPage eventsPage = new() { DataContext = _eventsPageVM };
@@ -398,8 +383,6 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
Breadcrumb = " > Kuka Roboter"; Breadcrumb = " > Kuka Roboter";
break; break;
case nameof(HotCoolPlatePage): case nameof(HotCoolPlatePage):
if (_hotCoolplatePageVM == null) if (_hotCoolplatePageVM == null)
_hotCoolplatePageVM = new(_adsManager, "directlySetInViewModel"); _hotCoolplatePageVM = new(_adsManager, "directlySetInViewModel");
@@ -408,8 +391,6 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
CurrentPage = hotCoolPlatePage; CurrentPage = hotCoolPlatePage;
Breadcrumb = " > Heiz- /Kühlplatte"; Breadcrumb = " > Heiz- /Kühlplatte";
break; break;
default: default:
CurrentPage = new Page(); CurrentPage = new Page();
@@ -428,8 +409,8 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
[RelayCommand] [RelayCommand]
private void AckAlarms() private void AckAlarms()
{ {
_adsManager.WriteValue("GVL_SCADA.stMachine.stConfirmAlarmsBtn.xRequest", true); _adsManager.WriteValue("GVL_SCADA.stMachine.stConfirmAlarmsBtn.xRequest", true);
} }
public void Dispose() public void Dispose()
{ {

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
namespace InfineonHMI.Model; namespace InfineonHMI.Model;
@@ -110,14 +111,38 @@ public enum Stationenum : uint
} }
public class StationEntry(Stationenum station, string name) public class StationEntry
{ {
public Stationenum eStation = station; private Stationenum eStation;
public string sName = name; public Stationenum EStation
{
get { return eStation; }
set { eStation = value; }
}
private string sName;
public string SName
{
get { return sName; }
set { sName = value; }
}
public StationEntry(Stationenum station, string name)
{
EStation = station;
SName = name;
}
public StationEntry()
{
EStation = Stationenum.EINGABE;
SName = "Eingabetray";
}
public override string ToString() public override string ToString()
{ {
return sName; return SName;
} }
} }
@@ -127,10 +152,8 @@ public class FlowReceipeEntry()
public UInt16 Priority { get; set; } public UInt16 Priority { get; set; }
public required StationEntry Station { get; set; } public required StationEntry Station { get; set; }
public UInt16 MaxRetries { get; set; } public UInt16 MaxRetries { get; set; }
public int NextNodeSuccess { get; set; } public int NextNodeSuccess { get; set; }
public int NextNodeRetry { get; set; } public int NextNodeRetry { get; set; }
public int NextNodeFail { get; set; } public int NextNodeFail { get; set; }
} }

View File

@@ -34,8 +34,7 @@ public class ReceipeObject
public ReceipeCoolplate ReceipeCoolplate { get; set; } public ReceipeCoolplate ReceipeCoolplate { get; set; }
public ReceipeEtcher ReceipeEtcher { get; set; } public ReceipeEtcher ReceipeEtcher { get; set; }
public ReceipeHighvoltageTester ReceipeHvTester { get; set; } public ReceipeHighvoltageTester ReceipeHvTester { get; set; }
public FlowReceipeModel FlowreceipeModel { get; set; }
public FlowReceipe Flowreceipe { get; set; }
public ReceipeObject() public ReceipeObject()
@@ -46,7 +45,7 @@ public class ReceipeObject
ReceipeCoolplate = new ReceipeCoolplate(); ReceipeCoolplate = new ReceipeCoolplate();
ReceipeEtcher = new ReceipeEtcher(); ReceipeEtcher = new ReceipeEtcher();
ReceipeHvTester = new ReceipeHighvoltageTester(); ReceipeHvTester = new ReceipeHighvoltageTester();
Flowreceipe = new FlowReceipe(); FlowreceipeModel = new FlowReceipeModel();
} }
} }
@@ -195,12 +194,12 @@ public class EtcherRobotStepData
} }
public class FlowReceipe public class FlowReceipeModel
{ {
public int NodeCount { get; set; } public int NodeCount { get; set; }
public List<FlowReceipeNode> Nodes { get; set; } public List<FlowReceipeNode> Nodes { get; set; }
public FlowReceipe() public FlowReceipeModel()
{ {
Nodes = new List<FlowReceipeNode>(); Nodes = new List<FlowReceipeNode>();
} }
@@ -209,7 +208,7 @@ public class FlowReceipe
public class FlowReceipeNode public class FlowReceipeNode
{ {
public UInt16 Priority { get; set; } public UInt16 Priority { get; set; }
public Int32 StationType { get; set; } public UInt32 StationType { get; set; }
public UInt16 MaxRetries { get; set; } public UInt16 MaxRetries { get; set; }
public int NextNodeSuccess { get; set; } public int NextNodeSuccess { get; set; }

View File

@@ -1,377 +0,0 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using Heisig.HMI.AdsManager;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System.Windows;
using System.Windows.Controls;
using Common;
using InfineonHMI.Common;
using TcEventLoggerAdsProxyLib;
namespace InfineonHMI;
public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
{
[ObservableProperty] private StringControlButtonVM dummyStringVM;
[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 IConfiguration _config;
private User currentUser;
// Last active event
[ObservableProperty] private string currentActiveEvent = "";
// Empty page
private readonly Page _emptyPage;
// Last navigate message
private readonly Stack<NavigateMessage> _messageStack = new();
NavigateMessage? _currentMessage;
// Hot Coolplate page view model
HotCoolPlatePageVM? _hotCoolplatePageVM;
AlignmentStationPageVM? _alignmentStationPageVM;
EtchingStation1PageVM? _etchingStation1PageVm;
EtchingStation2PageVM? _etchingStation2PageVm;
HighVoltageStationPageVM? _highVoltageStationPageVm;
MediaCabinetPageVM? _mediaCabinetPageVM;
NIOStationPageVM? _nioStationPageVm;
TrayFeederPageVM? _trayFeederPageVm;
private ProductionOverviewPageVM? _prodVM;
private MainWindowVM _mainVm;
// Kuka Robot page view model
KukaRobotPageVM? _kukaRobotPageVM;
public MachineOverviewPageVM()
{
// default ctor
MachinePackMLControlVM = new();
MachinePackMLControlVM.STitle = "Betriebszustand\n Gesamtanlage";
currentUser = Users.getCurrentUser();
}
public MachineOverviewPageVM(IAdsManager adsManager, IConfiguration config,MainWindowVM mainVm, ProductionOverviewPageVM prodVm, TcEventLogger eventLogger)
{
_adsManager = adsManager;
_config = config;
_prodVM = prodVm;
_mainVm = mainVm;
// Create dummy string
DummyStringVM = new StringControlButtonVM();
currentUser = Users.getCurrentUser();
MachinePackMLControlVM = new(_adsManager, "GVL_SCADA.stMachine.stMachineCmds");
MachinePackMLControlVM.STitle = "Betriebszustand\n Gesamtanlage";
// Create empty page
_emptyPage = new();
CurrentDetailPage = _emptyPage;
_currentMessage = new NavigateMessage("", typeof(Page));
_messageStack.Push(_currentMessage);
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;
}
[RelayCommand]
public void TrayfeederPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(TrayFeederPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void AlignerPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(AlignmentStationPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void Etching1PageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(EtchingStation1Page));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void Etching2PageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(EtchingStation2Page));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void HVTestPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(HighVoltageStationPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void HotCoolplatePageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(HotCoolPlatePage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void NIOStationPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(NIOStationPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void KukaPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(KukaRobotPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void MediaCabinetPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(MediaCabinetPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
// Only use for forward traversal!
public void Receive(NavigateMessage message)
{
// Only change page if its a new page type
if (CurrentDetailPage.GetType() == message.type)
return;
// Push current message
if (_currentMessage != null)
_messageStack.Push(_currentMessage);
// Save current message for later push
_currentMessage = message;
// Set can navigate back
Navigate(message);
}
private void Navigate(NavigateMessage message)
{
// Dispose current pages viewmodel
if (CurrentDetailPage.DataContext is IDisposable viewModel)
{
CurrentDetailPage.DataContext = null;
viewModel.Dispose();
}
// Create new page
switch (message.type.Name)
{
case nameof(TrayFeederPage):
if (_trayFeederPageVm == null)
_trayFeederPageVm = new(_adsManager, "GVL_SCADA.stMachine"); //In and Out ist set directly in ViewModel
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
CurrentDetailPage = trayFeederPage;
break;
case nameof(AlignmentStationPage):
// Create seetings page view model only once
if (_alignmentStationPageVM == null)
_alignmentStationPageVM = new(_adsManager, "GVL_SCADA.stMachine.stAligner");
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
CurrentDetailPage = settingsPage;
break;
case nameof(EtchingStation1Page):
if (_etchingStation1PageVm == null)
_etchingStation1PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher1");
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
CurrentDetailPage = etchingStation1Page;
break;
case nameof(EtchingStation2Page):
if (_etchingStation2PageVm == null)
_etchingStation2PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher2");
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
CurrentDetailPage = etchingStation2Page;
break;
case nameof(HighVoltageStationPage):
if (_highVoltageStationPageVm == null)
_highVoltageStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stHVTester"); // Hot/Cold is Set directly in VM
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
CurrentDetailPage = highVoltageStationPage;
break;
case nameof(HotCoolPlatePage):
if (_hotCoolplatePageVM == null)
_hotCoolplatePageVM = new(_adsManager, "GVL_SCADA.stMachine"); //".stHotplate /.stCoolplate is set directly in VM
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
CurrentDetailPage = hotCoolPlatePage;
break;
case nameof(NIOStationPage):
if (_nioStationPageVm == null)
_nioStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stNOK");
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
CurrentDetailPage = nIOStationPage;
break;
case nameof(KukaRobotPage):
// Create page view model only once
if (_kukaRobotPageVM == null)
_kukaRobotPageVM = new(_adsManager); // Variablenames are set directly in Viewmodel
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
CurrentDetailPage = kukaRobotPage;
break;
case nameof(MediaCabinetPage):
if (_mediaCabinetPageVM == null)
_mediaCabinetPageVM = new(_adsManager, "GVL_SCADA.stMachine.stMediaCabinet"); //TODO not Implemented on PLC yet
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
CurrentDetailPage = mediaCabinetPage;
break;
default:
CurrentDetailPage = new Page();
break;
}
}
[RelayCommand]
private void AckAlarms()
{
_adsManager.WriteValue("GVL_SCADA.stConfirmAlarmsBtn.xRequest", true);
}
public void Dispose()
{
// Dispose current pages viewmodel
if (CurrentDetailPage.DataContext is IDisposable viewModel)
{
CurrentDetailPage.DataContext = null;
viewModel.Dispose();
}
DummyStringVM.Dispose();
}
}

View File

@@ -1,12 +1,6 @@
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using HMIToolkit;
using System.ComponentModel.DataAnnotations;
using Heisig.HMI.AdsManager; using Heisig.HMI.AdsManager;
using CommunityToolkit.Mvvm.Input;
using TwinCAT.TypeSystem;
using System.Collections.ObjectModel;
using Common; using Common;
using InfineonHMI.Model;
namespace InfineonHMI; namespace InfineonHMI;

View File

@@ -0,0 +1,177 @@
using Common;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Heisig.HMI.AdsManager;
using InfineonHMI.Common;
using Microsoft.Extensions.Configuration;
namespace InfineonHMI;
public sealed partial class OverviewPageVM : ObservableValidator, IDisposable
{
[ObservableProperty] private PackMLControlVM machinePackMLControlVM;
private User currentUser;
private MainWindowVM _mainVm;
private readonly IAdsManager _adsManager;
private readonly IConfiguration _config;
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; }
}
public OverviewPageVM()
{
// default ctor
MachinePackMLControlVM = new();
MachinePackMLControlVM.STitle = "Betriebszustand\n Gesamtanlage";
currentUser = Users.getCurrentUser();
}
public OverviewPageVM(IAdsManager adsManager, string variableName)
{
_adsManager = adsManager;
currentUser = Users.getCurrentUser();
MachinePackMLControlVM = new(_adsManager, "GVL_SCADA.stMachine.stMachineCmds");
MachinePackMLControlVM.STitle = "Betriebszustand\n Gesamtanlage";
}
[RelayCommand]
public void TrayfeederPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(TrayFeederPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void AlignerPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(AlignmentStationPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void Etching1PageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(EtchingStation1Page));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void Etching2PageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(EtchingStation2Page));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void HVTestPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(HighVoltageStationPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void HotCoolplatePageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(HotCoolPlatePage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void NIOStationPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(NIOStationPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void KukaPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(KukaRobotPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
[RelayCommand]
public void MediaCabinetPageClicked()
{
NavigateMessage message = new("", typeof(ProductionOverviewPage));
NavigateMessage nextMessage = new("", typeof(MediaCabinetPage));
this.Dispose();
_mainVm?.NavigateFromOuterPage(message, nextMessage);
}
public void Dispose()
{
}
}

View File

@@ -3,308 +3,408 @@ using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging; using CommunityToolkit.Mvvm.Messaging;
using Heisig.HMI.AdsManager; using Heisig.HMI.AdsManager;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using InfineonHMI.Common; using InfineonHMI.Common;
using TcEventLoggerAdsProxyLib; using TcEventLoggerAdsProxyLib;
using System.ComponentModel;
namespace InfineonHMI; namespace InfineonHMI;
public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable, INotifyPropertyChanged
{ {
[ObservableProperty] private StringControlButtonVM dummyStringVM; [ObservableProperty] private StringControlButtonVM dummyStringVM;
[ObservableProperty] private Page currentDetailPage; [ObservableProperty] private Page currentDetailPage;
[ObservableProperty] private bool canNavigateBack; [ObservableProperty] private bool canNavigateBack;
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; private User currentUser;
// Last active event // Last active event
[ObservableProperty] private string currentActiveEvent = ""; [ObservableProperty] private string currentActiveEvent = "";
private readonly object _lock = new(); private readonly object _lock = new();
// Empty page // Empty page
private readonly Page _emptyPage; private readonly Page _emptyPage;
// Last navigate message // Last navigate message
private readonly Stack<NavigateMessage> _messageStack = new(); private readonly Stack<NavigateMessage> _messageStack = new();
NavigateMessage? _currentMessage; NavigateMessage? _currentMessage;
// Hot Coolplate page view model
HotCoolPlatePageVM? _hotCoolplatePageVM;
AlignmentStationPageVM? _alignmentStationPageVM; // Hot Coolplate page view model
HotCoolPlatePageVM? _hotCoolplatePageVM;
EtchingStation1PageVM? _etchingStation1PageVm; AlignmentStationPageVM? _alignmentStationPageVM;
EtchingStation2PageVM? _etchingStation2PageVm; EtchingStation1PageVM? _etchingStation1PageVm;
HighVoltageStationPageVM? _highVoltageStationPageVm; EtchingStation2PageVM? _etchingStation2PageVm;
MediaCabinetPageVM? _mediaCabinetPageVM; HighVoltageStationPageVM? _highVoltageStationPageVm;
NIOStationPageVM? _nioStationPageVm; MediaCabinetPageVM? _mediaCabinetPageVM;
TrayFeederPageVM? _trayFeederPageVm; NIOStationPageVM? _nioStationPageVm;
TrayFeederPageVM? _trayFeederPageVm;
// Kuka Robot page view model OverviewPageVM? _overviewPageVM;
KukaRobotPageVM? _kukaRobotPageVM;
public ProductionOverviewPageVM() public bool IsOverview
{ {
// default ctor get => (OverviewPage)currentDetailPage != null;
currentUser = Users.getCurrentUser(); set
} {
public ProductionOverviewPageVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger, NavigateMessage? message = null) if (value)
{ OverviewPageClicked();
_adsManager = adsManager; }
_config = config; }
// Create dummy string
DummyStringVM = new StringControlButtonVM();
currentUser = Users.getCurrentUser();
// Create empty page
_emptyPage = new();
CurrentDetailPage = _emptyPage; public bool IsTrayFeeder
_currentMessage = new NavigateMessage("", typeof(Page)); {
_messageStack.Push(_currentMessage); get => (TrayFeederPage)currentDetailPage != null;
set
{
if(value)
TrayfeederPageClicked();
}
}
if (message != null) public bool IsAligner
{ {
Receive(message); get => (AlignmentStationPage)currentDetailPage != null;
} set
{
if (value)
AlignerPageClicked();
}
}
WeakReferenceMessenger.Default.Register<NavigateMessage>(this); public bool IsHVTest
{
get => (HighVoltageStationPage)currentDetailPage != null;
set
{
if (value)
HVTestPageClicked();
}
}
} public bool IsEtchingStation1
{
get => (EtchingStation1Page)currentDetailPage != null;
set
{
if (value)
Etching1PageClicked();
}
}
[RelayCommand] public bool IsEtchingStation2
public void TrayfeederPageClicked() {
{ get => (EtchingStation2Page)currentDetailPage != null;
_messageStack.Clear(); set
_currentMessage = new NavigateMessage("", typeof(Page)); {
NavigateMessage message = new(_config["TrayFeederVarName"]!, typeof(TrayFeederPage)); if (value)
Receive(message); Etching2PageClicked();
} }
}
[RelayCommand] public bool IsHotCoolPlate
public void AlignerPageClicked() {
{ get => (HotCoolPlatePage)currentDetailPage != null;
_messageStack.Clear(); set
_currentMessage = new NavigateMessage("", typeof(Page)); {
NavigateMessage message = new(_config["AlignerVarName"]!, typeof(AlignmentStationPage)); if (value)
Receive(message); HotCoolplatePageClicked();
} }
}
[RelayCommand] public bool IsKukaRobot
public void Etching1PageClicked() {
{ get => (KukaRobotPage)currentDetailPage != null;
_messageStack.Clear(); set
_currentMessage = new NavigateMessage("", typeof(Page)); {
NavigateMessage message = new(_config["Etching1VarName"]!, typeof(EtchingStation1Page)); if (value)
Receive(message); KukaPageClicked();
} }
}
[RelayCommand] public bool IsNioStation
public void Etching2PageClicked() {
{ get => (NIOStationPage)currentDetailPage != null;
_messageStack.Clear(); set
_currentMessage = new NavigateMessage("", typeof(Page)); {
NavigateMessage message = new(_config["Etching2VarName"]!, typeof(EtchingStation2Page)); if (value)
Receive(message); NIOStationPageClicked();
} }
}
public bool IsMediaCabinet
{
get => (MediaCabinetPage)currentDetailPage != null;
set
{
if (value)
MediaCabinetPageClicked();
}
}
[RelayCommand] // Kuka Robot page view model
public void HVTestPageClicked() KukaRobotPageVM? _kukaRobotPageVM;
{ private bool isTrayFeeder;
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["HVTestVarName"]!, typeof(HighVoltageStationPage));
Receive(message);
}
[RelayCommand] public ProductionOverviewPageVM()
public void HotCoolplatePageClicked() {
{ // default ctor
_messageStack.Clear(); currentUser = Users.getCurrentUser();
_currentMessage = new NavigateMessage("", typeof(Page)); }
NavigateMessage message = new(_config["HotCoolplateVarName"]!, typeof(HotCoolPlatePage)); public ProductionOverviewPageVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger, NavigateMessage? message = null)
Receive(message); {
} _adsManager = adsManager;
_config = config;
// Create dummy string
DummyStringVM = new StringControlButtonVM();
currentUser = Users.getCurrentUser();
// Create empty page
_emptyPage = new();
[RelayCommand] CurrentDetailPage = _emptyPage;
public void NIOStationPageClicked() _currentMessage = new NavigateMessage("", typeof(Page));
{ _messageStack.Push(_currentMessage);
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["NIOStationVarName"]!, typeof(NIOStationPage));
Receive(message);
}
if (message != null)
{
Receive(message);
}
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
[RelayCommand] }
public void KukaPageClicked()
{
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["KukaRobotVarName"]!, typeof(KukaRobotPage));
Receive(message);
}
[RelayCommand] [RelayCommand]
public void MediaCabinetPageClicked() public void TrayfeederPageClicked()
{ {
_messageStack.Clear(); _messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page)); _currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["MediaCabinetVarName"]!, typeof(MediaCabinetPage)); NavigateMessage message = new(_config["TrayFeederVarName"]!, typeof(TrayFeederPage));
Receive(message); Receive(message);
} }
// Only use for forward traversal! [RelayCommand]
public void Receive(NavigateMessage message) public void AlignerPageClicked()
{ {
// Only change page if its a new page type _messageStack.Clear();
if (CurrentDetailPage.GetType() == message.type) _currentMessage = new NavigateMessage("", typeof(Page));
return; NavigateMessage message = new(_config["AlignerVarName"]!, typeof(AlignmentStationPage));
Receive(message);
}
// Push current message [RelayCommand]
if (_currentMessage != null) public void Etching1PageClicked()
_messageStack.Push(_currentMessage); {
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["Etching1VarName"]!, typeof(EtchingStation1Page));
Receive(message);
}
// Save current message for later push [RelayCommand]
_currentMessage = message; public void Etching2PageClicked()
{
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["Etching2VarName"]!, typeof(EtchingStation2Page));
Receive(message);
}
// Set can navigate back [RelayCommand]
CanNavigateBack = true; public void HVTestPageClicked()
{
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["HVTestVarName"]!, typeof(HighVoltageStationPage));
Receive(message);
}
Navigate(message); [RelayCommand]
} public void HotCoolplatePageClicked()
{
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["HotCoolplateVarName"]!, typeof(HotCoolPlatePage));
Receive(message);
}
public void NavigateFromOuterPage(NavigateMessage message) [RelayCommand]
{ public void NIOStationPageClicked()
_currentMessage = message; {
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["NIOStationVarName"]!, typeof(NIOStationPage));
Receive(message);
}
CanNavigateBack = true; [RelayCommand]
Navigate(message); public void OverviewPageClicked()
} {
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["OverviewVarName"]!, typeof(OverviewPage));
Receive(message);
}
private void Navigate(NavigateMessage message) [RelayCommand]
{ public void KukaPageClicked()
// Dispose current pages viewmodel {
if (CurrentDetailPage.DataContext is IDisposable viewModel) _messageStack.Clear();
{ _currentMessage = new NavigateMessage("", typeof(Page));
CurrentDetailPage.DataContext = null; NavigateMessage message = new(_config["KukaRobotVarName"]!, typeof(KukaRobotPage));
viewModel.Dispose(); Receive(message);
} }
// Create new page [RelayCommand]
switch (message.type.Name) public void MediaCabinetPageClicked()
{ {
case nameof(TrayFeederPage): _messageStack.Clear();
if (_trayFeederPageVm == null) _currentMessage = new NavigateMessage("", typeof(Page));
_trayFeederPageVm = new(_adsManager, "GVL_SCADA.stMachine"); //In and Out ist set directly in ViewModel NavigateMessage message = new(_config["MediaCabinetVarName"]!, typeof(MediaCabinetPage));
Receive(message);
}
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm }; // Only use for forward traversal!
CurrentDetailPage = trayFeederPage; public void Receive(NavigateMessage message)
break; {
// Only change page if its a new page type
if (CurrentDetailPage.GetType() == message.type)
return;
case nameof(AlignmentStationPage): // Push current message
// Create seetings page view model only once if (_currentMessage != null)
if (_alignmentStationPageVM == null) _messageStack.Push(_currentMessage);
_alignmentStationPageVM = new(_adsManager, "GVL_SCADA.stMachine.stAligner");
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
CurrentDetailPage = settingsPage;
break;
case nameof(EtchingStation1Page): // Save current message for later push
if (_etchingStation1PageVm == null) _currentMessage = message;
_etchingStation1PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher1");
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm }; // Set can navigate back
CurrentDetailPage = etchingStation1Page; CanNavigateBack = true;
break;
case nameof(EtchingStation2Page): Navigate(message);
if (_etchingStation2PageVm == null) }
_etchingStation2PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher2");
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm }; public void NavigateFromOuterPage(NavigateMessage message)
CurrentDetailPage = etchingStation2Page; {
break; _currentMessage = message;
case nameof(HighVoltageStationPage): CanNavigateBack = true;
if (_highVoltageStationPageVm == null) Navigate(message);
_highVoltageStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stHVTester"); // Hot/Cold is Set directly in VM }
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm }; private void Navigate(NavigateMessage message)
CurrentDetailPage = highVoltageStationPage; {
break; // Dispose current pages viewmodel
if (CurrentDetailPage.DataContext is IDisposable viewModel)
{
CurrentDetailPage.DataContext = null;
viewModel.Dispose();
}
case nameof(HotCoolPlatePage): // Create new page
if (_hotCoolplatePageVM == null) switch (message.type.Name)
_hotCoolplatePageVM = new(_adsManager, "GVL_SCADA.stMachine"); //".stHotplate /.stCoolplate is set directly in VM {
case nameof(OverviewPage):
_overviewPageVM ??= OverviewPage.CreateModel(_adsManager);
CurrentDetailPage = OverviewPage.CreateView(_overviewPageVM);
break;
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM }; case nameof(TrayFeederPage):
CurrentDetailPage = hotCoolPlatePage; _trayFeederPageVm ??= TrayFeederPage.CreateModel(_adsManager);
break; CurrentDetailPage = TrayFeederPage.CreateView(_trayFeederPageVm);
break;
case nameof(NIOStationPage): case nameof(AlignmentStationPage):
if (_nioStationPageVm == null) // Create seetings page view model only once
_nioStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stNOK");
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm }; _alignmentStationPageVM ??= AlignmentStationPage.CreateModel(_adsManager);
CurrentDetailPage = nIOStationPage; CurrentDetailPage = AlignmentStationPage.CreateView(_alignmentStationPageVM);
break; break;
case nameof(KukaRobotPage): case nameof(EtchingStation1Page):
// Create page view model only once
if (_kukaRobotPageVM == null)
_kukaRobotPageVM = new(_adsManager); // Variablenames are set directly in Viewmodel
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM }; _etchingStation1PageVm ??= EtchingStation1Page.CreateModel(_adsManager);
CurrentDetailPage = kukaRobotPage; CurrentDetailPage = EtchingStation1Page.CreateView(_etchingStation1PageVm);
break; break;
case nameof(MediaCabinetPage): case nameof(EtchingStation2Page):
if (_mediaCabinetPageVM == null)
_mediaCabinetPageVM = new(_adsManager, "GVL_SCADA.stMachine.stMediaCabinet"); //TODO not Implemented on PLC yet
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM }; _etchingStation2PageVm ??= EtchingStation2Page.CreateModel(_adsManager);
CurrentDetailPage = mediaCabinetPage; CurrentDetailPage = EtchingStation2Page.CreateView(_etchingStation2PageVm);
break; break;
default: case nameof(HighVoltageStationPage):
CurrentDetailPage = new Page();
break;
}
}
[RelayCommand] _highVoltageStationPageVm ??= HighVoltageStationPage.CreateModel(_adsManager);
private void AckAlarms() CurrentDetailPage = HighVoltageStationPage.CreateView(_highVoltageStationPageVm);
{ break;
_adsManager.WriteValue("GVL_SCADA.stConfirmAlarmsBtn.xRequest", true);
}
public void Dispose() case nameof(HotCoolPlatePage):
{
// Dispose current pages viewmodel
if (CurrentDetailPage.DataContext is IDisposable viewModel)
{
CurrentDetailPage.DataContext = null;
viewModel.Dispose();
}
DummyStringVM.Dispose(); _hotCoolplatePageVM ??= HotCoolPlatePage.CreateModel(_adsManager);
} CurrentDetailPage = HotCoolPlatePage.CreateView(_hotCoolplatePageVM);
break;
case nameof(NIOStationPage):
_nioStationPageVm ??= NIOStationPage.CreateModel(_adsManager);
CurrentDetailPage = NIOStationPage.CreateView(_nioStationPageVm);
break;
case nameof(KukaRobotPage):
// Create page view model only once
_kukaRobotPageVM??= KukaRobotPage.CreateModel(_adsManager);
CurrentDetailPage = KukaRobotPage.CreateView(_kukaRobotPageVM);
break;
case nameof(MediaCabinetPage)://TODO not Implemented on PLC yet
_mediaCabinetPageVM ??= MediaCabinetPage.CreateModel(_adsManager);
CurrentDetailPage = MediaCabinetPage.CreateView(_mediaCabinetPageVM);
break;
}
OnPropertyChanged(nameof(IsTrayFeeder));
OnPropertyChanged(nameof(IsHVTest));
OnPropertyChanged(nameof(IsAligner));
OnPropertyChanged(nameof(IsEtchingStation1));
OnPropertyChanged(nameof(IsEtchingStation2));
OnPropertyChanged(nameof(IsHotCoolPlate));
OnPropertyChanged(nameof(IsMediaCabinet));
OnPropertyChanged(nameof(IsKukaRobot));
OnPropertyChanged(nameof(IsNioStation));
OnPropertyChanged(nameof(IsOverview));
}
[RelayCommand]
private void AckAlarms()
{
_adsManager.WriteValue("GVL_SCADA.stConfirmAlarmsBtn.xRequest", true);
}
public void Dispose()
{
// Dispose current pages viewmodel
if (CurrentDetailPage.DataContext is IDisposable viewModel)
{
CurrentDetailPage.DataContext = null;
viewModel.Dispose();
}
DummyStringVM.Dispose();
}
} }

File diff suppressed because it is too large Load Diff

View File

@@ -35,7 +35,7 @@
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Ausrichtstation" VerticalAlignment="Top" HorizontalAlignment="Left" /> <!--<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}"/> <HMIToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding Path=VacuumValveControlVm}"/>

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,11 +8,22 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class AlignmentStationPage : Page public partial class AlignmentStationPage : Page
{ {
public AlignmentStationPage() public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
{
InitializeComponent(); public static AlignmentStationPageVM CreateModel(IAdsManager adsManager)
// Unloaded += OnUnloaded; {
} return new(adsManager, AdsVariableName);
}
public static AlignmentStationPage CreateView(AlignmentStationPageVM model)
{
return new AlignmentStationPage { DataContext = model };
}
public AlignmentStationPage()
{
InitializeComponent();
}
private void OnUnloaded(object? sender, EventArgs e) private void OnUnloaded(object? sender, EventArgs e)
{ {

View File

@@ -33,7 +33,7 @@
<RowDefinition /> <RowDefinition />
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Ätzstation 1" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40" /> <!--<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}"/>

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,15 +8,25 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class EtchingStation1Page : Page public partial class EtchingStation1Page : Page
{ {
public EtchingStation1Page() public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e) public static EtchingStation1PageVM CreateModel(IAdsManager adsManager)
{ {
var disposable = DataContext as IDisposable; return new(adsManager, AdsVariableName);
disposable?.Dispose(); }
}
public static EtchingStation1Page CreateView(EtchingStation1PageVM model)
{
return new EtchingStation1Page { DataContext = model };
}
public EtchingStation1Page()
{
InitializeComponent();
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
} }

View File

@@ -33,7 +33,7 @@
<RowDefinition /> <RowDefinition />
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Ätzstation 2" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40" /> <!--<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}"/>

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,15 +8,25 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class EtchingStation2Page : Page public partial class EtchingStation2Page : Page
{ {
public EtchingStation2Page() public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e) public static EtchingStation2PageVM CreateModel(IAdsManager adsManager)
{ {
var disposable = DataContext as IDisposable; return new(adsManager, AdsVariableName);
disposable?.Dispose(); }
}
public static EtchingStation2Page CreateView(EtchingStation2PageVM model)
{
return new EtchingStation2Page { DataContext = model };
}
public EtchingStation2Page()
{
InitializeComponent();
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
} }

View File

@@ -13,7 +13,7 @@
</Page.Resources> </Page.Resources>
<Grid> <Grid>
<DataGrid ItemsSource="{Binding CurrentEvents}" AutoGenerateColumns="False" IsReadOnly="True"> <DataGrid ItemsSource="{Binding CurrentEvents}" FontSize="30" AutoGenerateColumns="False" IsReadOnly="True">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="Message" Binding="{Binding Message}" Width="400"/> <DataGridTextColumn Header="Message" Binding="{Binding Message}" Width="400"/>
<DataGridTextColumn Header="Raised" Binding="{Binding Raised, Converter={StaticResource dtConverter}}" Width="*" SortDirection="Descending"/> <DataGridTextColumn Header="Raised" Binding="{Binding Raised, Converter={StaticResource dtConverter}}" Width="*" SortDirection="Descending"/>

View File

@@ -34,7 +34,7 @@
<RowDefinition /> <RowDefinition />
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<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="0" Grid.ColumnSpan="2" Content="Hochvolt Test Stationen" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40" />-->
<Label Grid.Row="0" Grid.Column="0" Content="Hochvolt Test Station Heiß" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="30"/> <Label Grid.Row="0" Grid.Column="0" Content="Hochvolt Test Station Heiß" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="30"/>
<Label Grid.Row="0" Grid.Column="5" Content="Hochvolt Test Station Kalt" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="30"/> <Label Grid.Row="0" Grid.Column="5" Content="Hochvolt Test Station Kalt" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="30"/>

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,13 +8,24 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class HighVoltageStationPage : Page public partial class HighVoltageStationPage : Page
{ {
public HighVoltageStationPage() public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e) public static HighVoltageStationPageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static HighVoltageStationPage CreateView(HighVoltageStationPageVM model)
{
return new HighVoltageStationPage { DataContext = model };
}
public HighVoltageStationPage()
{
InitializeComponent();
}
private void OnUnloaded(object? sender, EventArgs e)
{ {
var disposable = DataContext as IDisposable; var disposable = DataContext as IDisposable;
disposable?.Dispose(); disposable?.Dispose();

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,13 +8,24 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class HotCoolPlatePage : Page public partial class HotCoolPlatePage : Page
{ {
public HotCoolPlatePage() public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e) public static HotCoolPlatePageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static HotCoolPlatePage CreateView(HotCoolPlatePageVM model)
{
return new HotCoolPlatePage { DataContext = model };
}
public HotCoolPlatePage()
{
InitializeComponent();
}
private void OnUnloaded(object? sender, EventArgs e)
{ {
var disposable = DataContext as IDisposable; var disposable = DataContext as IDisposable;
disposable?.Dispose(); disposable?.Dispose();

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,13 +8,22 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class KukaRobotPage : Page public partial class KukaRobotPage : Page
{ {
public KukaRobotPage() public static KukaRobotPageVM CreateModel(IAdsManager adsManager)
{ {
InitializeComponent(); return new(adsManager);
// Unloaded += OnUnloaded; }
}
private void OnUnloaded(object? sender, EventArgs e) public static KukaRobotPage CreateView(KukaRobotPageVM model)
{
return new KukaRobotPage { DataContext = model };
}
public KukaRobotPage()
{
InitializeComponent();
}
private void OnUnloaded(object? sender, EventArgs e)
{ {
var disposable = DataContext as IDisposable; var disposable = DataContext as IDisposable;
disposable?.Dispose(); disposable?.Dispose();

View File

@@ -1,196 +0,0 @@
<Page x:Class="InfineonHMI.MachineOverviewPage"
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:uniperHmi="clr-namespace:InfineonHMI"
xmlns:common="clr-namespace:Common"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=uniperHmi:MachineOverviewPageVM, IsDesignTimeCreatable=True}"
Title="Production Overview">
<Grid Width="3840" Height="1554">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="450"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="1" Source="/Anlagenuebersicht.png" Stretch="Fill" Height="1504" Width="1936"/>
<!-- DETAIL PAGE -->
<Frame x:Name="DetailFrame"
Grid.Column="1"
NavigationUIVisibility="Hidden"
Content="{Binding CurrentDetailPage}"/>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<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="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button IsEnabled="{Binding CanUserChangePageTrayFeeder}" Grid.Row="0"
Height="160"
Margin="5"
FontSize="36"
FontFamily="Arial"
Content="Trayfeeder&#xA;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-&#xA;/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>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-23.091"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageEtching2}"
Command="{Binding Etching2PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1431,473,1770,971" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="24.991"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageHighVoltage}"
Command="{Binding HVTestPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1706,183,1472,1202" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-105.32"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageHotCoolplate}"
Command="{Binding HotCoolplatePageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2039,316,1175,1106" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-56.721"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageMediaCabinet}"
Command="{Binding MediaCabinetPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="878,565,2350,641"/>
<Button IsEnabled="{Binding CanUserChangePageAlignment}"
Command="{Binding AlignerPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1633,1048,1594,474" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="27.441"/>
<TranslateTransform/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageNIOStation}"
Command="{Binding NIOStationPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1707,932,1543,601" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="27.441"/>
<TranslateTransform/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<common:PackMLControl Margin="20 7 10 5"
IsEnabled="{Binding CanUserInteract}"
Grid.Column="1"
DataContext="{Binding MachinePackMLControlVM}" HorizontalAlignment="Left" VerticalAlignment="Top" />
</Grid>
</Page>

View File

@@ -1,22 +0,0 @@
using System.Windows.Controls;
namespace InfineonHMI;
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class MachineOverviewPage : Page
{
public MachineOverviewPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}

View File

@@ -25,7 +25,7 @@
<RowDefinition Height="30*" /> <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" FontSize="35" /> <!--<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}"/>

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,13 +8,24 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class MediaCabinetPage : Page public partial class MediaCabinetPage : Page
{ {
public MediaCabinetPage() public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e) public static MediaCabinetPageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static MediaCabinetPage CreateView(MediaCabinetPageVM model)
{
return new MediaCabinetPage { DataContext = model };
}
public MediaCabinetPage()
{
InitializeComponent();
}
private void OnUnloaded(object? sender, EventArgs e)
{ {
var disposable = DataContext as IDisposable; var disposable = DataContext as IDisposable;
disposable?.Dispose(); disposable?.Dispose();

View File

@@ -34,7 +34,7 @@
<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" Grid.ColumnSpan="2" Content="NOK Station" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40" />-->
<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" />

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,13 +8,24 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class NIOStationPage : Page public partial class NIOStationPage : Page
{ {
public NIOStationPage() public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e) public static NIOStationPageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static NIOStationPage CreateView(NIOStationPageVM model)
{
return new NIOStationPage { DataContext = model };
}
public NIOStationPage()
{
InitializeComponent();
}
private void OnUnloaded(object? sender, EventArgs e)
{ {
var disposable = DataContext as IDisposable; var disposable = DataContext as IDisposable;
disposable?.Dispose(); disposable?.Dispose();

View File

@@ -0,0 +1,95 @@
<Page x:Class="InfineonHMI.OverviewPage"
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:infineonHmi="clr-namespace:InfineonHMI"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=infineonHmi:OverviewPageVM, IsDesignTimeCreatable=True}"
d:DesignHeight="1554" d:DesignWidth="3390"
Title="OverviewPagePage">
<Grid Width="3840" Height="1554">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image Source="/Anlagenuebersicht.png" Stretch="Fill" Height="1504" Width="1936"/>
<!--<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>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-23.091"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageEtching2}"
Command="{Binding Etching2PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1431,473,1770,971" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="24.991"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageHighVoltage}"
Command="{Binding HVTestPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1706,183,1472,1202" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-105.32"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageHotCoolplate}"
Command="{Binding HotCoolplatePageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2039,316,1175,1106" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-56.721"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageMediaCabinet}"
Command="{Binding MediaCabinetPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="878,565,2350,641"/>
<Button IsEnabled="{Binding CanUserChangePageAlignment}"
Command="{Binding AlignerPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1633,1048,1594,474" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="27.441"/>
<TranslateTransform/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<Button IsEnabled="{Binding CanUserChangePageNIOStation}"
Command="{Binding NIOStationPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1707,932,1543,601" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="27.441"/>
<TranslateTransform/>
</TransformGroup>
</Button.RenderTransform>
</Button>-->
<common:PackMLControl Margin="20 7 10 5"
IsEnabled="{Binding CanUserInteract}"
DataContext="{Binding MachinePackMLControlVM}" HorizontalAlignment="Left" VerticalAlignment="Top" />
</Grid>
</Page>

View File

@@ -0,0 +1,29 @@
using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI
{
/// <summary>
/// Interaktionslogik für OverviewPagePage.xaml
/// </summary>
public partial class OverviewPage : Page
{
public static string AdsVariableName = "GVL_SCADA.stMachine.Overview";
private static IAdsManager _adsManager;
public static OverviewPageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static OverviewPage CreateView(OverviewPageVM model)
{
return new OverviewPage() { DataContext = model};
}
public OverviewPage()
{
InitializeComponent();
}
}
}

View File

@@ -7,104 +7,104 @@
mc:Ignorable="d" mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=uniperHmi:ProductionOverviewPageVM, IsDesignTimeCreatable=True}" d:DataContext="{d:DesignInstance Type=uniperHmi:ProductionOverviewPageVM, IsDesignTimeCreatable=True}"
Title="Production Overview"> Title="Production Overview">
<Page.Resources>
<Style x:Name="ProductionToggleButtonStyle" x:Key="ProductionToggleButtonStyle" TargetType="ToggleButton" BasedOn="{StaticResource MahApps.Styles.ToggleButton}">
<Setter Property="FontSize" Value="36"/>
<Setter Property="Height" Value="140"/>
<Setter Property="FontFamily" Value="Arial"/>
<Setter Property="Margin" Value="5"/>
</Style>
</Page.Resources>
<Grid Width="3840" Height="1554">
<Grid Width="3840" Height="1554"> <Grid.ColumnDefinitions>
<Grid.ColumnDefinitions> <ColumnDefinition Width="450"/>
<ColumnDefinition Width="450"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/> </Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" > <Grid Grid.Column="0" >
<Grid.RowDefinitions> <Grid.RowDefinitions>
<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="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="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Grid.Row="0" <ToggleButton Grid.Row="0"
Height="160" Content="ÜBERSICHT"
Margin="5" IsChecked="{Binding IsOverview}"
FontSize="36" Style="{StaticResource ProductionToggleButtonStyle}"/>
FontFamily="Arial"
Content="Trayfeeder&#xD;&#xA;Ein-/Ausgabe"
Command="{Binding TrayfeederPageClickedCommand}"/>
<Button Grid.Row="1" <Border Grid.Row="1"
Height="160" Margin="5"
Margin="5" BorderBrush="White"
FontSize="39" BorderThickness="0,5,0,0"/>
Content="Ausrichtstation"
Command="{Binding AlignerPageClickedCommand}"/>
<Button Grid.Row="2" <ToggleButton Grid.Row="2"
Height="160" Content="TRAYFEEDER&#xD;&#xA;EIN-/AUSGABE"
Margin="5" IsChecked="{Binding IsTrayFeeder}"
FontSize="36" Style="{StaticResource ProductionToggleButtonStyle}"/>
Content="Ätzer 1"
Command="{Binding Etching1PageClickedCommand}"/>
<Button Grid.Row="3" <ToggleButton Grid.Row="3"
Height="160" Content="AUSRICHTSTATION"
Margin="5" IsChecked="{Binding IsAligner}"
FontSize="36" Style="{StaticResource ProductionToggleButtonStyle}"/>
Content="Ätzer 2"
Command="{Binding Etching2PageClickedCommand}"/>
<Button Grid.Row="4" <ToggleButton Grid.Row="4"
Height="160" Content="ÄTZER 1"
Margin="5" IsChecked="{Binding IsEtchingStation1}"
FontSize="36" Style="{StaticResource ProductionToggleButtonStyle}"/>
Content="HV Test"
Command="{Binding HVTestPageClickedCommand}"/>
<Button Grid.Row="5" <ToggleButton Grid.Row="5"
Height="160" Content="ÄTZER 2"
Margin="5" IsChecked="{Binding IsEtchingStation2}"
FontSize="36" Style="{StaticResource ProductionToggleButtonStyle}"/>
Content="Heiz-&#xD;&#xA;/Kühlplatte"
Command="{Binding HotCoolplatePageClickedCommand}"/>
<Button Grid.Row="6" <ToggleButton Grid.Row="6"
Height="160" Content="HV TEST"
Margin="5" IsChecked="{Binding IsHVTest}"
FontSize="36" Style="{StaticResource ProductionToggleButtonStyle}"/>
Content="NOK Station"
Command="{Binding NIOStationPageClickedCommand}"/>
<Border Grid.Row="7" <ToggleButton Grid.Row="7"
Content="HEIZ-&#xD;&#xA;/KÜHLPLATTE"
IsChecked="{Binding IsHotCoolPlate}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<ToggleButton Grid.Row="8"
Content="NOK STATION"
IsChecked="{Binding IsNioStation}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<Border Grid.Row="9"
Margin="5" Margin="5"
BorderBrush="White" BorderBrush="White"
BorderThickness="0,5,0,0"/> BorderThickness="0,5,0,0"/>
<Button Grid.Row="8" <ToggleButton Grid.Row="10"
Height="160" Content="KUKA ROBOTER"
Margin="5" IsChecked="{Binding IsKukaRobot}"
FontSize="36" Content="Kuka Roboter" Style="{StaticResource ProductionToggleButtonStyle}"/>
Command="{Binding KukaPageClickedCommand}"/>
<Button Grid.Row="9" <ToggleButton Grid.Row="11"
Height="160" Content="MEDIENSCHRANK"
Margin="5" IsChecked="{Binding IsMediaCabinet}"
FontSize="36" Style="{StaticResource ProductionToggleButtonStyle}"/>
FontFamily="Arial"
Content="Medienschrank"
Command="{Binding MediaCabinetPageClickedCommand}"/>
</Grid> </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}"/>
</Grid> </Grid>
</Page> </Page>

View File

@@ -4,17 +4,23 @@
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:HMIToolkit="clr-namespace:HMIToolkit"
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="1554" d:DesignWidth="3840"> d:DesignHeight="1554" d:DesignWidth="3840">
<Page.Resources> <Page.Resources>
<CollectionViewSource x:Key="FlowStations" Source="{Binding FlowStationsVm}"/> <CollectionViewSource x:Key="FlowStations" Source="{Binding FlowStationsVm.FlowStations}"/>
<Style x:Key="Foo" TargetType="DataGridCell"> <HMIToolkit:BoolToVisibilityConverter x:Key="BoolToVisibilityConverterHide"
<Setter Property="FontSize" Value="30"/> True="Hidden"
</Style> False="Visible"/>
</Page.Resources> <HMIToolkit:BoolToVisibilityConverter x:Key="BoolToVisibilityConverterVisible"
True="Visible"
False="Hidden"/>
</Page.Resources>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.25*"/> <ColumnDefinition Width="0.25*"/>
@@ -66,46 +72,70 @@
<Button Grid.Row="0" x:Name="BtnReadToPlc" <Button Grid.Row="0" x:Name="BtnReadToPlc"
Content="Lese Daten von SPS" Content="Lese Daten von SPS"
Width="450" Height="140" FontSize="30" Width="450" Height="140" FontSize="30"
Command="{Binding ReadFromPlcCommand}" Command="{Binding LoadFromPlcCommand}"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10" Margin="10"
Visibility ="Collapsed"
/> />
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Daten an SPS gesendet: " VerticalAlignment="Center" FontSize="30"/>
<Label Grid.Row="1" Content="Daten in Datei gespeichert: " VerticalAlignment="Center" FontSize="30"/>
</Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="/Resources/X.png" Visibility="{Binding DataSendToPlc, Converter={StaticResource BoolToVisibilityConverterHide}}" MaxHeight="60" Margin="10"/>
<Image Grid.Row="0" Source="/Resources/Check.png" Visibility="{Binding DataSendToPlc, Converter={StaticResource BoolToVisibilityConverterVisible}}" MaxHeight="60" Margin="10"/>
<Image Grid.Row="1" Source="/Resources/X.png" Visibility="{Binding DataSaved, Converter={StaticResource BoolToVisibilityConverterHide}}" MaxHeight="60" Margin="10"/>
<Image Grid.Row="1" Source="/Resources/Check.png" Visibility="{Binding DataSaved, Converter={StaticResource BoolToVisibilityConverterVisible}}" MaxHeight="60" Margin="10"/>
</Grid>
<Button Grid.Row="0" x:Name="BtnDiscardChanges"
Content="Änderungen verwerfen"
Width="450" Height="140" FontSize="30"
Command="{Binding DiscardChangesCommand}"
HorizontalAlignment="Left"
Margin="10"
/>
</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:ParamControlInt Grid.Column="0" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding CameraProgramsVm}"/> <common:ParamControlInt DataContext="{Binding CameraProgramsVm}" Grid.Column="0" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlInt Grid.Column="0" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChucksVm}"/> <common:ParamControlInt DataContext="{Binding ChucksVm}" Grid.Column="0" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlInt Grid.Column="0" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding GripperVm}"/> <common:ParamControlInt DataContext="{Binding GripperVm}" Grid.Column="0" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding DiameterVm}"/> <common:ParamControlFloat DataContext="{Binding DiameterVm}" Grid.Column="0" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ThicknessVm}"/> <common:ParamControlFloat DataContext="{Binding ThicknessVm}" Grid.Column="0" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<Label Grid.Column="0" Grid.Row="9" Content="Heiz-/ Kühlplatte: " VerticalAlignment="Center" FontSize="24"></Label> <Label Grid.Column="0" Grid.Row="9" Content="Heiz-/ Kühlplatte: " VerticalAlignment="Center" FontSize="24"></Label>
<common:ParamControlFloat Grid.Column="0" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RestingTimeHotplateVm}"/> <common:ParamControlFloat DataContext="{Binding RestingTimeHotplateVm}" Grid.Column="0" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TargetTemperatureHotplateVm}"/> <common:ParamControlFloat DataContext="{Binding TargetTemperatureHotplateVm}" Grid.Column="0" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RestingTimeCoolplateVm}"/> <common:ParamControlFloat DataContext="{Binding RestingTimeCoolplateVm}" Grid.Column="0" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="13" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TargetTemperatureCoolplateVm}"/> <common:ParamControlFloat DataContext="{Binding TargetTemperatureCoolplateVm}" Grid.Column="0" Grid.Row="13" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<Label Grid.Column="0" Grid.Row="15" Content="Ätzerparameter: " VerticalAlignment="Center" FontSize="24"></Label> <Label Grid.Column="0" Grid.Row="15" Content="Ätzerparameter: " VerticalAlignment="Center" FontSize="24"></Label>
<common:ParamControlFloat Grid.Column="0" Grid.Row="16" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding PermissibleBeamParamDeviationsVm}"/> <common:ParamControlFloat DataContext="{Binding PermissibleBeamParamDeviationsVm}" Grid.Column="0" Grid.Row="16" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="17" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TimeIntervallBeamCheckVm}"/> <common:ParamControlFloat DataContext="{Binding TimeIntervallBeamCheckVm}" Grid.Column="0" Grid.Row="17" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="18" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RadialPosLowerWaterJetVm}"/> <common:ParamControlFloat DataContext="{Binding RadialPosLowerWaterJetVm}" Grid.Column="0" Grid.Row="18" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="19" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChuckRpmVm}"/> <common:ParamControlFloat DataContext="{Binding ChuckRpmVm}" Grid.Column="0" Grid.Row="19" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<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 DataContext="{Binding HvmaxTestCurrentVm}" Grid.Column="1" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding Hvn2PrePurgeTimeVm}"/> <common:ParamControlFloat DataContext="{Binding Hvn2PrePurgeTimeVm}" Grid.Column="1" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlInt Grid.Column="1" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvnumRetriesVm}"/> <common:ParamControlInt DataContext="{Binding HvnumRetriesVm}" Grid.Column="1" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlInt Grid.Column="1" Grid.Row="5" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvpolarityVm}"/> <common:ParamControlInt DataContext="{Binding HvpolarityVm}" Grid.Column="1" Grid.Row="5" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvrampTimeVm}"/> <common:ParamControlFloat DataContext="{Binding HvrampTimeVm}" Grid.Column="1" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestFrequencyVm}"/> <common:ParamControlFloat DataContext="{Binding HvtestFrequencyVm}" Grid.Column="1" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="8" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkCurrentVm}"/> <common:ParamControlFloat DataContext="{Binding HvTestOkCurrentVm}" Grid.Column="1" Grid.Row="8" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="9" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkVoltageVm}"/> <common:ParamControlFloat DataContext="{Binding HvTestOkVoltageVm}" Grid.Column="1" Grid.Row="9" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestTemperatureVm}"/> <common:ParamControlFloat DataContext="{Binding HvtestTemperatureVm}" Grid.Column="1" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestVoltageVm}"/> <common:ParamControlFloat DataContext="{Binding HvtestVoltageVm}" Grid.Column="1" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestPressureN2Vm}"/> <common:ParamControlFloat DataContext="{Binding HvtestPressureN2Vm}" Grid.Column="1" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<Label Grid.Column="1" Grid.Row="14" Content="Traypositionen" FontSize="35"></Label> <Label Grid.Column="1" Grid.Row="14" Content="Traypositionen" FontSize="35"></Label>
<Grid Grid.Column="1" Grid.Row="15" Grid.RowSpan="5"> <Grid Grid.Column="1" Grid.Row="15" Grid.RowSpan="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -116,9 +146,27 @@
SelectedItem="{Binding SelectedTrayPosition}" SelectedItem="{Binding SelectedTrayPosition}"
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30" > AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30" >
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="Pos Nr." Binding="{Binding PosId}"/> <DataGridTextColumn Header="Pos Nr." Binding="{Binding PosId}" IsReadOnly="True">
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}" Width="170"/> <DataGridTextColumn.EditingElementStyle>
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}" Width="170"/> <Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX, UpdateSourceTrigger=PropertyChanged, NotifyOnTargetUpdated=True}" Width="170">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY, UpdateSourceTrigger=PropertyChanged, NotifyOnTargetUpdated=True}" Width="170">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<StackPanel Grid.Column="1" Orientation="Vertical"> <StackPanel Grid.Column="1" Orientation="Vertical">
@@ -135,33 +183,84 @@
<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 FlowReceipe.FlowReceipeEntries}"
SelectedItem="{Binding SelectedFlowReceipeEntry, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding SelectedFlowReceipeEntry, UpdateSourceTrigger=PropertyChanged}"
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30"> AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30" CanUserReorderColumns="False" CanUserSortColumns="False">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="NodeID" Binding="{Binding NodeId}"/> <DataGridTextColumn Header="NodeID" Binding="{Binding NodeId, UpdateSourceTrigger=PropertyChanged}">
<DataGridTextColumn Header="Prio" Binding="{Binding Priority}"/> <DataGridTextColumn.EditingElementStyle>
<DataGridComboBoxColumn Header="Station" <Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Prio" Binding="{Binding Priority, UpdateSourceTrigger=PropertyChanged}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTemplateColumn Header="Station">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox
ItemsSource="{Binding Source={StaticResource FlowStations}}"
SelectedValue="{Binding Station, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding Station, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsSynchronizedWithCurrentItem="False"
FontSize="30">
</ComboBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--<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"/> <DataGridComboBoxColumn.ElementStyle>
<Setter Property="IsHitTestVisible" Value="False"/> <Style TargetType="ComboBox">
<Setter Property="Focusable" Value="False"/> <Setter Property="FontSize" Value="30"/>
</Style> <Setter Property="IsHitTestVisible" Value="False"/>
</DataGridComboBoxColumn.ElementStyle> <Setter Property="Focusable" Value="False"/>
<DataGridComboBoxColumn.EditingElementStyle> </Style>
<Style TargetType="ComboBox"> </DataGridComboBoxColumn.ElementStyle>
<Setter Property="FontSize" Value="30"/> <DataGridComboBoxColumn.EditingElementStyle>
</Style> <Style TargetType="ComboBox">
</DataGridComboBoxColumn.EditingElementStyle> <Setter Property="FontSize" Value="30"/>
</DataGridComboBoxColumn> </Style>
<DataGridTextColumn Header="Max. Wdh." Binding="{Binding MaxRetries}"/> </DataGridComboBoxColumn.EditingElementStyle>
<DataGridTextColumn Header="Nächste Node" Binding="{Binding NextNodeSuccess}"/> </DataGridComboBoxColumn>-->
<DataGridTextColumn Header="Nächste Node bei Wdh." Binding="{Binding NextNodeRetry}"/> <DataGridTextColumn Header="Max. Wdh." Binding="{Binding MaxRetries, UpdateSourceTrigger=PropertyChanged}">
<DataGridTextColumn Header="Nächste Node bei Fail" Binding="{Binding NextNodeFail}"></DataGridTextColumn> <DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Nächste Node" Binding="{Binding NextNodeSuccess, UpdateSourceTrigger=PropertyChanged}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Nächste Node bei Wdh." Binding="{Binding NextNodeRetry, UpdateSourceTrigger=PropertyChanged}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Nächste Node bei Fail" Binding="{Binding NextNodeFail, UpdateSourceTrigger=PropertyChanged}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<StackPanel Grid.Column="1" Orientation="Vertical"> <StackPanel Grid.Column="1" Orientation="Vertical">
@@ -185,13 +284,55 @@
SelectedItem="{Binding SelectedEtchRobotStep, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding SelectedEtchRobotStep, UpdateSourceTrigger=PropertyChanged}"
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30"> 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.EditingElementStyle>
<DataGridTextColumn Header="Pos Z" Binding="{Binding PosZ}"/> <Style TargetType="TextBox">
<DataGridTextColumn Header="Winkel Alpha" Binding="{Binding AngleAlpha}"/> <Setter Property="FontSize" Value="30"/>
<DataGridTextColumn Header="Geschw." Binding="{Binding MoveSpeed}"/> </Style>
<DataGridTextColumn Header="Wartezeit" Binding="{Binding Delay}"/> </DataGridTextColumn.EditingElementStyle>
<DataGridTextColumn Header="Medium" Binding="{Binding Medium}"/> </DataGridTextColumn>
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Pos Z" Binding="{Binding PosZ}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Winkel Alpha" Binding="{Binding AngleAlpha}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Geschw." Binding="{Binding MoveSpeed}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Wartezeit" Binding="{Binding Delay}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="Medium" Binding="{Binding Medium}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<DataGridCheckBoxColumn Header="Oberwasseer" Binding="{Binding WaterFromAbove}"/> <DataGridCheckBoxColumn Header="Oberwasseer" Binding="{Binding WaterFromAbove}"/>
<DataGridCheckBoxColumn Header="Unterwasser" Binding="{Binding WaterFromBelow}"/> <DataGridCheckBoxColumn Header="Unterwasser" Binding="{Binding WaterFromBelow}"/>
</DataGrid.Columns> </DataGrid.Columns>

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using System.Windows;
using System.Windows.Controls;
namespace InfineonHMI.Pages.Views; namespace InfineonHMI.Pages.Views;
@@ -11,4 +12,6 @@ public partial class ReceipePage : Page
{ {
InitializeComponent(); InitializeComponent();
} }
} }

View File

@@ -32,7 +32,7 @@
<RowDefinition /> <RowDefinition />
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="TrayFeederPage" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="40"/> <!--<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="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}"/> <common:PackMLControl Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" HorizontalAlignment="Right" Grid.RowSpan="6" Width="Auto" Margin="20" DataContext="{Binding TrayfeederOutPackMLControlVm}"/>

View File

@@ -1,4 +1,5 @@
using System.Windows.Controls; using Heisig.HMI.AdsManager;
using System.Windows.Controls;
namespace InfineonHMI; namespace InfineonHMI;
@@ -7,9 +8,20 @@ namespace InfineonHMI;
/// </summary> /// </summary>
public partial class TrayFeederPage : Page public partial class TrayFeederPage : Page
{ {
public TrayFeederPage() public static string AdsVariableName = "GVL_SCADA.stMachine";
public static TrayFeederPageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static TrayFeederPage CreateView(TrayFeederPageVM model)
{
return new TrayFeederPage { DataContext = model };
}
public TrayFeederPage()
{ {
InitializeComponent(); InitializeComponent();
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB