Merged in 123159753/amazfitbiptools/fix (pull request #1)

global correction of namespaces
fonts_experiment
123159753 2017-11-23 22:02:47 +00:00 committed by Valeriy Mironov
commit 3dc14edfff
45 changed files with 113 additions and 112 deletions

View File

@ -1,8 +1,8 @@
using WatchFace.Elements.ActivityElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.ActivityElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class Activity public class Activity
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.ActivityElements namespace WatchFace.Parser.Elements.ActivityElements
{ {
public class FormattedNumber public class FormattedNumber
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class AnalogDialFace public class AnalogDialFace
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class Background public class Background
{ {

View File

@ -1,8 +1,8 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using WatchFace.JsonConverters; using WatchFace.Parser.JsonConverters;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.BasicElements namespace WatchFace.Parser.Elements.BasicElements
{ {
public class CircleScale public class CircleScale
{ {

View File

@ -1,9 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json; using Newtonsoft.Json;
using WatchFace.JsonConverters; using WatchFace.Parser.JsonConverters;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.BasicElements namespace WatchFace.Parser.Elements.BasicElements
{ {
public class ClockHand public class ClockHand
{ {

View File

@ -1,6 +1,6 @@
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.BasicElements namespace WatchFace.Parser.Elements.BasicElements
{ {
public class Coordinates public class Coordinates
{ {

View File

@ -1,6 +1,6 @@
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.BasicElements namespace WatchFace.Parser.Elements.BasicElements
{ {
public class Image public class Image
{ {

View File

@ -1,6 +1,6 @@
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.BasicElements namespace WatchFace.Parser.Elements.BasicElements
{ {
public class ImageSet public class ImageSet
{ {

View File

@ -1,6 +1,6 @@
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.BasicElements namespace WatchFace.Parser.Elements.BasicElements
{ {
public class Number public class Number
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.BasicElements namespace WatchFace.Parser.Elements.BasicElements
{ {
public class Scale public class Scale
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class Battery public class Battery
{ {

View File

@ -1,8 +1,8 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Elements.DateElements; using WatchFace.Parser.Elements.DateElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class Date public class Date
{ {

View File

@ -1,6 +1,6 @@
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.DateElements namespace WatchFace.Parser.Elements.DateElements
{ {
public class MonthAndDay public class MonthAndDay
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.DateElements namespace WatchFace.Parser.Elements.DateElements
{ {
public class OneLineMonthAndDay public class OneLineMonthAndDay
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.DateElements namespace WatchFace.Parser.Elements.DateElements
{ {
public class SeparateMonthAndDay public class SeparateMonthAndDay
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class Scales public class Scales
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.StatusElements; using WatchFace.Parser.Elements.StatusElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class Status public class Status
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.StatusElements namespace WatchFace.Parser.Elements.StatusElements
{ {
public class Flag public class Flag
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.StatusElements namespace WatchFace.Parser.Elements.StatusElements
{ {
public class Switch public class Switch
{ {

View File

@ -1,8 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.TimeElements;
using WatchFace.Elements.TimeElements; using WatchFace.Parser.Utils;
using WatchFace.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class Time public class Time
{ {

View File

@ -1,6 +1,6 @@
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.TimeElements namespace WatchFace.Parser.Elements.TimeElements
{ {
public class AmPm public class AmPm
{ {

View File

@ -1,6 +1,7 @@
using WatchFace.Utils; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Parser.Utils;
namespace WatchFace.Elements.BasicElements namespace WatchFace.Parser.Elements.TimeElements
{ {
public class TwoDigits public class TwoDigits
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.WeatherElements; using WatchFace.Parser.Elements.WeatherElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements namespace WatchFace.Parser.Elements
{ {
public class Weather public class Weather
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.WeatherElements namespace WatchFace.Parser.Elements.WeatherElements
{ {
public class AirPollution public class AirPollution
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.WeatherElements namespace WatchFace.Parser.Elements.WeatherElements
{ {
public class OneLineTemperature public class OneLineTemperature
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.WeatherElements namespace WatchFace.Parser.Elements.WeatherElements
{ {
public class SeparateTemperature public class SeparateTemperature
{ {

View File

@ -1,6 +1,6 @@
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.WeatherElements namespace WatchFace.Parser.Elements.WeatherElements
{ {
public class Temperature public class Temperature
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.WeatherElements namespace WatchFace.Parser.Elements.WeatherElements
{ {
public class TemperatureNumber public class TemperatureNumber
{ {

View File

@ -1,6 +1,6 @@
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.WeatherElements namespace WatchFace.Parser.Elements.WeatherElements
{ {
public class TodayTemperature public class TodayTemperature
{ {

View File

@ -1,7 +1,7 @@
using WatchFace.Elements.BasicElements; using WatchFace.Parser.Elements.BasicElements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace.Elements.WeatherElements namespace WatchFace.Parser.Elements.WeatherElements
{ {
public class WeatherIcon public class WeatherIcon
{ {

View File

@ -1,5 +1,5 @@
using System; using System;
using WatchFace.Models; using WatchFace.Parser.Models;
namespace WatchFace namespace WatchFace
{ {

View File

@ -2,9 +2,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace namespace WatchFace.Parser
{ {
public class ImageReader public class ImageReader
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace WatchFace.JsonConverters namespace WatchFace.Parser.JsonConverters
{ {
public class HexStringJsonConverter : JsonConverter public class HexStringJsonConverter : JsonConverter
{ {

View File

@ -2,7 +2,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace WatchFace.Models namespace WatchFace.Parser.Models
{ {
public class Header public class Header
{ {

View File

@ -5,7 +5,7 @@ using System.Text;
using NLog; using NLog;
using NLog.Internal; using NLog.Internal;
namespace WatchFace.Models namespace WatchFace.Parser.Models
{ {
public class Parameter public class Parameter
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace WatchFace.Models namespace WatchFace.Parser.Models
{ {
[Flags] [Flags]
public enum ParameterFlags public enum ParameterFlags

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using NLog; using NLog;
using System.Drawing; using System.Drawing;
using WatchFace.Models; using WatchFace.Parser.Models;
namespace WatchFace namespace WatchFace.Parser
{ {
public class Reader public class Reader
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.IO; using System.IO;
namespace WatchFace.Utils namespace WatchFace.Parser.Utils
{ {
public class BitReader public class BitReader
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.IO; using System.IO;
namespace WatchFace.Utils namespace WatchFace.Parser.Utils
{ {
public class BitWriter public class BitWriter
{ {

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using NLog; using NLog;
using WatchFace.Models; using WatchFace.Parser.Models;
namespace WatchFace.Utils namespace WatchFace.Parser.Utils
{ {
public class ParametersConverter public class ParametersConverter
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace WatchFace.Utils namespace WatchFace.Parser.Utils
{ {
[AttributeUsage(AttributeTargets.Property)] [AttributeUsage(AttributeTargets.Property)]
public class RawParameterAttribute : Attribute public class RawParameterAttribute : Attribute

View File

@ -1,7 +1,7 @@
using WatchFace.Elements; using WatchFace.Parser.Elements;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace namespace WatchFace.Parser
{ {
public class WatchFace public class WatchFace
{ {

View File

@ -1,8 +1,8 @@
using System.IO; using System.IO;
using NLog; using NLog;
using WatchFace.Utils; using WatchFace.Parser.Utils;
namespace WatchFace namespace WatchFace.Parser
{ {
public class Writer public class Writer
{ {

View File

@ -5,7 +5,8 @@ using Newtonsoft.Json;
using NLog; using NLog;
using NLog.Config; using NLog.Config;
using NLog.Targets; using NLog.Targets;
using WatchFace.Utils; using WatchFace.Parser.Utils;
using WatchFace.Parser;
namespace WatchFace namespace WatchFace
{ {
@ -62,7 +63,7 @@ namespace WatchFace
ExportConfig(watchFace, Path.Combine(outputDirectory, $"{baseName}.json")); ExportConfig(watchFace, Path.Combine(outputDirectory, $"{baseName}.json"));
} }
private static void WriteWatchFace(string outputFileName, WatchFace watchFace) private static void WriteWatchFace(string outputFileName, Parser.WatchFace watchFace)
{ {
Logger.Debug("Writing watch face to '{0}'", outputFileName); Logger.Debug("Writing watch face to '{0}'", outputFileName);
try try
@ -100,12 +101,12 @@ namespace WatchFace
} }
} }
private static WatchFace ParseResources(Reader reader) private static Parser.WatchFace ParseResources(Reader reader)
{ {
Logger.Debug("Parsing parameters..."); Logger.Debug("Parsing parameters...");
try try
{ {
return ParametersConverter.Parse<WatchFace>(reader.Resources); return ParametersConverter.Parse<Parser.WatchFace>(reader.Resources);
} }
catch (Exception e) catch (Exception e)
{ {
@ -141,7 +142,7 @@ namespace WatchFace
} }
} }
private static WatchFace ReadConfig(string jsonFileName) private static Parser.WatchFace ReadConfig(string jsonFileName)
{ {
Logger.Debug("Reading config..."); Logger.Debug("Reading config...");
try try
@ -149,7 +150,7 @@ namespace WatchFace
using (var fileStream = File.OpenRead(jsonFileName)) using (var fileStream = File.OpenRead(jsonFileName))
using (var reader = new StreamReader(fileStream)) using (var reader = new StreamReader(fileStream))
{ {
return JsonConvert.DeserializeObject<WatchFace>(reader.ReadToEnd()); return JsonConvert.DeserializeObject<Parser.WatchFace>(reader.ReadToEnd());
} }
} }
catch (Exception e) catch (Exception e)
@ -159,7 +160,7 @@ namespace WatchFace
} }
} }
private static void ExportConfig(WatchFace watchFace, string jsonFileName) private static void ExportConfig(Parser.WatchFace watchFace, string jsonFileName)
{ {
Logger.Debug("Exporting config..."); Logger.Debug("Exporting config...");
try try