Skip to content

Commit 3032bf8

Browse files
committed
Initial commit
LazySchoolboyUtil v1.3 LazySchoolboyUtilMac v1.0
1 parent d41f949 commit 3032bf8

27 files changed

+3599
-0
lines changed

.gitignore

+401
Large diffs are not rendered by default.

LazySchoolboyUtil.sln

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "LazySchoolboyUtil", "LazySchoolboyUtil\LazySchoolboyUtil.shproj", "{198E35DD-3A8B-4875-B702-7D8B10B87BF5}"
5+
EndProject
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LazySchoolboyUtilMac", "LazySchoolboyUtilMac\LazySchoolboyUtilMac.csproj", "{32338C44-7525-477F-87D6-08BFC7ABCFB9}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x86 = Debug|x86
11+
Release|x86 = Release|x86
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{32338C44-7525-477F-87D6-08BFC7ABCFB9}.Debug|x86.ActiveCfg = Debug|x86
15+
{32338C44-7525-477F-87D6-08BFC7ABCFB9}.Debug|x86.Build.0 = Debug|x86
16+
{32338C44-7525-477F-87D6-08BFC7ABCFB9}.Release|x86.ActiveCfg = Release|x86
17+
{32338C44-7525-477F-87D6-08BFC7ABCFB9}.Release|x86.Build.0 = Release|x86
18+
EndGlobalSection
19+
EndGlobal

