Porównaj commity

...

132 Commity

Autor SHA1 Wiadomość Data
Nathan Crawford ee4fe73d20 Add Spanish translation from Claudio García Carlón 2022-01-03 18:24:48 -05:00
Nathan Crawford 34fb797550 Incremented versions and updated copyright year for embroideryReader and PesFile projects 2019-02-24 23:17:28 -05:00
Nathan Crawford 742cb94527 Speculative fix for #19, also parse design name from file and add more exceptions if file format is not as expected 2019-02-23 16:07:41 -05:00
Nathan Crawford f25708e604 Incremented version to 2.2.4, updated copyright year to 2018 2018-09-21 00:41:30 -04:00
Nathan Crawford 51bc553e73 Attempt to stop crash related to settings file when closing 2018-06-03 13:38:47 -04:00
Nathan Crawford afd3e80907 Try to catch errors when color number is out of range in PesFile.OpenFile()
Also cleanup some unneeded namespace specifiers
2017-12-14 16:43:03 -05:00
Nathan Crawford c16f3e7fb0 Fix select naming violations identified by VS 2017 2017-09-13 01:05:29 -04:00
Nathan Crawford 36e1668305 Increased version to 2.2.3 for new release, removed debug info from about dialog 2016-05-10 22:03:58 -04:00
Nathan Crawford b2e8809004 Added comment about printer resolution, incremented installer version to 2.2.2 2016-04-14 19:17:49 -04:00
Nathan Crawford de3eca27c8 Removed an unused property and added to a comment in Wix installer 2016-04-13 20:19:02 -04:00
Nathan Crawford aeb8aaf6e4 Catch InvalidPrinterException when showing print preview dialog. Should resolve issue #14. 2016-04-12 16:49:45 -04:00
Nathan Crawford 612b8d0a24 Set 100% scale based on 96 DPI instead of 254 DPI 2016-04-12 16:30:30 -04:00
Nathan Crawford 1b33c47dda Fix print scaling code, should resolve issue #12 and may help with issue #10 and issue #11 2016-04-12 16:16:08 -04:00
Nathan Crawford 34eb10023c Add manufacturer folder back to default install path to avoid possible name conflicts 2016-04-07 23:04:47 -04:00
Nathan Crawford 8471b3519c Increased version to 2.2.1 2016-04-07 22:21:55 -04:00
Nathan Crawford 2d59addb2d Add check for generated bitmap size 2016-04-07 14:36:19 -04:00
Nathan Crawford 9c44d3ecf6 Properly load and save background grid color when background grid is disabled 2016-04-04 22:51:35 -04:00
Nathan Crawford 2d78fbc5b5 Increase PesFile version to 1.5 2016-04-04 22:32:48 -04:00
Nathan Crawford fe2e9a7446 Add some basic checks on printer resolution to try to debug issue #11 2016-04-04 22:28:22 -04:00
Nathan Crawford 8798fcb80c Add basic input checks for PesFile.designToBitmap() to help diagnose issue #10 2016-04-04 22:10:04 -04:00
Nathan Crawford 3c9ff412ba Install the start menu icon as an icon, not an executable 2016-04-04 21:24:51 -04:00
Nathan Crawford 5d42ec4c52 Optimize stitch data for Graphics.Drawlines() before drawing 2016-04-04 21:18:12 -04:00
Nathan Crawford 9a7c4c19b4 Dispose temporary image used in scaling code 2016-04-04 21:15:46 -04:00
Nathan Crawford 7c779615dc Remove exception warning and narrowed exceptions down to just the expected types 2016-04-04 18:52:41 -04:00
Nathan Crawford 06e3a79874 Increase version to 2.2.0 for new feature release 2016-04-04 18:18:40 -04:00
Nathan Crawford 5f92c297f4 Updated to ErrorReporter.dll version 0.2 2016-04-04 16:23:41 -04:00
Nathan Crawford 09d181c1af Potential fix for issue #9 2016-04-04 16:22:28 -04:00
Nathan Crawford 8a141537a7 Change new instal to default to correct location, and allow user to change location 2016-04-01 01:18:34 -04:00
Nathan Crawford 01e04b0a61 Re-wrote Wix installer from the ground up 2016-04-01 00:49:07 -04:00
Nathan Crawford 54f5523484 Change installer to remove old versions before installing new one 2016-03-31 21:19:19 -04:00
Nathan Crawford 37c0b98487 Try to dispose IDisposable objects more diligently 2016-03-31 20:49:39 -04:00
Nathan Crawford 89c706588a Silence warnings about exceptions 2016-03-31 19:49:00 -04:00
Nathan Crawford 9d2b208a52 Reduce installer's minimum upgrade version to 1.6.0 2016-03-31 17:58:26 -04:00
Nathan Crawford 1c7f85d98e Update installer for beta release 2016-03-31 00:45:55 -04:00
Nathan Crawford ea38b44295 Attempt to optimize design drawing code a little, capture more info about each stitch as it is read from the file, increment project versions in prep for a beta release 2016-03-31 00:41:01 -04:00
Nathan Crawford 39cdbbda3f Try to make designToBitmap() a little more efficient, remove a redundant calculation for debug info stitch length 2016-03-30 20:29:26 -04:00
Nathan Crawford daa67cfcdd Properly mask off "extra bits" and clean up debug info loops slightly 2016-03-30 20:04:55 -04:00
Nathan Crawford 71f69a0b3a Add --all option to embroideryInfo. This should resolve issue #3. 2016-03-30 19:33:19 -04:00
Nathan Crawford 06632cc768 Add support for --help, -h and /? to print help message 2016-03-30 19:21:26 -04:00
Nathan Crawford 3bc68def33 Remove ErrorReporter.cs and use ErrorReporter.dll instead 2016-03-30 18:28:04 -04:00
Nathan Crawford 07e700a48d Removed unused returns 2016-03-28 23:24:41 -04:00
Nathan Crawford 7b024e7f27 Read bytes instead of characters when checking PES format markers, and cast bytes to characters before adding to strings 2016-03-28 23:23:14 -04:00
Nathan Crawford db7902970f Updated to IniFile 2.3.1 to fix issue where ini file is always rewritten 2016-03-27 22:15:19 -04:00
Nathan Crawford b1905feca1 Incremented versions for EmbroideryReader and PesFile 2016-03-22 19:51:42 -04:00
Nathan Crawford 3fda9e60b1 Replace PesFile.readyStatus with exceptions and exception handling 2016-03-22 19:48:13 -04:00
Nathan Crawford d2f64f0205 Catch IOExceptions when opening files 2016-03-22 19:17:25 -04:00
Nathan Crawford 725ab4e11e Use read-write sharing for opening PES files 2016-03-22 19:16:56 -04:00
Nathan Crawford 5aef99f6e5 Enclose PEC parsing with using() to ensure file is closed 2016-03-22 19:06:00 -04:00
Nathan Crawford 02ed3d8794 Use consts for WndProc messages 2016-03-22 18:48:12 -04:00
Nathan Crawford fc04bef577 Moved error reporting code to ErrorReporter class
Also tweaked and improved code to load reporting webpage
2016-02-24 12:53:19 -05:00
Nathan Crawford 97cc2d8935 Capture extra bits from certain stitches for debug output 2016-02-24 01:46:00 -05:00
Nathan Crawford d0c2eb485a Improved robustness of PesFile.OpenFile() 2016-02-23 23:41:24 -05:00
Nathan Crawford 5cf44ec832 Load translations before design file, in case there is an error 2016-02-23 23:40:21 -05:00
Nathan Crawford 246194c2aa Removed "using" directives that VS 2015 identified as unused 2016-02-23 23:09:13 -05:00
Nathan Crawford d32bab0edb First try at reporting unhandled exceptions 2016-02-23 22:19:59 -05:00
Nathan Crawford 9c1ec936a6 Updated another missed copyright year 2016-02-18 18:32:27 -05:00
Nathan Crawford c793ee83d2 Check working dir if translations can't be found relative to exe 2016-02-18 18:30:04 -05:00
Nathan Crawford b490109711 Don't change prefs until the OK button has been clicked
Also make the preferences dialog a bit more robust
2016-02-18 18:28:29 -05:00
Nathan Crawford d8d135ffe5 Update some copyright years that were missed last time around 2016-02-18 18:26:56 -05:00
Nathan Crawford 0e26a1644f Set minimum window size to prevent opening a tiny window 2016-02-18 18:25:56 -05:00
Nathan Crawford 3fed11f544 Incremented version to 2.0.2 and updated copyright year 2016-01-11 20:14:07 -05:00
Nathan Crawford b1d1fd0c89 Only save window size if not maximized or minimized, and save and restore window maximized state
This should help with the tiny window in issue #5
2016-01-11 19:52:02 -05:00
Nathan Crawford cb65256d5b Fix another bug with finding available translations 2015-12-28 21:02:59 -05:00
Nathan Crawford d9342e1180 Load translations relative to .exe instead of working directory 2015-12-28 20:17:09 -05:00
Nathan Crawford 5aa9cc9832 embroideryInfo fixes
Set image scale to 1.0, instead of 100,
Make default usage output more informative,
Update copyright year
2015-12-28 20:03:54 -05:00
Nathan Crawford f7d5589a19 Updated installer to 2.0.1 and changed ProductGuid 2015-12-28 19:19:38 -05:00
Nathan Crawford adf3b6a3cd Increase version to 2.0.1 to build test release for bug fixes 2015-12-28 19:01:19 -05:00
Nathan Crawford 0f11f3c63d Check for null design and valid bitmap size when updating image, should fix issue #5 2015-12-21 21:09:57 -05:00
Nathan Crawford e2604752e6 Increase version to 2.0.0 2015-09-22 22:28:46 -04:00
Nathan Crawford fd0e0c86f4 Installer: Removed UpdateCheck, updated translation file names, updated about URL 2015-09-22 22:09:57 -04:00
Nathan Crawford b1c18b1b77 Use IETF language tags for translation filenames 2015-09-22 21:54:55 -04:00
Nathan Crawford f71b0fe111 Removed UpdateCheck.dll and replaced it with EmbroideryReaderUpdates.cs 2015-09-22 21:38:01 -04:00
Nathan Crawford 0705e4b456 Try to match printer resolution when printing a design 2015-04-17 00:35:33 -04:00
Nathan Crawford 0d4ec463f2 Convert thread thickness and filter stitches threshold from double to float 2015-04-17 00:35:32 -04:00
Nathan Crawford 088682071b Fixed loaded file name in window title bar 2015-04-17 00:35:32 -04:00
Nathan Crawford 2f4b84e0e8 Default auto scale design to true 2015-04-17 00:35:32 -04:00
Nathan Crawford a5f7f8e14a Cleaned up and fixed rotate and scale code (resolves #4), fixed incorrect image being sent to print preview 2015-04-17 00:34:16 -04:00
Nathan Crawford 5d3f5886b8 Added Scale / Zoom menu as partial implementation of issue #4 2015-04-03 02:09:59 -04:00
Nathan Crawford 8c198c741b Removed unused references to PES classes 2015-04-02 22:44:41 -04:00
Nathan Crawford 4c0d607064 Update copyright year 2015-04-02 22:35:19 -04:00
Nathan Crawford be26151f95 Replace intpair struct with Tuple generic class 2015-04-02 22:25:27 -04:00
Nathan Crawford f6deb2eab9 Setup Wix installer to allow upgrades 2014-09-17 00:16:15 -04:00
Nathan Crawford dc37643ee6 Cleaned up Wix installer
Removed extra components, renamed some objects that were auto-generated
by he VS installer project
2014-09-16 22:51:24 -04:00
Nathan Crawford c570b3121d Rename translation files to language codes
Zip files don't handle Unicode characters, so store the
translation/language name in the ini file, instead of the name.
2014-09-16 19:46:10 -04:00
Nathan Crawford 85a022bd10 Update to IniFile 2.2 2014-09-15 23:59:02 -04:00
Nathan Crawford ebe1a80c50 Ignore generated msi files 2014-09-04 23:32:56 -04:00
Nathan Crawford 2d2f33115a Replace VS deployment project with Wix 2014-09-04 23:30:29 -04:00
Nathan Crawford 4ae27ec284 Add Chinese translations submitted by keetian 2014-09-04 20:40:36 -04:00
Nathan Crawford fb0eb1bd4d Update copyright year and bump version to 1.99.1 2014-09-04 20:39:42 -04:00
Nathan Crawford 0695371c8b Fix "pixels" label positioning 2014-09-04 20:33:24 -04:00
Nathan Crawford 3f3ca3e9aa Updated for beta of 2.0 2014-03-26 01:04:25 -04:00
Nathan Crawford c5d3c9be19 Added more translations from Andrea 2013-12-17 13:39:26 -05:00
Nathan Crawford f4f69fd5bd Added documentation for building translations 2013-12-11 20:51:22 -05:00
Nathan Crawford 7b3cc3f7d6 Fall back to English for missing strings
A placeholder string is still returned if the English translation is
missing or incomplete
2013-12-11 19:33:07 -05:00
Nathan Crawford 00779d20e5 Added translation files to installer 2013-12-11 19:09:55 -05:00
Nathan Crawford ce88147fdd Removed more obsolete Visual Studio files 2013-12-11 19:06:27 -05:00
Nathan Crawford dca8b020bc Updated IniFile.dll and UpdateCheck.dll to versions that target .Net 4.0 2013-12-11 18:56:48 -05:00
Nathan Crawford 9ccad2f545 Added controls for transparency grid size 2013-12-11 18:56:12 -05:00
Nathan Crawford 76a00f4aff Added batch file to generate images for a whole folder of designs 2013-12-11 18:54:47 -05:00
Nathan Crawford 09d0eb536a Added TranslationBuilder to turn translations.ods into language ini files 2013-12-11 18:52:35 -05:00
Nathan Crawford 19a1b51ffd Added settings for transparency grid 2013-12-10 19:33:45 -05:00
Nathan Crawford f373d5bc81 Finished initial translation support, closes #1 2013-12-10 19:17:41 -05:00
Nathan Crawford 96c38379db Initial support for loading translations. A big step for issue #1.
All controls and messageboxes appear to be translated now.
2013-12-07 01:32:24 -05:00
Nathan Crawford e0ebf2d20c Moved translation files to their own folder 2013-12-06 21:26:27 -05:00
Nathan Crawford 00c1ca3e37 Fixed string that got pasted in the name field 2013-12-06 21:12:44 -05:00
Nathan Crawford a2eb153ba1 Enhanced design debug output
Now includes unknown block start byte, and saving to a file displays a
messagebox when it's finished
2013-12-06 19:14:15 -05:00
Nathan Crawford 0f5ce1aa43 Make boolean values in settings file consistent
Deprecate YES and NO values in favor of TRUE and FALSE values
2013-12-06 19:06:37 -05:00
Nathan Crawford 91331d915c Added background grid to drawing panel
Includes setting to enable and disable the grid
2013-12-06 19:05:15 -05:00
Nathan Crawford edd9f83d84 Improved readability of X/Y value processing code
Included more descriptive comments as well
2013-12-06 19:04:33 -05:00
Nathan Crawford 1323b50759 Moved PesFile support classes to their own files 2013-12-06 19:03:40 -05:00
Nathan Crawford 046d2e82cb Fix broken filter 'ugly' stitches option 2013-12-06 19:02:34 -05:00
Nathan Crawford 0a2f9efa97 Fix swapped digits in 7-bit mask 2013-12-05 09:35:11 -05:00
njcrawford 72158feeeb Mask off the 8th bit in get7Bit2sComplement()
Also update copyright year
2013-12-04 23:21:33 -05:00
Nathan Crawford 10e7a923f1 Fixed issues around "dead code" comment
"Dead code" was part of the 2's complement conversion, when handling the odd-sized integers from PES file
2013-12-04 16:14:02 -05:00
Nathan Crawford 4e7b2e5d9e Add .gitattributes and normalize line endings 2013-12-03 16:59:12 -05:00
Nathan Crawford eda741d42e Removed old NSIS based installer 2013-12-03 16:48:52 -05:00
Nathan Crawford 042cc3abe3 Fixed detection of installed old versions 2013-12-03 15:12:59 -05:00
Nathan Crawford 5ef18eb593 Convert project to .Net 4.0 and add MSI installer 2013-12-03 14:32:03 -05:00
Nathan Crawford 18702b50a7 Removed IncrementVersionNumber 2013-12-03 13:32:29 -05:00
Nathan Crawford b0e3d20e9f Remove old visual studio project files, part 2 2013-12-03 13:30:11 -05:00
Nathan Crawford b014ab3499 Remove old Visual Studio project files, part 1 2013-12-03 13:17:03 -05:00
Nathan Crawford 341a97e4d8 Merge pull request #2 from virtualstaticvoid/patch-1
Failed to set `colorWarning` field in `getColorFromIndex` method.
2013-10-10 14:34:41 -07:00
Chris Stefano 9dffd4b251 Failed to set `colorWarning` field in `getColorFromIndex` method. 2013-10-10 23:25:23 +02:00
Nathan Crawford 61b4aad803 Added link to Embroidery Reader webpage 2013-10-08 00:30:44 -04:00
Nathan Crawford a642a33595 Added Italian translation from Andrea in 2011
Also started a spreadsheet to track translations, and eventually build
translation files from.
2013-10-07 23:25:07 -04:00
Nathan Crawford 97a728b74f Merge branch 'master' of https://github.com/njcrawford/EmbroideryReader 2013-10-07 22:13:53 -04:00
Nathan Crawford 7c810f386f Initial commit 2013-10-07 19:10:34 -07:00
Nathan Crawford 09cc4aaa68 Fixed compile errors 2012-09-30 01:26:32 +00:00
Nathan Crawford a10c80ed33 Moved file to docs folder 2012-09-28 22:54:37 +00:00
Nathan Crawford 035b7d2a8a Cleaned up and refactored code for easier reading 2012-09-28 22:53:54 +00:00
Nathan Crawford 8e07ced42c Moved PES colors into a table instead of a case statement 2012-09-28 22:23:10 +00:00
Nathan Crawford 4627214f50 Close file when we're done reading from it. Thanks to Farren Young for the patch. 2012-08-21 20:05:41 +00:00
115 zmienionych plików z 73302 dodań i 69840 usunięć

22
.gitattributes vendored 100644
Wyświetl plik

@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

114
.gitignore vendored 100644
Wyświetl plik

@ -0,0 +1,114 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
*.bak
*.wixpdb
*.wixobj
Thumbs.db
/.vs

1
Installer/.gitignore vendored 100644
Wyświetl plik

@ -0,0 +1 @@
/*.msi

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 103 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 318 B

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 318 B

Wyświetl plik

@ -0,0 +1,186 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v.NET Framework 4 Client Profile"/></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705">
<dependentAssembly>
<assemblyIdentity name="Accessibility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="cscompmgd" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CustomMarshalers" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="IEExecRemote" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="IEHost" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="IIEHost" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ISymWrapper" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.JScript" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualBasic.Compatibility.Data" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualBasic.Compatibility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualBasic" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualBasic.Vsa" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualC" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Vsa" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Vsa.Vb.CodeDOMProcessor" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft_VsaVb" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="mscorcfg" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Configuration.Install" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Design" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.DirectoryServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Drawing.Design" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.EnterpriseServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Management" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Messaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.Remoting" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.Serialization.Formatters.Soap" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ServiceProcess" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mobile" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.RegularExpressions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Services" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Forms" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="vjscor" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="VJSharpCodeProvider" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="vjslib" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="vjslibcw" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="vjswfc" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="VJSWfcBrowserStubLib" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="vjswfccw" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="vjswfchtml" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
</assemblyBinding></runtime></configuration>

Wyświetl plik

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!-- ProductGuid should change whenever ProductVersion changes -->
<?define ProductVersion="2.2.4" ?>
<?define ProductGuid="{39447850-C068-4C91-8142-AEA9630470C5}" ?>
<Product Id="$(var.ProductGuid)" Name="Embroidery Reader" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Nathan Crawford" UpgradeCode="CE1642E2-5EE0-454F-B7DF-5C9C92D6D40D">
<Package Description="Test file in a Product" Comments="Simple test" InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="ROOTDIR" Name="NJCrawford Software">
<Directory Id="PRODUCTDIR" Name="Embroidery Reader">
<Component Id="RequiredFiles" DiskId="1" Guid="ad3defbe-e276-41ab-9d76-9ab9f2976ac2">
<File Id="EMBROIDERYREADER.EXE" Name="embroideryReader.exe" Source="..\embroideryReader\bin\Release\embroideryReader.exe" KeyPath="yes">
<Shortcut Id="ExeShortcut" Directory="ProgramMenuDir" Name="Embroidery Reader" Advertise="yes" Icon="StartMenuIcon.ico" />
</File>
<ProgId Id="EmbroideryDesign" Description="Embroidery Design File" Icon="StartMenuIcon.ico" Advertise="yes">
<Extension Id="pes" Advertise="yes">
<Verb Id="open" Command="&amp;Open" Argument="&quot;%1&quot;" Sequence="1" />
</Extension>
</ProgId>
<File Id="PESFILE.DLL" Name="PesFile.dll" Source="..\embroideryReader\bin\Release\PesFile.dll" />
<File Id="INIFILE.DLL" Name="IniFile.dll" Source="..\embroideryReader\bin\Release\IniFile.dll" />
<File Id="ERRORREPORTER.DLL" Name="ErrorReporter.dll" Source="..\embroideryReader\bin\Release\ErrorReporter.dll" />
</Component>
<Directory Id="TRANSLATIONS" Name="translations">
<Component Id="Translations" DiskId="1" KeyPath="yes" Guid="4ac2c11d-b2c9-4557-a618-fa4bacf50889">
<File Id="EN_US.INI" Name="en-US.ini" Source="..\translations\en-US.ini" />
<File Id="IT_IT.INI" Name="it-IT.ini" Source="..\translations\it-IT.ini" />
<File Id="ZH_HANS.INI" Name="zh-Hans.ini" Source="..\translations\zh-Hans.ini" />
<File Id="ZH_HANT.INI" Name="zh-Hant.ini" Source="..\translations\zh-Hant.ini" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuDir" Name="Embroidery Reader">
<Component Id="StartMenuShortcuts" Guid="DDE4256E-E2D5-477F-A006-929245B20219">
<RemoveFolder Id="ProgramMenuDir" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Value="" />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="DefaultFeature" Title="Main Feature" Level="1">
<ComponentRef Id="RequiredFiles" />
<ComponentRef Id="Translations" />
<ComponentRef Id="StartMenuShortcuts" />
</Feature>
<UI />
<UIRef Id="WixUI_InstallDir" />
<Property Id="WIXUI_INSTALLDIR" Value="PRODUCTDIR" />
<!-- Require .Net Framework 4.0 Client profile -->
<PropertyRef Id="NETFRAMEWORK40CLIENT" />
<Condition Message="This application requires .NET Framework X.Y.">Installed OR NETFRAMEWORK40CLIENT</Condition>
<!-- Icon for start menu and file association -->
<Icon Id="StartMenuIcon.ico" SourceFile="..\embroideryReader\icon.ico" />
<!-- Allow upgrades from any older version with a Wix-based installer -->
<MajorUpgrade DowngradeErrorMessage="Downgrades are not supported. If you would like to install this version, you must uninstall the newer version first." />
<!-- Install for all users (or highest available level) by default -->
<Property Id="ALLUSERS" Value="2" />
<!-- Show help link in Programs and Features -->
<Property Id="ARPHELPLINK" Value="http://www.njcrawford.com/contact/" />
<!-- Show contact in Programs and Features -->
<Property Id="ARPCONTACT" Value="http://www.njcrawford.com/contact/" />
<!-- Show info/about URL in Programs and Features -->
<Property Id="ARPURLINFOABOUT" Value="http://www.njcrawford.com/programs/embroidery-reader/" />
<!-- Show icon in Programs and Features -->
<Property Id="ARPPRODUCTICON" Value="StartMenuIcon.ico" />
<!-- Search for pre-Wix installer versions -->
<Property Id="OLD_INSTALL">
<RegistrySearch Id="SearchForOldVersions" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\Embroidery Reader" Name="DisplayName" Type="raw" />
</Property>
<Condition Message="Embroidery Reader 1.5 or earlier is installed. Please remove previous versions of Embroidery Reader and run the installer again.">OLD_INSTALL = null</Condition>
<!-- It doesn't appear that PREVIOUSVERSIONSINSTALLED is needed with MajorUpgrade -->
<!-- <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" /> -->
<!-- Specify license file -->
<WixVariable Id="WixUILicenseRtf" Value="..\docs\license.rtf" />
<!-- Specify custom banner bitmap 493x58 -->
<WixVariable Id="WixUIBannerBmp" Value="images\banner.bmp" />
<!-- Specify custom dialog bitmap 493x312 -->
<WixVariable Id="WixUIDialogBmp" Value="images\dialog.bmp" />
</Product>
</Wix>

Wyświetl plik

@ -0,0 +1,26 @@
Installer must:
1. Install files into program files, in Embroidery Reader folder (or a user-selected folder)
a. Program .exe and .dlls
b. Translation .inis
2. Install Start menu Folder
a. Short cut to .exe
b. Must install for all users
3. Check for required .net version before installing
a. Should also direct user to download page, if not installed
4. Check for old non-Wix versions before installing
a. Version 1.5.1 and older
b. Would be nice if it would offer to uninstall old version as well
5. Only allow upgrades
a. If downgrade is required, uninstall current version and install older version
b. Older Wix-based installers must be removed during upgrade (to maintain a single Programs and Features entry)
6. Must have a respectable Programs and Features presence
a. Correct program name
b. Program icon
c. Contact URL
d. Support URL
e. Help URL
7. Must include correct license in installer
8. Must install a file association
a. Show icon for .pes files
b. Open .pes file with double click

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 112 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 601 KiB

Plik binarny nie jest wyświetlany.

339
LICENSE 100644
Wyświetl plik

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Open source .PES file viewer
Copyright (C) 2013 Nathan Crawford
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +0,0 @@
PesFile.cs

Wyświetl plik

@ -0,0 +1,98 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact/.
*/
namespace PesFile
{
public class PesColors
{
public static int[,] colorMap = new int[,] {
//red grn blu
{ 0, 0, 0}, // 0 Not used
{ 14, 31, 124}, // 1
{ 10, 85, 163}, // 2
{ 48, 135, 119}, // 3
{ 75, 107, 175}, // 4
{237, 23, 31}, // 5
{209, 92, 0}, // 6
{145, 54, 151}, // 7
{228, 154, 203}, // 8
{145, 95, 172}, // 9
{157, 214, 125}, // 10
{232, 169, 0}, // 11
{254, 186, 53}, // 12
{255, 255, 0}, // 13
{112, 188, 31}, // 14
{186, 152, 0}, // 15
{168, 168, 168}, // 16
{123, 111, 0}, // 17
{255, 255, 179}, // 18
{ 79, 85, 86}, // 19
{ 0, 0, 0}, // 20
{ 11, 61, 145}, // 21
{119, 1, 118}, // 22
{ 41, 49, 51}, // 23
{ 42, 19, 1}, // 24
{246, 74, 138}, // 25
{178, 118, 36}, // 26
{252, 187, 196}, // 27
{254, 55, 15}, // 28
{240, 240, 240}, // 29
{106, 28, 138}, // 30
{168, 221, 196}, // 31
{ 37, 132, 187}, // 32
{254, 179, 67}, // 33
{255, 240, 141}, // 34
{208, 166, 96}, // 35
{209, 84, 0}, // 36
{102, 186, 73}, // 37
{ 19, 74, 70}, // 38
{135, 135, 135}, // 39
{216, 202, 198}, // 40
{ 67, 86, 7}, // 41
{254, 227, 197}, // 42
{249, 147, 188}, // 43
{ 0, 56, 34}, // 44
{178, 175, 212}, // 45
{104, 106, 176}, // 46
{239, 227, 185}, // 47
{247, 56, 102}, // 48
{181, 76, 100}, // 49
{ 19, 43, 26}, // 50
{199, 1, 85}, // 51
{254, 158, 50}, // 52
{168, 222, 235}, // 53
{ 0, 103, 26}, // 54
{ 78, 41, 144}, // 55
{ 47, 126, 32}, // 56
{253, 217, 222}, // 57
{255, 217, 17}, // 58
{ 9, 91, 166}, // 59
{240, 249, 112}, // 60
{227, 243, 91}, // 61
{255, 200, 100}, // 62
{255, 200, 150}, // 63
{255, 200, 200} // 64
};
}
}

Wyświetl plik

@ -1,54 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PesFile</RootNamespace>
<AssemblyName>PesFile</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PesFile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

Wyświetl plik

@ -1,58 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PesFile</RootNamespace>
<AssemblyName>PesFile</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PesFile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>"$(ProjectDir)IncrementVersionNumber.exe" --postbuild</PostBuildEvent>
<PreBuildEvent>"$(ProjectDir)IncrementVersionNumber.exe" --prebuild</PreBuildEvent>
</PropertyGroup>
</Project>

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,92 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PesFile</RootNamespace>
<AssemblyName>PesFile</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PesFile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>"$(ProjectDir)IncrementVersionNumber.exe" --postbuild</PostBuildEvent>
<PreBuildEvent>"$(ProjectDir)IncrementVersionNumber.exe" --prebuild</PreBuildEvent>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PesFile</RootNamespace>
<AssemblyName>PesFile</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PesColors.cs" />
<Compile Include="PesFile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Stitch.cs" />
<Compile Include="StitchBlock.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embridery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2014 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact.html.
You can contact me at http://www.njcrawford.com/contact/.
*/
using System.Reflection;
@ -34,7 +34,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PesFile")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2011")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -55,5 +55,5 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.0.7")]
[assembly: AssemblyFileVersion("1.1.0.7")]
[assembly: AssemblyVersion("1.5.4.0")]
[assembly: AssemblyFileVersion("1.5.4.0")]

