diff --git a/src/Magpie/Magpie.Example/MainWindow.xaml.cs b/src/Magpie/Magpie.Example/MainWindow.xaml.cs index 7cb057d..8406b1e 100644 --- a/src/Magpie/Magpie.Example/MainWindow.xaml.cs +++ b/src/Magpie/Magpie.Example/MainWindow.xaml.cs @@ -1,6 +1,8 @@ using System.Reflection; using System.Windows; +using MagpieUpdater.Interfaces; using MagpieUpdater.Services; +using MagpieUpdater.Views; namespace MagpieExample { @@ -24,7 +26,7 @@ public MainWindow() InitializeComponent(); CurrentVersion.Content = "Current version: " + Assembly.GetEntryAssembly().GetName().Version; SelectedChannel = 1; - _magpie = new Magpie(MakeAppInfo(SelectedChannel)); + _magpie = new ExampleMagpie(MakeAppInfo(SelectedChannel)); _magpie.CheckInBackground(); } @@ -64,4 +66,18 @@ private void DailyBuildChannel_OnClick(object sender, RoutedEventArgs e) _magpie.SwitchSubscribedChannel(SelectedChannel); } } + + public class ExampleMagpie : Magpie + { + public ExampleMagpie(AppInfo appInfo, IDebuggingInfoLogger debuggingInfoLogger = null, IAnalyticsLogger analyticsLogger = null) + : base(appInfo, debuggingInfoLogger, analyticsLogger) + { + } + + protected override void SetOwner(Window window) + { + base.SetOwner(window); + window.AddCustomResource("_downloadNow", "What?"); + } + } } \ No newline at end of file diff --git a/src/Magpie/Magpie/Views/MainWindow.xaml b/src/Magpie/Magpie/Views/MainWindow.xaml index b420dad..455e195 100644 --- a/src/Magpie/Magpie/Views/MainWindow.xaml +++ b/src/Magpie/Magpie/Views/MainWindow.xaml @@ -99,7 +99,8 @@ Margin="10" HorizontalAlignment="Stretch" LastChildFill="False"> -