LazySchoolboyUtil/Format.cs

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
namespace LazySchoolboyUtil
2+
{
3+
public class Format
4+
{
5+
protected string formatName;
6+
protected string mime;
7+
protected int offset;
8+
protected byte[] magicNumbers;
9+
10+
public Format(string formatName, string mime, int offset, byte[] magicNumbers)
11+
{
12+
this.formatName = formatName;
13+
this.mime = mime;
14+
this.offset = offset;
15+
this.magicNumbers = magicNumbers;
16+
}
17+
18+
public string GetFormatName()
19+
{
20+
return formatName;
21+
}
22+
23+
public string GetMime()
24+
{
25+
return mime;
26+
}
27+
28+
public int GetOffset()
29+
{
30+
return offset;
31+
}
32+
33+
public byte[] GetMagicNumbers()
34+
{
35+
return magicNumbers;
36+
}
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5+
<HasSharedItems>true</HasSharedItems>
6+
<SharedGUID>{198E35DD-3A8B-4875-B702-7D8B10B87BF5}</SharedGUID>
7+
</PropertyGroup>
8+
<PropertyGroup Label="Configuration">
9+
<Import_RootNamespace>LazySchoolboyUtil</Import_RootNamespace>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<Compile Include="$(MSBuildThisFileDirectory)Util.cs" />
13+
<Compile Include="$(MSBuildThisFileDirectory)Format.cs" />
14+
</ItemGroup>
15+
</Project>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ProjectGuid>{198E35DD-3A8B-4875-B702-7D8B10B87BF5}</ProjectGuid>
5+
</PropertyGroup>
6+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
7+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
8+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
9+
<Import Project="LazySchoolboyUtil.projitems" Label="Shared" />
10+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
11+
</Project>

LazySchoolboyUtil/MagicNumbers.cs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
namespace LazySchoolboyUtil
3+
{
4+
public class MagicNumbers
5+
{
6+
public MagicNumbers()
7+
{
8+
}
9+
}
10+
}

LazySchoolboyUtil/Util.cs

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
using System.Collections.Generic;
2+
using System.Diagnostics;
3+
using System.IO;
4+
using System.Security.Cryptography;
5+
6+
namespace LazySchoolboyUtil
7+
{
8+
public static class Util
9+
{
10+
public static string version = "1.3";
11+
public static double progress;
12+
13+
static RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
14+
15+
public static void GenerateFile(string path, int size, Format format)
16+
{
17+
progress = 0;
18+
byte[] bytesToBeSaved = new byte[size];
19+
20+
rand.GetBytes(bytesToBeSaved);
21+
for (int i = format.GetOffset(); i <= format.GetOffset() + format.GetMagicNumbers().Length - 1; i++)
22+
{
23+
try
24+
{
25+
Debug.WriteLine("b1");
26+
progress = i / (format.GetMagicNumbers().LongLength / 100);
27+
}
28+
catch (System.Exception ex)
29+
{
30+
Debug.WriteLine("b2");
31+
Debug.WriteLine(ex.Message);
32+
}
33+
34+
bytesToBeSaved[i] = format.GetMagicNumbers()[i - format.GetOffset()];
35+
}
36+
using (var fs = new FileStream(path, FileMode.Create, FileAccess.Write))
37+
{
38+
fs.Write(bytesToBeSaved, 0, bytesToBeSaved.Length);
39+
}
40+
progress = 100;
41+
}
42+
43+
public static List<Format> GetListOfFormats()
44+
{
45+
List<Format> toReturn = new List<Format>();
46+
toReturn.Add(new Format("123", "application/vnd.lotus-1-2-3", 0, new byte[] { 0x00, 0x00, 0x1A, 0x00, 0x05, 0x10, 0x04 }));
47+
toReturn.Add(new Format("cpl", "application/cpl+xml", 0, new byte[] { 0x4D, 0x5A }));
48+
toReturn.Add(new Format("epub", "application/epub+zip", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04, 0x0A, 0x00, 0x02, 0x00 }));
49+
toReturn.Add(new Format("ttf", "application/font-sfnt", 0, new byte[] { 0x00, 0x01, 0x00, 0x00, 0x00 }));
50+
toReturn.Add(new Format("gz", "application/gzip", 0, new byte[] { 0x1F, 0x8B, 0x08 }));
51+
toReturn.Add(new Format("tgz", "application/gzip", 0, new byte[] { 0x1F, 0x8B, 0x08 }));
52+
toReturn.Add(new Format("hqx", "application/mac-binhex40", 0, new byte[] { 0x28, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6C, 0x65, 0x20, 0x6D, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6F, 0x6E, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42, 0x69, 0x6E, 0x48, 0x65, 0x78, 0x20 }));
53+
toReturn.Add(new Format("doc", "application/msword", 0, new byte[] { 0x0D, 0x44, 0x4F, 0x43 }));
54+
toReturn.Add(new Format("mxf", "application/mxf", 0, new byte[] { 0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02 }));
55+
toReturn.Add(new Format("lha", "application/octet-stream", 2, new byte[] { 0x2D, 0x6C, 0x68 }));
56+
toReturn.Add(new Format("lzh", "application/octet-stream", 2, new byte[] { 0x2D, 0x6C, 0x68 }));
57+
toReturn.Add(new Format("exe", "application/octet-stream", 0, new byte[] { 0x4D, 0x5A }));
58+
toReturn.Add(new Format("class", "application/octet-stream", 0, new byte[] { 0xCA, 0xFE, 0xBA, 0xBE }));
59+
toReturn.Add(new Format("dll", "application/octet-stream", 0, new byte[] { 0x4D, 0x5A }));
60+
toReturn.Add(new Format("img", "application/octet-stream", 0, new byte[] { 0xEB, 0x3C, 0x90, 0x2A }));
61+
toReturn.Add(new Format("iso", "application/octet-stream", 0, new byte[] { 0x43, 0x44, 0x30, 0x30, 0x31 }));
62+
toReturn.Add(new Format("ogx", "application/ogg", 0, new byte[] { 0x4F, 0x67, 0x67, 0x53, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }));
63+
toReturn.Add(new Format("oxps", "application/oxps", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04 }));
64+
toReturn.Add(new Format("pdf", "application/pdf", 0, new byte[] { 0x25, 0x50, 0x44, 0x46 }));
65+
toReturn.Add(new Format("p10", "application/pkcs10", 0, new byte[] { 0x64, 0x00, 0x00, 0x00 }));
66+
toReturn.Add(new Format("pls", "application/pls+xml", 0, new byte[] { 0x5B, 0x70, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0x5D }));
67+
toReturn.Add(new Format("eps", "application/postscript", 0, new byte[] { 0x25, 0x21, 0x50, 0x53, 0x2D, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x2D, 0x33, 0x2E, 0x30, 0x20, 0x45, 0x50, 0x53, 0x46, 0x2D, 0x33, 0x20, 0x30 }));
68+
toReturn.Add(new Format("ai", "application/postscript", 0, new byte[] { 0x25, 0x50, 0x44, 0x46 }));
69+
toReturn.Add(new Format("rtf", "application/rtf", 0, new byte[] { 0x7B, 0x5C, 0x72, 0x74, 0x66, 0x31 }));
70+
toReturn.Add(new Format("tsa", "application/tamp-sequence-adjust", 0, new byte[] { 0x47 }));
71+
toReturn.Add(new Format("msf", "application/vnd.epson.msf", 0, new byte[] { 0x2F, 0x2F, 0x20, 0x3C, 0x21, 0x2D, 0x2D, 0x20, 0x3C, 0x6D, 0x64, 0x62, 0x3A, 0x6D, 0x6F, 0x72, 0x6B, 0x3A, 0x7A }));
72+
toReturn.Add(new Format("fdf", "application/vnd.fdf", 0, new byte[] { 0x25, 0x50, 0x44, 0x46 }));
73+
toReturn.Add(new Format("fm", "application/vnd.framemaker", 0, new byte[] { 0x3C, 0x4D, 0x61, 0x6B, 0x65, 0x72, 0x46, 0x69, 0x6C, 0x65, 0x20 }));
74+
toReturn.Add(new Format("kmz", "application/vnd.google-earth.kmz", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04 }));
75+
toReturn.Add(new Format("tpl", "application/vnd.groove-tool-template", 0, new byte[] { 0x00, 0x20, 0xAF, 0x30 }));
76+
toReturn.Add(new Format("kwd", "application/vnd.kde.kword", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04 }));
77+
toReturn.Add(new Format("wk4", "application/vnd.lotus-1-2-3", 0, new byte[] { 0x00, 0x00, 0x1A, 0x00, 0x02, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }));
78+
toReturn.Add(new Format("wk3", "application/vnd.lotus-1-2-3", 0, new byte[] { 0x00, 0x00, 0x1A, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }));
79+
toReturn.Add(new Format("wk1", "application/vnd.lotus-1-2-3", 0, new byte[] { 0x00, 0x00, 0x02, 0x00, 0x06, 0x04, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00 }));
80+
toReturn.Add(new Format("apr", "application/vnd.lotus-approach", 0, new byte[] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }));
81+
toReturn.Add(new Format("nsf", "application/vnd.lotus-notes", 0, new byte[] { 0x1A, 0x00, 0x00, 0x04, 0x00, 0x00 }));
82+
toReturn.Add(new Format("ntf", "application/vnd.lotus-notes", 0, new byte[] { 0x4E, 0x49, 0x54, 0x46, 0x30 }));
83+
toReturn.Add(new Format("org", "application/vnd.lotus-organizer", 0, new byte[] { 0x41, 0x4F, 0x4C, 0x56, 0x4D, 0x31, 0x30, 0x30 }));
84+
toReturn.Add(new Format("lwp", "application/vnd.lotus-wordpro", 0, new byte[] { 0x57, 0x6F, 0x72, 0x64, 0x50, 0x72, 0x6F }));
85+
toReturn.Add(new Format("sam", "application/vnd.lotus-wordpro", 0, new byte[] { 0x5B, 0x50, 0x68, 0x6F, 0x6E, 0x65, 0x5D }));
86+
toReturn.Add(new Format("mif", "application/vnd.mif", 0, new byte[] { 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x20 }));
87+
toReturn.Add(new Format("xul", "application/vnd.mozilla.xul+xml", 0, new byte[] { 0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D, 0x22, 0x31, 0x2E, 0x30, 0x22, 0x3F, 0x3E }));
88+
toReturn.Add(new Format("asf", "application/vnd.ms-asf", 0, new byte[] { 0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C }));
89+
toReturn.Add(new Format("cab", "application/vnd.ms-cab-compressed", 0, new byte[] { 0x49, 0x53, 0x63, 0x28 }));
90+
toReturn.Add(new Format("xls", "application/vnd.ms-excel", 0, new byte[] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }));
91+
toReturn.Add(new Format("xla", "application/vnd.ms-excel", 0, new byte[] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }));
92+
toReturn.Add(new Format("chm", "application/vnd.ms-htmlhelp", 0, new byte[] { 0x49, 0x54, 0x53, 0x46 }));
93+
toReturn.Add(new Format("ppt", "application/vnd.ms-powerpoint", 0, new byte[] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }));
94+
toReturn.Add(new Format("pps", "application/vnd.ms-powerpoint", 0, new byte[] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }));
95+
toReturn.Add(new Format("wks", "application/application/vnd.ms-works", 0, new byte[] { 0xFF, 0x00, 0x02, 0x00, 0x04, 0x04, 0x05, 0x54, 0x02, 0x00 }));
96+
toReturn.Add(new Format("wpl", "application/vnd.ms-wpl", 84, new byte[] { 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x4D, 0x65, 0x64, 0x69, 0x61, 0x20, 0x50, 0x6C, 0x61, 0x79, 0x65, 0x72, 0x20, 0x2D, 0x2D, 0x20 }));
97+
toReturn.Add(new Format("xps", "application/vnd.ms-xpsdocument", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04 }));
98+
toReturn.Add(new Format("cif", "application/vnd.multiad.creator.cif", 2, new byte[] { 0x5B, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E }));
99+
toReturn.Add(new Format("odp", "application/vnd.oasis.opendocument.presentation", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04 }));
100+
toReturn.Add(new Format("odt", "application/vnd.oasis.opendocument.text", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04 }));
101+
toReturn.Add(new Format("ott", "application/vnd.oasis.opendocument.text-template", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04 }));
102+
toReturn.Add(new Format("pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00 }));
103+
toReturn.Add(new Format("xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00 }));
104+
toReturn.Add(new Format("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00 }));
105+
toReturn.Add(new Format("prc", "application/vnd.palm", 0, new byte[] { 0x42, 0x4F, 0x4F, 0x4B, 0x4D, 0x4F, 0x42, 0x49 }));
106+
toReturn.Add(new Format("pdb", "application/vnd.palm", 0, new byte[] { 0x4D, 0x2D, 0x57, 0x20, 0x50, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x20, 0x44, 0x69, 0x63, 0x74, 0x69 }));
107+
toReturn.Add(new Format("qxd", "application/vnd.Quark.QuarkXPress", 0, new byte[] { 0x00, 0x00, 0x4D, 0x4D, 0x58, 0x50, 0x52 }));
108+
toReturn.Add(new Format("rar", "application/vnd.rar", 0, new byte[] { 0x52, 0x61, 0x72, 0x21, 0x1A, 0x07, 0x01, 0x00 }));
109+
toReturn.Add(new Format("mmf", "application/vnd.smaf", 0, new byte[] { 0x4D, 0x4D, 0x4D, 0x44, 0x00, 0x00 }));
110+
toReturn.Add(new Format("cap", "application/vnd.tcpdump.pcap", 0, new byte[] { 0x52, 0x54, 0x53, 0x53 }));
111+
toReturn.Add(new Format("dmp", "application/vnd.tcpdump.pcap", 0, new byte[] { 0x4D, 0x44, 0x4D, 0x50, 0x93, 0xA7 }));
112+
toReturn.Add(new Format("wpd", "application/vnd.wordperfect", 0, new byte[] { 0xFF, 0x57, 0x50, 0x43 }));
113+
toReturn.Add(new Format("xar", "application/vnd.xara", 0, new byte[] { 0x78, 0x61, 0x72, 0x21 }));
114+
toReturn.Add(new Format("spf", "application/vnd.yamaha.smaf-phrase", 0, new byte[] { 0x53, 0x50, 0x46, 0x49, 0x00 }));
115+
toReturn.Add(new Format("dtd", "application/xml-dtd", 0, new byte[] { 0x07, 0x64, 0x74, 0x32, 0x64, 0x64, 0x74, 0x64 }));
116+
toReturn.Add(new Format("zip", "application/zip", 0, new byte[] { 0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }));
117+
toReturn.Add(new Format("amr", "application/AMR", 0, new byte[] { 0x23, 0x21, 0x41, 0x4D, 0x52 }));
118+
toReturn.Add(new Format("au", "audio/basic", 0, new byte[] { 0x2E, 0x73, 0x6E, 0x64 }));
119+
toReturn.Add(new Format("m4a", "audio/mp4", 0, new byte[] { 0x00, 0x00, 0x00, 0x20, 0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x41, 0x20 }));
120+
toReturn.Add(new Format("mp3", "audio/mpeg", 0, new byte[] { 0x49, 0x44, 0x33 }));
121+
toReturn.Add(new Format("oga", "audio/ogg", 0, new byte[] { 0x4F, 0x67, 0x67, 0x53, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }));
122+
toReturn.Add(new Format("ogg", "audio/ogg", 0, new byte[] { 0x4F, 0x67, 0x67, 0x53, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }));
123+
toReturn.Add(new Format("qcp", "audio/qcelp", 0, new byte[] { 0x52, 0x49, 0x46, 0x46 }));
124+
toReturn.Add(new Format("koz", "audio/vnd.audikoz", 0, new byte[] { 0x49, 0x44, 0x33, 0x03, 0x00, 0x00, 0x00 }));
125+
toReturn.Add(new Format("bmp", "image/bmp", 0, new byte[] { 0x42, 0x4D }));
126+
toReturn.Add(new Format("dib", "image/bmp", 0, new byte[] { 0x42, 0x4D }));
127+
toReturn.Add(new Format("emf", "image/emf", 0, new byte[] { 0x01, 0x00, 0x00, 0x00 }));
128+
toReturn.Add(new Format("fits", "image/fits", 0, new byte[] { 0x53, 0x49, 0x4D, 0x50, 0x4C, 0x45, 0x20, 0x20, 0x3D, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54 }));
129+
toReturn.Add(new Format("gif", "image/gif", 0, new byte[] { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61 }));
130+
toReturn.Add(new Format("jp2", "image/jp2", 0, new byte[] { 0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A }));
131+
toReturn.Add(new Format("jpg", "image/jpeg", 0, new byte[] { 0xFF, 0xD8 }));
132+
toReturn.Add(new Format("jpeg", "image/jpeg", 0, new byte[] { 0xFF, 0xD8 }));
133+
toReturn.Add(new Format("jpe", "image/jpeg", 0, new byte[] { 0xFF, 0xD8 }));
134+
toReturn.Add(new Format("jfif", "image/jpeg", 0, new byte[] { 0xFF, 0xD8 }));
135+
136+
//TODO: Add other formats
137+
138+
return toReturn;
139+
}
140+
}
141+
}

LazySchoolboyUtilMac/AppDelegate.cs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using AppKit;
2+
using Foundation;
3+
4+
namespace LazySchoolboyUtilMac
5+
{
6+
[Register("AppDelegate")]
7+
public class AppDelegate : NSApplicationDelegate
8+
{
9+
public AppDelegate()
10+
{
11+
}
12+
13+
public override void DidFinishLaunching(NSNotification notification)
14+
{
15+
// Insert code here to initialize your application
16+
}
17+
18+
public override void WillTerminate(NSNotification notification)
19+
{
20+
// Insert code here to tear down your application
21+
}
22+
}
23+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"images": [
3+
{
4+
"filename": "AppIcon-16.png",
5+
"size": "16x16",
6+
"scale": "1x",
7+
"idiom": "mac"
8+
},
9+
{
10+
"filename": "[email protected]",
11+
"size": "16x16",
12+
"scale": "2x",
13+
"idiom": "mac"
14+
},
15+
{
16+
"filename": "AppIcon-32.png",
17+
"size": "32x32",
18+
"scale": "1x",
19+
"idiom": "mac"
20+
},
21+
{
22+
"filename": "[email protected]",
23+
"size": "32x32",
24+
"scale": "2x",
25+
"idiom": "mac"
26+
},
27+
{
28+
"filename": "AppIcon-128.png",
29+
"size": "128x128",
30+
"scale": "1x",
31+
"idiom": "mac"
32+
},
33+
{
34+
"filename": "[email protected]",
35+
"size": "128x128",
36+
"scale": "2x",
37+
"idiom": "mac"
38+
},
39+
{
40+
"filename": "AppIcon-256.png",
41+
"size": "256x256",
42+
"scale": "1x",
43+
"idiom": "mac"
44+
},
45+
{
46+
"filename": "[email protected]",
47+
"size": "256x256",
48+
"scale": "2x",
49+
"idiom": "mac"
50+
},
51+
{
52+
"filename": "AppIcon-512.png",
53+
"size": "512x512",
54+
"scale": "1x",
55+
"idiom": "mac"
56+
},
57+
{
58+
"filename": "[email protected]",
59+
"size": "512x512",
60+
"scale": "2x",
61+
"idiom": "mac"
62+
}
63+
],
64+
"info": {
65+
"version": 1,
66+
"author": "xcode"
67+
}
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
</dict>
6+
</plist>

0 commit comments

Comments
 (0)