diff --git a/Amazfit.sln b/Amazfit.sln
new file mode 100644
index 0000000..c73ef76
--- /dev/null
+++ b/Amazfit.sln
@@ -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
diff --git a/Amazfit.sln.DotSettings b/Amazfit.sln.DotSettings
new file mode 100644
index 0000000..595f792
--- /dev/null
+++ b/Amazfit.sln.DotSettings
@@ -0,0 +1,12 @@
+
+ TOGETHER_SAME_LINE
+ False
+ NEVER
+ C:\Users\valeronm\AppData\Local\JetBrains\Transient\ReSharperPlatformVs15\v11_048a238b\SolutionCaches
+ True
+ True
+ True
+ True
+ True
+ True
+ True
\ No newline at end of file
diff --git a/AmazfitWFReader.sln b/AmazfitWFReader.sln
deleted file mode 100644
index bfce891..0000000
--- a/AmazfitWFReader.sln
+++ /dev/null
@@ -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
diff --git a/AmazfitWFReader.sln.DotSettings b/AmazfitWFReader.sln.DotSettings
deleted file mode 100644
index 4742e85..0000000
--- a/AmazfitWFReader.sln.DotSettings
+++ /dev/null
@@ -1,3 +0,0 @@
-
- TOGETHER_SAME_LINE
- C:\Users\valeronm\AppData\Local\JetBrains\Transient\ReSharperPlatformVs15\v11_048a238b\SolutionCaches
\ No newline at end of file
diff --git a/Cmd/App.config b/Cmd/App.config
deleted file mode 100644
index e15b3f8..0000000
--- a/Cmd/App.config
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Cmd/Program.cs b/Cmd/Program.cs
deleted file mode 100644
index c335373..0000000
--- a/Cmd/Program.cs
+++ /dev/null
@@ -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);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/UI/App.xaml b/UI/App.xaml
deleted file mode 100644
index db385e4..0000000
--- a/UI/App.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/UI/App.xaml.cs b/UI/App.xaml.cs
deleted file mode 100644
index 61f8a46..0000000
--- a/UI/App.xaml.cs
+++ /dev/null
@@ -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
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/UI/MainWindow.xaml b/UI/MainWindow.xaml
deleted file mode 100644
index 9d794c3..0000000
--- a/UI/MainWindow.xaml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UI/MainWindow.xaml.cs b/UI/MainWindow.xaml.cs
deleted file mode 100644
index 709b987..0000000
--- a/UI/MainWindow.xaml.cs
+++ /dev/null
@@ -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
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/UI/Properties/AssemblyInfo.cs b/UI/Properties/AssemblyInfo.cs
deleted file mode 100644
index 7d5c42f..0000000
--- a/UI/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -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
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the 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")]
diff --git a/UI/Properties/Resources.Designer.cs b/UI/Properties/Resources.Designer.cs
deleted file mode 100644
index 36470a0..0000000
--- a/UI/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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.
-//
-//------------------------------------------------------------------------------
-
-namespace UI.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // 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()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [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;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/UI/Properties/Resources.resx b/UI/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/UI/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/UI/Properties/Settings.Designer.cs b/UI/Properties/Settings.Designer.cs
deleted file mode 100644
index 84d05e7..0000000
--- a/UI/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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.
-//
-//------------------------------------------------------------------------------
-
-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;
- }
- }
- }
-}
diff --git a/UI/Properties/Settings.settings b/UI/Properties/Settings.settings
deleted file mode 100644
index 033d7a5..0000000
--- a/UI/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/UI/UI.csproj b/UI/UI.csproj
deleted file mode 100644
index 503c2de..0000000
--- a/UI/UI.csproj
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {B05BAE0A-2C09-4910-924D-CA3DA0FA1CFD}
- WinExe
- UI
- UI
- v4.6.1
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
- {8d2e0224-de7f-4ec9-ad23-9904b9d7b409}
- WatchFace
-
-
-
-
\ No newline at end of file
diff --git a/UI/App.config b/WatchFace.Cmd/App.config
similarity index 100%
rename from UI/App.config
rename to WatchFace.Cmd/App.config
diff --git a/WatchFace.Cmd/Program.cs b/WatchFace.Cmd/Program.cs
new file mode 100644
index 0000000..6e779dc
--- /dev/null
+++ b/WatchFace.Cmd/Program.cs
@@ -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);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Cmd/Properties/AssemblyInfo.cs b/WatchFace.Cmd/Properties/AssemblyInfo.cs
similarity index 89%
rename from Cmd/Properties/AssemblyInfo.cs
rename to WatchFace.Cmd/Properties/AssemblyInfo.cs
index 109f299..9cc4154 100644
--- a/Cmd/Properties/AssemblyInfo.cs
+++ b/WatchFace.Cmd/Properties/AssemblyInfo.cs
@@ -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:
//
diff --git a/Cmd/Cmd.csproj b/WatchFace.Cmd/WatchFace.Cmd.csproj
similarity index 52%
rename from Cmd/Cmd.csproj
rename to WatchFace.Cmd/WatchFace.Cmd.csproj
index 60a25d1..0a89bc2 100644
--- a/Cmd/Cmd.csproj
+++ b/WatchFace.Cmd/WatchFace.Cmd.csproj
@@ -4,10 +4,10 @@
Debug
AnyCPU
- {A599B50E-754E-4C8F-A078-867B26E3DD09}
+ {963BCF47-8C24-4219-BC84-8EC3670205B3}
Exe
- Cmd
- Cmd
+ WatchFace.Cmd
+ WatchFace.Cmd
v4.6.1
512
true
@@ -32,6 +32,13 @@
4
+
+ ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll
+ True
+
+
+ ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+
..\packages\SixLabors.Core.1.0.0-beta0004\lib\netstandard1.1\SixLabors.Core.dll
@@ -39,18 +46,54 @@
..\packages\SixLabors.ImageSharp.1.0.0-beta0002\lib\netstandard2.0\SixLabors.ImageSharp.dll
+
+ ..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll
+ True
+
..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll
+
+ ..\packages\System.Console.4.3.0\lib\net46\System.Console.dll
+ True
+
..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll
+
+ ..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll
+ True
+
+
+ ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll
+ True
+
+
+ ..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll
+ True
+
+
+ ..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll
+ True
+
+
+ ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll
+ True
+
..\packages\System.Memory.4.4.0-preview2-25405-01\lib\netstandard2.0\System.Memory.dll
+
+ ..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll
+ True
+
+
+ ..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll
+ True
+
..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll
@@ -58,11 +101,35 @@
..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll
+
+ ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
+ True
+
+
+ ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll
+ True
+
+
+ ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
+ True
+
+
+ ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
+ True
+
+
+ ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll
+ True
+
+
+ ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll
+ True
+
diff --git a/Cmd/packages.config b/WatchFace.Cmd/packages.config
similarity index 97%
rename from Cmd/packages.config
rename to WatchFace.Cmd/packages.config
index 0caaa5b..ad9fb22 100644
--- a/Cmd/packages.config
+++ b/WatchFace.Cmd/packages.config
@@ -3,6 +3,7 @@
+
@@ -49,7 +50,6 @@
-
diff --git a/WatchFace/Elements/BasicElements/ClockHand.cs b/WatchFace/Elements/BasicElements/ClockHand.cs
index 5685c86..23b05e2 100644
--- a/WatchFace/Elements/BasicElements/ClockHand.cs
+++ b/WatchFace/Elements/BasicElements/ClockHand.cs
@@ -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 Shape { get; set; }
public Image CenterImage { get; set; }
diff --git a/WatchFace/Elements/BasicElements/Image.cs b/WatchFace/Elements/BasicElements/Image.cs
index 2482300..7543ad6 100644
--- a/WatchFace/Elements/BasicElements/Image.cs
+++ b/WatchFace/Elements/BasicElements/Image.cs
@@ -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 descriptor)
{
diff --git a/WatchFace/Elements/BasicElements/ImageSet.cs b/WatchFace/Elements/BasicElements/ImageSet.cs
index 0fe72b5..138b3cc 100644
--- a/WatchFace/Elements/BasicElements/ImageSet.cs
+++ b/WatchFace/Elements/BasicElements/ImageSet.cs
@@ -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 descriptor)
{
diff --git a/WatchFace/Elements/BasicElements/Number.cs b/WatchFace/Elements/BasicElements/Number.cs
index 586e343..9005c85 100644
--- a/WatchFace/Elements/BasicElements/Number.cs
+++ b/WatchFace/Elements/BasicElements/Number.cs
@@ -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 descriptor)
{
diff --git a/WatchFace/Elements/Status.cs b/WatchFace/Elements/Status.cs
index 937dbbf..3b6e7f9 100644
--- a/WatchFace/Elements/Status.cs
+++ b/WatchFace/Elements/Status.cs
@@ -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);
diff --git a/WatchFace/Elements/StatusElements/Flag.cs b/WatchFace/Elements/StatusElements/Flag.cs
index 2715163..8a6568e 100644
--- a/WatchFace/Elements/StatusElements/Flag.cs
+++ b/WatchFace/Elements/StatusElements/Flag.cs
@@ -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 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);
diff --git a/WatchFace/Elements/StatusElements/Switch.cs b/WatchFace/Elements/StatusElements/Switch.cs
index 8105291..a00d6b9 100644
--- a/WatchFace/Elements/StatusElements/Switch.cs
+++ b/WatchFace/Elements/StatusElements/Switch.cs
@@ -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 descriptor)
{
diff --git a/WatchFace/Elements/Time.cs b/WatchFace/Elements/Time.cs
index 9d5db53..e4b0138 100644
--- a/WatchFace/Elements/Time.cs
+++ b/WatchFace/Elements/Time.cs
@@ -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 descriptor)
{
diff --git a/WatchFace/JsonConverters/HexStringJsonConverter.cs b/WatchFace/JsonConverters/HexStringJsonConverter.cs
new file mode 100644
index 0000000..2150e96
--- /dev/null
+++ b/WatchFace/JsonConverters/HexStringJsonConverter.cs
@@ -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);
+ }
+ }
+}
\ No newline at end of file
diff --git a/WatchFace/WatchFace.csproj b/WatchFace/WatchFace.csproj
index ce17735..d3e21b5 100644
--- a/WatchFace/WatchFace.csproj
+++ b/WatchFace/WatchFace.csproj
@@ -1,21 +1,18 @@
- netstandard1.6
+ netstandard2.0
+
-
- ..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Drawing.dll
+
+ ..\..\..\..\.nuget\packages\newtonsoft.json\10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll
-
-
-
-