Restructure assets into their own dedicated folders
@@ -77,14 +77,14 @@ namespace WPinternals
|
||||
Registration.CheckExpiration();
|
||||
|
||||
string PatchDefintionsXml;
|
||||
string PatchDefintionsPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PatchDefintions.xml");
|
||||
string PatchDefintionsPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets", "PatchDefintions.xml");
|
||||
if (File.Exists(PatchDefintionsPath))
|
||||
{
|
||||
PatchDefintionsXml = File.ReadAllText(PatchDefintionsPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
using Stream stream = System.Reflection.Assembly.GetEntryAssembly().GetManifestResourceStream("WPinternals.PatchDefinitions.xml");
|
||||
using Stream stream = System.Reflection.Assembly.GetEntryAssembly().GetManifestResourceStream("WPinternals.Assets.PatchDefinitions.xml");
|
||||
using StreamReader sr = new(stream);
|
||||
PatchDefintionsXml = sr.ReadToEnd();
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -2108,7 +2108,7 @@ namespace WPinternals
|
||||
Part = new FlashPart();
|
||||
Partition TargetPartition = GPT.GetPartition("UEFI_BS_NV");
|
||||
Part.StartSector = (UInt32)TargetPartition.FirstSector; // GPT is prepared for 64-bit sector-offset, but flash app isn't.
|
||||
string SBRes = IsSpecB ? "WPinternals.SB" : "WPinternals.SBA";
|
||||
string SBRes = IsSpecB ? "WPinternals.Assets.SB" : "WPinternals.Assets.SBA";
|
||||
Part.Stream = new SeekableStream(() =>
|
||||
{
|
||||
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace WPinternals
|
||||
// It overwrites the variable in a different NV-partition than where this variable is stored usually.
|
||||
// This normally leads to endless-loops when the NV-variables are enumerated.
|
||||
// But the partition contains an extra hack to break out the endless loops.
|
||||
Stream stream = assembly.GetManifestResourceStream("WPinternals.SB");
|
||||
Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SB");
|
||||
|
||||
return new DecompressedStream(stream);
|
||||
});
|
||||
@@ -2293,7 +2293,7 @@ namespace WPinternals
|
||||
// It overwrites the variable in a different NV-partition than where this variable is stored usually.
|
||||
// This normally leads to endless-loops when the NV-variables are enumerated.
|
||||
// But the partition contains an extra hack to break out the endless loops.
|
||||
Stream stream = assembly.GetManifestResourceStream("WPinternals.SB");
|
||||
Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SB");
|
||||
|
||||
return new DecompressedStream(stream);
|
||||
});
|
||||
@@ -2652,7 +2652,7 @@ namespace WPinternals
|
||||
// It overwrites the variable in a different NV-partition than where this variable is stored usually.
|
||||
// This normally leads to endless-loops when the NV-variables are enumerated.
|
||||
// But the partition contains an extra hack to break out the endless loops.
|
||||
Stream stream = assembly.GetManifestResourceStream("WPinternals.SB");
|
||||
Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SB");
|
||||
|
||||
return new DecompressedStream(stream);
|
||||
});
|
||||
|
||||
@@ -1013,7 +1013,7 @@ namespace WPinternals
|
||||
// It overwrites the variable in a different NV-partition than where this variable is stored usually.
|
||||
// This normally leads to endless-loops when the NV-variables are enumerated.
|
||||
// But the partition contains an extra hack to break out the endless loops.
|
||||
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.SBMSM"))
|
||||
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SBMSM"))
|
||||
{
|
||||
using DecompressedStream dec = new(stream);
|
||||
using MemoryStream SB = new(); // Must be a seekable stream!
|
||||
@@ -1240,7 +1240,7 @@ namespace WPinternals
|
||||
// It overwrites the variable in a different NV-partition than where this variable is stored usually.
|
||||
// This normally leads to endless-loops when the NV-variables are enumerated.
|
||||
// But the partition contains an extra hack to break out the endless loops.
|
||||
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.SBMSM"))
|
||||
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SBMSM"))
|
||||
{
|
||||
using DecompressedStream dec = new(stream);
|
||||
using MemoryStream SB = new(); // Must be a seekable stream!
|
||||
@@ -1441,7 +1441,7 @@ namespace WPinternals
|
||||
// It overwrites the variable in a different NV-partition than where this variable is stored usually.
|
||||
// This normally leads to endless-loops when the NV-variables are enumerated.
|
||||
// But the partition contains an extra hack to break out the endless loops.
|
||||
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.SBMSM"))
|
||||
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SBMSM"))
|
||||
{
|
||||
using DecompressedStream dec = new(stream);
|
||||
using MemoryStream SB = new(); // Must be a seekable stream!
|
||||
|
||||
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="700">
|
||||
<UserControl.Resources>
|
||||
<BitmapImage x:Key="LogoImageSource" UriSource="..\Logo.png" />
|
||||
<BitmapImage x:Key="LogoImageSource" UriSource="..\Assets\Logo.png" />
|
||||
</UserControl.Resources>
|
||||
<Border BorderThickness="1" BorderBrush="#FFD4D4D4" HorizontalAlignment="Stretch" VerticalAlignment="Center" Padding="25">
|
||||
<Grid>
|
||||
|
||||
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="700">
|
||||
<UserControl.Resources>
|
||||
<BitmapImage x:Key="Busy" UriSource="..\aerobusy.gif" />
|
||||
<BitmapImage x:Key="Busy" UriSource="..\Assets\aerobusy.gif" />
|
||||
<helpers:ObjectToVisibilityConverter x:Key="ObjectToVisibilityConverter" />
|
||||
<helpers:InverseObjectToVisibilityConverter x:Key="InverseObjectToVisibilityConverter" />
|
||||
<helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/>
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace WPinternals
|
||||
InitializeComponent();
|
||||
|
||||
// Setting these properties in XAML results in an error. Why?
|
||||
GifImage.GifSource = "/aerobusy.gif";
|
||||
GifImage.GifSource = "/Assets/aerobusy.gif";
|
||||
GifImage.AutoStart = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
d:DesignWidth="700"
|
||||
>
|
||||
<UserControl.Resources>
|
||||
<BitmapImage x:Key="Busy" UriSource="..\aerobusy.gif" />
|
||||
<BitmapImage x:Key="Busy" UriSource="..\Assets\aerobusy.gif" />
|
||||
<helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/>
|
||||
<helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" />
|
||||
</UserControl.Resources>
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace WPinternals
|
||||
UIContext = SynchronizationContext.Current;
|
||||
|
||||
// Setting these properties in XAML results in an error. Why?
|
||||
GifImage.GifSource = "/aerobusy.gif";
|
||||
GifImage.GifSource = "/Assets/aerobusy.gif";
|
||||
GifImage.AutoStart = true;
|
||||
|
||||
Loaded += Empty_Loaded;
|
||||
|
||||
@@ -23,7 +23,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
<Window x:Class="WPinternals.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:WPinternals" Height="760" Width="1150" Icon="..\WPinternals.ico" Closed="Window_Closed">
|
||||
xmlns:local="clr-namespace:WPinternals" Height="760" Width="1150" Icon="..\Assets\WPinternals.ico" Closed="Window_Closed">
|
||||
<Window.Resources>
|
||||
<DataTemplate DataType="{x:Type local:BootUnlockResourcesViewModel}">
|
||||
<local:FlashResourcesView />
|
||||
@@ -115,8 +115,8 @@ DEALINGS IN THE SOFTWARE.
|
||||
<DataTemplate DataType="{x:Type local:ContextViewModel}">
|
||||
<local:ContextView />
|
||||
</DataTemplate>
|
||||
<BitmapImage x:Key="LogoImageSource" UriSource="..\Logo.png" />
|
||||
<BitmapImage x:Key="LogoSmallImageSource" UriSource="..\Logo-Small.png" />
|
||||
<BitmapImage x:Key="LogoImageSource" UriSource="..\Assets\Logo.png" />
|
||||
<BitmapImage x:Key="LogoSmallImageSource" UriSource="..\Assets\Logo-Small.png" />
|
||||
<Style x:Key="MenuButtonStyle" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="{x:Type Button}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
||||
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="700">
|
||||
<UserControl.Resources>
|
||||
<BitmapImage x:Key="Busy" UriSource="..\aerobusy.gif" />
|
||||
<BitmapImage x:Key="Busy" UriSource="..\Assets\aerobusy.gif" />
|
||||
<helpers:HexConverter x:Key="HexConverter" />
|
||||
<helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/>
|
||||
<helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" />
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace WPinternals
|
||||
UIContext = SynchronizationContext.Current;
|
||||
|
||||
// Setting these properties in XAML results in an error. Why?
|
||||
GifImage.GifSource = "/aerobusy.gif";
|
||||
GifImage.GifSource = "/Assets/aerobusy.gif";
|
||||
GifImage.AutoStart = true;
|
||||
|
||||
Loaded += NokiaBootloaderView_Loaded;
|
||||
|
||||
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="700">
|
||||
<UserControl.Resources>
|
||||
<BitmapImage x:Key="Busy" UriSource="..\aerobusy.gif" />
|
||||
<BitmapImage x:Key="Busy" UriSource="..\Assets\aerobusy.gif" />
|
||||
<helpers:HexConverter x:Key="HexConverter" />
|
||||
<helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/>
|
||||
<helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" />
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<NoWarn>1701;1702;CA1416;RCS1090;RCS1163</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>WPinternals.ico</ApplicationIcon>
|
||||
<ApplicationIcon>Assets\WPinternals.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>WPinternals.App</StartupObject>
|
||||
@@ -306,27 +306,27 @@
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<AppDesigner Include="Properties\" />
|
||||
<EmbeddedResource Include="SB" />
|
||||
<EmbeddedResource Include="SBA" />
|
||||
<EmbeddedResource Include="SBMSM" />
|
||||
<EmbeddedResource Include="Assets\SB" />
|
||||
<EmbeddedResource Include="Assets\SBA" />
|
||||
<EmbeddedResource Include="Assets\SBMSM" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Logo.png" />
|
||||
<Resource Include="Assets\Logo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="WPinternals.ico" />
|
||||
<Resource Include="Assets\WPinternals.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="aerobusy.gif" />
|
||||
<Resource Include="Assets\aerobusy.gif" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="PhoneReboot.png" />
|
||||
<Resource Include="Assets\PhoneReboot.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Logo-Small.png" />
|
||||
<Resource Include="Assets\Logo-Small.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="PatchDefinitions.xml">
|
||||
<EmbeddedResource Include="Assets\PatchDefinitions.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||