Skip to content

Commit

Permalink
whats new now topmost in menu; url is generated from adriligt version…
Browse files Browse the repository at this point in the history
… and culture
  • Loading branch information
fabsenet committed Sep 28, 2018
1 parent f9c5497 commit fa6311c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion adrilight/View/SettingsWindowComponents/WhatsNew.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</UserControl.Resources>
<Grid>
<materialDesign:Card Margin="4 4 4 4" Width="900" VerticalAlignment="Stretch" Height="auto">
<WebBrowser Source="https://fabse.net"></WebBrowser>
<WebBrowser x:Name="browser"></WebBrowser>
</materialDesign:Card>
</Grid>
</UserControl>
5 changes: 3 additions & 2 deletions adrilight/View/SettingsWindowComponents/WhatsNew.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ namespace adrilight.View.SettingsWindowComponents
/// </summary>
public partial class WhatsNew : UserControl
{
public WhatsNew()
public WhatsNew(SettingsViewModel settingsViewModel)
{
InitializeComponent();
browser.Source = settingsViewModel.WhatsNewUrl;
}


Expand All @@ -37,7 +38,7 @@ public WhatsNewSetupSelectableViewPart(Lazy<WhatsNew> lazyContent)
this.lazyContent = lazyContent ?? throw new ArgumentNullException(nameof(lazyContent));
}

public int Order => 50;
public int Order => -50;

public string ViewPartName => "Whats New?";

Expand Down
2 changes: 1 addition & 1 deletion adrilight/ViewModel/ISelectableViewPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace adrilight.ViewModel
{
interface ISelectableViewPart
public interface ISelectableViewPart
{
int Order { get; }
string ViewPartName { get; }
Expand Down
5 changes: 4 additions & 1 deletion adrilight/ViewModel/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
Expand All @@ -22,7 +23,7 @@

namespace adrilight.ViewModel
{
class SettingsViewModel : ViewModelBase
public class SettingsViewModel : ViewModelBase
{
private static ILogger _log = LogManager.GetCurrentClassLogger();

Expand Down Expand Up @@ -267,5 +268,7 @@ public ISpot[] PreviewSpots
RaisePropertyChanged();
}
}

public Uri WhatsNewUrl =>new Uri( $"https://fabse.net/adrilight/{App.VersionNumber}/{Thread.CurrentThread.CurrentUICulture.Name}");
}
}

0 comments on commit fa6311c

Please sign in to comment.