Impl Kuka Page and Hot/Coolplate Page
Add all other Pages
This commit is contained in:
@@ -53,6 +53,9 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
// Settings page viem model
|
||||
SettingsPageVM? _settingsPageVM;
|
||||
|
||||
// Kuka Robot page view model
|
||||
KukaRobotPageVM? _kukaRobotPageVM;
|
||||
|
||||
public MainWindowVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
@@ -115,6 +118,15 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
NavigateMessage message = new("", typeof(EventsPage));
|
||||
Receive(message);
|
||||
}
|
||||
[RelayCommand]
|
||||
public void KukaRobotClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["KukaRobotVarName"]!, typeof(KukaRobotPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void NavigateBack()
|
||||
@@ -239,6 +251,16 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
Breadcrumb = " > Settings";
|
||||
break;
|
||||
|
||||
case nameof(KukaRobotPage):
|
||||
// Create page view model only once
|
||||
if (_kukaRobotPageVM == null)
|
||||
_kukaRobotPageVM = new(_adsManager, "GVL_CONFIG.stRobotConfig");
|
||||
|
||||
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
||||
CurrentPage = kukaRobotPage;
|
||||
Breadcrumb = " > Kuka Roboter";
|
||||
break;
|
||||
|
||||
default:
|
||||
CurrentPage = new Page();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user