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="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))
return;
@@ -73,7 +73,7 @@ public static class L4ItXmlSerializer
/// <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!;

View File

@@ -44,7 +44,7 @@
<Border Grid.Row="0" 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"/>
<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.Column="1" Grid.Row="1">
@@ -55,7 +55,7 @@
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
<Label Grid.Row="0" VerticalAlignment="Center" Content="Voll" HorizontalAlignment="Center" FontSize="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.Row="1" Grid.Column="0">
@@ -66,7 +66,7 @@
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
<Label Grid.Row="0" VerticalAlignment="Center" Content="Leer" HorizontalAlignment="Center" FontSize="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>
<Border Grid.Column="1" Grid.Row="1" BorderBrush="White" BorderThickness="1"/>

View File

@@ -17,9 +17,8 @@
<ColumnDefinition Width="200" />
</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"/>
<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>

View File

@@ -23,9 +23,4 @@ public partial class ParamControlFloat : UserControl
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 System.ComponentModel.DataAnnotations;
using TwinCAT.TypeSystem;
using Heisig.HMI.AdsManager;
using InfineonHMI.Common;
namespace Common;
public sealed partial class ParamControlFloatVm : ObservableValidator, IDisposable
public sealed partial class ParamControlFloatVm : ObservableValidator, IDisposable, IChangeTrackingEx
{
private float initValue;
[ObservableProperty]
private string sName;
[ObservableProperty]
private float value;
public ParamControlFloatVm()
{
SName = "No Name:";
Value = 0.0f;
initValue = Value;
}
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" />
</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"/>
<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}" />
<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}" />
</Grid>

View File

@@ -1,28 +1,38 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System.ComponentModel.DataAnnotations;
using TwinCAT.TypeSystem;
using Heisig.HMI.AdsManager;
using InfineonHMI.Common;
namespace Common;
public sealed partial class ParamControlIntVm : ObservableValidator, IDisposable
public sealed partial class ParamControlIntVm : ObservableValidator, IDisposable, IChangeTrackingEx
{
[ObservableProperty]
private string sName;
private int initValue;
[ObservableProperty] private string sName;
[ObservableProperty] private int value;
[ObservableProperty]
private int value;
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
{
// Todo: For Deployment, set Userlevel to 0 if default!
CurrentUser = new User("unknown", "default", 100);
}
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>
<None Remove="Anlagenuebersicht.png" />
<None Remove="Resources\Application.png" />
<None Remove="Resources\Check.png" />
<None Remove="Resources\user.png" />
<None Remove="Resources\X.png" />
</ItemGroup>
<ItemGroup>
@@ -38,7 +40,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Application.png" />
<Resource Include="Resources\Check.png" />
<Resource Include="Resources\user.png" />
<Resource Include="Resources\X.png" />
</ItemGroup>
<ItemGroup>

View File

@@ -164,13 +164,6 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- 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}"
Grid.Column="1" Content="Stationen" FontSize="38" Margin="10"
Width="440"
@@ -208,7 +201,7 @@
<!-- Softkey 9 -->
<Button Grid.Column="8"
Width="450"
Content="Alarm quitieren" FontSize="38" Margin="10"
Content="Alarm quittieren" FontSize="38" Margin="10"
Command="{Binding AckAlarmsCommand}"/>
</Grid>

View File

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

View File

