Initial Push

This commit is contained in:
2026-02-11 08:38:36 +01:00
commit 627050501d
81 changed files with 5500 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
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;
namespace UniperHMI
{
public enum E_BMS_CONTROL_MODE : short
{
AUTO_REMOTE = 1,
AUTO_LOCAL = 2,
SAFETY_CHECK = 3,
CAPACITY_TEST = 4,
MANUAL = 5
}
public class BMSControlModeEntry(E_BMS_CONTROL_MODE mode, string name)
{
public E_BMS_CONTROL_MODE eMode = mode;
public string Name = name;
public override string ToString()
{
return Name;
}
}
public sealed partial class AutomaticModePageVM : ObservableValidator, IDisposable
{
private int _setpoint;
[Range(-40000, 40000)]
public int Setpoint
{
get => this._setpoint;
set => SetProperty(ref this._setpoint, value, true);
}
[ObservableProperty]
private int processValue;
[ObservableProperty]
public HMIControlButtonVM? startButton;
[ObservableProperty]
public HMIControlButtonVM? stopButton;
[ObservableProperty]
private E_BMS_CONTROL_MODE bmsControlMode;
[ObservableProperty]
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
[
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
];
[ObservableProperty]
private BMSControlModeEntry selectedControlMode;
[ObservableProperty]
private bool canChangeControlMode;
private readonly string? _variableName;
private readonly IAdsManager? _adsManager;
public AutomaticModePageVM()
{
StartButton = new HMIControlButtonVM();
StopButton = new HMIControlButtonVM();
SelectedControlMode = ReqBMSControlModes[1];
canChangeControlMode = true;
}
public AutomaticModePageVM(IAdsManager adsManager, string variableName)
{
_adsManager = adsManager;
_variableName = variableName;
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
SelectedControlMode = ReqBMSControlModes[1];
_adsManager.Register("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
}
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
{
Setpoint = (int)e.Value;
}
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
{
CanChangeControlMode = (bool)e.Value;
}
private void CurrentControlModeChanged(object? sender, ValueChangedEventArgs e)
{
BmsControlMode = (E_BMS_CONTROL_MODE)e.Value;
SelectedControlMode.eMode = BmsControlMode;
SelectedControlMode.Name = "Test";
}
public void Dispose()
{
StartButton?.Dispose();
StartButton = null;
StopButton?.Dispose();
StopButton = null;
_adsManager?.Deregister("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
_adsManager?.Deregister("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
}
[RelayCommand]
private void StartAutomatic()
{
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", Setpoint);
}
[RelayCommand]
private void StopAutomatic()
{
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", 0);
Setpoint = 0;
}
public static ValidationResult ValidatePower(int power, ValidationContext context)
{
if (power < -40000 || power > 40000)
return new("Must be between -40.000 and +40.000");
else
return ValidationResult.Success!;
}
}
}

View File

@@ -0,0 +1,55 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using Heisig.HMI.AdsManager;
namespace UniperHMI
{
public sealed partial class BatteryOverviewPageVM : ObservableObject, IDisposable
{
[ObservableProperty]
private StringControlButtonVM? string1VM;
[ObservableProperty]
private StringControlButtonVM? string2VM;
[ObservableProperty]
private StringControlButtonVM? dummyStringVM;
private readonly IAdsManager? _adsManager;
public BatteryOverviewPageVM()
{
string1VM = new StringControlButtonVM();
string2VM = new StringControlButtonVM();
}
public BatteryOverviewPageVM(IAdsManager adsManager)
{
_adsManager = adsManager;
string1VM = new StringControlButtonVM(adsManager, "GVL_SCADA.stHMIInterface[0]");
string2VM = new StringControlButtonVM(adsManager, "GVL_SCADA.stHMIInterface[1]");
}
public void Dispose()
{
String1VM?.Dispose();
String1VM = null;
String2VM?.Dispose();
String2VM = null;
}
[RelayCommand]
private void String1Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage("GVL_SCADA.stHMIInterface[0]", typeof(StringOverviewPage), "String 1"));
}
[RelayCommand]
private void String2Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage("GVL_SCADA.stHMIInterface[1]", typeof(StringOverviewPage), "String 2"));
}
}
}

View File