82
PesFile/Stitch.cs 100644
Wyświetl plik

@ -0,0 +1,82 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact/.
*/
using System;
using System.Drawing;
namespace PesFile
{
public class Stitch
{
public enum MoveBitSize
{
Unknown,
SevenBits,
TwelveBits
};
public enum StitchType
{
Unknown,
NormalStitch,
MovementBeginAnchor,
MovementEndAnchor,
MovementOnly
}
public Point a;
public Point b;
// Extra bits to output with debug info
public int extraBits1;
public int extraBits2;
// Was this stitch represented as 7 bit move or 12 bit move in the file
public MoveBitSize XMoveBits;
public MoveBitSize YMoveBits;
public StitchType stitchType;
public Stitch(Point pointA, Point pointB)
{
this.a = pointA;
this.b = pointB;
}
public Stitch(Point pointA, Point pointB, int extraBits1, int extraBits2, MoveBitSize XMoveBits, MoveBitSize YMoveBits, StitchType stitchType)
{
this.a = pointA;
this.b = pointB;
this.extraBits1 = extraBits1;
this.extraBits2 = extraBits2;
this.XMoveBits = XMoveBits;
this.YMoveBits = YMoveBits;
this.stitchType = stitchType;
}
public double CalcLength()
{
double diffx = Math.Abs(a.X - b.X);
double diffy = Math.Abs(a.Y - b.Y);
return Math.Sqrt(Math.Pow(diffx, 2.0) + Math.Pow(diffy, 2.0));
}
}
}

Wyświetl plik

@ -0,0 +1,42 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact/.
*/
using System;
using System.Drawing;
namespace PesFile
{
public class StitchBlock
{
public Color color;
public Int32 colorIndex;
public Int32 stitchesTotal;
public Stitch[] stitches;
public byte unknownStartByte;
public StitchBlock()
{
color = Color.Black;
}
}
}

6
README.md 100644
Wyświetl plik

@ -0,0 +1,6 @@
Embroidery Reader
================
Embroidery Reader is an open source .PES file viewer written in C#.
For more information, see [http://www.njcrawford.com/programs/embroidery-reader/](http://www.njcrawford.com/programs/embroidery-reader/).

74
TranslationBuilder/Form1.Designer.cs wygenerowano 100644
Wyświetl plik

@ -0,0 +1,74 @@
namespace TranslationBuilder
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.lblStatus = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(77, 113);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(133, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Build Translation Files";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// lblStatus
//
this.lblStatus.AutoSize = true;
this.lblStatus.Location = new System.Drawing.Point(90, 179);
this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(38, 13);
this.lblStatus.TabIndex = 1;
this.lblStatus.Text = "Ready";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.lblStatus);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label lblStatus;
}
}

Wyświetl plik

@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OdsReadWrite;
using System.IO;
namespace TranslationBuilder
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
button1.Enabled = false;
lblStatus.Text = "Building...";
this.Invalidate();
Application.DoEvents();
List<string> languageName = new List<string>();
List<string> outputs = new List<string>();
DataSet theData = new OdsReaderWriter().ReadOdsFile("..\\..\\..\\translations\\translations.ods");
int rowCounter = 0;
foreach (DataRow thisRow in theData.Tables[0].Rows)
{
if (rowCounter == 0)
{
for (int i = 2; i < thisRow.ItemArray.Length; i++)
{
if (!String.IsNullOrEmpty(thisRow.ItemArray[i].ToString()))
{
languageName.Add(thisRow.ItemArray[i].ToString());
outputs.Add("");
}
}
}
else
{
string textId;
if (!String.IsNullOrEmpty(thisRow.ItemArray[0].ToString()))
{
textId = thisRow.ItemArray[0].ToString();
}
else
{
continue;
}
for (int i = 2; i < thisRow.ItemArray.Length; i++)
{
if (!String.IsNullOrEmpty(thisRow.ItemArray[i].ToString()))
{
outputs[i - 2] += textId + "=" + thisRow.ItemArray[i] + Environment.NewLine;
}
}
}
rowCounter++;
}
for (int i = 0; i < outputs.Count; i++)
{
StreamWriter outfile = new StreamWriter("..\\..\\..\\translations\\" + languageName[i] + ".ini");
outfile.WriteLine("# Embroidery Reader language strings file. To translate Embroidery Reader to a new");
outfile.WriteLine("# language, copy this file to a new name and translate each string.");
outfile.WriteLine("# If you make a new translation, please contact me! I'd love to");
outfile.WriteLine("# include your translation with Embroidery Reader.");
outfile.WriteLine("# The best way to contact me is through http://www.njcrawford.com/contact/.");
outfile.Write(outputs[i]);
outfile.Close();
//MessageBox.Show(languageName[i] + Environment.NewLine + outputs[i]);
}
lblStatus.Text = "Done";
}
}
}

Wyświetl plik

@ -0,0 +1,120 @@
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,322 @@
using System;
using System.Data;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Xml;
using Ionic.Zip;
namespace OdsReadWrite
{
internal sealed class OdsReaderWriter
{
// Namespaces. We need this to initialize XmlNamespaceManager so that we can search XmlDocument.
private static string[,] namespaces = new string[,]
{
{"table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0"},
{"office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0"},
{"style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0"},
{"text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0"},
{"draw", "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"},
{"fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"},
{"dc", "http://purl.org/dc/elements/1.1/"},
{"meta", "urn:oasis:names:tc:opendocument:xmlns:meta:1.0"},
{"number", "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"},
{"presentation", "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"},
{"svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"},
{"chart", "urn:oasis:names:tc:opendocument:xmlns:chart:1.0"},
{"dr3d", "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"},
{"math", "http://www.w3.org/1998/Math/MathML"},
{"form", "urn:oasis:names:tc:opendocument:xmlns:form:1.0"},
{"script", "urn:oasis:names:tc:opendocument:xmlns:script:1.0"},
{"ooo", "http://openoffice.org/2004/office"},
{"ooow", "http://openoffice.org/2004/writer"},
{"oooc", "http://openoffice.org/2004/calc"},
{"dom", "http://www.w3.org/2001/xml-events"},
{"xforms", "http://www.w3.org/2002/xforms"},
{"xsd", "http://www.w3.org/2001/XMLSchema"},
{"xsi", "http://www.w3.org/2001/XMLSchema-instance"},
{"rpt", "http://openoffice.org/2005/report"},
{"of", "urn:oasis:names:tc:opendocument:xmlns:of:1.2"},
{"rdfa", "http://docs.oasis-open.org/opendocument/meta/rdfa#"},
{"config", "urn:oasis:names:tc:opendocument:xmlns:config:1.0"}
};
// Read zip stream (.ods file is zip file).
private ZipFile GetZipFile(Stream stream)
{
return ZipFile.Read(stream);
}
// Read zip file (.ods file is zip file).
private ZipFile GetZipFile(string inputFilePath)
{
return ZipFile.Read(inputFilePath);
}
private XmlDocument GetContentXmlFile(ZipFile zipFile)
{
// Get file(in zip archive) that contains data ("content.xml").
ZipEntry contentZipEntry = zipFile["content.xml"];
// Extract that file to MemoryStream.
Stream contentStream = new MemoryStream();
contentZipEntry.Extract(contentStream);
contentStream.Seek(0, SeekOrigin.Begin);
// Create XmlDocument from MemoryStream (MemoryStream contains content.xml).
XmlDocument contentXml = new XmlDocument();
contentXml.Load(contentStream);
return contentXml;
}
private XmlNamespaceManager InitializeXmlNamespaceManager(XmlDocument xmlDocument)
{
XmlNamespaceManager nmsManager = new XmlNamespaceManager(xmlDocument.NameTable);
for (int i = 0; i < namespaces.GetLength(0); i++)
nmsManager.AddNamespace(namespaces[i, 0], namespaces[i, 1]);
return nmsManager;
}
/// <summary>
/// Read .ods file and store it in DataSet.
/// </summary>
/// <param name="inputFilePath">Path to the .ods file.</param>
/// <returns>DataSet that represents .ods file.</returns>
public DataSet ReadOdsFile(string inputFilePath)
{
ZipFile odsZipFile = this.GetZipFile(inputFilePath);
// Get content.xml file
XmlDocument contentXml = this.GetContentXmlFile(odsZipFile);
// Initialize XmlNamespaceManager
XmlNamespaceManager nmsManager = this.InitializeXmlNamespaceManager(contentXml);
DataSet odsFile = new DataSet(Path.GetFileName(inputFilePath));
foreach (XmlNode tableNode in this.GetTableNodes(contentXml, nmsManager))
odsFile.Tables.Add(this.GetSheet(tableNode, nmsManager));
return odsFile;
}
// In ODF sheet is stored in table:table node
private XmlNodeList GetTableNodes(XmlDocument contentXmlDocument, XmlNamespaceManager nmsManager)
{
return contentXmlDocument.SelectNodes("/office:document-content/office:body/office:spreadsheet/table:table", nmsManager);
}
private DataTable GetSheet(XmlNode tableNode, XmlNamespaceManager nmsManager)
{
DataTable sheet = new DataTable(tableNode.Attributes["table:name"].Value);
XmlNodeList rowNodes = tableNode.SelectNodes("table:table-row", nmsManager);
int rowIndex = 0;
foreach (XmlNode rowNode in rowNodes)
this.GetRow(rowNode, sheet, nmsManager, ref rowIndex);
return sheet;
}
private void GetRow(XmlNode rowNode, DataTable sheet, XmlNamespaceManager nmsManager, ref int rowIndex)
{
XmlAttribute rowsRepeated = rowNode.Attributes["table:number-rows-repeated"];
if (rowsRepeated == null || Convert.ToInt32(rowsRepeated.Value, CultureInfo.InvariantCulture) == 1)
{
while (sheet.Rows.Count < rowIndex)
sheet.Rows.Add(sheet.NewRow());
DataRow row = sheet.NewRow();
XmlNodeList cellNodes = rowNode.SelectNodes("table:table-cell", nmsManager);
int cellIndex = 0;
foreach (XmlNode cellNode in cellNodes)
this.GetCell(cellNode, row, nmsManager, ref cellIndex);
sheet.Rows.Add(row);
rowIndex++;
}
else
{
rowIndex += Convert.ToInt32(rowsRepeated.Value, CultureInfo.InvariantCulture);
}
// sheet must have at least one cell
if (sheet.Rows.Count == 0)
{
sheet.Rows.Add(sheet.NewRow());
sheet.Columns.Add();
}
}
private void GetCell(XmlNode cellNode, DataRow row, XmlNamespaceManager nmsManager, ref int cellIndex)
{
XmlAttribute cellRepeated = cellNode.Attributes["table:number-columns-repeated"];
string cellValue = this.ReadCellValue(cellNode);
int repeats = 1;
if (cellRepeated != null)
{
repeats = Convert.ToInt32(cellRepeated.Value, CultureInfo.InvariantCulture);
}
if (!String.IsNullOrEmpty(cellValue))
{
for (int i = 0; i < repeats; i++)
{
DataTable sheet = row.Table;
while (sheet.Columns.Count <= cellIndex)
sheet.Columns.Add();
row[cellIndex] = cellValue;
cellIndex++;
}
}
else
{
cellIndex += repeats;
}
}
private string ReadCellValue(XmlNode cell)
{
XmlAttribute cellVal = cell.Attributes["office:value"];
if (cellVal == null)
return String.IsNullOrEmpty(cell.InnerText) ? null : cell.InnerText;
else
return cellVal.Value;
}
/// <summary>
/// Writes DataSet as .ods file.
/// </summary>
/// <param name="odsFile">DataSet that represent .ods file.</param>
/// <param name="outputFilePath">The name of the file to save to.</param>
public void WriteOdsFile(DataSet odsFile, string outputFilePath)
{
ZipFile templateFile = this.GetZipFile(Assembly.GetExecutingAssembly().GetManifestResourceStream("OdsReadWrite.template.ods"));
XmlDocument contentXml = this.GetContentXmlFile(templateFile);
XmlNamespaceManager nmsManager = this.InitializeXmlNamespaceManager(contentXml);
XmlNode sheetsRootNode = this.GetSheetsRootNodeAndRemoveChildrens(contentXml, nmsManager);
foreach (DataTable sheet in odsFile.Tables)
this.SaveSheet(sheet, sheetsRootNode);
this.SaveContentXml(templateFile, contentXml);
templateFile.Save(outputFilePath);
}
private XmlNode GetSheetsRootNodeAndRemoveChildrens(XmlDocument contentXml, XmlNamespaceManager nmsManager)
{
XmlNodeList tableNodes = this.GetTableNodes(contentXml, nmsManager);
XmlNode sheetsRootNode = tableNodes.Item(0).ParentNode;
// remove sheets from template file
foreach (XmlNode tableNode in tableNodes)
sheetsRootNode.RemoveChild(tableNode);
return sheetsRootNode;
}
private void SaveSheet(DataTable sheet, XmlNode sheetsRootNode)
{
XmlDocument ownerDocument = sheetsRootNode.OwnerDocument;
XmlNode sheetNode = ownerDocument.CreateElement("table:table", this.GetNamespaceUri("table"));
XmlAttribute sheetName = ownerDocument.CreateAttribute("table:name", this.GetNamespaceUri("table"));
sheetName.Value = sheet.TableName;
sheetNode.Attributes.Append(sheetName);
this.SaveColumnDefinition(sheet, sheetNode, ownerDocument);
this.SaveRows(sheet, sheetNode, ownerDocument);
sheetsRootNode.AppendChild(sheetNode);
}
private void SaveColumnDefinition(DataTable sheet, XmlNode sheetNode, XmlDocument ownerDocument)
{
XmlNode columnDefinition = ownerDocument.CreateElement("table:table-column", this.GetNamespaceUri("table"));
XmlAttribute columnsCount = ownerDocument.CreateAttribute("table:number-columns-repeated", this.GetNamespaceUri("table"));
columnsCount.Value = sheet.Columns.Count.ToString(CultureInfo.InvariantCulture);
columnDefinition.Attributes.Append(columnsCount);
sheetNode.AppendChild(columnDefinition);
}
private void SaveRows(DataTable sheet, XmlNode sheetNode, XmlDocument ownerDocument)
{
DataRowCollection rows = sheet.Rows;
for (int i = 0; i < rows.Count; i++)
{
XmlNode rowNode = ownerDocument.CreateElement("table:table-row", this.GetNamespaceUri("table"));
this.SaveCell(rows[i], rowNode, ownerDocument);
sheetNode.AppendChild(rowNode);
}
}
private void SaveCell(DataRow row, XmlNode rowNode, XmlDocument ownerDocument)
{
object[] cells = row.ItemArray;
for (int i = 0; i < cells.Length; i++)
{
XmlElement cellNode = ownerDocument.CreateElement("table:table-cell", this.GetNamespaceUri("table"));
if (row[i] != DBNull.Value)
{
// We save values as text (string)
XmlAttribute valueType = ownerDocument.CreateAttribute("office:value-type", this.GetNamespaceUri("office"));
valueType.Value = "string";
cellNode.Attributes.Append(valueType);
XmlElement cellValue = ownerDocument.CreateElement("text:p", this.GetNamespaceUri("text"));
cellValue.InnerText = row[i].ToString();
cellNode.AppendChild(cellValue);
}
rowNode.AppendChild(cellNode);
}
}
private void SaveContentXml(ZipFile templateFile, XmlDocument contentXml)
{
templateFile.RemoveEntry("content.xml");
MemoryStream memStream = new MemoryStream();
contentXml.Save(memStream);
memStream.Seek(0, SeekOrigin.Begin);
templateFile.AddEntry("content.xml", memStream);
}
private string GetNamespaceUri(string prefix)
{
for (int i = 0; i < namespaces.GetLength(0); i++)
{
if (namespaces[i, 0] == prefix)
return namespaces[i, 1];
}
throw new InvalidOperationException("Can't find that namespace URI");
}
}
}