@@ -16,6 +16,14 @@ namespace InfineonHMI;
public sealed partial class MainWindowVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
{
private const string _actualUserPrefix = "Aktueller Benutzer: \n";
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;
@@ -30,16 +38,9 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
[ObservableProperty] private string sCurrentPackMLState;
[ObservableProperty] private bool canUserChangePageProductionWindow;
[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
{
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
private readonly Page _emptyPage;
@@ -76,12 +75,9 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
ProductionOverviewPageVM? _productionOverviewPageVM;
private MachineOverviewPageVM? _machineOverviewPageVM;
// Hot Coolplate page view model
HotCoolPlatePageVM? _hotCoolplatePageVM;
// Kuka Robot page view model
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]
private void SettingsWindow()
@@ -253,16 +255,7 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
{
var userWindowVm = new UserManagementWindowVm(currentUser);
CurrentUser = userWindowVm.GetCurrentUserLevel();
OverviewWindowClicked();
}
[RelayCommand]
private void OverviewWindowClicked()
{
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config[""]!, typeof(MachineOverviewPage));
Receive(message);
ProductionWindowClicked();
}
[RelayCommand]
@@ -363,14 +356,6 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
CurrentPage = productionOverviewPage;
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):
#pragma warning disable MVVMTK0034 // Direct field reference to [ObservableProperty] backing field
EventsPage eventsPage = new() { DataContext = _eventsPageVM };
@@ -398,8 +383,6 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
Breadcrumb = " > Kuka Roboter";
break;
case nameof(HotCoolPlatePage):
if (_hotCoolplatePageVM == null)
_hotCoolplatePageVM = new(_adsManager, "directlySetInViewModel");
@@ -409,8 +392,6 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
Breadcrumb = " > Heiz- /Kühlplatte";
break;
default:
CurrentPage = new Page();
break;

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
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;
public string sName = name;
private Stationenum eStation;
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()
{
return sName;
return SName;
}
}
@@ -127,10 +152,8 @@ public class FlowReceipeEntry()
public UInt16 Priority { get; set; }
public required StationEntry Station { get; set; }
public UInt16 MaxRetries { get; set; }
public int NextNodeSuccess { get; set; }
public int NextNodeRetry { get; set; }
public int NextNodeFail { get; set; }
}

View File