@@ -0,0 +1,109 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System.Collections.ObjectModel;
using System.Windows;
using TcEventLoggerAdsProxyLib;
namespace UniperHMI
{
public partial class EventData : ObservableObject
{
[ObservableProperty]
public uint id;
[ObservableProperty]
public string? message;
[ObservableProperty]
public DateTime raised;
[ObservableProperty]
public DateTime cleared;
[ObservableProperty]
public DateTime confirmed;
};
public sealed partial class EventsPageVM : ObservableObject
{
public ObservableCollection<EventData> CurrentEvents { get; private set; } = [];
private readonly object _lock = new();
private readonly TcEventLogger _logger;
[ObservableProperty]
private EventData? currentEvent;
// 599264352000000000 ticks is a date used by beckhoff for events that didnt happen up to this point
private const long NoTime = 599264352000000000;
public EventsPageVM(TcEventLogger logger)
{
_logger = logger;
_logger.AlarmRaised += SimpleAlarmRaisedEvent;
_logger.AlarmCleared += SimpleAlarmClearedEvent;
_logger.AlarmConfirmed += SimpleConfirmedAlarmEvent;
_logger.Connect("10.103.32.50.1.1");
GetAllActiveEvents();
}
private void RebuildCurrentEventsList()
{
lock (_lock)
{
CurrentEvents.Clear();
}
GetAllActiveEvents();
}
private void SimpleConfirmedAlarmEvent(TcAlarm alarm, bool remove)
{
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
}
private void SimpleAlarmClearedEvent(TcAlarm alarm, bool remove)
{
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
}
private void SimpleAlarmRaisedEvent(TcAlarm alarm)
{
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
}
private void GetAllActiveEvents()
{
EventData eventData;
List<EventData> tempEventList = [];
lock (_lock)
{
foreach (var alarm in _logger.ActiveAlarms)
{
eventData = new()
{
Id = alarm.EventId,
Message = alarm.GetText(1033),
Raised = alarm.TimeRaised,
Cleared = alarm.TimeCleared,
Confirmed = alarm.TimeConfirmed
};
tempEventList.Add(eventData);
}
IEnumerable<EventData> _eventQuery =
from data in tempEventList
orderby data.Raised descending
select data;
CurrentEvent = _eventQuery.FirstOrDefault();
CurrentEvents = new ObservableCollection<EventData>(_eventQuery);
}
}
}
}

View File

@@ -0,0 +1,69 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using Heisig.HMI.AdsManager;
using UniperHMI.OwnControls;
namespace UniperHMI
{
public sealed partial class ModuleOverviewPageVM : ObservableObject, IDisposable
{
[ObservableProperty]
private UnitControlButtonVM unit1;
[ObservableProperty]
private UnitControlButtonVM unit2;
[ObservableProperty]
private UnitControlButtonVM unit3;
[ObservableProperty]
private UnitControlButtonVM unit4;
private readonly IAdsManager? _adsManager;
private readonly string? _variableName;
public ModuleOverviewPageVM(IAdsManager adsManager, string variableName)
{
_adsManager = adsManager;
_variableName = variableName;
unit1 = new(_adsManager, _variableName + ".stHMIInterfaceUnit1");
unit2 = new(_adsManager, _variableName + ".stHMIInterfaceUnit2");
unit3 = new(_adsManager, _variableName + ".stHMIInterfaceUnit3");
unit4 = new(_adsManager, _variableName + ".stHMIInterfaceUnit4");
}
public void Dispose()
{
Unit1?.Dispose();
Unit2?.Dispose();
Unit3?.Dispose();
Unit4?.Dispose();
}
[RelayCommand]
public void Unit1Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit1", typeof(UnitOverviewPage), "Unit 1"));
}
[RelayCommand]
public void Unit2Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit2", typeof(UnitOverviewPage), "Unit 2"));
}
[RelayCommand]
public void Unit3Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit3", typeof(UnitOverviewPage), "Unit 3"));
}
[RelayCommand]
public void Unit4Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit4", typeof(UnitOverviewPage), "Unit 4"));
}
}
}

View File

