private static Parser.WatchFace ParseResources(Reader reader) { Logger.Debug("Parsing parameters..."); try { if (previewSize.Width == 176) { return(ParametersConverter.Parse <WatchFaceBip>(reader.Parameters)); } else if (previewSize.Width == 360) { return(ParametersConverter.Parse <WatchFaceVerge>(reader.Parameters)); } else if (previewSize.Width == 454 || previewSize.Width == 390) { return(ParametersConverter.Parse <WatchFaceGTR>(reader.Parameters)); } else { return(ParametersConverter.Parse <Parser.WatchFace>(reader.Parameters)); } } catch (Exception e) { Logger.Fatal(e); return(null); } }
private static Parser.WatchFace ParseResources(Reader reader) { Logger.Debug("Parsing parameters..."); try { return(ParametersConverter.Parse <Parser.WatchFace>(reader.Parameters)); } catch (Exception e) { Logger.Fatal(e); return(null); } }
private static Reader ReadWatchFace(string inputFileName) { Logger.Debug("Opening watch face '{0}'", inputFileName); try { using (var fileStream = File.OpenRead(inputFileName)) { var reader = new Reader(fileStream); Logger.Debug("Reading parameters..."); reader.Read(); return(reader); } } catch (Exception e) { Logger.Fatal(e); return(null); } }