From 33c22ab897f9d1e08261e0ecb00f87fd29e16232 Mon Sep 17 00:00:00 2001 From: Damian Suess Date: Sat, 24 Aug 2024 11:12:23 -0400 Subject: [PATCH] e2e updates. Only use AttachDevTools when in Debug mode --- e2e/BootstrapperShellSample/Views/MainWindow.axaml.cs | 2 ++ e2e/ModulesSample/MainWindow.axaml.cs | 2 ++ e2e/SampleBaseApp/Views/MainWindow.axaml.cs | 6 +++++- e2e/ViewDiscovery/Views/MainWindow.axaml.cs | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/e2e/BootstrapperShellSample/Views/MainWindow.axaml.cs b/e2e/BootstrapperShellSample/Views/MainWindow.axaml.cs index ac4fdfd..1c6c64e 100644 --- a/e2e/BootstrapperShellSample/Views/MainWindow.axaml.cs +++ b/e2e/BootstrapperShellSample/Views/MainWindow.axaml.cs @@ -12,7 +12,9 @@ public partial class MainWindow : Window public MainWindow() { this.InitializeComponent(); +#if DEBUG this.AttachDevTools(); +#endif } } } diff --git a/e2e/ModulesSample/MainWindow.axaml.cs b/e2e/ModulesSample/MainWindow.axaml.cs index 8eb792a..b07e7e7 100644 --- a/e2e/ModulesSample/MainWindow.axaml.cs +++ b/e2e/ModulesSample/MainWindow.axaml.cs @@ -21,7 +21,9 @@ public MainWindow() public MainWindow(IEventAggregator eventAggregator) { InitializeComponent(); +#if DEBUG this.AttachDevTools(); +#endif _logTextBox = this.FindControl("LogTextBox"); _itemsControl = this.FindControl("ItemsControl1"); diff --git a/e2e/SampleBaseApp/Views/MainWindow.axaml.cs b/e2e/SampleBaseApp/Views/MainWindow.axaml.cs index c1d63a2..4f1410d 100644 --- a/e2e/SampleBaseApp/Views/MainWindow.axaml.cs +++ b/e2e/SampleBaseApp/Views/MainWindow.axaml.cs @@ -1,3 +1,4 @@ +using Avalonia; using Avalonia.Controls; namespace SampleBaseApp.Views @@ -7,6 +8,9 @@ public partial class MainWindow : Window public MainWindow() { InitializeComponent(); +#if DEBUG + this.AttachDevTools(); +#endif } } -} \ No newline at end of file +} diff --git a/e2e/ViewDiscovery/Views/MainWindow.axaml.cs b/e2e/ViewDiscovery/Views/MainWindow.axaml.cs index 4d62602..6c381ac 100644 --- a/e2e/ViewDiscovery/Views/MainWindow.axaml.cs +++ b/e2e/ViewDiscovery/Views/MainWindow.axaml.cs @@ -21,7 +21,9 @@ public MainWindow() public MainWindow(IRegionManager regionManager) { this.InitializeComponent(); +#if DEBUG this.AttachDevTools(); +#endif _regionManager = regionManager; regionManager.RegisterViewWithRegion(RegionNames.ContentRegion, typeof(ViewA));