Skip to content
This repository was archived by the owner on Jan 8, 2022. It is now read-only.

Commit c8f56e0

Browse files
committed
Previous to modifying the ViewModels
1 parent 34bc2ad commit c8f56e0

File tree

5 files changed

+23
-1
lines changed

5 files changed

+23
-1
lines changed

Source/Deployer.Raspberry.Gui/App.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ResourceDictionary.MergedDictionaries>
1111
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
1212
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
13-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
13+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Crimson.xaml" />
1414
</ResourceDictionary.MergedDictionaries>
1515

1616
<valueConverters:BoolNegationConverter x:Key="BoolNegationConverter" />
11.5 KB
Binary file not shown.
11 KB
Loading

Source/Deployer.Raspberry.Gui/Deployer.Raspberry.Gui.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
<DependentUpon>Settings.settings</DependentUpon>
7777
</Compile>
7878
<Compile Include="ViewModels\AdvancedViewModel.cs" />
79+
<Compile Include="ViewModels\DiskViewModel.cs" />
7980
<Compile Include="ViewModels\DualBootViewModel.cs" />
8081
<Compile Include="ViewModels\IBusyObject.cs" />
8182
<Compile Include="ViewModels\MessageViewModel.cs" />
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using ByteSizeLib;
2+
using Deployer.FileSystem;
3+
4+
namespace Deployer.Raspberry.Gui.ViewModels
5+
{
6+
public class DiskViewModel
7+
{
8+
private readonly Disk disk;
9+
10+
public DiskViewModel(Disk disk)
11+
{
12+
this.disk = disk;
13+
}
14+
15+
public uint Number => disk.Number + 1;
16+
public string FriendlyName => disk.FriendlyName;
17+
public ByteSize Size => disk.Size;
18+
public bool IsUsualTarget => Size > ByteSize.FromGigaBytes(14) && Size < ByteSize.FromGigaBytes(255);
19+
public Disk Disk => disk;
20+
}
21+
}

0 commit comments

Comments
 (0)