aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Test/Properties/Resources.Designer.cs
blob: 3cc3d290602ab2f7b9c09b0faea063aebf4985cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Tango.Scripting.Test.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", "15.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("Tango.Scripting.Test.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;
            }
        }
        
        /// <summary>
        ///   Looks up a localized resource of type System.Byte[].
        /// </summary>
        internal static byte[] template {
            get {
                object obj = ResourceManager.GetObject("template", resourceCulture);
                return ((byte[])(obj));
            }
        }
    }
}
s="w"> int stitchesSinceChange = 0; int currColorIndex = 0; unsigned short sx, sy; if(!pattern) { embLog_error("format-shv.c readShv(), pattern argument is null\n"); return 0; } if(!fileName) { embLog_error("format-shv.c readShv(), fileName argument is null\n"); return 0; } file = embFile_open(fileName, "rb"); if(!file) { embLog_error("format-shv.c readShv(), cannot open %s for reading\n", fileName); return 0; } embFile_seek(file, strlen(headerText), SEEK_SET); fileNameLength = binaryReadUInt8(file); embFile_seek(file, fileNameLength, SEEK_CUR); designWidth = binaryReadUInt8(file); designHeight = binaryReadUInt8(file); halfDesignWidth = binaryReadUInt8(file); halfDesignHeight = binaryReadUInt8(file); halfDesignWidth2 = binaryReadUInt8(file); halfDesignHeight2 = binaryReadUInt8(file); if((designHeight % 2) == 1) { embFile_seek(file, ((designHeight + 1)*designWidth)/2, SEEK_CUR); } else { embFile_seek(file, (designHeight*designWidth)/2, SEEK_CUR); } numberOfColors = binaryReadUInt8(file); magicCode = binaryReadUInt16(file); binaryReadByte(file); something = binaryReadInt32(file); left = binaryReadInt16(file); top = binaryReadInt16(file); right = binaryReadInt16(file); bottom = binaryReadInt16(file); something2 = binaryReadByte(file); numberOfSections = binaryReadUInt8(file); something3 = binaryReadByte(file); for(i = 0; i < numberOfColors; i++) { unsigned int stitchCount, colorNumber; stitchCount = binaryReadUInt32BE(file); colorNumber = binaryReadUInt8(file); embPattern_addThread(pattern, shvThreads[colorNumber % 43]); stitchesPerColor[i] = stitchCount; embFile_seek(file, 9, SEEK_CUR); } embFile_seek(file, -2, SEEK_CUR); for(i = 0; !embFile_eof(file); i++) { unsigned char b0, b1; int flags; if(inJump) { flags = JUMP; } else { flags = NORMAL; } b0 = binaryReadUInt8(file); b1 = binaryReadUInt8(file); if(stitchesSinceChange >= stitchesPerColor[currColorIndex]) { embPattern_addStitchRel(pattern, 0, 0, STOP, 1); currColorIndex++; stitchesSinceChange = 0; } if(b0 == 0x80) { stitchesSinceChange++; if(b1 == 3) { continue; } else if(b1 == 0x02) { inJump = 0; continue; } else if(b1 == 0x01) { stitchesSinceChange += 2; sx = binaryReadUInt8(file); sx = (unsigned short)(sx << 8 | binaryReadUInt8(file)); sy = binaryReadUInt8(file); sy = (unsigned short)(sy << 8 | binaryReadUInt8(file)); flags = TRIM; inJump = 1; embPattern_addStitchRel(pattern, shvDecodeShort(sx) / 10.0, shvDecodeShort(sy) / 10.0, flags, 1); continue; } } dx = shvDecode(b0); dy = shvDecode(b1); stitchesSinceChange++; embPattern_addStitchRel(pattern, dx / 10.0, dy / 10.0, flags, 1); } embFile_close(file); /* Check for an END stitch and add one if it is not present */ if(pattern->lastStitch->stitch.flags != END) embPattern_addStitchRel(pattern, 0, 0, END, 1); embPattern_flipVertical(pattern); return 1; } /*! Writes the data from \a pattern to a file with the given \a fileName. * Returns \c true if successful, otherwise returns \c false. */ int writeShv(EmbPattern* pattern, const char* fileName) { if(!pattern) { embLog_error("format-shv.c writeShv(), pattern argument is null\n"); return 0; } if(!fileName) { embLog_error("format-shv.c writeShv(), fileName argument is null\n"); return 0; } if(!embStitchList_count(pattern->stitchList)) { embLog_error("format-shv.c writeShv(), pattern contains no stitches\n"); return 0; } /* Check for an END stitch and add one if it is not present */ if(pattern->lastStitch->stitch.flags != END) embPattern_addStitchRel(pattern, 0, 0, END, 1); /* TODO: embFile_open() needs to occur here after the check for no stitches */ return 0; /*TODO: finish writeShv */ } /* kate: bom off; indent-mode cstyle; indent-width 4; replace-trailing-space-save on; */