@@ -0,0 +1,56 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using Heisig.HMI.AdsManager;
namespace UniperHMI;
public sealed partial class StringOverviewPageVM : ObservableObject, IDisposable
{
[ObservableProperty]
private ModuleControlButtonVM module1;
[ObservableProperty]
private ModuleControlButtonVM module2;
[ObservableProperty]
private ModuleControlButtonVM module3;
private readonly IAdsManager? _adsManager;
private readonly string? _variableName;
public StringOverviewPageVM(IAdsManager adsManager, string variableName)
{
_adsManager = adsManager;
_variableName = variableName;
module1 = new(_adsManager, _variableName + ".stHMIInterfaceModule1");
module2 = new(_adsManager, _variableName + ".stHMIInterfaceModule2");
module3 = new(_adsManager, _variableName + ".stHMIInterfaceModule3");
}
public void Dispose()
{
Module1?.Dispose();
Module2?.Dispose();
Module3?.Dispose();
}
[RelayCommand]
private void Module1Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule1", typeof(ModuleOverviewPage), "Module 1"));
}
[RelayCommand]
private void Module2Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule2", typeof(ModuleOverviewPage), "Module 2"));
}
[RelayCommand]
private void Module3Clicked()
{
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule3", typeof(ModuleOverviewPage), "Module 3"));
}
}

View File

@@ -0,0 +1,31 @@
using CommunityToolkit.Mvvm.ComponentModel;
using Heisig.HMI.AdsManager;
namespace UniperHMI;
public sealed partial class UnitOverviewPageVM : ObservableObject, IDisposable
{
[ObservableProperty]
private string unitName;
[ObservableProperty]
private UnitDetailsControlVM unitControlVM;
private readonly IAdsManager? _adsManager;
private readonly string? _variableName;
public UnitOverviewPageVM(IAdsManager adsManager, string variableName)
{
_adsManager = adsManager;
_variableName = variableName;
unitControlVM = new(_adsManager, _variableName);
unitName = "Unit X";
}
public void Dispose()
{
UnitControlVM?.Dispose();
}
}

View File

@@ -0,0 +1,49 @@
<Page x:Class="UniperHMI.AutomaticModePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:UniperHMI"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
d:DesignHeight="450" d:DesignWidth="800"
Title="AutomaticModePage">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
</Grid>
</Page>

View File

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

View File

@@ -0,0 +1,39 @@
<Page x:Class="UniperHMI.BatteryOverviewPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:UniperHMI"
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
mc:Ignorable="d"
x:Name="root"
d:DataContext="{d:DesignInstance Type=local:BatteryOverviewPageVM, IsDesignTimeCreatable=False}"
Title="ManualModePage" Height="Auto" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Center">
<Grid Margin="10" Width="Auto" Height="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<local:SMUControlButton Grid.Row="0" Grid.Column="0" DataContext="{Binding String1VM}" Command="{Binding ElementName=root, Path=DataContext.String1ClickedCommand}" SMUName="String 1" Margin="0,0,5,0" />
<local:SMUControlButton Grid.Row="0" Grid.Column="1" DataContext="{Binding String2VM}" Command="{Binding ElementName=root, Path=DataContext.String2ClickedCommand}" SMUName="String 2" Margin="0,0,5,0" />
<local:SMUControlButton Grid.Row="0" Grid.Column="2" DataContext="{Binding DummyStringVM}" SMUName="String 3" Margin="0,0,5,0" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="0" Grid.Column="3" DataContext="{Binding DummyStringVM}" SMUName="String 4" Margin="0,0,5,0" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="0" Grid.Column="4" DataContext="{Binding DummyStringVM}" SMUName="String 5" Margin="0,0,5,0" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="0" Grid.Column="5" DataContext="{Binding DummyStringVM}" SMUName="String 6" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="1" Grid.Column="0" DataContext="{Binding DummyStringVM}" SMUName="String 7" Margin="0,5,5,0" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="1" Grid.Column="1" DataContext="{Binding DummyStringVM}" SMUName="String 8" Margin="0,5,5,0" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="1" Grid.Column="2" DataContext="{Binding DummyStringVM}" SMUName="String 9" Margin="0,5,5,0" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="1" Grid.Column="3" DataContext="{Binding DummyStringVM}" SMUName="String 10" Margin="0,5,5,0" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="1" Grid.Column="4" DataContext="{Binding DummyStringVM}" SMUName="String 11" Margin="0,5,5,0" IsEnabled="False"/>
<local:SMUControlButton Grid.Row="1" Grid.Column="5" DataContext="{Binding DummyStringVM}" SMUName="String 12" Margin="0,5,0,0" IsEnabled="False"/>
</Grid>
</Page>

View File

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

View File