@@ -34,8 +34,7 @@ public class ReceipeObject
public ReceipeCoolplate ReceipeCoolplate { get; set; }
public ReceipeEtcher ReceipeEtcher { get; set; }
public ReceipeHighvoltageTester ReceipeHvTester { get; set; }
public FlowReceipe Flowreceipe { get; set; }
public FlowReceipeModel FlowreceipeModel { get; set; }
public ReceipeObject()
@@ -46,7 +45,7 @@ public class ReceipeObject
ReceipeCoolplate = new ReceipeCoolplate();
ReceipeEtcher = new ReceipeEtcher();
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 List<FlowReceipeNode> Nodes { get; set; }
public FlowReceipe()
public FlowReceipeModel()
{
Nodes = new List<FlowReceipeNode>();
}
@@ -209,7 +208,7 @@ public class FlowReceipe
public class FlowReceipeNode
{
public UInt16 Priority { get; set; }
public Int32 StationType { get; set; }
public UInt32 StationType { get; set; }
public UInt16 MaxRetries { 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 HMIToolkit;
using System.ComponentModel.DataAnnotations;
using Heisig.HMI.AdsManager;
using CommunityToolkit.Mvvm.Input;
using TwinCAT.TypeSystem;
using System.Collections.ObjectModel;
using Common;
using InfineonHMI.Model;
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,15 +3,14 @@ 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 InfineonHMI.Common;
using TcEventLoggerAdsProxyLib;
using System.ComponentModel;
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;
@@ -55,9 +54,110 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
TrayFeederPageVM? _trayFeederPageVm;
OverviewPageVM? _overviewPageVM;
public bool IsOverview
{
get => (OverviewPage)currentDetailPage != null;
set
{
if (value)
OverviewPageClicked();
}
}
public bool IsTrayFeeder
{
get => (TrayFeederPage)currentDetailPage != null;
set
{
if(value)
TrayfeederPageClicked();
}
}
public bool IsAligner
{
get => (AlignmentStationPage)currentDetailPage != null;
set
{
if (value)
AlignerPageClicked();
}
}
public bool IsHVTest
{
get => (HighVoltageStationPage)currentDetailPage != null;
set
{
if (value)
HVTestPageClicked();
}
}
public bool IsEtchingStation1
{
get => (EtchingStation1Page)currentDetailPage != null;
set
{
if (value)
Etching1PageClicked();
}
}
public bool IsEtchingStation2
{
get => (EtchingStation2Page)currentDetailPage != null;
set
{
if (value)
Etching2PageClicked();
}
}
public bool IsHotCoolPlate
{
get => (HotCoolPlatePage)currentDetailPage != null;
set
{
if (value)
HotCoolplatePageClicked();
}
}
public bool IsKukaRobot
{
get => (KukaRobotPage)currentDetailPage != null;
set
{
if (value)
KukaPageClicked();
}
}
public bool IsNioStation
{
get => (NIOStationPage)currentDetailPage != null;
set
{
if (value)
NIOStationPageClicked();
}
}
public bool IsMediaCabinet
{
get => (MediaCabinetPage)currentDetailPage != null;
set
{
if (value)
MediaCabinetPageClicked();
}
}
// Kuka Robot page view model
KukaRobotPageVM? _kukaRobotPageVM;
private bool isTrayFeeder;
public ProductionOverviewPageVM()
{
@@ -150,7 +250,14 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
Receive(message);
}
[RelayCommand]
public void OverviewPageClicked()
{
_messageStack.Clear();
_currentMessage = new NavigateMessage("", typeof(Page));
NavigateMessage message = new(_config["OverviewVarName"]!, typeof(OverviewPage));
Receive(message);
}
[RelayCommand]
public void KukaPageClicked()
@@ -210,84 +317,77 @@ public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipi
// 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
case nameof(OverviewPage):
_overviewPageVM ??= OverviewPage.CreateModel(_adsManager);
CurrentDetailPage = OverviewPage.CreateView(_overviewPageVM);
break;
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
CurrentDetailPage = trayFeederPage;
case nameof(TrayFeederPage):
_trayFeederPageVm ??= TrayFeederPage.CreateModel(_adsManager);
CurrentDetailPage = TrayFeederPage.CreateView(_trayFeederPageVm);
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;
_alignmentStationPageVM ??= AlignmentStationPage.CreateModel(_adsManager);
CurrentDetailPage = AlignmentStationPage.CreateView(_alignmentStationPageVM);
break;
case nameof(EtchingStation1Page):
if (_etchingStation1PageVm == null)
_etchingStation1PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher1");
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
CurrentDetailPage = etchingStation1Page;
_etchingStation1PageVm ??= EtchingStation1Page.CreateModel(_adsManager);
CurrentDetailPage = EtchingStation1Page.CreateView(_etchingStation1PageVm);
break;
case nameof(EtchingStation2Page):
if (_etchingStation2PageVm == null)
_etchingStation2PageVm = new(_adsManager, "GVL_SCADA.stMachine.stEtcher2");
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
CurrentDetailPage = etchingStation2Page;
_etchingStation2PageVm ??= EtchingStation2Page.CreateModel(_adsManager);
CurrentDetailPage = EtchingStation2Page.CreateView(_etchingStation2PageVm);
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;
_highVoltageStationPageVm ??= HighVoltageStationPage.CreateModel(_adsManager);
CurrentDetailPage = HighVoltageStationPage.CreateView(_highVoltageStationPageVm);
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;
_hotCoolplatePageVM ??= HotCoolPlatePage.CreateModel(_adsManager);
CurrentDetailPage = HotCoolPlatePage.CreateView(_hotCoolplatePageVM);
break;
case nameof(NIOStationPage):
if (_nioStationPageVm == null)
_nioStationPageVm = new(_adsManager, "GVL_SCADA.stMachine.stNOK");
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
CurrentDetailPage = nIOStationPage;
_nioStationPageVm ??= NIOStationPage.CreateModel(_adsManager);
CurrentDetailPage = NIOStationPage.CreateView(_nioStationPageVm);
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;
_kukaRobotPageVM??= KukaRobotPage.CreateModel(_adsManager);
CurrentDetailPage = KukaRobotPage.CreateView(_kukaRobotPageVM);
break;
case nameof(MediaCabinetPage):
if (_mediaCabinetPageVM == null)
_mediaCabinetPageVM = new(_adsManager, "GVL_SCADA.stMachine.stMediaCabinet"); //TODO not Implemented on PLC yet
case nameof(MediaCabinetPage)://TODO not Implemented on PLC yet
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
CurrentDetailPage = mediaCabinetPage;
break;
default:
CurrentDetailPage = new Page();
_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]

File diff suppressed because it is too large Load Diff

View File

@@ -35,7 +35,7 @@
<RowDefinition />
</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}"/>

View File

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

View File

@@ -33,7 +33,7 @@
<RowDefinition />
<RowDefinition />
</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="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}"/>

View File

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

View File

