Added extracting all data, renamed project
parent
b58b7030cf
commit
de156812e8
|
@ -0,0 +1,61 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27004.2009
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchFace", "WatchFace\WatchFace.csproj", "{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchFace.Cmd", "WatchFace.Cmd\WatchFace.Cmd.csproj", "{963BCF47-8C24-4219-BC84-8EC3670205B3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|x64.Build.0 = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|x86.Build.0 = Release|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Release|x64.Build.0 = Release|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{963BCF47-8C24-4219-BC84-8EC3670205B3}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {76A7037C-575A-4EA5-A894-D47C03F8D3ED}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,12 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/EMPTY_BLOCK_STYLE/@EntryValue">TOGETHER_SAME_LINE</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_INITIALIZER_ARRANGEMENT/@EntryValue">False</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
|
||||
<s:String x:Key="/Default/Environment/Hierarchy/PsiConfigurationSettingsKey/CustomLocation/@EntryValue">C:\Users\valeronm\AppData\Local\JetBrains\Transient\ReSharperPlatformVs15\v11_048a238b\SolutionCaches</s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
@ -1,79 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27004.2009
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI", "UI\UI.csproj", "{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchFace", "WatchFace\WatchFace.csproj", "{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cmd", "Cmd\Cmd.csproj", "{A599B50E-754E-4C8F-A078-867B26E3DD09}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|x64.Build.0 = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8D2E0224-DE7F-4EC9-AD23-9904B9D7B409}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A599B50E-754E-4C8F-A078-867B26E3DD09}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {76A7037C-575A-4EA5-A894-D47C03F8D3ED}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,3 +0,0 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/EMPTY_BLOCK_STYLE/@EntryValue">TOGETHER_SAME_LINE</s:String>
|
||||
<s:String x:Key="/Default/Environment/Hierarchy/PsiConfigurationSettingsKey/CustomLocation/@EntryValue">C:\Users\valeronm\AppData\Local\JetBrains\Transient\ReSharperPlatformVs15\v11_048a238b\SolutionCaches</s:String></wpf:ResourceDictionary>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,56 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using SixLabors.ImageSharp;
|
||||
using WatchFace;
|
||||
using WatchFace.Models;
|
||||
|
||||
namespace Cmd
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
var fileName = args[0];
|
||||
Reader reader;
|
||||
Console.WriteLine("Opening watch face: {0}", fileName);
|
||||
using (var fileStream = File.OpenRead(fileName))
|
||||
{
|
||||
reader = new Reader(fileStream);
|
||||
reader.Parse();
|
||||
}
|
||||
|
||||
foreach (var resource in reader.Resources)
|
||||
{
|
||||
Console.WriteLine("{0:D}: ", resource.Id);
|
||||
foreach (var descriptor in resource.Children) WriteParameter(4, descriptor);
|
||||
}
|
||||
|
||||
var watchFace = WatchFace.WatchFace.Parse(reader.Resources);
|
||||
|
||||
var index = 0;
|
||||
foreach (var image in reader.Images)
|
||||
{
|
||||
image.Save($"{index}.bmp");
|
||||
index++;
|
||||
}
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
private static void WriteParameter(int offset, Parameter parameter)
|
||||
{
|
||||
for (var i = 0; i < offset; i++)
|
||||
Console.Write(' ');
|
||||
Console.Write("{0:D}: ", parameter.Id);
|
||||
if (parameter.IsComplex)
|
||||
{
|
||||
Console.WriteLine();
|
||||
foreach (var parameter1 in parameter.Children) WriteParameter(offset + 4, parameter1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("{0:D} (0x{0:x})", parameter.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
<Application x:Class="UI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:UI"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
<Window x:Class="UI.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:UI"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="350" Width="525">
|
||||
<Grid Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox IsReadOnly="True" Margin="0,0,8,0"/>
|
||||
<Button Content="Button" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Grid.Column="1"/>
|
||||
</Grid>
|
||||
<TextBox AcceptsReturn="True" Grid.Row="1" />
|
||||
</Grid>
|
||||
</Window>
|
|
@ -1,28 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("UI")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("UI")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//In order to begin building localizable applications, set
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||
//the line below to match the UICulture setting in the project file.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,71 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace UI.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UI.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,117 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -1,30 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace UI.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
103
UI/UI.csproj
103
UI/UI.csproj
|
@ -1,103 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>UI</RootNamespace>
|
||||
<AssemblyName>UI</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WatchFace\WatchFace.csproj">
|
||||
<Project>{8d2e0224-de7f-4ec9-ad23-9904b9d7b409}</Project>
|
||||
<Name>WatchFace</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,91 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using SixLabors.ImageSharp;
|
||||
using WatchFace;
|
||||
using WatchFace.Models;
|
||||
|
||||
namespace Cmd
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
private static int Main(string[] args)
|
||||
{
|
||||
var inputFileName = args[0];
|
||||
if (inputFileName == null)
|
||||
{
|
||||
Usage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reader reader;
|
||||
Console.WriteLine("Opening watch face '{0}'", inputFileName);
|
||||
using (var fileStream = File.OpenRead(inputFileName))
|
||||
{
|
||||
reader = new Reader(fileStream);
|
||||
Console.WriteLine("Reading watch face parameters...");
|
||||
reader.Parse();
|
||||
}
|
||||
|
||||
//foreach (var resource in reader.Resources)
|
||||
//{
|
||||
// Console.WriteLine("{0:D}: ", resource.Id);
|
||||
// foreach (var descriptor in resource.Children) WriteParameter(4, descriptor);
|
||||
//}
|
||||
|
||||
Console.WriteLine("Parsing parameters...");
|
||||
var watchFace = WatchFace.WatchFace.Parse(reader.Resources);
|
||||
|
||||
var path = Path.GetDirectoryName(inputFileName);
|
||||
var name = Path.GetFileNameWithoutExtension(inputFileName);
|
||||
var unpackedPath = Path.Combine(path, $"{name}_unpacked");
|
||||
if (!Directory.Exists(unpackedPath)) Directory.CreateDirectory(unpackedPath);
|
||||
Console.WriteLine("Unpacking watch face to '{0}'", unpackedPath);
|
||||
|
||||
|
||||
var configFileName = Path.Combine(unpackedPath, "config.json");
|
||||
Console.WriteLine("Eporting config...");
|
||||
using (var fileStream = File.OpenWrite(configFileName))
|
||||
using (var writer = new StreamWriter(fileStream))
|
||||
{
|
||||
writer.Write(JsonConvert.SerializeObject(watchFace, Formatting.Indented,
|
||||
new JsonSerializerSettings {NullValueHandling = NullValueHandling.Ignore}));
|
||||
writer.Flush();
|
||||
}
|
||||
|
||||
Console.WriteLine("Eporting images...");
|
||||
var index = 0;
|
||||
foreach (var image in reader.Images)
|
||||
{
|
||||
image.Save(Path.Combine(unpackedPath, $"{index}.bmp"));
|
||||
index++;
|
||||
}
|
||||
|
||||
Console.WriteLine("Everything done!");
|
||||
Console.ReadKey();
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static void Usage()
|
||||
{
|
||||
Console.WriteLine("Usage: wf.exe [watchface bin]");
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
private static void WriteParameter(int offset, Parameter parameter)
|
||||
{
|
||||
for (var i = 0; i < offset; i++)
|
||||
Console.Write(' ');
|
||||
Console.Write("{0:D}: ", parameter.Id);
|
||||
if (parameter.IsComplex)
|
||||
{
|
||||
Console.WriteLine();
|
||||
foreach (var parameter1 in parameter.Children) WriteParameter(offset + 4, parameter1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("{0:D} (0x{0:x})", parameter.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Cmd")]
|
||||
[assembly: AssemblyTitle("WatchFace.Cmd")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Cmd")]
|
||||
[assembly: AssemblyProduct("WatchFace.Cmd")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("a599b50e-754e-4c8f-a078-867b26e3dd09")]
|
||||
[assembly: Guid("963bcf47-8c24-4219-bc84-8ec3670205b3")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
|
@ -4,10 +4,10 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A599B50E-754E-4C8F-A078-867B26E3DD09}</ProjectGuid>
|
||||
<ProjectGuid>{963BCF47-8C24-4219-BC84-8EC3670205B3}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Cmd</RootNamespace>
|
||||
<AssemblyName>Cmd</AssemblyName>
|
||||
<RootNamespace>WatchFace.Cmd</RootNamespace>
|
||||
<AssemblyName>WatchFace.Cmd</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
|
@ -32,6 +32,13 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Win32.Primitives">
|
||||
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SixLabors.Core, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SixLabors.Core.1.0.0-beta0004\lib\netstandard1.1\SixLabors.Core.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -39,18 +46,54 @@
|
|||
<HintPath>..\packages\SixLabors.ImageSharp.1.0.0-beta0002\lib\netstandard2.0\SixLabors.ImageSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.AppContext">
|
||||
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Console">
|
||||
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Globalization.Calendars">
|
||||
<HintPath>..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Compression">
|
||||
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.IO.Compression.ZipFile">
|
||||
<HintPath>..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.FileSystem">
|
||||
<HintPath>..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.FileSystem.Primitives">
|
||||
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.4.0-preview2-25405-01\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http">
|
||||
<HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Sockets">
|
||||
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
|
@ -58,11 +101,35 @@
|
|||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation">
|
||||
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Algorithms">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates">
|
||||
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.ReaderWriter">
|
||||
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
|
@ -3,6 +3,7 @@
|
|||
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" />
|
||||
<package id="NETStandard.Library" version="1.6.1" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />
|
||||
<package id="SixLabors.Core" version="1.0.0-beta0004" targetFramework="net461" />
|
||||
<package id="SixLabors.ImageSharp" version="1.0.0-beta0002" targetFramework="net461" />
|
||||
<package id="System.AppContext" version="4.3.0" targetFramework="net461" />
|
||||
|
@ -49,7 +50,6 @@
|
|||
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Threading" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net461" />
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using WatchFace.JsonConverters;
|
||||
using WatchFace.Models;
|
||||
|
||||
namespace WatchFace.Elements.BasicElements
|
||||
|
@ -7,7 +9,10 @@ namespace WatchFace.Elements.BasicElements
|
|||
public class ClockHand
|
||||
{
|
||||
public long Unknown { get; set; }
|
||||
|
||||
[JsonConverter(typeof(HexStringJsonConverter))]
|
||||
public long Color { get; set; }
|
||||
|
||||
public Coordinates Center { get; set; }
|
||||
public List<Coordinates> Shape { get; set; }
|
||||
public Image CenterImage { get; set; }
|
||||
|
|
|
@ -6,9 +6,9 @@ namespace WatchFace.Elements.BasicElements
|
|||
{
|
||||
public class Image
|
||||
{
|
||||
public long ImageIndex { get; set; }
|
||||
public long X { get; set; }
|
||||
public long Y { get; set; }
|
||||
public long ImageIndex { get; set; }
|
||||
|
||||
public static Image Parse(List<Parameter> descriptor)
|
||||
{
|
||||
|
|
|
@ -6,10 +6,10 @@ namespace WatchFace.Elements.BasicElements
|
|||
{
|
||||
public class ImageSet
|
||||
{
|
||||
public long ImageIndex { get; set; }
|
||||
public long ImagesCount { get; set; }
|
||||
public long X { get; set; }
|
||||
public long Y { get; set; }
|
||||
public long ImageIndex { get; set; }
|
||||
public long ImagesCount { get; set; }
|
||||
|
||||
public static ImageSet Parse(List<Parameter> descriptor)
|
||||
{
|
||||
|
|
|
@ -6,15 +6,14 @@ namespace WatchFace.Elements.BasicElements
|
|||
{
|
||||
public class Number
|
||||
{
|
||||
public long BottomRightX { get; set; }
|
||||
public long BottomRightY { get; set; }
|
||||
public long ImageIndex { get; set; }
|
||||
public long ImagesCount { get; set; }
|
||||
public long TopLeftX { get; set; }
|
||||
public long TopLeftY { get; set; }
|
||||
|
||||
public long BottomRightX { get; set; }
|
||||
public long BottomRightY { get; set; }
|
||||
public long Unknown1 { get; set; }
|
||||
public long Unknown2 { get; set; }
|
||||
public long ImageIndex { get; set; }
|
||||
public long ImagesCount { get; set; }
|
||||
|
||||
public static Number Parse(List<Parameter> descriptor)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace WatchFace.Elements
|
|||
{
|
||||
public class Status
|
||||
{
|
||||
public Switch Switch { get; set; }
|
||||
public Switch Bluetooth { get; set; }
|
||||
public Flag Alarm { get; set; }
|
||||
public Flag Lock { get; set; }
|
||||
public Flag DoNotDisturb { get; set; }
|
||||
|
@ -22,7 +22,7 @@ namespace WatchFace.Elements
|
|||
switch (parameter.Id)
|
||||
{
|
||||
case 1:
|
||||
result.Switch = Switch.Parse(parameter.Children);
|
||||
result.Bluetooth = Switch.Parse(parameter.Children);
|
||||
break;
|
||||
case 2:
|
||||
result.Alarm = Flag.Parse(parameter.Children);
|
||||
|
|
|
@ -7,8 +7,8 @@ namespace WatchFace.Elements.StatusElements
|
|||
{
|
||||
public class Flag
|
||||
{
|
||||
public long ImageIndexOn { get; set; }
|
||||
public Coordinates Coordinates { get; set; }
|
||||
public long ImageIndex { get; set; }
|
||||
|
||||
public static Flag Parse(List<Parameter> descriptor)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ namespace WatchFace.Elements.StatusElements
|
|||
result.Coordinates = Coordinates.Parse(parameter.Children);
|
||||
break;
|
||||
case 2:
|
||||
result.ImageIndexOn = parameter.Value;
|
||||
result.ImageIndex = parameter.Value;
|
||||
break;
|
||||
default:
|
||||
throw new InvalidParameterException(parameter);
|
||||
|
|
|
@ -7,9 +7,9 @@ namespace WatchFace.Elements.StatusElements
|
|||
{
|
||||
public class Switch
|
||||
{
|
||||
public Coordinates Coordinates { get; set; }
|
||||
public long ImageIndexOn { get; set; }
|
||||
public long ImageIndexOff { get; set; }
|
||||
public Coordinates Coordinates { get; set; }
|
||||
|
||||
public static Switch Parse(List<Parameter> descriptor)
|
||||
{
|
||||
|
|
|
@ -8,10 +8,10 @@ namespace WatchFace.Elements
|
|||
{
|
||||
public class Time
|
||||
{
|
||||
public AmPm AmPm { get; set; }
|
||||
public TwoDigits Hours { get; set; }
|
||||
public TwoDigits Minutes { get; set; }
|
||||
public TwoDigits Seconds { get; set; }
|
||||
public AmPm AmPm { get; set; }
|
||||
|
||||
public static Time Parse(List<Parameter> descriptor)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace WatchFace.JsonConverters
|
||||
{
|
||||
public class HexStringJsonConverter : JsonConverter
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue($"0x{value:x}");
|
||||
}
|
||||
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return typeof(uint) == objectType;
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue,
|
||||
JsonSerializer serializer)
|
||||
{
|
||||
var str = reader.ReadAsString();
|
||||
if (str == null || !str.StartsWith("0x"))
|
||||
throw new JsonSerializationException();
|
||||
return Convert.ToUInt32(str);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +1,18 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.6</TargetFramework>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0002" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Drawing">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Drawing.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\..\.nuget\packages\newtonsoft.json\10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Elements\AnalogDialFaceElements\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
Loading…
Reference in New Issue