@@ -0,0 +1,25 @@
<Page x:Class="UniperHMI.EventsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:UniperHMI"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:EventsPageVM, IsDesignTimeCreatable=False}"
d:DesignHeight="450" d:DesignWidth="800"
Title="EventsPage">
<Page.Resources>
<local:DateTimeToEventTimeConverter x:Key="dtConverter" />
</Page.Resources>
<Grid>
<DataGrid ItemsSource="{Binding CurrentEvents}" 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"/>
<DataGridTextColumn Header="Cleared" Binding="{Binding Cleared, Converter={StaticResource dtConverter}}" Width="*"/>
<DataGridTextColumn Header="Confirmed" Binding="{Binding Confirmed, Converter={StaticResource dtConverter}}" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Page>

View File

@@ -0,0 +1,14 @@
using System.Windows.Controls;
namespace UniperHMI;
/// <summary>
/// Interaktionslogik für EventsPage.xaml
/// </summary>
public partial class EventsPage : Page
{
public EventsPage()
{
InitializeComponent();
}
}

View File

@@ -0,0 +1,25 @@
<Page x:Class="UniperHMI.ModuleOverviewPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:UniperHMI"
d:DataContext="{d:DesignInstance Type=local:ModuleOverviewPageVM, IsDesignTimeCreatable=False}"
mc:Ignorable="d"
Width="Auto" Height="Auto" x:Name="root" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid Margin="10" ShowGridLines="False" Width="Auto" Height="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<local:SMUControlButton SMUName="Unit 1" DataContext="{Binding Unit1}" Command="{Binding ElementName=root, Path=DataContext.Unit1ClickedCommand}" Grid.Row="0" Grid.Column="0" Margin="0,0,5,0" />
<local:SMUControlButton SMUName="Unit 2" DataContext="{Binding Unit2}" Command="{Binding ElementName=root, Path=DataContext.Unit2ClickedCommand}" Grid.Row="0" Grid.Column="1" />
<local:SMUControlButton SMUName="Unit 3" DataContext="{Binding Unit3}" Command="{Binding ElementName=root, Path=DataContext.Unit3ClickedCommand}" Grid.Row="1" Grid.Column="0" Margin="0,5,5,0" />
<local:SMUControlButton SMUName="Unit 4" DataContext="{Binding Unit4}" Command="{Binding ElementName=root, Path=DataContext.Unit4ClickedCommand}" Grid.Row="1" Grid.Column="1" Margin="0,5,0,0"/>
</Grid>
</Page>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für ModuleOverviewPage.xaml
/// </summary>
public partial class ModuleOverviewPage : Page
{
public ModuleOverviewPage()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,23 @@
<Page x:Class="UniperHMI.StringOverviewPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:UniperHMI"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:StringOverviewPageVM, IsDesignTimeCreatable=False}"
Title="StringOverviewPage"
Width="Auto" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"
x:Name="root">
<Grid Margin="10" Width="Auto" Height="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<local:SMUControlButton SMUName="Modul 1" DataContext="{Binding Module1}" Command="{Binding ElementName=root, Path=DataContext.Module1ClickedCommand}" Grid.Column="0" Margin="0,0,5,0"/>
<local:SMUControlButton SMUName="Modul 2" DataContext="{Binding Module2}" Command="{Binding ElementName=root, Path=DataContext.Module2ClickedCommand}" Grid.Column="1" Margin="0,0,5,0"/>
<local:SMUControlButton SMUName="Modul 3" DataContext="{Binding Module3}" Command="{Binding ElementName=root, Path=DataContext.Module3ClickedCommand}" Grid.Column="2"/>
</Grid>
</Page>

View File

@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für StringOverviewPage.xaml
/// </summary>
public partial class StringOverviewPage : Page
{
public StringOverviewPage()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,16 @@
<Page x:Class="UniperHMI.UnitOverviewPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:UniperHMI"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:UnitOverviewPageVM, IsDesignTimeCreatable=False}"
Width="Auto" Height="Auto"
Title="UnitOverviewPage"
x:Name="root">
<Grid>
<local:UnitDetailsControl UnitName="{Binding ElementName=root, Path=DataContext.UnitName}" DataContext="{Binding UnitControlVM}" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</Page>

View File

@@ -0,0 +1,14 @@
using System.Windows.Controls;
namespace UniperHMI;
/// <summary>
/// Interaktionslogik für UnitOverviewPage.xaml
/// </summary>
public partial class UnitOverviewPage : Page
{
public UnitOverviewPage()
{
InitializeComponent();
}
}