@@ -33,7 +33,7 @@
<RowDefinition />
<RowDefinition />
</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="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;
@@ -7,12 +8,22 @@ namespace InfineonHMI;
/// </summary>
public partial class EtchingStation2Page : Page
{
public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
public static EtchingStation2PageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static EtchingStation2Page CreateView(EtchingStation2PageVM model)
{
return new EtchingStation2Page { DataContext = model };
}
public EtchingStation2Page()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;

View File

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

View File

@@ -34,7 +34,7 @@
<RowDefinition />
<RowDefinition />
</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="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;
@@ -7,10 +8,21 @@ namespace InfineonHMI;
/// </summary>
public partial class HighVoltageStationPage : Page
{
public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
public static HighVoltageStationPageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static HighVoltageStationPage CreateView(HighVoltageStationPageVM model)
{
return new HighVoltageStationPage { DataContext = model };
}
public HighVoltageStationPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)

View File

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

View File

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

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="33*" />
</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="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;
@@ -7,10 +8,21 @@ namespace InfineonHMI;
/// </summary>
public partial class MediaCabinetPage : Page
{
public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
public static MediaCabinetPageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static MediaCabinetPage CreateView(MediaCabinetPageVM model)
{
return new MediaCabinetPage { DataContext = model };
}
public MediaCabinetPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)

View File

@@ -34,7 +34,7 @@
<RowDefinition />
<RowDefinition />
</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 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;
@@ -7,10 +8,21 @@ namespace InfineonHMI;
/// </summary>
public partial class NIOStationPage : Page
{
public static string AdsVariableName = "GVL_SCADA.stMachine.TrayFeeder";
public static NIOStationPageVM CreateModel(IAdsManager adsManager)
{
return new(adsManager, AdsVariableName);
}
public static NIOStationPage CreateView(NIOStationPageVM model)
{
return new NIOStationPage { DataContext = model };
}
public NIOStationPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)

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,7 +7,14 @@
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=uniperHmi:ProductionOverviewPageVM, IsDesignTimeCreatable=True}"
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.ColumnDefinitions>
@@ -27,77 +34,70 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Grid.Row="0"
Height="160"
Margin="5"
FontSize="36"
FontFamily="Arial"
Content="Trayfeeder&#xD;&#xA;Ein-/Ausgabe"
Command="{Binding TrayfeederPageClickedCommand}"/>
<ToggleButton Grid.Row="0"
Content="ÜBERSICHT"
IsChecked="{Binding IsOverview}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<Button Grid.Row="1"
Height="160"
Margin="5"
FontSize="39"
Content="Ausrichtstation"
Command="{Binding AlignerPageClickedCommand}"/>
<Button Grid.Row="2"
Height="160"
Margin="5"
FontSize="36"
Content="Ätzer 1"
Command="{Binding Etching1PageClickedCommand}"/>
<Button Grid.Row="3"
Height="160"
Margin="5"
FontSize="36"
Content="Ätzer 2"
Command="{Binding Etching2PageClickedCommand}"/>
<Button Grid.Row="4"
Height="160"
Margin="5"
FontSize="36"
Content="HV Test"
Command="{Binding HVTestPageClickedCommand}"/>
<Button Grid.Row="5"
Height="160"
Margin="5"
FontSize="36"
Content="Heiz-&#xD;&#xA;/Kühlplatte"
Command="{Binding HotCoolplatePageClickedCommand}"/>
<Button Grid.Row="6"
Height="160"
Margin="5"
FontSize="36"
Content="NOK Station"
Command="{Binding NIOStationPageClickedCommand}"/>
<Border Grid.Row="7"
<Border Grid.Row="1"
Margin="5"
BorderBrush="White"
BorderThickness="0,5,0,0"/>
<Button Grid.Row="8"
Height="160"
Margin="5"
FontSize="36" Content="Kuka Roboter"
Command="{Binding KukaPageClickedCommand}"/>
<ToggleButton Grid.Row="2"
Content="TRAYFEEDER&#xD;&#xA;EIN-/AUSGABE"
IsChecked="{Binding IsTrayFeeder}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<Button Grid.Row="9"
Height="160"
<ToggleButton Grid.Row="3"
Content="AUSRICHTSTATION"
IsChecked="{Binding IsAligner}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<ToggleButton Grid.Row="4"
Content="ÄTZER 1"
IsChecked="{Binding IsEtchingStation1}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<ToggleButton Grid.Row="5"
Content="ÄTZER 2"
IsChecked="{Binding IsEtchingStation2}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<ToggleButton Grid.Row="6"
Content="HV TEST"
IsChecked="{Binding IsHVTest}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<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"
FontSize="36"
FontFamily="Arial"
Content="Medienschrank"
Command="{Binding MediaCabinetPageClickedCommand}"/>
BorderBrush="White"
BorderThickness="0,5,0,0"/>
<ToggleButton Grid.Row="10"
Content="KUKA ROBOTER"
IsChecked="{Binding IsKukaRobot}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
<ToggleButton Grid.Row="11"
Content="MEDIENSCHRANK"
IsChecked="{Binding IsMediaCabinet}"
Style="{StaticResource ProductionToggleButtonStyle}"/>
</Grid>
<!-- DETAIL PAGE -->