Wyświetl plik

@ -0,0 +1,43 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2018 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact/.
*/
using System;
using System.Windows.Forms;
namespace TranslationBuilder
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

Wyświetl plik

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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("TranslationBuilder")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TranslationBuilder")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2018")]
[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)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0d502bfb-4e4a-4ffa-9006-8480b142ce68")]
// 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")]

Wyświetl plik

@ -1,14 +1,14 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4200
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace embroideryReader.Properties {
namespace TranslationBuilder.Properties {
using System;
@ -19,7 +19,7 @@ namespace embroideryReader.Properties {
// 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", "2.0.0.0")]
[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 {
@ -39,7 +39,7 @@ namespace embroideryReader.Properties {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("embroideryReader.Properties.Resources", typeof(Resources).Assembly);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TranslationBuilder.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;

Wyświetl plik

@ -0,0 +1,117 @@
<?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>

Wyświetl plik

@ -1,18 +1,18 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4200
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace embroideryReader.Properties {
namespace TranslationBuilder.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

Wyświetl plik

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Wyświetl plik

@ -1,85 +1,92 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A80DF4D8-967D-4352-9E1D-F22D23236BE2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryTester</RootNamespace>
<AssemblyName>embroideryTester</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<SubType>Designer</SubType>
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources-2005.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources-2005.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings-2005.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings-2005.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2005.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TranslationBuilder</RootNamespace>
<AssemblyName>TranslationBuilder</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</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|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ionic.Zip">
<HintPath>.\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="OdsReaderWriter.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Wyświetl plik

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

Wyświetl plik

@ -1,55 +1,55 @@
<html>
<head>
<title>CSewFigSeg</title>
</head>
<body>
<pre>
Copyright (c) 2011 Nathan Crawford.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
$Id$
Most numerical values appear to be 16 bit signed ints and are shown as such in this document, unless otherwise noted.
All characters appear to be ascii.
This class appears to be very similar to CEmbOne, with additional info
for color changes.
CSewFigSeg
Start stitch blocks
Block:
(block type)
(color index)
(number of stitches in this block)
(x value)
(y value)
(x value)
(y value)
(x value)
...
When all the stitches in this block have been read, there will be a
block seperator/joiner with one of these values:
-32765 (03 80 in hex, 32771 as UInt16) Meaning another block is next.
OR
A smaller positive number, seems to be between 0 and 100 and seems to
indicate a color change. If this is the case, there will be 13 more
values (26 bytes), the last of which tells if there is another block or
not. (-32767 (01 80 in hex) for yes, -1 (00 FF in hex) for no)
If there is another block coming, there will be another 24 values
(48 bytes), and then the next block will start. If not, there will be
1 more value (2 bytes) which seems to always be 0. This seems to be
a common ending to all the classes. (-1, 0)
(block)
(block seperator)
(block)
(block seperator)
...
when you get a block seperator that has the -1 value mentoined above, stitch blocks are done
</pre>
</body>
</html>
<html>
<head>
<title>CSewFigSeg</title>
</head>
<body>
<pre>
Copyright (c) 2011 Nathan Crawford.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
$Id$
Most numerical values appear to be 16 bit signed ints and are shown as such in this document, unless otherwise noted.
All characters appear to be ascii.
This class appears to be very similar to CEmbOne, with additional info
for color changes.
CSewFigSeg
Start stitch blocks
Block:
(block type)
(color index)
(number of stitches in this block)
(x value)
(y value)
(x value)
(y value)
(x value)
...
When all the stitches in this block have been read, there will be a
block seperator/joiner with one of these values:
-32765 (03 80 in hex, 32771 as UInt16) Meaning another block is next.
OR
A smaller positive number, seems to be between 0 and 100 and seems to
indicate a color change. If this is the case, there will be 13 more
values (26 bytes), the last of which tells if there is another block or
not. (-32767 (01 80 in hex) for yes, -1 (00 FF in hex) for no)
If there is another block coming, there will be another 24 values
(48 bytes), and then the next block will start. If not, there will be
1 more value (2 bytes) which seems to always be 0. This seems to be
a common ending to all the classes. (-1, 0)
(block)
(block seperator)
(block)
(block seperator)
...
when you get a block seperator that has the -1 value mentoined above, stitch blocks are done
</pre>
</body>
</html>

Wyświetl plik

@ -1,339 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

343
docs/license.rtf 100644
Wyświetl plik

@ -0,0 +1,343 @@
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.10586}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22\lang9\tab\tab GNU GENERAL PUBLIC LICENSE\par
\tab\tab Version 2, June 1991\par
\par
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\par
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\par
Everyone is permitted to copy and distribute verbatim copies\par
of this license document, but changing it is not allowed.\par
\par
\tab\tab\tab Preamble\par
\par
The licenses for most software are designed to take away your\par
freedom to share and change it. By contrast, the GNU General Public\par
License is intended to guarantee your freedom to share and change free\par
software--to make sure the software is free for all its users. This\par
General Public License applies to most of the Free Software\par
Foundation's software and to any other program whose authors commit to\par
using it. (Some other Free Software Foundation software is covered by\par
the GNU Lesser General Public License instead.) You can apply it to\par
your programs, too.\par
\par
When we speak of free software, we are referring to freedom, not\par
price. Our General Public Licenses are designed to make sure that you\par
have the freedom to distribute copies of free software (and charge for\par
this service if you wish), that you receive source code or can get it\par
if you want it, that you can change the software or use pieces of it\par
in new free programs; and that you know you can do these things.\par
\par
To protect your rights, we need to make restrictions that forbid\par
anyone to deny you these rights or to ask you to surrender the rights.\par
These restrictions translate to certain responsibilities for you if you\par
distribute copies of the software, or if you modify it.\par
\par
For example, if you distribute copies of such a program, whether\par
gratis or for a fee, you must give the recipients all the rights that\par
you have. You must make sure that they, too, receive or can get the\par
source code. And you must show them these terms so they know their\par
rights.\par
\par
We protect your rights with two steps: (1) copyright the software, and\par
(2) offer you this license which gives you legal permission to copy,\par
distribute and/or modify the software.\par
\par
Also, for each author's protection and ours, we want to make certain\par
that everyone understands that there is no warranty for this free\par
software. If the software is modified by someone else and passed on, we\par
want its recipients to know that what they have is not the original, so\par
that any problems introduced by others will not reflect on the original\par
authors' reputations.\par
\par
Finally, any free program is threatened constantly by software\par
patents. We wish to avoid the danger that redistributors of a free\par
program will individually obtain patent licenses, in effect making the\par
program proprietary. To prevent this, we have made it clear that any\par
patent must be licensed for everyone's free use or not licensed at all.\par
\par
The precise terms and conditions for copying, distribution and\par
modification follow.\par
\par
\tab\tab GNU GENERAL PUBLIC LICENSE\par
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\par
\par
0. This License applies to any program or other work which contains\par
a notice placed by the copyright holder saying it may be distributed\par
under the terms of this General Public License. The "Program", below,\par
refers to any such program or work, and a "work based on the Program"\par
means either the Program or any derivative work under copyright law:\par
that is to say, a work containing the Program or a portion of it,\par
either verbatim or with modifications and/or translated into another\par
language. (Hereinafter, translation is included without limitation in\par
the term "modification".) Each licensee is addressed as "you".\par
\par
Activities other than copying, distribution and modification are not\par
covered by this License; they are outside its scope. The act of\par
running the Program is not restricted, and the output from the Program\par
is covered only if its contents constitute a work based on the\par
Program (independent of having been made by running the Program).\par
Whether that is true depends on what the Program does.\par
\par
1. You may copy and distribute verbatim copies of the Program's\par
source code as you receive it, in any medium, provided that you\par
conspicuously and appropriately publish on each copy an appropriate\par
copyright notice and disclaimer of warranty; keep intact all the\par
notices that refer to this License and to the absence of any warranty;\par
and give any other recipients of the Program a copy of this License\par
along with the Program.\par
\par
You may charge a fee for the physical act of transferring a copy, and\par
you may at your option offer warranty protection in exchange for a fee.\par
\par
2. You may modify your copy or copies of the Program or any portion\par
of it, thus forming a work based on the Program, and copy and\par
distribute such modifications or work under the terms of Section 1\par
above, provided that you also meet all of these conditions:\par
\par
a) You must cause the modified files to carry prominent notices\par
stating that you changed the files and the date of any change.\par
\par
b) You must cause any work that you distribute or publish, that in\par
whole or in part contains or is derived from the Program or any\par
part thereof, to be licensed as a whole at no charge to all third\par
parties under the terms of this License.\par
\par
c) If the modified program normally reads commands interactively\par
when run, you must cause it, when started running for such\par
interactive use in the most ordinary way, to print or display an\par
announcement including an appropriate copyright notice and a\par
notice that there is no warranty (or else, saying that you provide\par
a warranty) and that users may redistribute the program under\par
these conditions, and telling the user how to view a copy of this\par
License. (Exception: if the Program itself is interactive but\par
does not normally print such an announcement, your work based on\par
the Program is not required to print an announcement.)\par
\par
These requirements apply to the modified work as a whole. If\par
identifiable sections of that work are not derived from the Program,\par
and can be reasonably considered independent and separate works in\par
themselves, then this License, and its terms, do not apply to those\par
sections when you distribute them as separate works. But when you\par
distribute the same sections as part of a whole which is a work based\par
on the Program, the distribution of the whole must be on the terms of\par
this License, whose permissions for other licensees extend to the\par
entire whole, and thus to each and every part regardless of who wrote it.\par
\par
Thus, it is not the intent of this section to claim rights or contest\par
your rights to work written entirely by you; rather, the intent is to\par
exercise the right to control the distribution of derivative or\par
collective works based on the Program.\par
\par
In addition, mere aggregation of another work not based on the Program\par
with the Program (or with a work based on the Program) on a volume of\par
a storage or distribution medium does not bring the other work under\par
the scope of this License.\par
\par
3. You may copy and distribute the Program (or a work based on it,\par
under Section 2) in object code or executable form under the terms of\par
Sections 1 and 2 above provided that you also do one of the following:\par
\par
a) Accompany it with the complete corresponding machine-readable\par
source code, which must be distributed under the terms of Sections\par
1 and 2 above on a medium customarily used for software interchange; or,\par
\par
b) Accompany it with a written offer, valid for at least three\par
years, to give any third party, for a charge no more than your\par
cost of physically performing source distribution, a complete\par
machine-readable copy of the corresponding source code, to be\par
distributed under the terms of Sections 1 and 2 above on a medium\par
customarily used for software interchange; or,\par
\par
c) Accompany it with the information you received as to the offer\par
to distribute corresponding source code. (This alternative is\par
allowed only for noncommercial distribution and only if you\par
received the program in object code or executable form with such\par
an offer, in accord with Subsection b above.)\par
\par
The source code for a work means the preferred form of the work for\par
making modifications to it. For an executable work, complete source\par
code means all the source code for all modules it contains, plus any\par
associated interface definition files, plus the scripts used to\par
control compilation and installation of the executable. However, as a\par
special exception, the source code distributed need not include\par
anything that is normally distributed (in either source or binary\par
form) with the major components (compiler, kernel, and so on) of the\par
operating system on which the executable runs, unless that component\par
itself accompanies the executable.\par
\par
If distribution of executable or object code is made by offering\par
access to copy from a designated place, then offering equivalent\par
access to copy the source code from the same place counts as\par
distribution of the source code, even though third parties are not\par
compelled to copy the source along with the object code.\par
\par
4. You may not copy, modify, sublicense, or distribute the Program\par
except as expressly provided under this License. Any attempt\par
otherwise to copy, modify, sublicense or distribute the Program is\par
void, and will automatically terminate your rights under this License.\par
However, parties who have received copies, or rights, from you under\par
this License will not have their licenses terminated so long as such\par
parties remain in full compliance.\par
\par
5. You are not required to accept this License, since you have not\par
signed it. However, nothing else grants you permission to modify or\par
distribute the Program or its derivative works. These actions are\par
prohibited by law if you do not accept this License. Therefore, by\par
modifying or distributing the Program (or any work based on the\par
Program), you indicate your acceptance of this License to do so, and\par
all its terms and conditions for copying, distributing or modifying\par
the Program or works based on it.\par
\par
6. Each time you redistribute the Program (or any work based on the\par
Program), the recipient automatically receives a license from the\par
original licensor to copy, distribute or modify the Program subject to\par
these terms and conditions. You may not impose any further\par
restrictions on the recipients' exercise of the rights granted herein.\par
You are not responsible for enforcing compliance by third parties to\par
this License.\par
\par
7. If, as a consequence of a court judgment or allegation of patent\par
infringement or for any other reason (not limited to patent issues),\par
conditions are imposed on you (whether by court order, agreement or\par
otherwise) that contradict the conditions of this License, they do not\par
excuse you from the conditions of this License. If you cannot\par
distribute so as to satisfy simultaneously your obligations under this\par
License and any other pertinent obligations, then as a consequence you\par
may not distribute the Program at all. For example, if a patent\par
license would not permit royalty-free redistribution of the Program by\par
all those who receive copies directly or indirectly through you, then\par
the only way you could satisfy both it and this License would be to\par
refrain entirely from distribution of the Program.\par
\par
If any portion of this section is held invalid or unenforceable under\par
any particular circumstance, the balance of the section is intended to\par
apply and the section as a whole is intended to apply in other\par
circumstances.\par
\par
It is not the purpose of this section to induce you to infringe any\par
patents or other property right claims or to contest validity of any\par
such claims; this section has the sole purpose of protecting the\par
integrity of the free software distribution system, which is\par
implemented by public license practices. Many people have made\par
generous contributions to the wide range of software distributed\par
through that system in reliance on consistent application of that\par
system; it is up to the author/donor to decide if he or she is willing\par
to distribute software through any other system and a licensee cannot\par
impose that choice.\par
\par
This section is intended to make thoroughly clear what is believed to\par
be a consequence of the rest of this License.\par
\par
8. If the distribution and/or use of the Program is restricted in\par
certain countries either by patents or by copyrighted interfaces, the\par
original copyright holder who places the Program under this License\par
may add an explicit geographical distribution limitation excluding\par
those countries, so that distribution is permitted only in or among\par
countries not thus excluded. In such case, this License incorporates\par
the limitation as if written in the body of this License.\par
\par
9. The Free Software Foundation may publish revised and/or new versions\par
of the General Public License from time to time. Such new versions will\par
be similar in spirit to the present version, but may differ in detail to\par
address new problems or concerns.\par
\par
Each version is given a distinguishing version number. If the Program\par
specifies a version number of this License which applies to it and "any\par
later version", you have the option of following the terms and conditions\par
either of that version or of any later version published by the Free\par
Software Foundation. If the Program does not specify a version number of\par
this License, you may choose any version ever published by the Free Software\par
Foundation.\par
\par
10. If you wish to incorporate parts of the Program into other free\par
programs whose distribution conditions are different, write to the author\par
to ask for permission. For software which is copyrighted by the Free\par
Software Foundation, write to the Free Software Foundation; we sometimes\par
make exceptions for this. Our decision will be guided by the two goals\par
of preserving the free status of all derivatives of our free software and\par
of promoting the sharing and reuse of software generally.\par
\par
\tab\tab\tab NO WARRANTY\par
\par
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\par
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\par
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\par
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\par
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\par
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\par
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\par
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\par
REPAIR OR CORRECTION.\par
\par
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\par
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\par
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\par
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\par
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\par
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\par
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\par
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\par
POSSIBILITY OF SUCH DAMAGES.\par
\par
\tab\tab END OF TERMS AND CONDITIONS\par
\par
\tab How to Apply These Terms to Your New Programs\par
\par
If you develop a new program, and you want it to be of the greatest\par
possible use to the public, the best way to achieve this is to make it\par
free software which everyone can redistribute and change under these terms.\par
\par
To do so, attach the following notices to the program. It is safest\par
to attach them to the start of each source file to most effectively\par
convey the exclusion of warranty; and each file should have at least\par
the "copyright" line and a pointer to where the full notice is found.\par
\par
<one line to give the program's name and a brief idea of what it does.>\par
Copyright (C) <year> <name of author>\par
\par
This program is free software; you can redistribute it and/or modify\par
it under the terms of the GNU General Public License as published by\par
the Free Software Foundation; either version 2 of the License, or\par
(at your option) any later version.\par
\par
This program is distributed in the hope that it will be useful,\par
but WITHOUT ANY WARRANTY; without even the implied warranty of\par
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\par
GNU General Public License for more details.\par
\par
You should have received a copy of the GNU General Public License along\par
with this program; if not, write to the Free Software Foundation, Inc.,\par
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\par
\par
Also add information on how to contact you by electronic and paper mail.\par
\par
If the program is interactive, make it output a short notice like this\par
when it starts in an interactive mode:\par
\par
Gnomovision version 69, Copyright (C) year name of author\par
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\par
This is free software, and you are welcome to redistribute it\par
under certain conditions; type `show c' for details.\par
\par
The hypothetical commands `show w' and `show c' should show the appropriate\par
parts of the General Public License. Of course, the commands you use may\par
be called something other than `show w' and `show c'; they could even be\par
mouse-clicks or menu items--whatever suits your program.\par
\par
You should also get your employer (if you work as a programmer) or your\par
school, if any, to sign a "copyright disclaimer" for the program, if\par
necessary. Here is a sample; alter the names:\par
\par
Yoyodyne, Inc., hereby disclaims all copyright interest in the program\par
`Gnomovision' (which makes passes at compilers) written by James Hacker.\par
\par
<signature of Ty Coon>, 1 April 1989\par
Ty Coon, President of Vice\par
\par
This General Public License does not permit incorporating your program into\par
proprietary programs. If your program is a subroutine library, you may\par
consider it more useful to permit linking proprietary applications with the\par
library. If this is what you want to do, use the GNU Lesser General\par
Public License instead of this License.\par
}

Wyświetl plik

@ -1,8 +1,8 @@
<html>
<head>
<title>pes0001</title>
</head>
<body>
</head>
<body>
<pre>Copyright (c) 2011 Nathan Crawford.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
@ -10,80 +10,80 @@
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
$Id$
Most numerical values appear to be 16 bit signed ints and are shown as such in this document, unless otherwise noted.
All characters appear to be ascii.
#PES0001 (16 bytes in this section)
1. address of the PEC section start (this is a UInt32)
2. a value of 1 here seems to indicate design data is over 100KB long, or 0 for less than 100KB
3. 1 (the rest of the fields in this section appear to be always the same; they also match the ending fields of the next section)
4. 1
5. -1
6. 0
7. number of characters in the name of the next class (7 for CEmbOne)
CEmbOne (66 bytes in this section)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22. design X offset
23. design Y offset
24. design width
25. design height
26.
27.
28.
29. 1 (the rest of the fields in this section appear to be always the same; they also match the ending fields of the previous section)
30. 1
31. -1
32. 0
33. number of characters in the name of the next class (7 for CSewSeg)
CSewSeg
Start stitch blocks
Block:
(color start indicator) (all color changes have the same value for this field; if the value here is not the same as the first block, it's not a color change)
(color index)
(number of stitches in this block)
(x value)
(y value)
(x value)
(y value)
(x value)
...
-32765 (block seperator or joiner) (03 80 in hex, 32771 as UInt16)
(block)
(block seperator)
(block)
(block seperator)
...
when you read all the stitches for a block and the next value is not a block seperator, stitch blocks are done (I think)
Start color table:
(color index)
(number of blocks before next color change?)
(color index)
(number of blocks)
...
This block ends with 0 0 (00 00 in hex)
After the color table should be 16716 (LA in char, 4C 41 in hex) which seems to signal the start of the PEC section
</pre>
</body>
$Id$
Most numerical values appear to be 16 bit signed ints and are shown as such in this document, unless otherwise noted.
All characters appear to be ascii.
#PES0001 (16 bytes in this section)
1. address of the PEC section start (this is a UInt32)
2. a value of 1 here seems to indicate design data is over 100KB long, or 0 for less than 100KB
3. 1 (the rest of the fields in this section appear to be always the same; they also match the ending fields of the next section)
4. 1
5. -1
6. 0
7. number of characters in the name of the next class (7 for CEmbOne)
CEmbOne (66 bytes in this section)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22. design X offset
23. design Y offset
24. design width
25. design height
26.
27.
28.
29. 1 (the rest of the fields in this section appear to be always the same; they also match the ending fields of the previous section)
30. 1
31. -1
32. 0
33. number of characters in the name of the next class (7 for CSewSeg)
CSewSeg
Start stitch blocks
Block:
(color start indicator) (all color changes have the same value for this field; if the value here is not the same as the first block, it's not a color change)
(color index)
(number of stitches in this block)
(x value)
(y value)
(x value)
(y value)
(x value)
...
-32765 (block seperator or joiner) (03 80 in hex, 32771 as UInt16)
(block)
(block seperator)
(block)
(block seperator)
...
when you read all the stitches for a block and the next value is not a block seperator, stitch blocks are done (I think)
Start color table:
(color index)
(number of blocks before next color change?)
(color index)
(number of blocks)
...
This block ends with 0 0 (00 00 in hex)
After the color table should be 16716 (LA in char, 4C 41 in hex) which seems to signal the start of the PEC section
</pre>
</body>
</html>

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2018 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -19,54 +19,103 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact.php.
You can contact me at http://www.njcrawford.com/contact/.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace embroideryInfo
{
class Program
{
static void PrintHelp()
{
Console.WriteLine("No input file specified.");
Console.WriteLine("To generate design debug text file:");
Console.WriteLine("embroideryInfo.exe --debug input.pes");
Console.WriteLine("To generate design debug text file for all files in current folder:");
Console.WriteLine("embroideryInfo.exe --debug --all");
Console.WriteLine("To generate PNG file:");
Console.WriteLine("embroideryInfo.exe --image input.pes");
Console.WriteLine("To generate PNG file for all files in the current folder:");
Console.WriteLine("embroideryInfo.exe --image --all");
}
static void GenerateDebug(string filename)
{
try
{
PesFile.PesFile design = new PesFile.PesFile(filename);
design.SaveDebugInfo();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
static void GenerateImage(string filename)
{
try
{
PesFile.PesFile design = new PesFile.PesFile(filename);
Bitmap DrawArea = design.DesignToBitmap(5.0f, false, 0.0f, 1.0f);
Bitmap temp = new Bitmap(DrawArea.Width, DrawArea.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
using (Graphics tempGraph = Graphics.FromImage(temp))
{
tempGraph.FillRectangle(Brushes.White, 0, 0, temp.Width, temp.Height);
tempGraph.DrawImageUnscaled(DrawArea, 0, 0);
tempGraph.Dispose();
temp.Save(System.IO.Path.ChangeExtension(filename, ".png"));
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
static void Main(string[] args)
{
if (args.Length > 0)
{
try
if(args[0] == "--help" || args[0] == "-h" || args[0] == "/?")
{
if (args[0] == "--image" && args.Length > 1)
PrintHelp();
}
else if (args[0] == "--image" && args.Length > 1)
{
if (args[1] == "--all")
{
PesFile.PesFile design = new PesFile.PesFile(args[1]);
Bitmap DrawArea = design.designToBitmap(5, false, 0);
Bitmap temp = new Bitmap(DrawArea.Width, DrawArea.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Graphics tempGraph = Graphics.FromImage(temp);
tempGraph.FillRectangle(Brushes.White, 0, 0, temp.Width, temp.Height);
tempGraph.DrawImageUnscaled(DrawArea, 0, 0);
tempGraph.Dispose();
temp.Save(System.IO.Path.ChangeExtension(args[1], ".png"));
foreach(string file in System.IO.Directory.EnumerateFiles(Environment.CurrentDirectory, "*.pes"))
{
GenerateImage(file);
}
}
else
{
PesFile.PesFile design = new PesFile.PesFile(args[0]);
design.saveDebugInfo();
GenerateImage(args[1]);
}
}
catch (Exception ex)
else if (args[0] == "--debug" && args.Length > 1)
{
Console.WriteLine(ex.ToString());
if (args[1] == "--all")
{
foreach (string file in System.IO.Directory.EnumerateFiles(Environment.CurrentDirectory, "*.pes"))
{
GenerateDebug(file);
}
}
else
{
GenerateDebug(args[1]);
}
}
}
else
{
Console.WriteLine("Specify input file");
for (int x = 0; x < args.Length; x++)
{
Console.WriteLine(args[x]);
}
PrintHelp();
}
}
}

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embridery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2014 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact.html.
You can contact me at http://www.njcrawford.com/contact/.
*/
using System.Reflection;
@ -34,7 +34,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("embroideryInfo")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2011")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -53,5 +53,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]

Wyświetl plik

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

Wyświetl plik

@ -1,54 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryInfo</RootNamespace>
<AssemblyName>embroideryInfo</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2005.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Wyświetl plik

@ -1,60 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryInfo</RootNamespace>
<AssemblyName>embroideryInfo</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2008.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Wyświetl plik

@ -1,97 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryInfo</RootNamespace>
<AssemblyName>embroideryInfo</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2010.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CD77BA88-4A2F-4366-816C-402DDB1C0D08}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryInfo</RootNamespace>
<AssemblyName>embroideryInfo</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile.csproj">
<Project>{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Wyświetl plik

@ -0,0 +1 @@
for %%i in (*.pes) do "embroideryInfo.exe" --image "%%~i"

Wyświetl plik

@ -1,75 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryReader", "embroideryReader\embroideryReader-2005.csproj", "{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryTester", "embroideryTester\embroideryTester-2005.csproj", "{A80DF4D8-967D-4352-9E1D-F22D23236BE2}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryInfo", "embroideryInfo\embroideryInfo-2005.csproj", "{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PesFile", "PesFile\PesFile-2005.csproj", "{66EF662E-F52C-4104-9C15-A14266D8F3B8}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{1BA749B5-4B20-4C6A-AAE0-57F3A718B6E7}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
ProjectSection(SolutionItems) = preProject
docs\csewfigseg.html = docs\csewfigseg.html
docs\docsindex.html = docs\docsindex.html
docs\pes0001.html = docs\pes0001.html
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryThumbs", "embroideryThumbs\embroideryThumbs-2005.csproj", "{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Release|Any CPU.Build.0 = Release|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Release|Any CPU.Build.0 = Release|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Release|Any CPU.Build.0 = Release|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Release|Any CPU.Build.0 = Release|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Wyświetl plik

@ -1,70 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C# Express 2008
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{1BA749B5-4B20-4C6A-AAE0-57F3A718B6E7}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryReader-2008", "embroideryReader\embroideryReader-2008.csproj", "{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryTester-2008", "embroideryTester\embroideryTester-2008.csproj", "{A80DF4D8-967D-4352-9E1D-F22D23236BE2}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryInfo-2008", "embroideryInfo\embroideryInfo-2008.csproj", "{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PesFile-2008", "PesFile\PesFile-2008.csproj", "{66EF662E-F52C-4104-9C15-A14266D8F3B8}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryThumbs-2008", "embroideryThumbs\embroideryThumbs-2008.csproj", "{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Release|Any CPU.Build.0 = Release|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Release|Any CPU.Build.0 = Release|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Release|Any CPU.Build.0 = Release|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Release|Any CPU.Build.0 = Release|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Wyświetl plik

@ -1,46 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{1BA749B5-4B20-4C6A-AAE0-57F3A718B6E7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryReader-2010", "embroideryReader\embroideryReader-2010.csproj", "{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryTester-2010", "embroideryTester\embroideryTester-2010.csproj", "{A80DF4D8-967D-4352-9E1D-F22D23236BE2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryInfo-2010", "embroideryInfo\embroideryInfo-2010.csproj", "{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PesFile-2010", "PesFile\PesFile-2010.csproj", "{66EF662E-F52C-4104-9C15-A14266D8F3B8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryThumbs-2010", "embroideryThumbs\embroideryThumbs-2010.csproj", "{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}.Release|Any CPU.Build.0 = Release|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A80DF4D8-967D-4352-9E1D-F22D23236BE2}.Release|Any CPU.Build.0 = Release|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E3B0E33-E0BC-41C1-B1B3-7CADD39BE362}.Release|Any CPU.Build.0 = Release|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66EF662E-F52C-4104-9C15-A14266D8F3B8}.Release|Any CPU.Build.0 = Release|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Wyświetl plik

@ -0,0 +1,94 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{1BA749B5-4B20-4C6A-AAE0-57F3A718B6E7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryReader", "embroideryReader\embroideryReader.csproj", "{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryTester", "embroideryTester\embroideryTester.csproj", "{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryInfo", "embroideryInfo\embroideryInfo.csproj", "{CD77BA88-4A2F-4366-816C-402DDB1C0D08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PesFile", "PesFile\PesFile.csproj", "{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embroideryThumbs", "embroideryThumbs\embroideryThumbs.csproj", "{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranslationBuilder", "TranslationBuilder\TranslationBuilder.csproj", "{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Debug|x86.ActiveCfg = Debug|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Release|Any CPU.Build.0 = Release|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}.Release|x86.ActiveCfg = Release|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Debug|x86.ActiveCfg = Debug|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Release|Any CPU.Build.0 = Release|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}.Release|x86.ActiveCfg = Release|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Debug|x86.ActiveCfg = Debug|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Release|Any CPU.Build.0 = Release|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CD77BA88-4A2F-4366-816C-402DDB1C0D08}.Release|x86.ActiveCfg = Release|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Debug|x86.ActiveCfg = Debug|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Release|Any CPU.Build.0 = Release|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}.Release|x86.ActiveCfg = Release|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Debug|x86.ActiveCfg = Debug|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Release|Any CPU.Build.0 = Release|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C4E7E0E5-EA6E-45DC-809A-1EF1FF8CCFE0}.Release|x86.ActiveCfg = Release|Any CPU
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Debug|Any CPU.ActiveCfg = Debug|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Debug|Mixed Platforms.Build.0 = Debug|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Debug|x86.ActiveCfg = Debug|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Debug|x86.Build.0 = Debug|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Release|Any CPU.ActiveCfg = Release|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Release|Mixed Platforms.ActiveCfg = Release|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Release|Mixed Platforms.Build.0 = Release|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Release|x86.ActiveCfg = Release|x86
{470DCEFF-9178-475E-B3A0-A1ABF42AB1ED}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Wyświetl plik

@ -1,322 +1,402 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace embroideryReader
{
public class EmbroideryReaderSettings
{
private NJCrawford.IniFile settings;
// update location is obsolete, but leaving here for historical purposes
private const String SETTING_UPDATE_LOCATION = "update location";
private const String SECTION_BACKGROUND_COLOR = "background color";
private const String SETTING_BACKGROUND_COLOR_ENABLED = "enabled";
private const String SETTING_BACKGROUND_COLOR_RED = "red";
private const String SETTING_BACKGROUND_COLOR_GREEN = "green";
private const String SETTING_BACKGROUND_COLOR_BLUE = "blue";
private const String SETTING_FILTER_STITCHES = "filter stitches";
private const String SETTING_FILTER_STITCHES_THRESHOLD = "filter stitches threshold";
private const String SETTING_THREAD_THICKNESS = "thread thickness";
private const String SETTING_LAST_OPEN_FILE_FOLDER = "last open file folder";
private const String SETTING_LAST_SAVE_IMAGE_LOCATION = "last save image location";
private const String SETTING_WINDOW_WIDTH = "window width";
private const String SETTING_WINDOW_HEIGHT = "window height";
private const String VALUE_YES = "yes";
private const String VALUE_NO = "no";
private const String VALUE_TRUE = "true";
private const String VALUE_FALSE = "false";
private const String UPDATE_URL = "http://www.njcrawford.com/updates/embroidery-reader.ini";
private const String SETTINGS_FILENAME = "embroideryreader.ini";
private const String SETTINGS_PATH_COMPANY = "NJCrawford Software";
private const String SETTINGS_PATH_APP_NAME = "Embroidery Reader";
public EmbroideryReaderSettings()
{
string settingsPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
settingsPath = System.IO.Path.Combine(settingsPath, SETTINGS_PATH_COMPANY);
settingsPath = System.IO.Path.Combine(settingsPath, SETTINGS_PATH_APP_NAME);
if (!System.IO.Directory.Exists(settingsPath))
{
System.IO.Directory.CreateDirectory(settingsPath);
}
settingsPath = System.IO.Path.Combine(settingsPath, SETTINGS_FILENAME);
// new settings file in application data folder
settings = new NJCrawford.IniFile(settingsPath);
// if the new file doesn't exist but the old one does, copy useful settings from old file to new
if (!System.IO.File.Exists(settingsPath) && System.IO.File.Exists(SETTINGS_FILENAME))
{
// Old settings file stored in installation folder breaks on
// Windows 7.
NJCrawford.IniFile oldSettings = new NJCrawford.IniFile(SETTINGS_FILENAME);
if (!String.IsNullOrEmpty(oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED)))
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED)))
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN)))
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE)))
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SETTING_FILTER_STITCHES)))
{
settings.setValue(SETTING_FILTER_STITCHES, oldSettings.getValue(SETTING_FILTER_STITCHES));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SETTING_FILTER_STITCHES_THRESHOLD)))
{
settings.setValue(SETTING_FILTER_STITCHES_THRESHOLD, oldSettings.getValue(SETTING_FILTER_STITCHES_THRESHOLD));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SETTING_THREAD_THICKNESS)))
{
settings.setValue(SETTING_THREAD_THICKNESS, oldSettings.getValue(SETTING_THREAD_THICKNESS));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SETTING_LAST_OPEN_FILE_FOLDER)))
{
settings.setValue(SETTING_LAST_OPEN_FILE_FOLDER, oldSettings.getValue(SETTING_LAST_OPEN_FILE_FOLDER));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SETTING_LAST_SAVE_IMAGE_LOCATION)))
{
settings.setValue(SETTING_LAST_SAVE_IMAGE_LOCATION, oldSettings.getValue(SETTING_LAST_SAVE_IMAGE_LOCATION));
}
}
}
// This is no longer in the settings file, but I'm keeping it here because
// I can't think of a better place to put it yet.
public String updateLocation
{
get
{
return UPDATE_URL;
}
}
public bool backgroundColorEnabled
{
get
{
return (settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED) == VALUE_YES);
}
set
{
String output = VALUE_NO;
if (value)
{
output = VALUE_YES;
}
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, output);
}
}
public System.Drawing.Color backgroundColor
{
get
{
if (backgroundColorEnabled)
{
if (frmMain.checkColorFromStrings(settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED),
settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN),
settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE)))
{
return frmMain.makeColorFromStrings(settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED),
settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN),
settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE));
}
else
{
return System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Control);
}
}
else
{
return System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Control);
}
}
set
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED, value.R.ToString());
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN, value.G.ToString());
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE, value.B.ToString());
}
}
public bool filterStiches
{
get
{
return (settings.getValue(SETTING_FILTER_STITCHES) == VALUE_TRUE);
}
set
{
String output = VALUE_FALSE;
if (value)
{
output = VALUE_TRUE;
}
settings.setValue(SETTING_FILTER_STITCHES, output);
}
}
public double threadThickness
{
get
{
double thickness = 5;
if (settings.getValue(SETTING_THREAD_THICKNESS) != null)
{
if (Double.TryParse(settings.getValue(SETTING_THREAD_THICKNESS), out thickness))
{
if (thickness < 1)
{
thickness = 1;
}
}
}
return thickness;
}
set
{
settings.setValue(SETTING_THREAD_THICKNESS, value.ToString());
}
}
public double filterStitchesThreshold
{
get
{
int threshold = 120;
if (settings.getValue(SETTING_FILTER_STITCHES_THRESHOLD) != null)
{
if (Int32.TryParse(settings.getValue(SETTING_FILTER_STITCHES_THRESHOLD), out threshold))
{
if (threshold < 10)
{
threshold = 10;
}
}
}
return threshold;
}
set
{
settings.setValue(SETTING_FILTER_STITCHES_THRESHOLD, value.ToString());
}
}
public String lastOpenFileFolder
{
get
{
return settings.getValue(SETTING_LAST_OPEN_FILE_FOLDER);
}
set
{
settings.setValue(SETTING_LAST_OPEN_FILE_FOLDER, value);
}
}
public void save()
{
settings.save();
}
public String lastSaveImageLocation
{
get
{
return settings.getValue(SETTING_LAST_SAVE_IMAGE_LOCATION);
}
set
{
settings.setValue(SETTING_LAST_SAVE_IMAGE_LOCATION, value);
}
}
public int windowWidth
{
get
{
Int32 retval;
string temp = settings.getValue(SETTING_WINDOW_WIDTH);
if(!Int32.TryParse(temp, out retval))
{
retval = 300;
}
return retval;
}
set
{
settings.setValue(SETTING_WINDOW_WIDTH, value.ToString());
}
}
public int windowHeight
{
get
{
Int32 retval;
string temp = settings.getValue(SETTING_WINDOW_HEIGHT);
if (!Int32.TryParse(temp, out retval))
{
retval = 300;
}
return retval;
}
set
{
settings.setValue(SETTING_WINDOW_HEIGHT, value.ToString());
}
}
}
}
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact
*/
using System;
namespace embroideryReader
{
public class EmbroideryReaderSettings
{
private NJCrawford.IniFile settings;
// update location is obsolete, but leaving here for historical purposes
private const String SETTING_UPDATE_LOCATION = "update location";
private const String SECTION_BACKGROUND_COLOR = "background color";
private const String SETTING_BACKGROUND_COLOR_ENABLED = "enabled";
private const String SETTING_BACKGROUND_COLOR_RED = "red";
private const String SETTING_BACKGROUND_COLOR_GREEN = "green";
private const String SETTING_BACKGROUND_COLOR_BLUE = "blue";
private const String SETTING_FILTER_STITCHES = "filter stitches";
private const String SETTING_FILTER_STITCHES_THRESHOLD = "filter stitches threshold";
private const String SETTING_THREAD_THICKNESS = "thread thickness";
private const String SETTING_LAST_OPEN_FILE_FOLDER = "last open file folder";
private const String SETTING_LAST_SAVE_IMAGE_LOCATION = "last save image location";
private const String SETTING_WINDOW_MAXIMIZED = "window maximized";
private const String SETTING_WINDOW_WIDTH = "window width";
private const String SETTING_WINDOW_HEIGHT = "window height";
private const String SETTING_AUTOSCALE_DESIGN = "auto scale design";
private const String SECTION_TRANSPARENCY_GRID = "transparency grid";
private const String SETTING_TRANSPARENCY_GRID_ENABLE = "enabled";
private const String SETTING_TRANSPARENCY_GRID_SIZE = "size";
private const String SETTING_TRANSPARENCY_GRID_COLOR_RED = "red";
private const String SETTING_TRANSPARENCY_GRID_COLOR_GREEN = "green";
private const String SETTING_TRANSPARENCY_GRID_COLOR_BLUE = "blue";
private const String SETTING_TRANSLATION = "translation";
private const String UPDATE_URL = "http://www.njcrawford.com/updates/embroidery-reader.ini";
private const String SETTINGS_FILENAME = "embroideryreader.ini";
private const String SETTINGS_PATH_COMPANY = "NJCrawford Software";
private const String SETTINGS_PATH_APP_NAME = "Embroidery Reader";
private const int DEFAULT_WINDOW_SIZE = 300;
private const int MINIMUM_WINDOW_SIZE = 150;
public EmbroideryReaderSettings()
{
string settingsPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
settingsPath = System.IO.Path.Combine(settingsPath, SETTINGS_PATH_COMPANY);
settingsPath = System.IO.Path.Combine(settingsPath, SETTINGS_PATH_APP_NAME);
if (!System.IO.Directory.Exists(settingsPath))
{
System.IO.Directory.CreateDirectory(settingsPath);
}
settingsPath = System.IO.Path.Combine(settingsPath, SETTINGS_FILENAME);
// new settings file in application data folder
settings = new NJCrawford.IniFile(settingsPath);
// if the new file doesn't exist but the old one does, copy useful settings from old file to new
if (!System.IO.File.Exists(settingsPath) && System.IO.File.Exists(SETTINGS_FILENAME))
{
// Old settings file stored in installation folder breaks on
// Windows 7.
NJCrawford.IniFile oldSettings = new NJCrawford.IniFile(SETTINGS_FILENAME);
if (oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, -1) != -1)
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, ""));
}
if (oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED, -1) != -1)
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED, ""));
}
if (oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN, -1) != -1)
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN, ""));
}
if (oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE, -1) != -1)
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE, oldSettings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE, ""));
}
if (oldSettings.getValue(SETTING_FILTER_STITCHES, false))
{
settings.setValue(SETTING_FILTER_STITCHES, oldSettings.getValue(SETTING_FILTER_STITCHES, ""));
}
if (oldSettings.getValue(SETTING_FILTER_STITCHES_THRESHOLD, 0.0) > 0.0)
{
settings.setValue(SETTING_FILTER_STITCHES_THRESHOLD, oldSettings.getValue(SETTING_FILTER_STITCHES_THRESHOLD, ""));
}
if (oldSettings.getValue(SETTING_THREAD_THICKNESS, 0.0) > 0.0)
{
settings.setValue(SETTING_THREAD_THICKNESS, oldSettings.getValue(SETTING_THREAD_THICKNESS, ""));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SETTING_LAST_OPEN_FILE_FOLDER, "")))
{
settings.setValue(SETTING_LAST_OPEN_FILE_FOLDER, oldSettings.getValue(SETTING_LAST_OPEN_FILE_FOLDER, ""));
}
if (!String.IsNullOrEmpty(oldSettings.getValue(SETTING_LAST_SAVE_IMAGE_LOCATION, "")))
{
settings.setValue(SETTING_LAST_SAVE_IMAGE_LOCATION, oldSettings.getValue(SETTING_LAST_SAVE_IMAGE_LOCATION, ""));
}
}
// Default to transparency grid enabled
if (String.IsNullOrWhiteSpace(settings.getValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_ENABLE, "")))
{
settings.setValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_ENABLE, true);
}
// Update deprecated settings
if (settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, "") == "yes")
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, true);
}
else
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, false);
}
// Default language to english
if (String.IsNullOrWhiteSpace(settings.getValue(SETTING_TRANSLATION, "")))
{
settings.setValue(SETTING_TRANSLATION, "English (EN-US)");
}
}
// This is no longer in the settings file, but I'm keeping it here because
// I can't think of a better place to put it yet.
public String updateLocation
{
get
{
return UPDATE_URL;
}
}
public bool backgroundColorEnabled
{
get
{
return settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, false);
}
set
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_ENABLED, value);
}
}
public System.Drawing.Color backgroundColor
{
get
{
if (!backgroundColorEnabled)
{
return System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Control);
}
try
{
return System.Drawing.Color.FromArgb(settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED, -1),
settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN, -1),
settings.getValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE, -1));
}
catch(ArgumentException /*argEx*/)
{
return System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Control);
}
}
set
{
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_RED, value.R);
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_GREEN, value.G);
settings.setValue(SECTION_BACKGROUND_COLOR, SETTING_BACKGROUND_COLOR_BLUE, value.B);
}
}
public bool filterStiches
{
get
{
return (settings.getValue(SETTING_FILTER_STITCHES, false));
}
set
{
settings.setValue(SETTING_FILTER_STITCHES, value);
}
}
public float threadThickness
{
get
{
float thickness = settings.getValue(SETTING_THREAD_THICKNESS, 5.0f);
if (thickness < 1.0f)
{
thickness = 1.0f;
}
return thickness;
}
set
{
settings.setValue(SETTING_THREAD_THICKNESS, value);
}
}
public float filterStitchesThreshold
{
get
{
float threshold = settings.getValue(SETTING_FILTER_STITCHES_THRESHOLD, 64.0f);
if (threshold < 10.0f)
{
threshold = 10.0f;
}
return threshold;
}
set
{
settings.setValue(SETTING_FILTER_STITCHES_THRESHOLD, value);
}
}
public String lastOpenFileFolder
{
get
{
return settings.getValue(SETTING_LAST_OPEN_FILE_FOLDER, "");
}
set
{
settings.setValue(SETTING_LAST_OPEN_FILE_FOLDER, value);
}
}
public void save()
{
settings.save();
}
public String lastSaveImageLocation
{
get
{
return settings.getValue(SETTING_LAST_SAVE_IMAGE_LOCATION, "");
}
set
{
settings.setValue(SETTING_LAST_SAVE_IMAGE_LOCATION, value);
}
}
public bool windowMaximized
{
get
{
return settings.getValue(SETTING_WINDOW_MAXIMIZED, false);
}
set
{
settings.setValue(SETTING_WINDOW_MAXIMIZED, value);
}
}
public int windowWidth
{
get
{
// Return the stored window size, but no smaller than MINUMUM_WINDOW_SIZE
return Math.Max(settings.getValue(SETTING_WINDOW_WIDTH, DEFAULT_WINDOW_SIZE), MINIMUM_WINDOW_SIZE);
}
set
{
settings.setValue(SETTING_WINDOW_WIDTH, value);
}
}
public int windowHeight
{
get
{
// Return the stored window size, but no smaller than MINUMUM_WINDOW_SIZE
return Math.Max(settings.getValue(SETTING_WINDOW_HEIGHT, DEFAULT_WINDOW_SIZE), MINIMUM_WINDOW_SIZE);
}
set
{
settings.setValue(SETTING_WINDOW_HEIGHT, value);
}
}
public bool AutoScaleDesign
{
get
{
return settings.getValue(SETTING_AUTOSCALE_DESIGN, true);
}
set
{
settings.setValue(SETTING_AUTOSCALE_DESIGN, value);
}
}
public bool transparencyGridEnabled
{
get
{
return (settings.getValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_ENABLE, false));
}
set
{
settings.setValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_ENABLE, value);
}
}
public int transparencyGridSize
{
get
{
return settings.getValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_SIZE, 5);
}
set
{
settings.setValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_SIZE, value);
}
}
public System.Drawing.Color transparencyGridColor
{
get
{
if (!transparencyGridEnabled)
{
return System.Drawing.Color.LightGray;
}
try
{
return System.Drawing.Color.FromArgb(settings.getValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_COLOR_RED, -1),
settings.getValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_COLOR_GREEN, -1),
settings.getValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_COLOR_BLUE, -1));
}
catch(ArgumentException /*argEx*/)
{
return System.Drawing.Color.LightGray;
}
}
set
{
settings.setValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_COLOR_RED, value.R);
settings.setValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_COLOR_GREEN, value.G);
settings.setValue(SECTION_TRANSPARENCY_GRID, SETTING_TRANSPARENCY_GRID_COLOR_BLUE, value.B);
}
}
public String translation
{
get
{
return settings.getValue(SETTING_TRANSLATION, "");
}
set
{
settings.setValue(SETTING_TRANSLATION, value);
}
}
}
}

Wyświetl plik

@ -0,0 +1,255 @@
using System;
using System.ComponentModel;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
namespace embroideryReader
{
class EmbroideryReaderUpdates
{
public enum versionImportance { unknownOrUnavailable, bugfix, feature, critical, };
System.Net.WebClient downloader = new System.Net.WebClient();
NJCrawford.StringIniReader updateInfo;
System.Uri updateURI;
string lastError = "";
private bool isInfoReady = false;
private BackgroundWorker internalThread;
private string updateURL;
private const string VERSION = "version";
private const string RELEASE_DATE = "release date";
private const string MORE_INFO_URL = "more info url";
public const string SETTINGS_SECTION_NAME = "update info";
public const string SETTINGS_NEWER_VERSION = "newer version available";
public const string SETTINGS_MORE_INFO = "more info url";
public const string SETTINGS_RELEASE_DATE = "release date";
public const string SETTINGS_LAST_CHECK = "last update check";
private Mutex infoReadyMutex;
private Version callerVersion;
private string callerName;
private NJCrawford.IniFile appSettings;
public delegate void callbackFunctionType();
private callbackFunctionType callbackFunction;
public EmbroideryReaderUpdates(string updateLocation, NJCrawford.IniFile settingsFile, callbackFunctionType callback)
{
callbackFunction = callback;
appSettings = settingsFile;
infoReadyMutex = new Mutex();
updateURL = updateLocation;
callerVersion = Assembly.GetCallingAssembly().GetName().Version;
callerName = Assembly.GetCallingAssembly().GetName().Name;
//internalThread = new Thread(new ThreadStart(internalThreadFunction));
internalThread = new BackgroundWorker();
internalThread.DoWork += new DoWorkEventHandler(internalThread_DoWork);
internalThread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(internalThread_RunWorkerCompleted);
internalThread.RunWorkerAsync();
}
void internalThread_DoWork(object sender, DoWorkEventArgs e)
{
string downloadString = "";
updateURI = new Uri(updateURL);
downloader.Headers.Add("user-agent", "UpdateCheck/" + Assembly.GetExecutingAssembly().GetName().Version + " " + callerName + "/" + callerVersion);
try
{
downloadString = downloader.DownloadString(updateURI);
updateInfo = new NJCrawford.StringIniReader(downloadString);
}
catch (Exception ex)
{
//don't complain, just remember it for later
lastError = ex.Message;
}
// I suspect that this will prevent a race condition
infoReadyMutex.WaitOne();
isInfoReady = true;
infoReadyMutex.ReleaseMutex();
}
void internalThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (appSettings != null)
{
if (IsInfoValid())
{
appSettings.setValue(SETTINGS_SECTION_NAME, SETTINGS_NEWER_VERSION, VersionAvailable().ToString());
appSettings.setValue(SETTINGS_SECTION_NAME, SETTINGS_MORE_INFO, getMoreInfoURL());
appSettings.setValue(SETTINGS_SECTION_NAME, SETTINGS_RELEASE_DATE, getReleaseDate().ToShortDateString());
}
appSettings.setValue(SETTINGS_SECTION_NAME, SETTINGS_LAST_CHECK, DateTime.Now.ToShortDateString());
}
if (callbackFunction != null)
{
callbackFunction();
}
}
/*<summary>Returns null if not available for any reason.</summary>*/
public Version VersionAvailable()
{
Version retval = null;
string versionString = updateInfo.getValue(VERSION, "");
if (!String.IsNullOrEmpty(versionString))
{
try
{
retval = new Version(versionString);
}
catch (FormatException fex)
{
lastError = fex.Message;
}
}
return retval;
}
public bool IsUpdateAvailable()
{
bool retval = false;
Version currentVersion = Assembly.GetCallingAssembly().GetName().Version;
if (VersionAvailable() != null)
{
retval = (VersionAvailable() > currentVersion);
}
return retval;
}
public string GetLastError()
{
return lastError;
}
public void ResetLastError()
{
lastError = "";
}
/*<summary>Returns the date and possibly time
* the latest update was released. Returns DateTime.MinValue
* if not available.</summary>
*/
public DateTime getReleaseDate()
{
DateTime retval = DateTime.MinValue;
try
{
retval = Convert.ToDateTime(updateInfo.getValue(RELEASE_DATE, ""));
}
catch (FormatException fx)
{
lastError = fx.Message;
}
return retval;
}
// gets 'more info url'
public string getMoreInfoURL()
{
return updateInfo.getValue(MORE_INFO_URL, "");
}
public bool IsInfoReady()
{
bool retval;
// I suspect that this will prevent a race condition
infoReadyMutex.WaitOne();
retval = isInfoReady;
infoReadyMutex.ReleaseMutex();
return retval;
}
public void waitForInfo()
{
while (!isInfoReady)
{
System.Threading.Thread.Sleep(100);
Application.DoEvents();
}
}
public bool IsInfoValid()
{
string versionString = updateInfo.getValue(VERSION, "");
if (String.IsNullOrEmpty(versionString))
{
lastError = "Missing version in update info";
return false;
}
else
{
// Make sure the version is valid
// Check for 4 int16s seperated by dots
string[] parts = versionString.Split('.');
bool versionOK = true;
if (parts.Length == 4)
{
Int16 junk;
for (int i = 0; i < 4; i++)
{
if (!Int16.TryParse(parts[i], out junk))
{
versionOK = false;
}
}
}
else
{
versionOK = false;
}
if (!versionOK)
{
lastError = "Invalid version format";
return false;
}
}
string releaseDateString = updateInfo.getValue(RELEASE_DATE, "");
if (String.IsNullOrEmpty(releaseDateString))
{
lastError = "Missing release date in update info";
return false;
}
else
{
// Make sure the date is valid
DateTime junk;
if (!DateTime.TryParse(releaseDateString, out junk))
{
lastError = "Invalid release date";
return false;
}
}
string moreInfoURL = updateInfo.getValue(MORE_INFO_URL, "");
if (String.IsNullOrEmpty(moreInfoURL))
{
lastError = "Missing 'more info url' in update info";
return false;
}
else
{
// Make sure url is valid
if(!Uri.IsWellFormedUriString(moreInfoURL, UriKind.Absolute))
{
lastError = "Invalid 'more info url'";
return false;
}
}
return true;
}
}
}

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,29 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace embroideryReader
{
class GuiResources
{
/// uiFlags: 0 - Count of GDI objects
/// uiFlags: 1 - Count of USER objects
/// - Win32 GDI objects (pens, brushes, fonts, palettes, regions, device contexts, bitmap headers)
/// - Win32 USER objects:
/// - WIN32 resources (accelerator tables, bitmap resources, dialog box templates, font resources, menu resources, raw data resources, string table entries, message table entries, cursors/icons)
/// - Other USER objects (windows, menus)
///
[DllImport("User32")]
extern public static int GetGuiResources(IntPtr hProcess, int uiFlags);
public static int GetGuiResourcesGDICount()
{
return GetGuiResources(Process.GetCurrentProcess().Handle, 0);
}
public static int GetGuiResourcesUserCount()
{
return GetGuiResources(Process.GetCurrentProcess().Handle, 1);
}
}
}

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -24,7 +24,7 @@ You can contact me at http://www.njcrawford.com/contact
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Windows.Forms;
namespace embroideryReader
@ -37,6 +37,10 @@ namespace embroideryReader
[STAThread]
static void Main()
{
// Register ErrorReporter to report unhandled exceptions
NJCrawford.ErrorReporter.RegisterWebReport("Embroidery Reader", "http://www.njcrawford.com/contact/error-reports/?2subject=Embroidery%20Reader%20Automated%20Error%20Report&2message=");
// Normal program.cs stuff
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embridery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2018 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -35,7 +35,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Embroidery Reader")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2011")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -54,5 +54,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("2.2.5.0")]
[assembly: AssemblyFileVersion("2.2.5.0")]

Wyświetl plik

@ -1,71 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace embroideryReader.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", "2.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("embroideryReader.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;
}
}
}
}

Wyświetl plik

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

Wyświetl plik

@ -1,117 +1,117 @@
<?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>
<?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>

Wyświetl plik

@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace embroideryReader.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.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;
}
}
}
}

Wyświetl plik

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

Wyświetl plik

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Wyświetl plik

@ -0,0 +1,219 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
A copy of the full GPL 2 license can be found in the docs directory.
You can contact me at http://www.njcrawford.com/contact
*/
using System;
using System.Collections.Generic;
using NJCrawford;
namespace embroideryReader
{
public class Translation
{
private const string TRANSLATIONS_FOLDER = "translations";
private const string TRANSLATION_FILE_EXT = ".ini";
private const string DEFAULT_TRANSLATION_NAME = "EN-US";
// String IDs
public enum StringID {
TRANSLATION_DISPLAY_NAME,
UNSUPPORTED_FORMAT,
COLOR_WARNING,
ERROR_FILE,
CORRUPT_FILE,
// File type descriptions
FILE_TYPE_PES,
FILE_TYPE_ALL,
FILE_TYPE_BMP,
FILE_TYPE_PNG,
FILE_TYPE_JPG,
FILE_TYPE_GIF,
FILE_TYPE_TIFF,
ABOUT_MESSAGE,
ERROR_UPDATE,
VERSION,
ERROR_WEBPAGE,
NO_UPDATE,
ERROR_DEBUG,
NO_DESIGN,
UNSUPPORTED_CLASS,
IMAGE_SAVED,
// Menu strings
MENU_FILE,
MENU_OPEN,
MENU_SAVE_IMAGE,
MENU_PRINT,
MENU_PRINT_PREVIEW,
MENU_EXIT,
MENU_EDIT,
MENU_COPY,
MENU_PREFS,
MENU_VIEW,
ROTATE_LEFT,
ROTATE_RIGHT,
MENU_RESET,
MENU_SCALE_ZOOM,
MENU_FIT_TO_WINDOW,
MENU_HELP,
CHECK_UPDATE,
SAVE_DEBUG,
SHOW_DEBUG,
MENU_ABOUT,
PICK_COLOR,
BACKGROUND_COLOR,
RESET_COLOR,
CANCEL,
OK,
THREAD_THICKNESS,
PIXELS,
BACKGROUND,
STITCH_DRAW,
REMOVE_UGLY_STITCHES,
UGLY_STITCH_LENGTH,
SETTINGS,
LATEST_VERSION,
NEW_VERSION_MESSAGE,
NEW_VERSION_QUESTION,
NEW_VERSION_TITLE,
DEBUG_INFO_SAVED,
ENABLE_TRANSPARENCY_GRID,
LANGUAGE,
GRID_SIZE,
TRANSLATION_INCOMPLETE,
// This must be last. Used for checking completeness of translation files.
TOTAL_COUNT,
};
IniFile translationFile;
IniFile defaultFile;
public Translation(String name)
{
Load(name);
}
private string GetBasePath()
{
// Build the path that should be used by default
string exePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);
exePath = System.IO.Path.Combine(exePath, TRANSLATIONS_FOLDER);
// If the default path exists, use it
if (System.IO.Directory.Exists(exePath))
{
return exePath;
}
// If the translations folder exists in the current working directory, use it
else if(System.IO.Directory.Exists(TRANSLATIONS_FOLDER))
{
return TRANSLATIONS_FOLDER;
}
// No usable translations folder found
throw new Exception("Unable to locate a suitable translations directory");
}
// Returns the names of available translations
// The first value of each tubple is the display name, the second value
// is the file name that must be passed to the open function.
public List<Tuple<String, String>> GetAvailableTranslations()
{
List<Tuple<String, String>> retval = new List<Tuple<String, String>>();
foreach (String file in System.IO.Directory.EnumerateFiles(
GetBasePath(),
"*" + TRANSLATION_FILE_EXT,
System.IO.SearchOption.TopDirectoryOnly))
{
IniFile tempFile = new IniFile(file);
retval.Add(new Tuple<String, String>(tempFile.getValue(StringID.TRANSLATION_DISPLAY_NAME.ToString(), ""), System.IO.Path.GetFileNameWithoutExtension(file)));
}
return retval;
}
// Load a translation file
// Names are just the file name without the extension
public void Load(String translationName)
{
// Init default translation, in case loaded translation is missing any strings
defaultFile = new IniFile(System.IO.Path.Combine(GetBasePath(), DEFAULT_TRANSLATION_NAME + TRANSLATION_FILE_EXT));
String translationPath = System.IO.Path.Combine(GetBasePath(), translationName + TRANSLATION_FILE_EXT);
if (System.IO.File.Exists(translationPath))
{
// Tranlation exists, load it
translationFile = new IniFile(translationPath);
}
else
{
// Requested translation doesn't exist, so use the default
translationFile = defaultFile;
}
}
// Returns the translated string, or a string representation of the
// string ID if the translation isn't available.
public String GetTranslatedString(StringID sid)
{
string retval;
retval = translationFile.getValue(sid.ToString(), "");
// Check the default translation if string is not found in the loaded translation
if (String.IsNullOrEmpty(retval))
{
retval = defaultFile.getValue(sid.ToString(), "");
}
// If it's not found in the default, return a placeholder string
if (String.IsNullOrEmpty(retval))
{
retval = "%" + sid.ToString() + "%";
}
return retval;
}
// Returns true if the loaded translation file contains all expected
// string IDs, or false if not.
public bool IsComplete()
{
bool retval = true;
for (StringID sid = (StringID)0; sid < StringID.TOTAL_COUNT; sid++)
{
if (translationFile.getValue(sid.ToString(), (String)null) == null)
{
retval = false;
break;
}
}
return retval;
}
}
}

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

Wyświetl plik

@ -1,124 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryReader</RootNamespace>
<AssemblyName>embroideryReader</AssemblyName>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="IniFile, Version=1.2.1.11, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\IniFile.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="UpdateCheck, Version=0.2.0.35, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\UpdateCheck.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="frmSettingsDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSettingsDialog.Designer.cs">
<DependentUpon>frmSettingsDialog.cs</DependentUpon>
</Compile>
<Compile Include="frmTextbox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmTextbox.Designer.cs">
<DependentUpon>frmTextbox.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="EmbroideryReaderSettings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmMain.resx">
<SubType>Designer</SubType>
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSettingsDialog.resx">
<SubType>Designer</SubType>
<DependentUpon>frmSettingsDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmTextbox.resx">
<SubType>Designer</SubType>
<DependentUpon>frmTextbox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources-2005.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources-2005.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings-2005.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings-2005.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2005.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

Wyświetl plik

@ -1,129 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryReader</RootNamespace>
<AssemblyName>embroideryReader</AssemblyName>
<ApplicationIcon>icon.ico</ApplicationIcon>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="IniFile, Version=1.2.1.11, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\IniFile.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="UpdateCheck, Version=0.2.0.35, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\UpdateCheck.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="EmbroideryReaderSettings.cs" />
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="frmSettingsDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSettingsDialog.Designer.cs">
<DependentUpon>frmSettingsDialog.cs</DependentUpon>
</Compile>
<Compile Include="frmTextbox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmTextbox.Designer.cs">
<DependentUpon>frmTextbox.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmMain.resx">
<SubType>Designer</SubType>
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSettingsDialog.resx">
<SubType>Designer</SubType>
<DependentUpon>frmSettingsDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmTextbox.resx">
<SubType>Designer</SubType>
<DependentUpon>frmTextbox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources-2008.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources-2008.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings-2008.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings-2008.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2008.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>"$(ProjectDir)\IncrementVersionNumber.exe" --postbuild</PostBuildEvent>
<PreBuildEvent>"$(ProjectDir)\IncrementVersionNumber.exe" --prebuild</PreBuildEvent>
</PropertyGroup>
</Project>

Wyświetl plik

@ -1,166 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0A9A24AD-60F0-4664-BCC6-2B98B3E8B565}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryReader</RootNamespace>
<AssemblyName>embroideryReader</AssemblyName>
<ApplicationIcon>icon.ico</ApplicationIcon>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="IniFile, Version=1.2.1.11, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\IniFile.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="UpdateCheck, Version=0.2.0.35, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\UpdateCheck.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="EmbroideryReaderSettings.cs" />
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="frmSettingsDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSettingsDialog.Designer.cs">
<DependentUpon>frmSettingsDialog.cs</DependentUpon>
</Compile>
<Compile Include="frmTextbox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmTextbox.Designer.cs">
<DependentUpon>frmTextbox.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmMain.resx">
<SubType>Designer</SubType>
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSettingsDialog.resx">
<SubType>Designer</SubType>
<DependentUpon>frmSettingsDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmTextbox.resx">
<SubType>Designer</SubType>
<DependentUpon>frmTextbox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources-2010.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources-2010.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings-2010.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings-2010.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2010.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{91B4187B-F1FB-40AD-BFBA-2DF2790965DB}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryReader</RootNamespace>
<AssemblyName>embroideryReader</AssemblyName>
<ApplicationIcon>icon.ico</ApplicationIcon>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="ErrorReporter">
<HintPath>.\ErrorReporter.dll</HintPath>
</Reference>
<Reference Include="IniFile, Version=1.2.1.11, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\IniFile.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="EmbroideryReaderSettings.cs" />
<Compile Include="EmbroideryReaderUpdates.cs" />
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="frmSettingsDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSettingsDialog.Designer.cs">
<DependentUpon>frmSettingsDialog.cs</DependentUpon>
</Compile>
<Compile Include="frmTextbox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmTextbox.Designer.cs">
<DependentUpon>frmTextbox.cs</DependentUpon>
</Compile>
<Compile Include="GuiResources.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Translation.cs" />
<EmbeddedResource Include="frmMain.resx">
<SubType>Designer</SubType>
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSettingsDialog.resx">
<SubType>Designer</SubType>
<DependentUpon>frmSettingsDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmTextbox.resx">
<SubType>Designer</SubType>
<DependentUpon>frmTextbox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile.csproj">
<Project>{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

Wyświetl plik

@ -49,6 +49,19 @@ namespace embroideryReader
this.rotateLeftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.rotateRightToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.zoomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fitToWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale100ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale90ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale80ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale70ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale60ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale50ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale40ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale30ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale20ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale10ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scale5ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.checkForUpdateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveDebugInfoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -64,6 +77,7 @@ namespace embroideryReader
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.menuStrip1.SuspendLayout();
this.panel2.SuspendLayout();
this.statusStrip1.SuspendLayout();
@ -105,13 +119,13 @@ namespace embroideryReader
this.toolStripSeparator3,
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.openToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.openToolStripMenuItem.Text = "Open...";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
@ -119,20 +133,20 @@ namespace embroideryReader
//
this.saveAsBitmapToolStripMenuItem.Enabled = false;
this.saveAsBitmapToolStripMenuItem.Name = "saveAsBitmapToolStripMenuItem";
this.saveAsBitmapToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.saveAsBitmapToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.saveAsBitmapToolStripMenuItem.Text = "Save as image...";
this.saveAsBitmapToolStripMenuItem.Click += new System.EventHandler(this.saveAsBitmapToolStripMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(163, 6);
this.toolStripSeparator2.Size = new System.Drawing.Size(154, 6);
//
// printToolStripMenuItem
//
this.printToolStripMenuItem.Enabled = false;
this.printToolStripMenuItem.Name = "printToolStripMenuItem";
this.printToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.printToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.printToolStripMenuItem.Text = "Print...";
this.printToolStripMenuItem.Click += new System.EventHandler(this.printToolStripMenuItem_Click);
//
@ -140,19 +154,19 @@ namespace embroideryReader
//
this.printPreviewToolStripMenuItem.Enabled = false;
this.printPreviewToolStripMenuItem.Name = "printPreviewToolStripMenuItem";
this.printPreviewToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.printPreviewToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.printPreviewToolStripMenuItem.Text = "Print Preview...";
this.printPreviewToolStripMenuItem.Click += new System.EventHandler(this.printPreviewToolStripMenuItem_Click);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(163, 6);
this.toolStripSeparator3.Size = new System.Drawing.Size(154, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@ -163,26 +177,26 @@ namespace embroideryReader
this.toolStripSeparator4,
this.preferencesToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
this.editToolStripMenuItem.Text = "Edit";
//
// copyToolStripMenuItem
//
this.copyToolStripMenuItem.Enabled = false;
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.copyToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.copyToolStripMenuItem.Text = "Copy";
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(152, 6);
this.toolStripSeparator4.Size = new System.Drawing.Size(141, 6);
//
// preferencesToolStripMenuItem
//
this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem";
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.preferencesToolStripMenuItem.Text = "Preferences...";
this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.preferencesToolStripMenuItem_Click);
//
@ -191,16 +205,17 @@ namespace embroideryReader
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.rotateLeftToolStripMenuItem,
this.rotateRightToolStripMenuItem,
this.refreshToolStripMenuItem});
this.refreshToolStripMenuItem,
this.zoomToolStripMenuItem});
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(41, 20);
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.viewToolStripMenuItem.Text = "View";
//
// rotateLeftToolStripMenuItem
//
this.rotateLeftToolStripMenuItem.Enabled = false;
this.rotateLeftToolStripMenuItem.Name = "rotateLeftToolStripMenuItem";
this.rotateLeftToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.rotateLeftToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.rotateLeftToolStripMenuItem.Text = "Rotate left";
this.rotateLeftToolStripMenuItem.Click += new System.EventHandler(this.rotateLeftToolStripMenuItem_Click);
//
@ -208,7 +223,7 @@ namespace embroideryReader
//
this.rotateRightToolStripMenuItem.Enabled = false;
this.rotateRightToolStripMenuItem.Name = "rotateRightToolStripMenuItem";
this.rotateRightToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.rotateRightToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.rotateRightToolStripMenuItem.Text = "Rotate right";
this.rotateRightToolStripMenuItem.Click += new System.EventHandler(this.rotateRightToolStripMenuItem_Click);
//
@ -216,10 +231,115 @@ namespace embroideryReader
//
this.refreshToolStripMenuItem.Enabled = false;
this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem";
this.refreshToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.refreshToolStripMenuItem.Text = "Reset";
this.refreshToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.refreshToolStripMenuItem.Text = "Reset / Refresh";
this.refreshToolStripMenuItem.Click += new System.EventHandler(this.refreshToolStripMenuItem_Click);
//
// zoomToolStripMenuItem
//
this.zoomToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fitToWindowToolStripMenuItem,
this.toolStripSeparator5,
this.scale100ToolStripMenuItem,
this.scale90ToolStripMenuItem,
this.scale80ToolStripMenuItem,
this.scale70ToolStripMenuItem,
this.scale60ToolStripMenuItem,
this.scale50ToolStripMenuItem,
this.scale40ToolStripMenuItem,
this.scale30ToolStripMenuItem,
this.scale20ToolStripMenuItem,
this.scale10ToolStripMenuItem,
this.scale5ToolStripMenuItem});
this.zoomToolStripMenuItem.Enabled = false;
this.zoomToolStripMenuItem.Name = "zoomToolStripMenuItem";
this.zoomToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.zoomToolStripMenuItem.Text = "Scale / Zoom";
//
// fitToWindowToolStripMenuItem
//
this.fitToWindowToolStripMenuItem.Name = "fitToWindowToolStripMenuItem";
this.fitToWindowToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.fitToWindowToolStripMenuItem.Text = "Fit to window";
this.fitToWindowToolStripMenuItem.Click += new System.EventHandler(this.fitToWindowToolStripMenuItem_Click);
//
// scale100ToolStripMenuItem
//
this.scale100ToolStripMenuItem.Name = "scale100ToolStripMenuItem";
this.scale100ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale100ToolStripMenuItem.Text = "100%";
this.scale100ToolStripMenuItem.Click += new System.EventHandler(this.scale100ToolStripMenuItem_Click);
//
// scale90ToolStripMenuItem
//
this.scale90ToolStripMenuItem.Name = "scale90ToolStripMenuItem";
this.scale90ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale90ToolStripMenuItem.Text = "90%";
this.scale90ToolStripMenuItem.Click += new System.EventHandler(this.scale90ToolStripMenuItem_Click);
//
// scale80ToolStripMenuItem
//
this.scale80ToolStripMenuItem.Name = "scale80ToolStripMenuItem";
this.scale80ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale80ToolStripMenuItem.Text = "80%";
this.scale80ToolStripMenuItem.Click += new System.EventHandler(this.scale80ToolStripMenuItem_Click);
//
// scale70ToolStripMenuItem
//
this.scale70ToolStripMenuItem.Name = "scale70ToolStripMenuItem";
this.scale70ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale70ToolStripMenuItem.Text = "70%";
this.scale70ToolStripMenuItem.Click += new System.EventHandler(this.scale70ToolStripMenuItem_Click);
//
// scale60ToolStripMenuItem
//
this.scale60ToolStripMenuItem.Name = "scale60ToolStripMenuItem";
this.scale60ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale60ToolStripMenuItem.Text = "60%";
this.scale60ToolStripMenuItem.Click += new System.EventHandler(this.scale60ToolStripMenuItem_Click);
//
// scale50ToolStripMenuItem
//
this.scale50ToolStripMenuItem.Name = "scale50ToolStripMenuItem";
this.scale50ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale50ToolStripMenuItem.Text = "50%";
this.scale50ToolStripMenuItem.Click += new System.EventHandler(this.scale50ToolStripMenuItem_Click);
//
// scale40ToolStripMenuItem
//
this.scale40ToolStripMenuItem.Name = "scale40ToolStripMenuItem";
this.scale40ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale40ToolStripMenuItem.Text = "40%";
this.scale40ToolStripMenuItem.Click += new System.EventHandler(this.scale40ToolStripMenuItem_Click);
//
// scale30ToolStripMenuItem
//
this.scale30ToolStripMenuItem.Name = "scale30ToolStripMenuItem";
this.scale30ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale30ToolStripMenuItem.Text = "30%";
this.scale30ToolStripMenuItem.Click += new System.EventHandler(this.scale30ToolStripMenuItem_Click);
//
// scale20ToolStripMenuItem
//
this.scale20ToolStripMenuItem.Name = "scale20ToolStripMenuItem";
this.scale20ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale20ToolStripMenuItem.Text = "20%";
this.scale20ToolStripMenuItem.Click += new System.EventHandler(this.scale20ToolStripMenuItem_Click);
//
// scale10ToolStripMenuItem
//
this.scale10ToolStripMenuItem.Name = "scale10ToolStripMenuItem";
this.scale10ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale10ToolStripMenuItem.Text = "10%";
this.scale10ToolStripMenuItem.Click += new System.EventHandler(this.scale10ToolStripMenuItem_Click);
//
// scale5ToolStripMenuItem
//
this.scale5ToolStripMenuItem.Name = "scale5ToolStripMenuItem";
this.scale5ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.scale5ToolStripMenuItem.Text = "5%";
this.scale5ToolStripMenuItem.Click += new System.EventHandler(this.scale5ToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -229,13 +349,13 @@ namespace embroideryReader
this.toolStripSeparator1,
this.aboutToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.helpToolStripMenuItem.Text = "Help";
//
// checkForUpdateToolStripMenuItem
//
this.checkForUpdateToolStripMenuItem.Name = "checkForUpdateToolStripMenuItem";
this.checkForUpdateToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.checkForUpdateToolStripMenuItem.Size = new System.Drawing.Size(202, 22);
this.checkForUpdateToolStripMenuItem.Text = "Check for update";
this.checkForUpdateToolStripMenuItem.Click += new System.EventHandler(this.checkForUpdateToolStripMenuItem_Click);
//
@ -243,7 +363,7 @@ namespace embroideryReader
//
this.saveDebugInfoToolStripMenuItem.Enabled = false;
this.saveDebugInfoToolStripMenuItem.Name = "saveDebugInfoToolStripMenuItem";
this.saveDebugInfoToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.saveDebugInfoToolStripMenuItem.Size = new System.Drawing.Size(202, 22);
this.saveDebugInfoToolStripMenuItem.Text = "Save design debug info";
this.saveDebugInfoToolStripMenuItem.Click += new System.EventHandler(this.saveDebugInfoToolStripMenuItem_Click);
//
@ -251,19 +371,19 @@ namespace embroideryReader
//
this.showDebugInfoToolStripMenuItem.Enabled = false;
this.showDebugInfoToolStripMenuItem.Name = "showDebugInfoToolStripMenuItem";
this.showDebugInfoToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.showDebugInfoToolStripMenuItem.Size = new System.Drawing.Size(202, 22);
this.showDebugInfoToolStripMenuItem.Text = "Show design debug info";
this.showDebugInfoToolStripMenuItem.Click += new System.EventHandler(this.showDebugInfoToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(196, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(199, 6);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(202, 22);
this.aboutToolStripMenuItem.Text = "About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
@ -276,6 +396,7 @@ namespace embroideryReader
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(572, 332);
this.panel2.TabIndex = 10;
this.panel2.Resize += new System.EventHandler(this.panel2_Resize);
//
// statusStrip1
//
@ -323,6 +444,11 @@ namespace embroideryReader
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(149, 6);
//
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -335,8 +461,9 @@ namespace embroideryReader
this.MainMenuStrip = this.menuStrip1;
this.Name = "frmMain";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.ResizeEnd += new System.EventHandler(this.frmMain_ResizeEnd);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.panel2.ResumeLayout(false);
@ -383,6 +510,20 @@ namespace embroideryReader
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.ToolStripMenuItem zoomToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fitToWindowToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale100ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale90ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale80ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale70ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale60ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale50ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale40ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale30ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale20ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale10ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem scale5ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
}
}

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -24,14 +24,11 @@ You can contact me at http://www.njcrawford.com/contact
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
namespace embroideryReader
{
@ -45,6 +42,13 @@ namespace embroideryReader
private const String APP_TITLE = "Embroidery Reader";
private Translation translation;
private float designScale = 1.0f;
private Size panel2LastUpdateSize;
private bool maximizeChanged = false;
private int designRotation = 0;
private string loadedFileName = "";
public frmMain()
{
@ -52,24 +56,77 @@ namespace embroideryReader
args = Environment.GetCommandLineArgs();
}
private void checkSettings()
private void LoadSettings(bool reload)
{
this.BackColor = settings.backgroundColor;
this.Width = settings.windowWidth;
this.Height = settings.windowHeight;
if (settings.backgroundColorEnabled)
{
panel2.BackColor = settings.backgroundColor;
}
else
{
panel2.BackColor = Color.FromKnownColor(KnownColor.Control);
}
if (!reload)
{
if (settings.windowMaximized)
{
// Check maximized first
this.WindowState = FormWindowState.Maximized;
}
else
{
// Not maximized, restore last saved window size
this.Width = settings.windowWidth;
this.Height = settings.windowHeight;
}
}
SetDesignScaleSetting(1.0f, settings.AutoScaleDesign, false);
}
private void Form1_Load(object sender, EventArgs e)
{
checkSettings();
// Set app window title
this.Text = APP_TITLE;
// Load and check settings
LoadSettings(false);
// Load translation
LoadTranslatedStrings(settings.translation);
// Load design, if specified
if (args.Length > 1)
{
openFile(args[1]);
OpenFile(args[1]);
}
}
public static bool checkColorFromStrings(string red, string green, string blue)
// WndProc values
// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms646360(v=vs.85).aspx for more info
const int WM_SYSCOMMAND = 0x0112;
const int SC_MAXIMIZE = 0xF030;
const int SC_MINIMIZE = 0xF020;
const int SC_RESTORE = 0xF120;
const int SC_WPARAM_MASK = 0xFFF0;
// Override WndProc to capture maximize and restore events
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_SYSCOMMAND)
{
// Check your window state here
int maskedWParam = m.WParam.ToInt32() & SC_WPARAM_MASK;
if (maskedWParam == SC_MAXIMIZE ||
maskedWParam == SC_MINIMIZE ||
maskedWParam == SC_RESTORE)
{
maximizeChanged = true;
}
}
base.WndProc(ref m);
}
public static bool CheckColorFromStrings(string red, string green, string blue)
{
byte redByte;
byte greenByte;
@ -88,20 +145,21 @@ namespace embroideryReader
blueByte = Convert.ToByte(blue);
retval = true;
}
catch (Exception ex)
catch (FormatException /* ex */)
{
retval = false;
}
catch (OverflowException /* ex */)
{
#if DEBUG
Console.WriteLine(ex.Message);
#endif
retval = false;
}
}
return retval;
}
public static Color makeColorFromStrings(string red, string green, string blue)
public static Color MakeColorFromStrings(string red, string green, string blue)
{
if (checkColorFromStrings(red, green, blue))
if (CheckColorFromStrings(red, green, blue))
{
return Color.FromArgb(Convert.ToByte(red), Convert.ToByte(green), Convert.ToByte(blue));
}
@ -111,34 +169,186 @@ namespace embroideryReader
}
}
private void openFile(string filename)
private void UpdateDesignImage()
{
if(design == null)
{
// No design loaded - nothing to update
return;
}
// Assume 96 DPI until we can come up with a better way to calculate it
float screenDPI = 96;
Bitmap tempImage = design.DesignToBitmap((float)settings.threadThickness, (settings.filterStiches), settings.filterStitchesThreshold, (screenDPI / design.NativeDPI));
// Rotate image
switch (designRotation)
{
case 90:
tempImage.RotateFlip(RotateFlipType.Rotate90FlipNone);
break;
case 180:
tempImage.RotateFlip(RotateFlipType.Rotate180FlipNone);
break;
case 270:
tempImage.RotateFlip(RotateFlipType.Rotate270FlipNone);
break;
}
// Scale image
if (fitToWindowToolStripMenuItem.Checked)
{
// Calculate size of image based on available drawing area
float windowWidth = panel2.Width - 3;
float windowHeight = panel2.Height - 3;
// Figure out which dimension is more constrained
float widthScale = windowWidth / tempImage.Width;
float heightScale = windowHeight / tempImage.Height;
if (widthScale < heightScale)
{
designScale = widthScale;
}
else
{
designScale = heightScale;
}
}
int width = (int)(tempImage.Width * designScale);
int height = (int)(tempImage.Height * designScale);
if (width < 1 || height < 1)
{
// Image area is too small to update
return;
}
if (width != tempImage.Width || height != tempImage.Height)
{
// Scale image code from http://stackoverflow.com/questions/1922040/resize-an-image-c-sharp
Rectangle destRect = new Rectangle(0, 0, width, height);
Bitmap scaledImage = new Bitmap(width, height);
scaledImage.SetResolution(tempImage.HorizontalResolution, tempImage.VerticalResolution);
using (var graphics = Graphics.FromImage(scaledImage))
{
graphics.CompositingMode = CompositingMode.SourceCopy;
graphics.CompositingQuality = CompositingQuality.HighQuality;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
using (var wrapMode = new ImageAttributes())
{
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
graphics.DrawImage(tempImage, destRect, 0, 0, tempImage.Width, tempImage.Height, GraphicsUnit.Pixel, wrapMode);
}
}
// Keep the scaled image and dispose the intermediate image
tempImage.Dispose();
tempImage = scaledImage;
}
// About to abandon the current DrawArea object, dispose it now
if(DrawArea != null)
{
DrawArea.Dispose();
DrawArea = null;
}
// Add transparency grid
if (settings.transparencyGridEnabled)
{
DrawArea = new Bitmap(tempImage.Width, tempImage.Height);
using (Graphics g = Graphics.FromImage(DrawArea))
{
Color gridColor = settings.transparencyGridColor;
using (Pen gridPen = new Pen(gridColor))
{
int gridSize = settings.transparencyGridSize;
for (int xStart = 0; (xStart * gridSize) < DrawArea.Width; xStart++)
{
for (int yStart = 0; (yStart * gridSize) < DrawArea.Height; yStart++)
{
// Fill even columns in even rows and odd columns in odd rows
if ((xStart % 2) == (yStart % 2))
{
g.FillRectangle(gridPen.Brush, (xStart * gridSize), (yStart * gridSize), gridSize, gridSize);
}
}
}
}
g.DrawImage(tempImage, 0, 0);
// Done with tempImage
tempImage.Dispose();
tempImage = null;
}
}
else
{
// Keeping the object tempImage was pointing at, so don't dispose it
DrawArea = tempImage;
}
panel1.Width = DrawArea.Width;
panel1.Height = DrawArea.Height;
panel1.Invalidate();
panel2LastUpdateSize = panel2.Size;
// Update window title
this.Text = System.IO.Path.GetFileName(loadedFileName) + " (" + (designScale * 100).ToString("0") + "%) - " + APP_TITLE;
}
private void OpenFile(string filename)
{
if (!System.IO.File.Exists(filename))
{
// "An error occured while reading the file:"
MessageBox.Show(Translation.StringID.ERROR_FILE + Environment.NewLine + "File \"" + filename + "\" does not exist", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
design = new PesFile.PesFile(filename);
if (design.getStatus() == PesFile.statusEnum.Ready)
try
{
this.Text = System.IO.Path.GetFileName(filename) + " - " + APP_TITLE;
design = new PesFile.PesFile(filename);
}
catch(System.IO.IOException ioex)
{
// "An error occured while reading the file:"
MessageBox.Show(Translation.StringID.ERROR_FILE + Environment.NewLine + filename + ":" + Environment.NewLine + ioex.Message, "IOException", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
design = null;
}
catch(PesFile.PECFormatException pecex)
{
// "This file is either corrupt or not a valid PES file."
MessageBox.Show(Translation.StringID.ERROR_FILE + Environment.NewLine + filename + ":" + Environment.NewLine + pecex.Message, "PECFormatException", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
design = null;
}
DrawArea = design.designToBitmap((float)settings.threadThickness, (settings.filterStiches), (int)settings.filterStitchesThreshold);
panel1.Width = design.GetWidth() + (int)(settings.threadThickness * 2);
panel1.Height = design.GetHeight() + (int)(settings.threadThickness * 2);
panel1.Invalidate();
loadedFileName = filename;
if (design != null)
{
UpdateDesignImage();
if (design.getFormatWarning())
if (design.GetFormatWarning())
{
toolStripStatusLabel1.Text = "The format of this file is not completely supported";
toolStripStatusLabel1.Text = translation.GetTranslatedString(Translation.StringID.UNSUPPORTED_FORMAT); // "The format of this file is not completely supported";
}
else if (design.getColorWarning())
else if (design.GetColorWarning())
{
toolStripStatusLabel1.Text = "Colors shown for this design may be inaccurate";
toolStripStatusLabel1.Text = translation.GetTranslatedString(Translation.StringID.COLOR_WARNING); // "Colors shown for this design may be inaccurate"
}
else
{
toolStripStatusLabel1.Text = "";
}
copyToolStripMenuItem.Enabled = true;
saveDebugInfoToolStripMenuItem.Enabled = true;
printPreviewToolStripMenuItem.Enabled = true;
@ -146,18 +356,13 @@ namespace embroideryReader
rotateLeftToolStripMenuItem.Enabled = true;
rotateRightToolStripMenuItem.Enabled = true;
refreshToolStripMenuItem.Enabled = true;
zoomToolStripMenuItem.Enabled = true;
showDebugInfoToolStripMenuItem.Enabled = true;
saveAsBitmapToolStripMenuItem.Enabled = true;
panel2.Select();
}
else
{
string message = "An error occured while reading the file:" + Environment.NewLine + design.getLastError();
if (design.getStatus() == PesFile.statusEnum.ParseError)
{
message += Environment.NewLine + "This file is either corrupt or not a valid PES file.";
}
MessageBox.Show(message);
copyToolStripMenuItem.Enabled = false;
saveDebugInfoToolStripMenuItem.Enabled = false;
printPreviewToolStripMenuItem.Enabled = false;
@ -178,7 +383,8 @@ namespace embroideryReader
openFileDialog1.InitialDirectory = settings.lastOpenFileFolder;
}
openFileDialog1.FileName = "";
openFileDialog1.Filter = "Embroidery Files (*.pes)|*.pes|All Files (*.*)|*.*";
openFileDialog1.Filter = translation.GetTranslatedString(Translation.StringID.FILE_TYPE_PES) + " (*.pes)|*.pes|" + // "Embroidery Files (*.pes)|*.pes|
translation.GetTranslatedString(Translation.StringID.FILE_TYPE_ALL) + " (*.*)|*.*"; // All Files (*.*)|*.*";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
filename = openFileDialog1.FileName;
@ -189,7 +395,7 @@ namespace embroideryReader
else
{
settings.lastOpenFileFolder = System.IO.Path.GetDirectoryName(filename);
openFile(filename);
OpenFile(filename);
}
}
}
@ -209,21 +415,32 @@ namespace embroideryReader
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("EmbroideryReader version " + currentVersion() + ". This program reads and displays embroidery designs from .PES files.");
string message = String.Format(translation.GetTranslatedString(Translation.StringID.ABOUT_MESSAGE), CurrentVersion()); // "EmbroideryReader version " + currentVersion() + ". This program reads and displays embroidery designs from .PES files."
//message += Environment.NewLine;
//message += Environment.NewLine + "GUI GDI count: " + GuiResources.GetGuiResourcesGDICount();
//message += Environment.NewLine + "GUI USER count: " + GuiResources.GetGuiResourcesUserCount();
//message += Environment.NewLine + ".Net framework version: " + Environment.Version;
MessageBox.Show(message);
}
private void checkForUpdateToolStripMenuItem_Click(object sender, EventArgs e)
{
NJCrawford.UpdateCheck updater = new NJCrawford.UpdateCheck(settings.updateLocation, null, null);
EmbroideryReaderUpdates updater = new EmbroideryReaderUpdates(settings.updateLocation, null, null);
updater.waitForInfo();
if (updater.GetLastError() != "")
{
MessageBox.Show("Encountered an error while checking for updates: " + updater.GetLastError());
MessageBox.Show(translation.GetTranslatedString(Translation.StringID.ERROR_UPDATE) + // "Encountered an error while checking for updates: "
updater.GetLastError());
}
else if (updater.IsUpdateAvailable())
{
if (MessageBox.Show("Version " + updater.VersionAvailable() + " was released on " + updater.getReleaseDate().ToShortDateString() + "." + Environment.NewLine + "You have version " + currentVersion() + ". Would you like to go to the Embroidery Reader website to download or find out more about the new version?", "New version available", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
if (MessageBox.Show(String.Format(translation.GetTranslatedString(Translation.StringID.NEW_VERSION_MESSAGE),
updater.VersionAvailable(), updater.getReleaseDate().ToShortDateString(), CurrentVersion()) + // "Version " + updater.VersionAvailable() + " was released on " + updater.getReleaseDate().ToShortDateString() + ". You have version " + currentVersion() + "."
Environment.NewLine +
translation.GetTranslatedString(Translation.StringID.NEW_VERSION_QUESTION), // "Would you like to go to the Embroidery Reader website to download or find out more about the new version?",
translation.GetTranslatedString(Translation.StringID.NEW_VERSION_TITLE), // "New version available",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
try
{
@ -231,25 +448,52 @@ namespace embroideryReader
}
catch (Exception ex)
{
MessageBox.Show("An error occured while trying to open the webpage:" + Environment.NewLine + ex.ToString());
MessageBox.Show(translation.GetTranslatedString(Translation.StringID.ERROR_WEBPAGE) + // "An error occured while trying to open the webpage:"
Environment.NewLine + ex.ToString());
}
}
}
else
{
MessageBox.Show("No updates are available right now." + Environment.NewLine + "(Latest version is " + updater.VersionAvailable() + ", you have version " + currentVersion() + ")");
MessageBox.Show(translation.GetTranslatedString(Translation.StringID.NO_UPDATE) + // "No updates are available right now."
Environment.NewLine +
String.Format(translation.GetTranslatedString(Translation.StringID.LATEST_VERSION),
updater.VersionAvailable(), CurrentVersion())); // "(Latest version is " + updater.VersionAvailable() + ", you have version " + currentVersion() + ")");
}
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
settings.windowWidth = this.Width;
settings.windowHeight = this.Height;
settings.save();
if (this.WindowState == FormWindowState.Maximized)
{
settings.windowMaximized = true;
}
else
{
settings.windowMaximized = false;
if (this.WindowState == FormWindowState.Normal)
{
// If window is not minimized or maximized, save current size
settings.windowWidth = this.Width;
settings.windowHeight = this.Height;
}
}
try
{
settings.save();
}
catch (System.IO.IOException /*ioex*/)
{
// Ignore IO exceptions when saving settings file, to deal with crashes caused by
// closing many windows at once.
// This isn't a great way to handle the problem, but it's better than getting
// the same automated error report over and over.
}
}
private string currentVersion()
private string CurrentVersion()
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
@ -260,16 +504,19 @@ namespace embroideryReader
{
try
{
design.saveDebugInfo();
string debugFile = design.SaveDebugInfo();
MessageBox.Show(String.Format(translation.GetTranslatedString(Translation.StringID.DEBUG_INFO_SAVED), // "Saved debug info to " + debugFile
debugFile));
}
catch (Exception ex)
{
MessageBox.Show("There was an error while saving debug info:" + Environment.NewLine + ex.ToString());
MessageBox.Show(translation.GetTranslatedString(Translation.StringID.ERROR_DEBUG) + // "There was an error while saving debug info:"
Environment.NewLine + ex.ToString());
}
}
else
{
MessageBox.Show("No design loaded.");
MessageBox.Show(translation.GetTranslatedString(Translation.StringID.NO_DESIGN)); // "No design loaded."
}
}
@ -277,11 +524,14 @@ namespace embroideryReader
{
frmSettingsDialog tempForm = new frmSettingsDialog();
tempForm.settingsToModify = settings;
tempForm.setTranslation = translation;
if (tempForm.ShowDialog() == DialogResult.OK)
{
settings = tempForm.settingsToModify;
checkSettings();
LoadSettings(true);
UpdateDesignImage();
}
LoadTranslatedStrings(settings.translation);
}
private void printToolStripMenuItem_Click(object sender, EventArgs e)
@ -294,21 +544,49 @@ namespace embroideryReader
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
if (DrawArea != null)
if (design != null)
{
float dpiX = 100;
float dpiY = 100;
double inchesPerMM = 0.03937007874015748031496062992126;
e.Graphics.ScaleTransform((float)(dpiX * inchesPerMM * 0.1), (float)(dpiY * inchesPerMM * 0.1));
// Note: scaling based on reported printer DPI may produce terrible results in some
// cases. The reported DPI can even be a negative number, which indicates a general print
// quality. So, future self, for the sake of your sanity... just don't do it. :-)
// See https://msdn.microsoft.com/en-us/library/system.drawing.printing.printerresolution.x(v=vs.110).aspx
// for more detail.
e.Graphics.DrawImage(DrawArea, 30, 30);
// Calculate scale values for print graphics object (100 dpi seems to be the default
// for the printer graphics object)
double graphicsXScaleFactor = (100.0 / design.NativeDPI);
double graphicsYScaleFactor = (100.0 / design.NativeDPI);
// Check for scale out of range
if(graphicsXScaleFactor < 0.001 || graphicsXScaleFactor > 100.0)
{
throw new ArgumentOutOfRangeException("Print X graphics scale is '" + graphicsXScaleFactor + "', expected range is 0.001 - 100.0");
}
if (graphicsYScaleFactor < 0.001 || graphicsYScaleFactor > 100.0)
{
throw new ArgumentOutOfRangeException("Print Y graphics scale is '" + graphicsYScaleFactor + "', expected range is 0.001 - 100.0");
}
// Set print graphics object scale and draw the image
e.Graphics.ScaleTransform((float)graphicsXScaleFactor, (float)graphicsYScaleFactor);
using (Bitmap tempDrawArea = design.DesignToBitmap((float)settings.threadThickness, settings.filterStiches, settings.filterStitchesThreshold, 1.0f))
{
e.Graphics.DrawImage(tempDrawArea, 30, 30);
}
}
}
private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e)
{
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();
try
{
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();
}
catch(System.Drawing.Printing.InvalidPrinterException pex)
{
MessageBox.Show("Unable to find a default printer: " + pex.Message + Environment.NewLine + Environment.NewLine + "Possible reasons include: no printers are installed, or no printer is set as the default.");
}
}
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
@ -316,69 +594,42 @@ namespace embroideryReader
if (DrawArea != null)
{
Clipboard.Clear();
Bitmap temp = new Bitmap(DrawArea.Width, DrawArea.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Graphics tempGraph = Graphics.FromImage(temp);
tempGraph.FillRectangle(Brushes.White, 0, 0, temp.Width, temp.Height);
tempGraph.DrawImageUnscaled(DrawArea, 0, 0);
tempGraph.Dispose();
Clipboard.SetImage(temp);
using (Bitmap temp = new Bitmap(DrawArea.Width, DrawArea.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb))
{
using (Graphics tempGraph = Graphics.FromImage(temp))
{
tempGraph.FillRectangle(Brushes.White, 0, 0, temp.Width, temp.Height);
tempGraph.DrawImageUnscaled(DrawArea, 0, 0);
}
Clipboard.SetImage(temp);
}
}
}
private void refreshToolStripMenuItem_Click(object sender, EventArgs e)
{
if (design != null && design.getStatus() == PesFile.statusEnum.Ready)
{
DrawArea = design.designToBitmap((float)settings.threadThickness, (settings.filterStiches), (int)settings.filterStitchesThreshold);
panel1.Width = design.GetWidth() + (int)(settings.threadThickness * 2);
panel1.Height = design.GetHeight() + (int)(settings.threadThickness * 2);
panel1.Invalidate();
if (design.getClassWarning())
{
toolStripStatusLabel1.Text = "This file contains a class that is not yet supported";
}
else if (design.getFormatWarning())
{
toolStripStatusLabel1.Text = "The format of this file is not completely supported";
}
else if (design.getColorWarning())
{
toolStripStatusLabel1.Text = "Colors shown for this design may be inaccurate";
}
else
{
toolStripStatusLabel1.Text = "";
}
}
designRotation = 0;
UpdateDesignImage();
}
private void rotateLeftToolStripMenuItem_Click(object sender, EventArgs e)
{
Bitmap temp = new Bitmap(DrawArea.Height, DrawArea.Width);
Graphics g = Graphics.FromImage(temp);
g.RotateTransform(270.0f);
g.DrawImage(DrawArea, -DrawArea.Width, 0);
g.Dispose();
DrawArea = temp;
int temp2 = panel1.Width;
panel1.Width = panel1.Height;
panel1.Height = temp2;
panel1.Invalidate();
designRotation -= 90;
if(designRotation < 0)
{
designRotation += 360;
}
UpdateDesignImage();
}
private void rotateRightToolStripMenuItem_Click(object sender, EventArgs e)
{
Bitmap temp = new Bitmap(DrawArea.Height, DrawArea.Width);
Graphics g = Graphics.FromImage(temp);
g.RotateTransform(90.0f);
g.DrawImage(DrawArea, 0, -DrawArea.Height);
g.Dispose();
DrawArea = temp;
int temp2 = panel1.Width;
panel1.Width = panel1.Height;
panel1.Height = temp2;
panel1.Invalidate();
designRotation += 90;
if (designRotation >= 360)
{
designRotation -= 360;
}
UpdateDesignImage();
}
private void showDebugInfoToolStripMenuItem_Click(object sender, EventArgs e)
@ -388,16 +639,17 @@ namespace embroideryReader
try
{
frmTextbox theform = new frmTextbox();
theform.showText(design.getDebugInfo());
theform.showText(design.GetDebugInfo());
}
catch (Exception ex)
{
MessageBox.Show("There was an error while saving debug info:" + Environment.NewLine + ex.ToString());
MessageBox.Show(translation.GetTranslatedString(Translation.StringID.ERROR_DEBUG) + // "There was an error while saving debug info:"
Environment.NewLine + ex.ToString());
}
}
else
{
MessageBox.Show("No design loaded.");
MessageBox.Show(translation.GetTranslatedString(Translation.StringID.NO_DESIGN)); // "No design loaded."
}
}
@ -405,40 +657,48 @@ namespace embroideryReader
{
if (DrawArea != null)
{
Bitmap temp = new Bitmap(DrawArea.Width, DrawArea.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Graphics tempGraph = Graphics.FromImage(temp);
tempGraph.FillRectangle(Brushes.White, 0, 0, temp.Width, temp.Height);
tempGraph.DrawImageUnscaled(DrawArea, 0, 0);
tempGraph.Dispose();
saveFileDialog1.FileName = "";
saveFileDialog1.Filter = "Bitmap (*.bmp)|*.bmp|PNG (*.png)|*.png|JPEG (*.jpg)|*.jpg|GIF (*.gif)|*.gif|TIFF (*.tif)|*.tif|All Files (*.*)|*.*";
if (settings.lastSaveImageLocation != null)
using (Bitmap temp = new Bitmap(DrawArea.Width, DrawArea.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb))
{
saveFileDialog1.InitialDirectory = settings.lastSaveImageLocation;
}
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
string filename = "";
filename = saveFileDialog1.FileName;
System.Drawing.Imaging.ImageFormat format;
switch (System.IO.Path.GetExtension(filename).ToLower())
using (Graphics tempGraph = Graphics.FromImage(temp))
{
case ".bmp": format = System.Drawing.Imaging.ImageFormat.Bmp; break;
case ".png": format = System.Drawing.Imaging.ImageFormat.Png; break;
case ".jpg": format = System.Drawing.Imaging.ImageFormat.Jpeg; break;
case ".gif": format = System.Drawing.Imaging.ImageFormat.Gif; break;
case ".tif": format = System.Drawing.Imaging.ImageFormat.Tiff; break;
default: format = System.Drawing.Imaging.ImageFormat.Bmp; break;
tempGraph.FillRectangle(Brushes.White, 0, 0, temp.Width, temp.Height);
tempGraph.DrawImageUnscaled(DrawArea, 0, 0);
}
saveFileDialog1.FileName = "";
// "Bitmap (*.bmp)|*.bmp|PNG (*.png)|*.png|JPEG (*.jpg)|*.jpg|GIF (*.gif)|*.gif|TIFF (*.tif)|*.tif|All Files (*.*)|*.*"
saveFileDialog1.Filter = translation.GetTranslatedString(Translation.StringID.FILE_TYPE_BMP) + " (*.bmp)|*.bmp|" +
translation.GetTranslatedString(Translation.StringID.FILE_TYPE_PNG) + " (*.png)|*.png|" +
translation.GetTranslatedString(Translation.StringID.FILE_TYPE_JPG) + " (*.jpg)|*.jpg|" +
translation.GetTranslatedString(Translation.StringID.FILE_TYPE_GIF) + " (*.gif)|*.gif|" +
translation.GetTranslatedString(Translation.StringID.FILE_TYPE_TIFF) + " (*.tif)|*.tif|" +
translation.GetTranslatedString(Translation.StringID.FILE_TYPE_ALL) + " (*.*)|*.*";
if (settings.lastSaveImageLocation != null)
{
saveFileDialog1.InitialDirectory = settings.lastSaveImageLocation;
}
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
string filename = "";
filename = saveFileDialog1.FileName;
System.Drawing.Imaging.ImageFormat format;
switch (System.IO.Path.GetExtension(filename).ToLower())
{
case ".bmp": format = System.Drawing.Imaging.ImageFormat.Bmp; break;
case ".png": format = System.Drawing.Imaging.ImageFormat.Png; break;
case ".jpg": format = System.Drawing.Imaging.ImageFormat.Jpeg; break;
case ".gif": format = System.Drawing.Imaging.ImageFormat.Gif; break;
case ".tif": format = System.Drawing.Imaging.ImageFormat.Tiff; break;
default: format = System.Drawing.Imaging.ImageFormat.Bmp; break;
}
temp.Save(filename, format);
ShowStatus(translation.GetTranslatedString(Translation.StringID.IMAGE_SAVED), 5000); // "Image saved"
settings.lastSaveImageLocation = System.IO.Path.GetDirectoryName(filename);
}
temp.Save(filename, format);
showStatus("Image saved", 5000);
settings.lastSaveImageLocation = System.IO.Path.GetDirectoryName(filename);
}
}
}
private void showStatus(string text, int msec)
private void ShowStatus(string text, int msec)
{
toolStripStatusLabel2.Text = text;
timer1.Interval = msec;
@ -449,5 +709,149 @@ namespace embroideryReader
{
toolStripStatusLabel2.Text = "";
}
private void LoadTranslatedStrings(String translationName)
{
translation = new Translation(translationName);
// File menu
fileToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_FILE);
openToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_OPEN);
saveAsBitmapToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_SAVE_IMAGE);
printToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_PRINT);
printPreviewToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_PRINT_PREVIEW);
exitToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_EXIT);
// Edit menu
editToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_EDIT);
copyToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_COPY);
preferencesToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_PREFS);
// View menu
viewToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_VIEW);
rotateLeftToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.ROTATE_LEFT);
rotateRightToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.ROTATE_RIGHT);
refreshToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_RESET);
zoomToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_SCALE_ZOOM);
fitToWindowToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_FIT_TO_WINDOW);
// Help menu
helpToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_HELP);
checkForUpdateToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.CHECK_UPDATE);
saveDebugInfoToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.SAVE_DEBUG);
showDebugInfoToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.SHOW_DEBUG);
aboutToolStripMenuItem.Text = translation.GetTranslatedString(Translation.StringID.MENU_ABOUT);
}
private void SetDesignScaleSetting(float scale, bool autoSize, bool updateDesign)
{
if(autoSize)
{
fitToWindowToolStripMenuItem.Checked = true;
settings.AutoScaleDesign = true;
}
else
{
fitToWindowToolStripMenuItem.Checked = false;
settings.AutoScaleDesign = false;
designScale = scale;
}
if (updateDesign)
{
UpdateDesignImage();
}
}
private void scale100ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(1.0f, false, true);
}
private void scale90ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.9f, false, true);
}
private void scale80ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.8f, false, true);
}
private void scale70ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.7f, false, true);
}
private void scale60ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.6f, false, true);
}
private void scale50ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.5f, false, true);
}
private void scale40ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.4f, false, true);
}
private void scale30ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.3f, false, true);
}
private void scale20ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.2f, false, true);
}
private void scale10ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.1f, false, true);
}
private void scale5ToolStripMenuItem_Click(object sender, EventArgs e)
{
SetDesignScaleSetting(0.05f, false, true);
}
private void fitToWindowToolStripMenuItem_Click(object sender, EventArgs e)
{
// Toggle checked state
fitToWindowToolStripMenuItem.Checked = !fitToWindowToolStripMenuItem.Checked;
// Update design
SetDesignScaleSetting(1.0f, fitToWindowToolStripMenuItem.Checked, true);
}
private void frmMain_ResizeEnd(object sender, EventArgs e)
{
// Finished resize, update design scale if set to fit-to-window.
// This event also captures window move events, so check if the size
// of panel2 has changed to see if it's really a resize event.
if (fitToWindowToolStripMenuItem.Checked && panel2LastUpdateSize != panel2.Size)
{
UpdateDesignImage();
}
}
private void panel2_Resize(object sender, EventArgs e)
{
// This event is the one we really want, but it fires much too
// frequently during a resize event. So, let ReziseEnd handle most
// of the cases and only process this after a window maximize or
// restore.
if(maximizeChanged)
{
maximizeChanged = false;
if (fitToWindowToolStripMenuItem.Checked)
{
UpdateDesignImage();
}
}
}
}
}

Wyświetl plik

@ -28,28 +28,43 @@ namespace embroideryReader
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSettingsDialog));
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.btnColor = new System.Windows.Forms.Button();
this.lblColor = new System.Windows.Forms.Label();
this.btnResetColor = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.lblThreadThickness = new System.Windows.Forms.Label();
this.txtThreadThickness = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chkUglyStitches = new System.Windows.Forms.CheckBox();
this.lblPixelThick = new System.Windows.Forms.Label();
this.grpBackground = new System.Windows.Forms.GroupBox();
this.txtGridSize = new System.Windows.Forms.TextBox();
this.lblGridSizePixels = new System.Windows.Forms.Label();
this.lblGridSize = new System.Windows.Forms.Label();
this.btnResetGridColor = new System.Windows.Forms.Button();
this.btnGridColor = new System.Windows.Forms.Button();
this.pnlBackground = new System.Windows.Forms.Panel();
this.lblBackgroundColor = new System.Windows.Forms.Label();
this.chkDrawGrid = new System.Windows.Forms.CheckBox();
this.grpStitch = new System.Windows.Forms.GroupBox();
this.lblUglyLength = new System.Windows.Forms.Label();
this.lblPixelLength = new System.Windows.Forms.Label();
this.txtThreshold = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.chkUglyStitches = new System.Windows.Forms.CheckBox();
this.cmbLanguage = new System.Windows.Forms.ComboBox();
this.grpLanguage = new System.Windows.Forms.GroupBox();
this.lblIncompleteTranslation = new System.Windows.Forms.Label();
this.grpTranparencyGrid = new System.Windows.Forms.GroupBox();
this.grpBackground.SuspendLayout();
this.pnlBackground.SuspendLayout();
this.grpStitch.SuspendLayout();
this.grpLanguage.SuspendLayout();
this.grpTranparencyGrid.SuspendLayout();
this.SuspendLayout();
//
// btnColor
//
this.btnColor.Location = new System.Drawing.Point(171, 16);
this.btnColor.Location = new System.Drawing.Point(200, 19);
this.btnColor.Name = "btnColor";
this.btnColor.Size = new System.Drawing.Size(75, 23);
this.btnColor.TabIndex = 0;
@ -57,19 +72,9 @@ namespace embroideryReader
this.btnColor.UseVisualStyleBackColor = true;
this.btnColor.Click += new System.EventHandler(this.btnColor_Click);
//
// lblColor
//
this.lblColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblColor.Location = new System.Drawing.Point(6, 16);
this.lblColor.Name = "lblColor";
this.lblColor.Size = new System.Drawing.Size(130, 52);
this.lblColor.TabIndex = 1;
this.lblColor.Text = "Background Color";
this.lblColor.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnResetColor
//
this.btnResetColor.Location = new System.Drawing.Point(171, 45);
this.btnResetColor.Location = new System.Drawing.Point(200, 48);
this.btnResetColor.Name = "btnResetColor";
this.btnResetColor.Size = new System.Drawing.Size(75, 23);
this.btnResetColor.TabIndex = 2;
@ -80,7 +85,7 @@ namespace embroideryReader
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(171, 190);
this.btnOK.Location = new System.Drawing.Point(137, 327);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 3;
@ -91,7 +96,7 @@ namespace embroideryReader
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(252, 190);
this.btnCancel.Location = new System.Drawing.Point(218, 327);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 4;
@ -99,14 +104,14 @@ namespace embroideryReader
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// label1
// lblThreadThickness
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(6, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(92, 13);
this.label1.TabIndex = 5;
this.label1.Text = "Thread thickness:";
this.lblThreadThickness.AutoSize = true;
this.lblThreadThickness.Location = new System.Drawing.Point(6, 16);
this.lblThreadThickness.Name = "lblThreadThickness";
this.lblThreadThickness.Size = new System.Drawing.Size(92, 13);
this.lblThreadThickness.TabIndex = 5;
this.lblThreadThickness.Text = "Thread thickness:";
//
// txtThreadThickness
//
@ -115,42 +120,146 @@ namespace embroideryReader
this.txtThreadThickness.Size = new System.Drawing.Size(32, 20);
this.txtThreadThickness.TabIndex = 6;
//
// label2
// lblPixelThick
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(142, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(33, 13);
this.label2.TabIndex = 7;
this.label2.Text = "pixels";
this.lblPixelThick.AutoSize = true;
this.lblPixelThick.Location = new System.Drawing.Point(142, 16);
this.lblPixelThick.Name = "lblPixelThick";
this.lblPixelThick.Size = new System.Drawing.Size(33, 13);
this.lblPixelThick.TabIndex = 7;
this.lblPixelThick.Text = "pixels";
//
// groupBox1
// grpBackground
//
this.groupBox1.Controls.Add(this.lblColor);
this.groupBox1.Controls.Add(this.btnColor);
this.groupBox1.Controls.Add(this.btnResetColor);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(315, 79);
this.groupBox1.TabIndex = 8;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Background";
this.grpBackground.Controls.Add(this.grpTranparencyGrid);
this.grpBackground.Controls.Add(this.pnlBackground);
this.grpBackground.Controls.Add(this.btnColor);
this.grpBackground.Controls.Add(this.btnResetColor);
this.grpBackground.Location = new System.Drawing.Point(12, 12);
this.grpBackground.Name = "grpBackground";
this.grpBackground.Size = new System.Drawing.Size(281, 155);
this.grpBackground.TabIndex = 8;
this.grpBackground.TabStop = false;
this.grpBackground.Text = "Background";
//
// groupBox2
// txtGridSize
//
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.txtThreshold);
this.groupBox2.Controls.Add(this.chkUglyStitches);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.txtThreadThickness);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Location = new System.Drawing.Point(12, 97);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(315, 87);
this.groupBox2.TabIndex = 3;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Stitch drawing";
this.txtGridSize.Location = new System.Drawing.Point(64, 42);
this.txtGridSize.Name = "txtGridSize";
this.txtGridSize.Size = new System.Drawing.Size(32, 20);
this.txtGridSize.TabIndex = 18;
this.txtGridSize.TextChanged += new System.EventHandler(this.txtGridSize_TextChanged);
//
// lblGridSizePixels
//
this.lblGridSizePixels.AutoSize = true;
this.lblGridSizePixels.Location = new System.Drawing.Point(102, 45);
this.lblGridSizePixels.Name = "lblGridSizePixels";
this.lblGridSizePixels.Size = new System.Drawing.Size(33, 13);
this.lblGridSizePixels.TabIndex = 17;
this.lblGridSizePixels.Text = "pixels";
//
// lblGridSize
//
this.lblGridSize.AutoSize = true;
this.lblGridSize.Location = new System.Drawing.Point(6, 45);
this.lblGridSize.Name = "lblGridSize";
this.lblGridSize.Size = new System.Drawing.Size(52, 13);
this.lblGridSize.TabIndex = 16;
this.lblGridSize.Text = "Grid Size:";
//
// btnResetGridColor
//
this.btnResetGridColor.Location = new System.Drawing.Point(188, 44);
this.btnResetGridColor.Name = "btnResetGridColor";
this.btnResetGridColor.Size = new System.Drawing.Size(75, 23);
this.btnResetGridColor.TabIndex = 15;
this.btnResetGridColor.Text = "Reset Color";
this.btnResetGridColor.UseVisualStyleBackColor = true;
this.btnResetGridColor.Click += new System.EventHandler(this.btnResetGridColor_Click);
//
// btnGridColor
//
this.btnGridColor.Location = new System.Drawing.Point(188, 15);
this.btnGridColor.Name = "btnGridColor";
this.btnGridColor.Size = new System.Drawing.Size(75, 23);
this.btnGridColor.TabIndex = 14;
this.btnGridColor.Text = "Pick Color...";
this.btnGridColor.UseVisualStyleBackColor = true;
this.btnGridColor.Click += new System.EventHandler(this.btnGridColor_Click);
//
// pnlBackground
//
this.pnlBackground.Controls.Add(this.lblBackgroundColor);
this.pnlBackground.Location = new System.Drawing.Point(10, 19);
this.pnlBackground.Name = "pnlBackground";
this.pnlBackground.Size = new System.Drawing.Size(130, 50);
this.pnlBackground.TabIndex = 13;
this.pnlBackground.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlBackground_Paint);
//
// lblBackgroundColor
//
this.lblBackgroundColor.BackColor = System.Drawing.Color.Transparent;
this.lblBackgroundColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblBackgroundColor.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblBackgroundColor.Location = new System.Drawing.Point(0, 0);
this.lblBackgroundColor.Name = "lblBackgroundColor";
this.lblBackgroundColor.Size = new System.Drawing.Size(130, 50);
this.lblBackgroundColor.TabIndex = 16;
this.lblBackgroundColor.Text = "Background Color";
this.lblBackgroundColor.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// chkDrawGrid
//
this.chkDrawGrid.AutoSize = true;
this.chkDrawGrid.Location = new System.Drawing.Point(6, 19);
this.chkDrawGrid.Name = "chkDrawGrid";
this.chkDrawGrid.Size = new System.Drawing.Size(143, 17);
this.chkDrawGrid.TabIndex = 12;
this.chkDrawGrid.Text = "Enable transparency grid";
this.chkDrawGrid.UseVisualStyleBackColor = true;
this.chkDrawGrid.CheckedChanged += new System.EventHandler(this.chkDrawGrid_CheckedChanged);
//
// grpStitch
//
this.grpStitch.Controls.Add(this.lblUglyLength);
this.grpStitch.Controls.Add(this.lblPixelLength);
this.grpStitch.Controls.Add(this.txtThreshold);
this.grpStitch.Controls.Add(this.chkUglyStitches);
this.grpStitch.Controls.Add(this.lblThreadThickness);
this.grpStitch.Controls.Add(this.txtThreadThickness);
this.grpStitch.Controls.Add(this.lblPixelThick);
this.grpStitch.Location = new System.Drawing.Point(12, 173);
this.grpStitch.Name = "grpStitch";
this.grpStitch.Size = new System.Drawing.Size(281, 86);
this.grpStitch.TabIndex = 3;
this.grpStitch.TabStop = false;
this.grpStitch.Text = "Stitch drawing";
//
// lblUglyLength
//
this.lblUglyLength.AutoSize = true;
this.lblUglyLength.Location = new System.Drawing.Point(31, 58);
this.lblUglyLength.Name = "lblUglyLength";
this.lblUglyLength.Size = new System.Drawing.Size(67, 13);
this.lblUglyLength.TabIndex = 11;
this.lblUglyLength.Text = "Ugly Length:";
//
// lblPixelLength
//
this.lblPixelLength.AutoSize = true;
this.lblPixelLength.Location = new System.Drawing.Point(142, 58);
this.lblPixelLength.Name = "lblPixelLength";
this.lblPixelLength.Size = new System.Drawing.Size(33, 13);
this.lblPixelLength.TabIndex = 10;
this.lblPixelLength.Text = "pixels";
//
// txtThreshold
//
this.txtThreshold.Location = new System.Drawing.Point(104, 55);
this.txtThreshold.Name = "txtThreshold";
this.txtThreshold.Size = new System.Drawing.Size(32, 20);
this.txtThreshold.TabIndex = 9;
//
// chkUglyStitches
//
@ -162,30 +271,51 @@ namespace embroideryReader
this.chkUglyStitches.Text = "Remove \'ugly\' stitches";
this.chkUglyStitches.UseVisualStyleBackColor = true;
//
// txtThreshold
// cmbLanguage
//
this.txtThreshold.Location = new System.Drawing.Point(130, 55);
this.txtThreshold.Name = "txtThreshold";
this.txtThreshold.Size = new System.Drawing.Size(32, 20);
this.txtThreshold.TabIndex = 9;
this.cmbLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbLanguage.FormattingEnabled = true;
this.cmbLanguage.Location = new System.Drawing.Point(14, 19);
this.cmbLanguage.Name = "cmbLanguage";
this.cmbLanguage.Size = new System.Drawing.Size(132, 21);
this.cmbLanguage.TabIndex = 10;
this.cmbLanguage.SelectedIndexChanged += new System.EventHandler(this.cmbLanguage_SelectedIndexChanged);
//
// label3
// grpLanguage
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(168, 58);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(33, 13);
this.label3.TabIndex = 10;
this.label3.Text = "pixels";
this.grpLanguage.Controls.Add(this.lblIncompleteTranslation);
this.grpLanguage.Controls.Add(this.cmbLanguage);
this.grpLanguage.Location = new System.Drawing.Point(12, 265);
this.grpLanguage.Name = "grpLanguage";
this.grpLanguage.Size = new System.Drawing.Size(281, 56);
this.grpLanguage.TabIndex = 11;
this.grpLanguage.TabStop = false;
this.grpLanguage.Text = "Language";
//
// label4
// lblIncompleteTranslation
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(57, 58);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(67, 13);
this.label4.TabIndex = 11;
this.label4.Text = "Ugly Length:";
this.lblIncompleteTranslation.AutoSize = true;
this.lblIncompleteTranslation.Location = new System.Drawing.Point(152, 22);
this.lblIncompleteTranslation.Name = "lblIncompleteTranslation";
this.lblIncompleteTranslation.Size = new System.Drawing.Size(123, 13);
this.lblIncompleteTranslation.TabIndex = 11;
this.lblIncompleteTranslation.Text = "Translation is incomplete";
this.lblIncompleteTranslation.Visible = false;
//
// grpTranparencyGrid
//
this.grpTranparencyGrid.Controls.Add(this.chkDrawGrid);
this.grpTranparencyGrid.Controls.Add(this.btnResetGridColor);
this.grpTranparencyGrid.Controls.Add(this.txtGridSize);
this.grpTranparencyGrid.Controls.Add(this.btnGridColor);
this.grpTranparencyGrid.Controls.Add(this.lblGridSize);
this.grpTranparencyGrid.Controls.Add(this.lblGridSizePixels);
this.grpTranparencyGrid.Location = new System.Drawing.Point(6, 75);
this.grpTranparencyGrid.Name = "grpTranparencyGrid";
this.grpTranparencyGrid.Size = new System.Drawing.Size(269, 74);
this.grpTranparencyGrid.TabIndex = 12;
this.grpTranparencyGrid.TabStop = false;
this.grpTranparencyGrid.Text = "Transparency Grid";
//
// frmSettingsDialog
//
@ -193,20 +323,27 @@ namespace embroideryReader
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(339, 225);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.ClientSize = new System.Drawing.Size(305, 359);
this.Controls.Add(this.grpLanguage);
this.Controls.Add(this.grpStitch);
this.Controls.Add(this.grpBackground);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmSettingsDialog";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Embroidery Reader Settings";
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.grpBackground.ResumeLayout(false);
this.pnlBackground.ResumeLayout(false);
this.grpStitch.ResumeLayout(false);
this.grpStitch.PerformLayout();
this.grpLanguage.ResumeLayout(false);
this.grpLanguage.PerformLayout();
this.grpTranparencyGrid.ResumeLayout(false);
this.grpTranparencyGrid.PerformLayout();
this.ResumeLayout(false);
}
@ -215,18 +352,29 @@ namespace embroideryReader
private System.Windows.Forms.ColorDialog colorDialog1;
private System.Windows.Forms.Button btnColor;
private System.Windows.Forms.Label lblColor;
private System.Windows.Forms.Button btnResetColor;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblThreadThickness;
private System.Windows.Forms.TextBox txtThreadThickness;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lblPixelThick;
private System.Windows.Forms.GroupBox grpBackground;
private System.Windows.Forms.GroupBox grpStitch;
private System.Windows.Forms.Label lblPixelLength;
private System.Windows.Forms.TextBox txtThreshold;
private System.Windows.Forms.CheckBox chkUglyStitches;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label lblUglyLength;
private System.Windows.Forms.CheckBox chkDrawGrid;
private System.Windows.Forms.ComboBox cmbLanguage;
private System.Windows.Forms.GroupBox grpLanguage;
private System.Windows.Forms.Panel pnlBackground;
private System.Windows.Forms.Button btnResetGridColor;
private System.Windows.Forms.Button btnGridColor;
private System.Windows.Forms.Label lblBackgroundColor;
private System.Windows.Forms.Label lblIncompleteTranslation;
private System.Windows.Forms.TextBox txtGridSize;
private System.Windows.Forms.Label lblGridSizePixels;
private System.Windows.Forms.Label lblGridSize;
private System.Windows.Forms.GroupBox grpTranparencyGrid;
}
}

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -25,18 +25,22 @@ You can contact me at http://www.njcrawford.com/contact
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace embroideryReader
{
public partial class frmSettingsDialog : Form
{
private bool colorChanged = false;
private EmbroideryReaderSettings settings;
private Translation translation;
private List<Tuple<String, String>> availableTranslations = new List<Tuple<string,string>>();
// Local copies of settings to update
private bool backgroundColorEnabled;
private Color transparencyGridColor;
private int gridSize;
public EmbroideryReaderSettings settingsToModify
{
get
@ -45,17 +49,29 @@ namespace embroideryReader
}
set
{
// Save a local reference to update later if/when the user clicks the OK button
settings = value;
if (settings.backgroundColorEnabled)
// Load background color settings
backgroundColorEnabled = settings.backgroundColorEnabled;
if (backgroundColorEnabled)
{
lblColor.BackColor = settings.backgroundColor;
pnlBackground.BackColor = settings.backgroundColor;
}
// Load thread thickness setting
txtThreadThickness.Text = settings.threadThickness.ToString();
// Load filter stitches settings
chkUglyStitches.Checked = settings.filterStiches;
txtThreshold.Text = settings.filterStitchesThreshold.ToString();
// Load transparency grid settings
chkDrawGrid.Checked = settings.transparencyGridEnabled;
gridSize = settings.transparencyGridSize;
txtGridSize.Text = gridSize.ToString();
transparencyGridColor = settings.transparencyGridColor;
updateGridColorControls();
}
}
@ -71,50 +87,182 @@ namespace embroideryReader
private void btnColor_Click(object sender, EventArgs e)
{
colorDialog1.Color = lblColor.BackColor;
if (colorDialog1.ShowDialog() == DialogResult.OK && lblColor.BackColor != colorDialog1.Color)
colorDialog1.Color = pnlBackground.BackColor;
if (colorDialog1.ShowDialog() == DialogResult.OK)
{
lblColor.BackColor = colorDialog1.Color;
colorChanged = true;
pnlBackground.BackColor = colorDialog1.Color;
backgroundColorEnabled = true;
}
}
private void btnResetColor_Click(object sender, EventArgs e)
{
if (lblColor.BackColor != Color.FromKnownColor(KnownColor.Control))
{
lblColor.BackColor = Color.FromKnownColor(KnownColor.Control);
colorChanged = true;
}
pnlBackground.BackColor = Color.FromKnownColor(KnownColor.Control);
backgroundColorEnabled = false;
}
private void btnOK_Click(object sender, EventArgs e)
{
if (colorChanged)
{
if (lblColor.BackColor != Color.FromKnownColor(KnownColor.Control))
{
settings.backgroundColorEnabled = true;
settings.backgroundColor = lblColor.BackColor;
}
else
{
settings.backgroundColorEnabled = false;
}
}
double threadThickness;
if (Double.TryParse(txtThreadThickness.Text, out threadThickness))
// Save thread thickness setting
float threadThickness;
if (Single.TryParse(txtThreadThickness.Text, out threadThickness))
{
settings.threadThickness = threadThickness;
}
// Save filter stitches settings
settings.filterStiches = chkUglyStitches.Checked;
double threshold;
if (Double.TryParse(txtThreshold.Text, out threshold))
float threshold;
if (Single.TryParse(txtThreshold.Text, out threshold))
{
settings.filterStitchesThreshold = threshold;
}
// Save Transparency grid settings
settings.transparencyGridEnabled = chkDrawGrid.Checked;
settings.transparencyGridSize = gridSize;
if(chkDrawGrid.Checked)
{
settings.transparencyGridColor = transparencyGridColor;
}
// Save background color settings
settings.backgroundColorEnabled = backgroundColorEnabled;
if(backgroundColorEnabled)
{
settings.backgroundColor = pnlBackground.BackColor;
}
// Save translation setting
settings.translation = availableTranslations[cmbLanguage.SelectedIndex].Item2;
// Save settings file
settings.save();
}
public Translation setTranslation
{
set
{
translation = value;
loadTranslatedStrings();
availableTranslations = translation.GetAvailableTranslations();
foreach (Tuple<String, String> names in availableTranslations)
{
cmbLanguage.Items.Add(names.Item1 + " (" + names.Item2 + ")");
if(names.Item2 == settings.translation)
{
cmbLanguage.SelectedIndex = cmbLanguage.Items.Count - 1;
}
}
// Make sure a valid language is selected if no match was found
if(cmbLanguage.Items.Count != 0 && cmbLanguage.SelectedIndex == -1)
{
cmbLanguage.SelectedIndex = 0;
}
}
}
private void loadTranslatedStrings()
{
this.Text = translation.GetTranslatedString(Translation.StringID.SETTINGS);
grpBackground.Text = translation.GetTranslatedString(Translation.StringID.BACKGROUND);
lblBackgroundColor.Text = translation.GetTranslatedString(Translation.StringID.BACKGROUND_COLOR);
btnColor.Text = translation.GetTranslatedString(Translation.StringID.PICK_COLOR);
btnResetColor.Text = translation.GetTranslatedString(Translation.StringID.RESET_COLOR);
grpStitch.Text = translation.GetTranslatedString(Translation.StringID.STITCH_DRAW);
lblThreadThickness.Text = translation.GetTranslatedString(Translation.StringID.THREAD_THICKNESS);
txtThreadThickness.Left = lblThreadThickness.Right + 5;
lblPixelThick.Text = translation.GetTranslatedString(Translation.StringID.PIXELS);
lblPixelThick.Left = txtThreadThickness.Right + 5;
chkUglyStitches.Text = translation.GetTranslatedString(Translation.StringID.REMOVE_UGLY_STITCHES);
lblUglyLength.Text = translation.GetTranslatedString(Translation.StringID.UGLY_STITCH_LENGTH);
txtThreshold.Left = lblUglyLength.Right + 5;
lblPixelLength.Text = translation.GetTranslatedString(Translation.StringID.PIXELS);
lblPixelLength.Left = txtThreshold.Right + 5;
chkDrawGrid.Text = translation.GetTranslatedString(Translation.StringID.ENABLE_TRANSPARENCY_GRID);
grpLanguage.Text = translation.GetTranslatedString(Translation.StringID.LANGUAGE);
btnCancel.Text = translation.GetTranslatedString(Translation.StringID.CANCEL);
btnOK.Text = translation.GetTranslatedString(Translation.StringID.OK);
btnGridColor.Text = translation.GetTranslatedString(Translation.StringID.PICK_COLOR);
btnResetGridColor.Text = translation.GetTranslatedString(Translation.StringID.RESET_COLOR);
lblGridSize.Text = translation.GetTranslatedString(Translation.StringID.GRID_SIZE);
txtGridSize.Left = lblGridSize.Right + 5;
lblGridSizePixels.Text = translation.GetTranslatedString(Translation.StringID.PIXELS);
lblGridSizePixels.Left = txtGridSize.Right + 5;
lblIncompleteTranslation.Text = translation.GetTranslatedString(Translation.StringID.TRANSLATION_INCOMPLETE);
}
private void cmbLanguage_SelectedIndexChanged(object sender, EventArgs e)
{
translation.Load(availableTranslations[cmbLanguage.SelectedIndex].Item2);
lblIncompleteTranslation.Visible = !translation.IsComplete();
loadTranslatedStrings();
}
private void chkDrawGrid_CheckedChanged(object sender, EventArgs e)
{
pnlBackground.Invalidate();
pnlBackground.Update();
updateGridColorControls();
}
private void updateGridColorControls()
{
btnGridColor.Enabled = chkDrawGrid.Checked;
btnResetGridColor.Enabled = chkDrawGrid.Checked;
txtGridSize.Enabled = chkDrawGrid.Checked;
}
private void pnlBackground_Paint(object sender, PaintEventArgs e)
{
if (chkDrawGrid.Checked)
{
using (Pen gridPen = new Pen(transparencyGridColor))
{
for (int xStart = 0; (xStart * gridSize) < pnlBackground.Width; xStart++)
{
for (int yStart = 0; (yStart * gridSize) < pnlBackground.Height; yStart++)
{
// Fill even columns in even rows and odd columns in odd rows
if ((xStart % 2) == (yStart % 2))
{
e.Graphics.FillRectangle(gridPen.Brush, (xStart * gridSize), (yStart * gridSize), gridSize, gridSize);
}
}
}
}
}
}
private void btnGridColor_Click(object sender, EventArgs e)
{
colorDialog1.Color = transparencyGridColor;
if (colorDialog1.ShowDialog() == DialogResult.OK)
{
transparencyGridColor = colorDialog1.Color;
pnlBackground.Invalidate();
}
}
private void btnResetGridColor_Click(object sender, EventArgs e)
{
transparencyGridColor = Color.LightGray;
pnlBackground.Invalidate();
}
private void txtGridSize_TextChanged(object sender, EventArgs e)
{
if (Int32.TryParse(txtGridSize.Text, out gridSize))
{
// Try to keep grid size in a reasonable range
if (gridSize < 1 || gridSize > 1000)
{
gridSize = 5;
}
pnlBackground.Invalidate();
}
}
}
}

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2019 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -24,11 +24,6 @@ You can contact me at http://www.njcrawford.com/contact
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace embroideryReader

Wyświetl plik

@ -1,120 +1,120 @@
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2014 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License

Wyświetl plik

@ -1,123 +1,123 @@
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2018 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -23,7 +23,6 @@ You can contact me at http://www.njcrawford.com/contact/.
*/
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace embroideryTester

Wyświetl plik

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("emroideryTester")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2011")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Wyświetl plik

@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace embroideryTester.Properties {
using System;
/// <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", "2.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 (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("embroideryTester.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;
}
}
}
}

Wyświetl plik

@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4200
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace embroideryTester.Properties {
using System;
/// <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", "2.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 (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("embroideryTester.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;
}
}
}
}

Wyświetl plik

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

Wyświetl plik

@ -1,117 +1,117 @@
<?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>
<?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>

Wyświetl plik

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace embroideryTester.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.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;
}
}
}
}

Wyświetl plik

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4200
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace embroideryTester.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.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;
}
}
}
}

Wyświetl plik

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

Wyświetl plik

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Wyświetl plik

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

Wyświetl plik

@ -1,91 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A80DF4D8-967D-4352-9E1D-F22D23236BE2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryTester</RootNamespace>
<AssemblyName>embroideryTester</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<SubType>Designer</SubType>
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources-2008.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources-2008.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings-2008.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings-2008.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2008.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Wyświetl plik

@ -1,126 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A80DF4D8-967D-4352-9E1D-F22D23236BE2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryTester</RootNamespace>
<AssemblyName>embroideryTester</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<SubType>Designer</SubType>
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources-2010.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources-2010.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings-2010.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings-2010.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2010.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0B91A835-C5E1-479F-A56B-D2E8E5A2FFC1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryTester</RootNamespace>
<AssemblyName>embroideryTester</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<SubType>Designer</SubType>
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile.csproj">
<Project>{DBF6F9B8-D00A-4BC0-BECF-EE4081F22375}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Wyświetl plik

@ -1,7 +1,7 @@
/*
Embroidery Reader - an application to view .pes embroidery designs
Copyright (C) 2011 Nathan Crawford
Copyright (C) 2018 Nathan Crawford
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -23,7 +23,6 @@ You can contact me at http://www.njcrawford.com/contact/.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
@ -175,7 +174,7 @@ namespace embroideryThumbs
logfile.WriteLine("Called Extract");
logfile.Close();
System.Drawing.Bitmap designBitmap = designFile.designToBitmap(3, false, 0);
System.Drawing.Bitmap designBitmap = designFile.DesignToBitmap(3, false, 0, 1.0f);
IntPtr hBmp = designBitmap.GetHbitmap();

Wyświetl plik

@ -1,35 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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("embroideryThumbs")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("embroideryThumbs")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2011")]
[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(true)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("36115830-3226-4c7d-9abc-937cc8932cf6")]
// 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 Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.2")]
[assembly: AssemblyFileVersion("1.0.0.2")]
using System.Reflection;
using System.Runtime.CompilerServices;
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("embroideryThumbs")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("embroideryThumbs")]
[assembly: AssemblyCopyright("Copyright © Nathan Crawford 2018")]
[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(true)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("36115830-3226-4c7d-9abc-937cc8932cf6")]
// 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 Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.2")]
[assembly: AssemblyFileVersion("1.0.0.2")]

Wyświetl plik

@ -1,63 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{978B855C-C9CD-4A5E-A335-9ED8DD3E001A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>embroideryThumbs</RootNamespace>
<AssemblyName>embroideryThumbs</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>true</RegisterForComInterop>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PESThumbnail.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PesFile\PesFile-2005.csproj">
<Project>{66EF662E-F52C-4104-9C15-A14266D8F3B8}</Project>
<Name>PesFile</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More