Skip to content

Commit 98bd1b2

Browse files
author
Alexandru Macocian
committed
Periodically check for updates.
Reorder settings in the settings category view.
1 parent c169ca1 commit 98bd1b2

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

Daybreak/Daybreak.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
1010
<LangVersion>preview</LangVersion>
1111
<ApplicationIcon>Daybreak.ico</ApplicationIcon>
12-
<Version>0.6.0</Version>
12+
<Version>0.6.1</Version>
1313
<ApplicationManifest>app.manifest</ApplicationManifest>
1414
</PropertyGroup>
1515

Daybreak/Launch/MainWindow.xaml.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,21 @@ private async void CheckForUpdates()
159159
else
160160
{
161161
this.viewManager.ShowView<MainView>();
162+
this.PeriodicallyCheckForUpdates();
162163
}
163164
}
164165

166+
private void PeriodicallyCheckForUpdates()
167+
{
168+
TaskExtensions.RunPeriodicAsync(async () =>
169+
{
170+
if (await this.applicationUpdater.UpdateAvailable())
171+
{
172+
this.Dispatcher.Invoke(() => this.viewManager.ShowView<AskUpdateView>());
173+
}
174+
}, TimeSpan.FromMinutes(15), TimeSpan.FromMinutes(15), CancellationToken.None);
175+
}
176+
165177
private static Color GetAverageColor(BitmapSource bitmap)
166178
{
167179
var format = bitmap.Format;

Daybreak/Views/SettingsCategoryView.xaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@
1212
Clicked="BackButton_Clicked" VerticalAlignment="Top" HorizontalAlignment="Left"></controls:BackButton>
1313
<WrapPanel Orientation="Vertical" VerticalAlignment="Bottom">
1414
<WrapPanel Orientation="Horizontal">
15-
<controls:TileButton Grid.Row="5" Title="Account settings" Foreground="White" BorderBrush="White" BorderThickness="2"
15+
<controls:TileButton Title="Account settings" Foreground="White" BorderBrush="White" BorderThickness="2"
1616
HighlightColor="White" Clicked="AccountButton_Clicked" Width="150" Height="150">
1717
<controls:TileButton.InnerContent>
1818
<controls:AvatarGlyph></controls:AvatarGlyph>
1919
</controls:TileButton.InnerContent>
2020
</controls:TileButton>
21-
<controls:TileButton Grid.Row="5" Grid.Column="1" Title="Launcher settings" Foreground="White" BorderBrush="White" BorderThickness="2"
21+
<controls:TileButton Title="Guildwars settings" Foreground="White" BorderBrush="White" BorderThickness="2"
22+
HighlightColor="White" Clicked="FileButton_Clicked" Height="150" Width="150">
23+
<controls:TileButton.InnerContent>
24+
<controls:FileGlyph></controls:FileGlyph>
25+
</controls:TileButton.InnerContent>
26+
</controls:TileButton>
27+
<controls:TileButton Title="Launcher settings" Foreground="White" BorderBrush="White" BorderThickness="2"
2228
HighlightColor="White" Clicked="LauncherButton_Clicked" Width="150" Height="150">
2329
<controls:TileButton.InnerContent>
2430
<controls:GoldenArrowGlyph></controls:GoldenArrowGlyph>
2531
</controls:TileButton.InnerContent>
2632
</controls:TileButton>
27-
<controls:TileButton Grid.Row="5" Grid.Column="2" Title="Experimental settings" Foreground="White" BorderBrush="White" BorderThickness="2"
33+
<controls:TileButton Title="Experimental settings" Foreground="White" BorderBrush="White" BorderThickness="2"
2834
HighlightColor="White" Clicked="ExperimentalButton_Clicked" Height="150" Width="150">
2935
<controls:TileButton.InnerContent>
3036
<controls:ExperimentGlyph></controls:ExperimentGlyph>
3137
</controls:TileButton.InnerContent>
3238
</controls:TileButton>
33-
<controls:TileButton Grid.Row="5" Grid.Column="2" Title="Guildwars settings" Foreground="White" BorderBrush="White" BorderThickness="2"
34-
HighlightColor="White" Clicked="FileButton_Clicked" Height="150" Width="150">
35-
<controls:TileButton.InnerContent>
36-
<controls:FileGlyph></controls:FileGlyph>
37-
</controls:TileButton.InnerContent>
38-
</controls:TileButton>
3939
</WrapPanel>
4040
</WrapPanel>
4141
</Grid>

0 commit comments

Comments
 (0)