View File

@@ -4,16 +4,22 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:uniperHmi="clr-namespace:InfineonHMI"
xmlns:HMIToolkit="clr-namespace:HMIToolkit"
xmlns:common="clr-namespace:Common"
d:DataContext="{d:DesignInstance Type=uniperHmi:ReceipePageVM, IsDesignTimeCreatable=True}"
mc:Ignorable="d"
d:DesignHeight="1554" d:DesignWidth="3840">
<Page.Resources>
<CollectionViewSource x:Key="FlowStations" Source="{Binding FlowStationsVm}"/>
<Style x:Key="Foo" TargetType="DataGridCell">
<Setter Property="FontSize" Value="30"/>
</Style>
<CollectionViewSource x:Key="FlowStations" Source="{Binding FlowStationsVm.FlowStations}"/>
<HMIToolkit:BoolToVisibilityConverter x:Key="BoolToVisibilityConverterHide"
True="Hidden"
False="Visible"/>
<HMIToolkit:BoolToVisibilityConverter x:Key="BoolToVisibilityConverterVisible"
True="Visible"
False="Hidden"/>
</Page.Resources>
<Grid>
<Grid.ColumnDefinitions>
@@ -66,46 +72,70 @@
<Button Grid.Row="0" x:Name="BtnReadToPlc"
Content="Lese Daten von SPS"
Width="450" Height="140" FontSize="30"
Command="{Binding ReadFromPlcCommand}"
Command="{Binding LoadFromPlcCommand}"
HorizontalAlignment="Left"
Margin="10"
/>
<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"
Visibility ="Collapsed"
/>
</StackPanel>
<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 Grid.Column="0" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChucksVm}"/>
<common:ParamControlInt Grid.Column="0" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding GripperVm}"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding DiameterVm}"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ThicknessVm}"/>
<common:ParamControlInt DataContext="{Binding CameraProgramsVm}" Grid.Column="0" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlInt DataContext="{Binding ChucksVm}" Grid.Column="0" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlInt DataContext="{Binding GripperVm}" Grid.Column="0" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding DiameterVm}" Grid.Column="0" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<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>
<common:ParamControlFloat Grid.Column="0" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RestingTimeHotplateVm}"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TargetTemperatureHotplateVm}"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RestingTimeCoolplateVm}"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="13" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TargetTemperatureCoolplateVm}"/>
<common:ParamControlFloat DataContext="{Binding RestingTimeHotplateVm}" Grid.Column="0" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding TargetTemperatureHotplateVm}" Grid.Column="0" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding RestingTimeCoolplateVm}" Grid.Column="0" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<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>
<common:ParamControlFloat Grid.Column="0" Grid.Row="16" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding PermissibleBeamParamDeviationsVm}"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="17" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TimeIntervallBeamCheckVm}"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="18" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RadialPosLowerWaterJetVm}"/>
<common:ParamControlFloat Grid.Column="0" Grid.Row="19" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChuckRpmVm}"/>
<common:ParamControlFloat DataContext="{Binding PermissibleBeamParamDeviationsVm}" Grid.Column="0" Grid.Row="16" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding TimeIntervallBeamCheckVm}" Grid.Column="0" Grid.Row="17" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding RadialPosLowerWaterJetVm}" Grid.Column="0" Grid.Row="18" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<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>
<common:ParamControlFloat Grid.Column="1" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvmaxTestCurrentVm}"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding Hvn2PrePurgeTimeVm}"/>
<common:ParamControlInt Grid.Column="1" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvnumRetriesVm}"/>
<common:ParamControlInt Grid.Column="1" Grid.Row="5" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvpolarityVm}"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvrampTimeVm}"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestFrequencyVm}"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="8" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkCurrentVm}"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="9" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkVoltageVm}"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestTemperatureVm}"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestVoltageVm}"/>
<common:ParamControlFloat Grid.Column="1" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestPressureN2Vm}"/>
<common:ParamControlFloat DataContext="{Binding HvmaxTestCurrentVm}" Grid.Column="1" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding Hvn2PrePurgeTimeVm}" Grid.Column="1" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlInt DataContext="{Binding HvnumRetriesVm}" Grid.Column="1" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlInt DataContext="{Binding HvpolarityVm}" Grid.Column="1" Grid.Row="5" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding HvrampTimeVm}" Grid.Column="1" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding HvtestFrequencyVm}" Grid.Column="1" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding HvTestOkCurrentVm}" Grid.Column="1" Grid.Row="8" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding HvTestOkVoltageVm}" Grid.Column="1" Grid.Row="9" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding HvtestTemperatureVm}" Grid.Column="1" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<common:ParamControlFloat DataContext="{Binding HvtestVoltageVm}" Grid.Column="1" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<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>
<Grid Grid.Column="1" Grid.Row="15" Grid.RowSpan="5">
<Grid.ColumnDefinitions>
@@ -116,9 +146,27 @@
SelectedItem="{Binding SelectedTrayPosition}"
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30" >
<DataGrid.Columns>
<DataGridTextColumn Header="Pos Nr." Binding="{Binding PosId}"/>
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}" Width="170"/>
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}" Width="170"/>
<DataGridTextColumn Header="Pos Nr." Binding="{Binding PosId}" IsReadOnly="True">
<DataGridTextColumn.EditingElementStyle>
<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>
<StackPanel Grid.Column="1" Orientation="Vertical">
@@ -135,16 +183,43 @@
<ColumnDefinition Width="90*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
<DataGrid Grid.Column="0" ItemsSource="{Binding FlowReceipeEntries}"
<DataGrid Grid.Column="0" ItemsSource="{Binding FlowReceipe.FlowReceipeEntries}"
SelectedItem="{Binding SelectedFlowReceipeEntry, UpdateSourceTrigger=PropertyChanged}"
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30">
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30" CanUserReorderColumns="False" CanUserSortColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="NodeID" Binding="{Binding NodeId}"/>
<DataGridTextColumn Header="Prio" Binding="{Binding Priority}"/>
<DataGridComboBoxColumn Header="Station"
<DataGridTextColumn Header="NodeID" Binding="{Binding NodeId, UpdateSourceTrigger=PropertyChanged}">
<DataGridTextColumn.EditingElementStyle>
<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}}"
SelectedValueBinding="{Binding Station, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True}">
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}}"
SelectedValueBinding="{Binding Station, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True}"
>
<DataGridComboBoxColumn.ElementStyle>
<Style TargetType="ComboBox">
<Setter Property="FontSize" Value="30"/>
@@ -157,11 +232,35 @@
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridComboBoxColumn.EditingElementStyle>
</DataGridComboBoxColumn>
<DataGridTextColumn Header="Max. Wdh." Binding="{Binding MaxRetries}"/>
<DataGridTextColumn Header="Nächste Node" Binding="{Binding NextNodeSuccess}"/>
<DataGridTextColumn Header="Nächste Node bei Wdh." Binding="{Binding NextNodeRetry}"/>
<DataGridTextColumn Header="Nächste Node bei Fail" Binding="{Binding NextNodeFail}"></DataGridTextColumn>
</DataGridComboBoxColumn>-->
<DataGridTextColumn Header="Max. Wdh." Binding="{Binding MaxRetries, UpdateSourceTrigger=PropertyChanged}">
<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>
<StackPanel Grid.Column="1" Orientation="Vertical">
@@ -185,13 +284,55 @@
SelectedItem="{Binding SelectedEtchRobotStep, UpdateSourceTrigger=PropertyChanged}"
AutoGenerateColumns="False" CanUserAddRows="False" FontSize="30">
<DataGrid.Columns>
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}"/>
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}"/>
<DataGridTextColumn Header="Pos Z" Binding="{Binding PosZ}"/>
<DataGridTextColumn Header="Winkel Alpha" Binding="{Binding AngleAlpha}"/>
<DataGridTextColumn Header="Geschw." Binding="{Binding MoveSpeed}"/>
<DataGridTextColumn Header="Wartezeit" Binding="{Binding Delay}"/>
<DataGridTextColumn Header="Medium" Binding="{Binding Medium}"/>
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="30"/>
</Style>
</DataGridTextColumn.EditingElementStyle>
</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="Unterwasser" Binding="{Binding WaterFromBelow}"/>
</DataGrid.Columns>

View File

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

View File

@@ -32,7 +32,7 @@
<RowDefinition />
<RowDefinition />
</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="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;
@@ -7,9 +8,20 @@ namespace InfineonHMI;
/// </summary>
public partial class TrayFeederPage : Page
{
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();
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB