Compare commits
15 Commits
Author | SHA1 | Date |
---|---|---|
J. Fronny | a42306b0b1 | |
J. Fronny | b7a29ce224 | |
Renovate Bot | dc46269b4f | |
CreepyCrafter24 | 739a35d00f | |
CreepyCrafter24 | a0da4df4e3 | |
CreepyCrafter24 | 2c949a745c | |
CreepyCrafter24 | 1aebfb2ccf | |
CreepyCrafter24 | 148c1f9b83 | |
CreepyCrafter24 | 6c8cdd2af2 | |
CreepyCrafter24 | 35ecfcd98b | |
CreepyCrafter24 | 9f054ccdc4 | |
CreepyCrafter24 | 4bf91056ff | |
CreepyCrafter24 | 0bcc3c08b5 | |
CreepyCrafter24 | 4ecf0b122a | |
CreepyCrafter24 | d3494903b8 |
|
@ -1,3 +1,8 @@
|
|||
BUILD/*
|
||||
tmp/*
|
||||
tmp1/*
|
||||
tmp2/*
|
||||
tmp3/*
|
||||
|
||||
# Created by https://www.gitignore.io/api/csharp,visualstudio
|
||||
# Edit at https://www.gitignore.io/?templates=csharp,visualstudio
|
||||
|
|
3
1/1.cs
3
1/1.cs
|
@ -58,6 +58,9 @@ namespace LaptopSimulator2015.Levels
|
|||
public Panel desktopIcon { get; set; }
|
||||
public int installerProgressSteps => 500;
|
||||
public Color backColor => Color.Black;
|
||||
public string[] credits => new string[] { "Level1 Icon made by Oliver Scholtz from www.iconfinder.com" };
|
||||
public bool isLowQuality => false;
|
||||
|
||||
List<Vector2> enemies;
|
||||
List<Vector2> bullets;
|
||||
Vector2 player;
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>_1</RootNamespace>
|
||||
<AssemblyName>1</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
5
2/2.cs
5
2/2.cs
|
@ -59,6 +59,9 @@ namespace LaptopSimulator2015.Levels
|
|||
public Panel desktopIcon { get; set; }
|
||||
public int installerProgressSteps => 500;
|
||||
public Color backColor => Color.Black;
|
||||
public string[] credits => new string[] { "Level2 Icon made by Intel" };
|
||||
public bool isLowQuality => false;
|
||||
|
||||
List<Vector2> enemies;
|
||||
Vector2 player;
|
||||
int lives;
|
||||
|
@ -122,9 +125,7 @@ namespace LaptopSimulator2015.Levels
|
|||
public void draw(GraphicsWrapper g, Panel minigamePanel, Timer minigameTimer, uint minigameTime)
|
||||
{
|
||||
for (int i = 0; i < enemies.Count; i++)
|
||||
//g.g.FillRectangle(new SolidBrush(Color.Red), new Rectangle(enemies[i].toPoint(), new Size(10, 10)));
|
||||
g.DrawRectangle(new RectangleF(enemies[i].toPointF(), new SizeF(10, 10)), Color.Red);
|
||||
//g.g.FillRectangle(new SolidBrush(Color.Green), new Rectangle(player.toPoint(), new Size(10, 10)));
|
||||
g.DrawRectangle(new RectangleF(player.toPointF(), new SizeF(10, 10)), Color.Green);
|
||||
g.DrawSizedString(lives.ToString(), 7, player.toPointF(), Brushes.White, true, true);
|
||||
}
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>_2</RootNamespace>
|
||||
<AssemblyName>2</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
38
3/3.cs
38
3/3.cs
|
@ -62,6 +62,8 @@ namespace LaptopSimulator2015.Levels
|
|||
|
||||
public int installerProgressSteps => 500;
|
||||
public Color backColor => Color.Black;
|
||||
public string[] credits => new string[] { "Level3 Icon made by NVidia" };
|
||||
public bool isLowQuality => false;
|
||||
|
||||
Vector2 center;
|
||||
Vector2 cannon;
|
||||
|
@ -96,13 +98,14 @@ namespace LaptopSimulator2015.Levels
|
|||
{
|
||||
firing = false;
|
||||
List<Vector2> targetsToRemove = new List<Vector2>();
|
||||
Rect tr = new Rect(targ, new Vector2(power, power), true);
|
||||
for (int i = 0; i < targets.Count; i++)
|
||||
{
|
||||
if (targets[i].distanceFromSquared(targ) <= Math.Pow(power + 10, 2))
|
||||
if (targets[i].distanceToRectSquared(tr) <= 400)
|
||||
targetsToRemove.Add(targets[i]);
|
||||
}
|
||||
targets = targets.Except(targetsToRemove.Distinct()).Distinct().ToList();
|
||||
g.g.FillRectangle(new SolidBrush(Color.White), new Rectangle(Misc.d2i(targ.X - power / 2), Misc.d2i(targ.Y - power / 2), Misc.d2i(power), Misc.d2i(power)));
|
||||
targets = targets.Except(targetsToRemove.Distinct()).Distinct().ToList();
|
||||
g.DrawRectangle(tr, Color.White);
|
||||
power = 10;
|
||||
}
|
||||
targ = new Vector2(center);
|
||||
|
@ -112,9 +115,9 @@ namespace LaptopSimulator2015.Levels
|
|||
if (Input.Down)
|
||||
cannonL -= 100 / power;
|
||||
if (Input.Right)
|
||||
playerRot += 80 / power;
|
||||
if (Input.Left)
|
||||
playerRot -= 80 / power;
|
||||
if (Input.Left)
|
||||
playerRot += 80 / power;
|
||||
while (playerRot > 360)
|
||||
playerRot -= 360;
|
||||
while (playerRot < 0)
|
||||
|
@ -146,28 +149,25 @@ namespace LaptopSimulator2015.Levels
|
|||
|
||||
public void draw(GraphicsWrapper g, Panel minigamePanel, Timer minigameTimer, uint minigameTime)
|
||||
{
|
||||
//g.g.FillRectangle(new SolidBrush(Color.Green), player);
|
||||
g.DrawRectangle(new RectangleF(center.toPointF(), new SizeF(10, 10)), Color.Green, transform:false);
|
||||
g.g.DrawLine(new Pen(new SolidBrush(Color.Green), 5), center.toPoint(), cannon.toPoint());
|
||||
g.DrawRectangle(new RectangleF(center.toPointF(), new SizeF(10, 10)), Color.Green);
|
||||
g.DrawLine(center, cannon, Color.Green, 5);
|
||||
for (int i = 0; i < targets.Count; i++)
|
||||
{
|
||||
g.g.DrawEllipse(new Pen(new SolidBrush(Color.Red), 6), new RectangleF(Misc.d2f(targets[i].X - 10), Misc.d2f(targets[i].Y - 10), 20, 20));
|
||||
g.g.DrawEllipse(new Pen(new SolidBrush(Color.White), 6), new RectangleF(Misc.d2f(targets[i].X - 7), Misc.d2f(targets[i].Y - 7), 14, 14));
|
||||
g.g.FillEllipse(new SolidBrush(Color.Red), new RectangleF(Misc.d2f(targets[i].X - 3), Misc.d2f(targets[i].Y - 3), 6, 6));
|
||||
g.g.DrawLine(new Pen(new SolidBrush(Color.Gray), 3), Misc.d2f(targets[i].X - 13), Misc.d2f(targets[i].Y - 15), Misc.d2f(targets[i].X + 13), Misc.d2f(targets[i].Y - 15));
|
||||
g.g.DrawLine(new Pen(new SolidBrush(Color.Red), 3), Misc.d2f(targets[i].X - 13), Misc.d2f(targets[i].Y - 15), Misc.d2f(targets[i].X + ((((double)targets[i].Tag) * 0.2) - 12.9) + 0.1), Misc.d2f(targets[i].Y - 15));
|
||||
g.DrawEllipse(new Rect(targets[i], new Vector2(26, 26), true), Color.Red);
|
||||
g.DrawEllipse(new Rect(targets[i], new Vector2(13, 13), true), Color.White, false, 4.333f);
|
||||
Vector2 mp = new Vector2(targets[i].X + ((((double)targets[i].Tag) * 0.2) - 12.9) + 0.1, targets[i].Y + 15);
|
||||
g.DrawLine(mp, new Vector2(targets[i].X + 13, targets[i].Y + 15), Color.Gray, 3);
|
||||
g.DrawLine(new Vector2(targets[i].X - 13, targets[i].Y + 15), mp, Color.Red, 3);
|
||||
}
|
||||
if (firing)
|
||||
{
|
||||
//g.g.DrawRectangle(new Pen(new SolidBrush(Color.Green), 1), new Rectangle(Misc.d2i(targ.X - power / 2), Misc.d2i(targ.Y - power / 2), Misc.d2i(power), Misc.d2i(power)));
|
||||
g.DrawRectangle(new RectangleF(targ.toPointF(), new SizeF(Misc.d2f(power), Misc.d2f(power))), Color.Green, filled: false, transform: false);
|
||||
g.g.DrawLine(new Pen(new SolidBrush(Color.Green), 1), new PointF(Misc.d2i(targ.X), Misc.d2i(targ.Y - power / 2)), new PointF(Misc.d2i(targ.X), Misc.d2i(targ.Y + power / 2)));
|
||||
g.g.DrawLine(new Pen(new SolidBrush(Color.Green), 1), new PointF(Misc.d2i(targ.X - power / 2), Misc.d2i(targ.Y)), new PointF(Misc.d2i(targ.X + power / 2), Misc.d2i(targ.Y)));
|
||||
g.DrawRectangle(new Rect(targ, new Vector2(power, power), true), Color.Green, filled: false);
|
||||
g.DrawLine(targ + new Vector2(-power / 2, 0), targ + new Vector2(power / 2, 0), Color.Green, 1);
|
||||
g.DrawLine(targ + new Vector2(0, -power / 2), targ + new Vector2(0, power / 2), Color.Green, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
//g.g.FillRectangle(new SolidBrush(Color.Green), new RectangleF(Misc.d2f(targ.X - 2.5f), Misc.d2f(targ.Y - 2.5f), 5, 5));
|
||||
g.DrawRectangle(new RectangleF(targ.toPointF(), new SizeF(5, 5)), Color.Green, transform: false);
|
||||
g.DrawRectangle(new RectangleF(targ.toPointF(), new SizeF(5, 5)), Color.Green);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>_3</RootNamespace>
|
||||
<AssemblyName>3</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
7
3g/3.cs
7
3g/3.cs
|
@ -76,6 +76,9 @@ namespace LaptopSimulator2015.Goals
|
|||
}
|
||||
|
||||
public Color backColor => Color.Black;
|
||||
public string[] credits => new string[]{ "Testexetrisathlon Icon made by Freepik from www.flaticon.com" };
|
||||
public bool isLowQuality => true;
|
||||
|
||||
public static int[,] grid = new int[23, 10];
|
||||
public static int[,] droppedtetrominoeLocationGrid = new int[23, 10];
|
||||
public static bool isDropped = false;
|
||||
|
@ -201,11 +204,11 @@ namespace LaptopSimulator2015.Goals
|
|||
if (grid[y, x] == 1 | droppedtetrominoeLocationGrid[y, x] == 1)
|
||||
g.DrawRectangle(new RectangleF(x * 10, y * 10, 10, 10), Color.White, false, false);
|
||||
}
|
||||
g.g.DrawLine(new Pen(Color.DarkGray), new Point(0, (y + 1) * 10), new Point(10 * 10, (y + 1) * 10));
|
||||
g.DrawLine(new Point(0, (y + 1) * 10), new Point(10 * 10, (y + 1) * 10), Color.DarkGray, 1, false);
|
||||
}
|
||||
for (int x = 0; x < 10; x++)
|
||||
{
|
||||
g.g.DrawLine(new Pen(Color.DarkGray), new Point((x + 1) * 10, 0), new Point((x + 1) * 10, 23 * 10));
|
||||
g.DrawLine(new Point((x + 1) * 10, 0), new Point((x + 1) * 10, 23 * 10), Color.DarkGray, 1, false);
|
||||
}
|
||||
g.DrawSizedString("Level " + level, 10, new PointF(150, 10), Brushes.White, false);
|
||||
g.DrawSizedString("Score " + score, 10, new PointF(150, 30), Brushes.White, false);
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LaptopSimulator2015.Levels</RootNamespace>
|
||||
<AssemblyName>3g</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
9
4/4.cs
9
4/4.cs
|
@ -56,6 +56,8 @@ namespace LaptopSimulator2015.Levels
|
|||
public Panel desktopIcon { get; set; }
|
||||
public int installerProgressSteps => 500;
|
||||
public Color backColor => Color.Black;
|
||||
public bool isLowQuality => false;
|
||||
public string[] credits => new string[] { "Level4 Icon made by Microsoft" };
|
||||
|
||||
Random rnd;
|
||||
Vector2 player;
|
||||
|
@ -174,7 +176,7 @@ namespace LaptopSimulator2015.Levels
|
|||
for (int i = 0; i < platforms.Count; i++)
|
||||
{
|
||||
Rect rect = new Rect(platforms[i], new Vector2(100, 10), true);
|
||||
if (player.distanceToRectSquared(rect) <= 20 && rect.doOverlap(new Rect(player, new Vector2(10, 10), true)) && platforms[i].Y + 11 > player.Y && player.Y > platforms[i].Y + 9)
|
||||
if (rect.doOverlap(new Rect(player, new Vector2(10, 10), true)) && platforms[i].Y + 11 > player.Y && player.Y > platforms[i].Y + 9)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -186,9 +188,10 @@ namespace LaptopSimulator2015.Levels
|
|||
g.DrawRectangle(new Rect(player, new Vector2(10, 10), true), Color.Green);
|
||||
if (lazorTime >= 0 && lazorTime <= 80)
|
||||
{
|
||||
g.DrawRectangle(new RectangleF((float)lazor, minigamePanel.Height / 2, 2, minigamePanel.Height), Color.DarkGray);
|
||||
float m = (float)Misc.map(0, 80, 0, minigamePanel.Height, lazorTime);
|
||||
g.DrawRectangle(new RectangleF((float)lazor, minigamePanel.Height - m / 2, 2, m), Color.Red);
|
||||
Vector2 mp = new Vector2(lazor, m);
|
||||
g.DrawLine(mp, new Vector2(lazor, 0), Color.DarkGray, 2);
|
||||
g.DrawLine(new Vector2(lazor, minigamePanel.Height), mp, Color.Red, 2);
|
||||
}
|
||||
for (int i = 0; i < platforms.Count; i++)
|
||||
g.DrawRectangle(new Rect(platforms[i], new Vector2(100, 10), true), Color.White);
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>_4</RootNamespace>
|
||||
<AssemblyName>4</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Base</RootNamespace>
|
||||
<AssemblyName>Base</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
104
Base/Drawing.cs
104
Base/Drawing.cs
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Base
|
||||
{
|
||||
public class GraphicsWrapper : IDisposable
|
||||
public sealed class GraphicsWrapper : IDisposable
|
||||
{
|
||||
BufferedGraphics _g;
|
||||
Color backColor;
|
||||
|
@ -18,39 +18,51 @@ namespace Base
|
|||
/// Wrap the Graphics object with these excellent High-Quality functions
|
||||
/// </summary>
|
||||
/// <param name="g">The Graphics-object to wrap</param>
|
||||
/// <param name="backColor">Color used when filling</param>
|
||||
/// <param name="targetSize">The size of the device the Graphics are drawn to</param>
|
||||
public GraphicsWrapper(Graphics g, Color backColor, Rectangle targetSize)
|
||||
/// <param name="isLowQuality">Whether the quality should be ugly</param>
|
||||
public GraphicsWrapper(Graphics g, Color backColor, Rectangle targetSize, bool isLowQuality = false)
|
||||
{
|
||||
_g = BufferedGraphicsManager.Current.Allocate(g ?? throw new ArgumentNullException(nameof(g)), targetSize);
|
||||
this.g = _g.Graphics;
|
||||
this.backColor = backColor;
|
||||
this.targetSize = targetSize;
|
||||
this.g.SmoothingMode = isLowQuality ? SmoothingMode.None : SmoothingMode.HighQuality;
|
||||
this.g.InterpolationMode = isLowQuality ? InterpolationMode.Low : InterpolationMode.HighQualityBicubic;
|
||||
this.g.CompositingMode = isLowQuality ? CompositingMode.SourceCopy : CompositingMode.SourceOver;
|
||||
this.g.CompositingQuality = isLowQuality ? CompositingQuality.HighSpeed : CompositingQuality.HighQuality;
|
||||
this.g.PixelOffsetMode = isLowQuality ? PixelOffsetMode.None : PixelOffsetMode.HighQuality;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw a string with the given size
|
||||
/// </summary>
|
||||
/// <param name="s">The string to draw</param>
|
||||
/// <param name="text">The string to draw</param>
|
||||
/// <param name="size">The font size of the string</param>
|
||||
/// <param name="location">The location to draw the string at</param>
|
||||
/// <param name="brush">The brush to draw the string with</param>
|
||||
/// <param name="isLocationCentered">Set to true if you want to draw the string around instead of left-down from the location</param>
|
||||
public void DrawSizedString(string s, int size, PointF location, Brush brush, bool transform = true, bool isLocationCentered = false)
|
||||
/// <param name="centered">Set to true if you want to draw the string around instead of left-down from the location</param>
|
||||
public void DrawSizedString(string text, int size, PointF location, Brush brush, bool transform = true, bool centered = false)
|
||||
{
|
||||
SmoothingMode tmpS = g.SmoothingMode;
|
||||
InterpolationMode tmpI = g.InterpolationMode;
|
||||
CompositingMode tmpM = g.CompositingMode;
|
||||
CompositingQuality tmpQ = g.CompositingQuality;
|
||||
PixelOffsetMode tmpP = g.PixelOffsetMode;
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
g.CompositingMode = CompositingMode.SourceOver;
|
||||
g.CompositingQuality = CompositingQuality.HighQuality;
|
||||
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
SizeF sLen = g.MeasureString(s, new Font("Tahoma", size));
|
||||
RectangleF rectf = new RectangleF(location, sLen);
|
||||
if (isLocationCentered)
|
||||
rectf = new RectangleF(rectf.X - rectf.Width / 2, rectf.Y - rectf.Height / 2, rectf.Width, rectf.Height);
|
||||
Font f = new Font("Tahoma", size);
|
||||
SizeF s = g.MeasureString(text, f);
|
||||
RectangleF r = new RectangleF(centered ? new PointF(location.X - s.Width / 2, location.Y - s.Height / 2) : location, s);
|
||||
if (transform)
|
||||
rectf = w2s(rectf);
|
||||
g.DrawString(s, new Font("Tahoma", size), brush, rectf);
|
||||
r = w2s(r);
|
||||
g.DrawString(text, f, brush, r);
|
||||
g.PixelOffsetMode = tmpP;
|
||||
g.CompositingQuality = tmpQ;
|
||||
g.CompositingMode = tmpM;
|
||||
g.InterpolationMode = tmpI;
|
||||
g.SmoothingMode = tmpS;
|
||||
}
|
||||
|
@ -63,16 +75,14 @@ namespace Base
|
|||
/// <param name="centered">Whether the rectangle should be drawn centered rather than down-left</param>
|
||||
/// <param name="filled">Whether the rectangle should be filled</param>
|
||||
/// <param name="unfilledLineSize">The size of the lines used when not filling</param>
|
||||
public void DrawRectangle(RectangleF rectangle, Color color, bool centered = true, bool transform = true, bool filled = true, int unfilledLineSize = 1)
|
||||
public void DrawRectangle(RectangleF rectangle, Color color, bool centered = true, bool transform = true, bool filled = true, float unfilledLineSize = 1)
|
||||
{
|
||||
RectangleF r = rectangle;
|
||||
SizeF s = rectangle.Size;
|
||||
PointF location = rectangle.Location;
|
||||
RectangleF r = new RectangleF(centered ? new PointF(location.X - s.Width / 2, location.Y - s.Height / 2) : location, s);
|
||||
if (transform)
|
||||
r = w2s(r);
|
||||
Brush b = new SolidBrush(color);
|
||||
if (centered)
|
||||
{
|
||||
r = new RectangleF(new PointF(r.X - r.Width / 2, r.Y - r.Height / 2), r.Size);
|
||||
}
|
||||
if (filled)
|
||||
g.FillRectangle(b, r);
|
||||
else
|
||||
|
@ -86,10 +96,66 @@ namespace Base
|
|||
/// <param name="color">The color of the rectangle</param>
|
||||
/// <param name="filled">Whether the rectangle should be filled</param>
|
||||
/// <param name="unfilledLineSize">The size of the lines used when not filling</param>
|
||||
public void DrawRectangle(Rect rectangle, Color color, bool filled = true, int unfilledLineSize = 1) => DrawRectangle(rectangle.toRectangleF(), color, false, true, filled, unfilledLineSize);
|
||||
public void DrawRectangle(Rect rectangle, Color color, bool filled = true, float unfilledLineSize = 1) => DrawRectangle(rectangle.toRectangleF(), color, false, true, filled, unfilledLineSize);
|
||||
|
||||
/// <summary>
|
||||
/// Draws an ellipse
|
||||
/// </summary>
|
||||
/// <param name="rectangle">Use the PointF/SizeF Constructor as it is much more logical</param>
|
||||
/// <param name="color">The color of the ellipse</param>
|
||||
/// <param name="centered">Whether the ellipse should be drawn centered rather than down-left</param>
|
||||
/// <param name="filled">Whether the ellipse should be filled</param>
|
||||
/// <param name="unfilledLineSize">The size of the lines used when not filling</param>
|
||||
public void DrawEllipse(RectangleF rectangle, Color color, bool centered = true, bool transform = true, bool filled = true, float unfilledLineSize = 1)
|
||||
{
|
||||
RectangleF r = rectangle;
|
||||
if (transform)
|
||||
r = w2s(r);
|
||||
Brush b = new SolidBrush(color);
|
||||
if (centered)
|
||||
{
|
||||
r = new RectangleF(new PointF(r.X - r.Width / 2, r.Y - r.Height / 2), r.Size);
|
||||
}
|
||||
if (filled)
|
||||
g.FillEllipse(b, r);
|
||||
else
|
||||
g.DrawEllipse(new Pen(b, unfilledLineSize), new Rectangle(Misc.f2i(r.X), Misc.f2i(r.Y), Misc.f2i(r.Width), Misc.f2i(r.Height)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws a ellipse
|
||||
/// </summary>
|
||||
/// <param name="rectangle">The rectangle to draw the ellipse in</param>
|
||||
/// <param name="color">The color of the ellipse</param>
|
||||
/// <param name="filled">Whether the ellipse should be filled</param>
|
||||
/// <param name="unfilledLineSize">The size of the lines used when not filling</param>
|
||||
public void DrawEllipse(Rect rectangle, Color color, bool filled = true, float unfilledLineSize = 1) => DrawEllipse(rectangle.toRectangleF(), color, false, true, filled, unfilledLineSize);
|
||||
|
||||
/// <summary>
|
||||
/// Draw a line connecting the vectors
|
||||
/// </summary>
|
||||
/// <param name="p1">Start of the line</param>
|
||||
/// <param name="p2">End of the line</param>
|
||||
/// <param name="color">Color to be used</param>
|
||||
/// <param name="width">Width of the line in pixels</param>
|
||||
public void DrawLine(Vector2 p1, Vector2 p2, Color color, float width, bool transform = true) => DrawLine(p1.toPointF(), p2.toPointF(), color, width, transform);
|
||||
/// <summary>
|
||||
/// Draw a line connecting the points
|
||||
/// </summary>
|
||||
/// <param name="p1">Start of the line</param>
|
||||
/// <param name="p2">End of the line</param>
|
||||
/// <param name="color">Color to be used</param>
|
||||
/// <param name="width">Width of the line in pixels</param>
|
||||
public void DrawLine(PointF p1, PointF p2, Color color, float width, bool transform = true) => g.DrawLine(new Pen(color, width), transform ? w2s(p1) : p1, transform ? w2s(p2) : p2);
|
||||
|
||||
/// <summary>
|
||||
/// Clear the screen with the color provided when creating
|
||||
/// </summary>
|
||||
public void Clear() => g.Clear(backColor);
|
||||
|
||||
/// <summary>
|
||||
/// Render and dispose
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
g.Flush();
|
||||
|
@ -98,7 +164,7 @@ namespace Base
|
|||
_g.Dispose();
|
||||
}
|
||||
|
||||
public RectangleF w2s(RectangleF from) => new RectangleF(w2s(from.Location), from.Size);
|
||||
public RectangleF w2s(RectangleF from) => new RectangleF(w2s(new PointF(from.Left, from.Bottom)), from.Size);
|
||||
public PointF w2s(PointF from) => new PointF(from.X, targetSize.Height - from.Y);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ using System.Windows.Input;
|
|||
|
||||
namespace Base
|
||||
{
|
||||
public class Input
|
||||
public static class Input
|
||||
{
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
|
||||
private static extern short GetKeyState(int keyCode);
|
||||
static extern short GetKeyState(int keyCode);
|
||||
/// <summary>
|
||||
/// Check whether the Key is pressed
|
||||
/// </summary>
|
||||
|
@ -30,9 +30,9 @@ namespace Base
|
|||
state |= 2;
|
||||
return 1 == (state & 1);
|
||||
}
|
||||
catch (Exception e1)
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Invader: IsKeyDown failed:\r\n" + e1.ToString());
|
||||
Console.WriteLine("Invader: IsKeyDown failed:\r\n" + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,10 @@ namespace LaptopSimulator2015
|
|||
/// </summary>
|
||||
Image icon { get; }
|
||||
/// <summary>
|
||||
/// Added to credits, to be used for crediting authours of used icons etc
|
||||
/// </summary>
|
||||
string[] credits { get; }
|
||||
/// <summary>
|
||||
/// Level on which the Minigame becomes visible
|
||||
/// </summary>
|
||||
int availableAfter { get; }
|
||||
|
@ -28,6 +32,14 @@ namespace LaptopSimulator2015
|
|||
/// </summary>
|
||||
int gameClock { get; }
|
||||
/// <summary>
|
||||
/// Color to be painted to the Background before calling the draw method
|
||||
/// </summary>
|
||||
Color backColor { get; }
|
||||
/// <summary>
|
||||
/// In what quality to draw the frames
|
||||
/// </summary>
|
||||
bool isLowQuality { get; }
|
||||
/// <summary>
|
||||
/// DO NOT CHANGE! INTERNAL USE ONLY!
|
||||
/// </summary>
|
||||
Panel desktopIcon { get; set; }
|
||||
|
@ -54,10 +66,6 @@ namespace LaptopSimulator2015
|
|||
/// <param name="minigameTimer">The timer used for scheduling frames</param>
|
||||
/// <param name="minigameTime">The amount of total displayed frames</param>
|
||||
void draw(GraphicsWrapper g, Panel minigamePanel, Timer minigameTimer, uint minigameTime);
|
||||
/// <summary>
|
||||
/// Color to be painted to the Background before calling the draw method
|
||||
/// </summary>
|
||||
Color backColor { get; }
|
||||
}
|
||||
public interface Level : Minigame
|
||||
{
|
||||
|
|
125
Base/Rect.cs
125
Base/Rect.cs
|
@ -3,25 +3,15 @@ using System.Drawing;
|
|||
|
||||
namespace Base
|
||||
{
|
||||
public class Rect
|
||||
public struct Rect
|
||||
{
|
||||
public Vector2 Location;
|
||||
public Vector2 Size;
|
||||
bool centered;
|
||||
|
||||
/// <summary>
|
||||
/// Create a rect from the provided data
|
||||
/// </summary>
|
||||
/// <param name="Location">Bottom-left point</param>
|
||||
/// <param name="Size">Amount to extend top-right</param>
|
||||
public Rect(Vector2 Location, Vector2 Size, bool centered = false)
|
||||
{
|
||||
this.Location = Location ?? throw new ArgumentNullException(nameof(Location));
|
||||
this.Size = Size ?? throw new ArgumentNullException(nameof(Size));
|
||||
this.centered = centered;
|
||||
if (this.centered)
|
||||
this.Location -= this.Size / 2;
|
||||
}
|
||||
/// <param name="Location">Position</param>
|
||||
/// <param name="Size">Rect's size</param>
|
||||
/// <param name="centered">Whether the Rect should be created top-right or around the Location</param>
|
||||
public Rect(Vector2 Location, Vector2 Size, bool centered = false) : this(Location.X, Location.Y, Size.X, Size.Y, centered) { }
|
||||
|
||||
/// <summary>
|
||||
/// Create a rect from the provided data
|
||||
|
@ -30,13 +20,18 @@ namespace Base
|
|||
/// <param name="Y">Y in world-coordinates</param>
|
||||
/// <param name="Width">Width</param>
|
||||
/// <param name="Height">Height</param>
|
||||
/// <param name="centered">Whether the Rect should be created top-right or around the Location</param>
|
||||
public Rect(double X, double Y, double Width, double Height, bool centered = false)
|
||||
{
|
||||
Location = new Vector2(X, Y);
|
||||
Size = new Vector2(Width, Height);
|
||||
this.centered = centered;
|
||||
if (this.centered)
|
||||
Location -= Size / 2;
|
||||
this.X = X;
|
||||
this.Y = Y;
|
||||
this.Width = Width;
|
||||
this.Height = Height;
|
||||
if (centered)
|
||||
{
|
||||
this.X -= Width / 2;
|
||||
this.Y -= Height / 2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -45,70 +40,36 @@ namespace Base
|
|||
/// <param name="rect"></param>
|
||||
public Rect(Rect rect)
|
||||
{
|
||||
Location = rect.Location;
|
||||
Size = rect.Size;
|
||||
}
|
||||
public Rect(Rectangle rect)
|
||||
{
|
||||
Location = new Vector2(rect.Location);
|
||||
Size = new Vector2(rect.Size);
|
||||
}
|
||||
public Rect(RectangleF rect)
|
||||
{
|
||||
Location = new Vector2(rect.Location);
|
||||
Size = new Vector2(rect.Size);
|
||||
X = rect.X;
|
||||
Y = rect.Y;
|
||||
Width = rect.Width;
|
||||
Height = rect.Height;
|
||||
}
|
||||
/// <summary>
|
||||
/// Copies the Rect's data
|
||||
/// </summary>
|
||||
/// <param name="rect"></param>
|
||||
public Rect(Rectangle rect, bool transform = false) : this(rect.X, rect.Y, rect.Width, rect.Height, false) { }
|
||||
/// <summary>
|
||||
/// Copies the Rect's data
|
||||
/// </summary>
|
||||
/// <param name="rect"></param>
|
||||
public Rect(RectangleF rect, bool transform = false) : this(rect.X, rect.Y, rect.Width, rect.Height, false) { }
|
||||
|
||||
public double X
|
||||
{
|
||||
get => Location.X;
|
||||
set => Location.X = value;
|
||||
}
|
||||
|
||||
public double Y
|
||||
{
|
||||
get => Location.Y;
|
||||
set => Location.Y = value;
|
||||
}
|
||||
|
||||
public double Width
|
||||
{
|
||||
get => Size.X;
|
||||
set {
|
||||
if (centered)
|
||||
{
|
||||
double tmp = Size.X - value;
|
||||
Size.X = value;
|
||||
Location.X += tmp / 2;
|
||||
}
|
||||
else
|
||||
Size.X = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double Height
|
||||
{
|
||||
get => Size.Y;
|
||||
set {
|
||||
if (centered)
|
||||
{
|
||||
double tmp = Size.Y - value;
|
||||
Size.Y = value;
|
||||
Location.Y += tmp / 2;
|
||||
}
|
||||
else
|
||||
Size.Y = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double Bottom => Location.Y;
|
||||
public double Top => Location.Y + Size.Y;
|
||||
public double Left => Location.X;
|
||||
public double Right => Location.X + Size.X;
|
||||
public Vector2 bottomLeftPoint => new Vector2(Location);
|
||||
public Vector2 bottomRightPoint => new Vector2(Location.X, Location.Y + Size.Y);
|
||||
public Vector2 topLeftPoint => new Vector2(Location.X + Size.X, Location.Y);
|
||||
public Vector2 topRightPoint => Location + Size;
|
||||
public double X;
|
||||
public double Y;
|
||||
public double Width;
|
||||
public double Height;
|
||||
public Vector2 Location => new Vector2(X, Y);
|
||||
public Vector2 Size => new Vector2(Width, Height);
|
||||
public double Bottom => Y;
|
||||
public double Top => Y + Height;
|
||||
public double Left => X;
|
||||
public double Right => X + Width;
|
||||
public Vector2 bottomLeftPoint => new Vector2(Left, Bottom);
|
||||
public Vector2 topLeftPoint => new Vector2(Left, Top);
|
||||
public Vector2 bottomRightPoint => new Vector2(Right, Bottom);
|
||||
public Vector2 topRightPoint => new Vector2(Right, Top);
|
||||
public bool doOverlap(Rect other) => (Left <= other.Right && other.Left <= Right) || (Left >= other.Right && other.Left >= Right);
|
||||
public Rectangle toRectangle() => new Rectangle(Misc.d2i(X), Misc.d2i(Y), Misc.d2i(Width), Misc.d2i(Height));
|
||||
public RectangleF toRectangleF() => new RectangleF(Misc.d2f(X), Misc.d2f(Y), Misc.d2f(Width), Misc.d2f(Height));
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CaptchaGlitch_Double</RootNamespace>
|
||||
<AssemblyName>CaptchaGlitch_Double</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CaptchaGlitch_Rand</RootNamespace>
|
||||
<AssemblyName>CaptchaGlitch_Rand</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 J. Fronny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,30 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="LaptopSimulator2015.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
<LaptopSimulator2015.Properties.Settings>
|
||||
<setting name="wam" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="mlg" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="subs" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="level" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="lang" serializeAs="String">
|
||||
<value>(Default)</value>
|
||||
</setting>
|
||||
</LaptopSimulator2015.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
<runtime>
|
||||
<!-- AppContextSwitchOverrides values are in the form of 'key1=true|false;key2=true|false -->
|
||||
<!-- Please note that disabling Switch.UseLegacyAccessibilityFeatures, Switch.UseLegacyAccessibilityFeatures.2 and Switch.UseLegacyAccessibilityFeatures.3 is required to disable Switch.System.Windows.Forms.UseLegacyToolTipDisplay -->
|
||||
<AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false;Switch.UseLegacyAccessibilityFeatures.2=false;Switch.UseLegacyAccessibilityFeatures.3=false;Switch.System.Windows.Forms.UseLegacyToolTipDisplay=false"/>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace LaptopSimulator2015
|
|||
this.options_2 = new System.Windows.Forms.Panel();
|
||||
this.levelWindow = new System.Windows.Forms.Panel();
|
||||
this.levelWindowC1 = new System.Windows.Forms.Button();
|
||||
this.levelWindowContents = new System.Windows.Forms.TabControl();
|
||||
this.levelWindowContents = new WizardTab();
|
||||
this.levelWindow1 = new System.Windows.Forms.TabPage();
|
||||
this.levelWindowText1 = new System.Windows.Forms.Label();
|
||||
this.levelWindow2 = new System.Windows.Forms.TabPage();
|
||||
|
@ -71,6 +71,8 @@ namespace LaptopSimulator2015
|
|||
this.minigameClose = new System.Windows.Forms.Label();
|
||||
this.minigameClockT = new System.Windows.Forms.Timer(this.components);
|
||||
this.optionsWindow = new System.Windows.Forms.Panel();
|
||||
this.optionsWindowCredit = new System.Windows.Forms.Button();
|
||||
this.devWindowOpen = new System.Windows.Forms.Button();
|
||||
this.optionsWindowReset = new System.Windows.Forms.Button();
|
||||
this.optionsWindowLang = new System.Windows.Forms.ComboBox();
|
||||
this.optionsWindowSubs = new System.Windows.Forms.CheckBox();
|
||||
|
@ -85,16 +87,18 @@ namespace LaptopSimulator2015
|
|||
this.lsdEffectT = new System.Windows.Forms.Timer(this.components);
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.devWindow = new System.Windows.Forms.Panel();
|
||||
this.devWindowOverlay = new System.Windows.Forms.Button();
|
||||
this.devWindowSkip = new System.Windows.Forms.Button();
|
||||
this.devWindowLevelList = new System.Windows.Forms.ListBox();
|
||||
this.devWindowLevelLabel = new System.Windows.Forms.Label();
|
||||
this.devWindowDllLabel = new System.Windows.Forms.Label();
|
||||
this.devWindowDllList = new System.Windows.Forms.ListBox();
|
||||
this.devWindowHeader = new System.Windows.Forms.Panel();
|
||||
this.devWindowHeaderExit = new System.Windows.Forms.Label();
|
||||
this.devWindowIcon = new System.Windows.Forms.Panel();
|
||||
this.devWindowTitle = new System.Windows.Forms.Label();
|
||||
this.devWindowOpen = new System.Windows.Forms.Button();
|
||||
this.devWindowDllList = new System.Windows.Forms.ListBox();
|
||||
this.devWindowDllLabel = new System.Windows.Forms.Label();
|
||||
this.devWindowLevelLabel = new System.Windows.Forms.Label();
|
||||
this.devWindowLevelList = new System.Windows.Forms.ListBox();
|
||||
this.devWindowSkip = new System.Windows.Forms.Button();
|
||||
this.optionsWindowQualityLabel = new System.Windows.Forms.Label();
|
||||
this.optionsWindowQualityBox = new System.Windows.Forms.ComboBox();
|
||||
this.winMenuPanel.SuspendLayout();
|
||||
this.winTaskbar.SuspendLayout();
|
||||
this.winDesktop.SuspendLayout();
|
||||
|
@ -291,7 +295,7 @@ namespace LaptopSimulator2015
|
|||
this.levelWindowContents.Controls.Add(this.levelWindow2);
|
||||
this.levelWindowContents.Controls.Add(this.levelWindow3);
|
||||
this.levelWindowContents.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.levelWindowContents.ItemSize = new System.Drawing.Size(20, 15);
|
||||
this.levelWindowContents.ItemSize = new System.Drawing.Size(10, 10);
|
||||
this.levelWindowContents.Location = new System.Drawing.Point(0, 20);
|
||||
this.levelWindowContents.Name = "levelWindowContents";
|
||||
this.levelWindowContents.SelectedIndex = 0;
|
||||
|
@ -303,10 +307,10 @@ namespace LaptopSimulator2015
|
|||
// levelWindow1
|
||||
//
|
||||
this.levelWindow1.Controls.Add(this.levelWindowText1);
|
||||
this.levelWindow1.Location = new System.Drawing.Point(4, 19);
|
||||
this.levelWindow1.Location = new System.Drawing.Point(4, 14);
|
||||
this.levelWindow1.Name = "levelWindow1";
|
||||
this.levelWindow1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.levelWindow1.Size = new System.Drawing.Size(494, 225);
|
||||
this.levelWindow1.Size = new System.Drawing.Size(494, 230);
|
||||
this.levelWindow1.TabIndex = 0;
|
||||
this.levelWindow1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
|
@ -325,10 +329,10 @@ namespace LaptopSimulator2015
|
|||
this.levelWindow2.Controls.Add(this.captchaBox);
|
||||
this.levelWindow2.Controls.Add(this.captchaPanel);
|
||||
this.levelWindow2.Controls.Add(this.levelWindowText2);
|
||||
this.levelWindow2.Location = new System.Drawing.Point(4, 19);
|
||||
this.levelWindow2.Location = new System.Drawing.Point(4, 14);
|
||||
this.levelWindow2.Name = "levelWindow2";
|
||||
this.levelWindow2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.levelWindow2.Size = new System.Drawing.Size(494, 225);
|
||||
this.levelWindow2.Size = new System.Drawing.Size(494, 230);
|
||||
this.levelWindow2.TabIndex = 1;
|
||||
this.levelWindow2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
|
@ -366,9 +370,9 @@ namespace LaptopSimulator2015
|
|||
//
|
||||
this.levelWindow3.Controls.Add(this.levelWindowProgress);
|
||||
this.levelWindow3.Controls.Add(this.levelWindowText3);
|
||||
this.levelWindow3.Location = new System.Drawing.Point(4, 19);
|
||||
this.levelWindow3.Location = new System.Drawing.Point(4, 14);
|
||||
this.levelWindow3.Name = "levelWindow3";
|
||||
this.levelWindow3.Size = new System.Drawing.Size(494, 225);
|
||||
this.levelWindow3.Size = new System.Drawing.Size(494, 230);
|
||||
this.levelWindow3.TabIndex = 2;
|
||||
this.levelWindow3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
|
@ -415,7 +419,7 @@ namespace LaptopSimulator2015
|
|||
this.levelWindowHeaderExit.TabIndex = 2;
|
||||
this.levelWindowHeaderExit.Text = "r";
|
||||
this.levelWindowHeaderExit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.levelWindowHeaderExit.Click += new System.EventHandler(this.LevelWindowHeaderExit_Click);
|
||||
this.levelWindowHeaderExit.Click += new System.EventHandler(this.CloseMinigame);
|
||||
//
|
||||
// levelWindowIcon
|
||||
//
|
||||
|
@ -474,7 +478,7 @@ namespace LaptopSimulator2015
|
|||
this.minigameClose.Text = "r";
|
||||
this.minigameClose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.minigameClose.Visible = false;
|
||||
this.minigameClose.Click += new System.EventHandler(this.MinigameClose_Click);
|
||||
this.minigameClose.Click += new System.EventHandler(this.CloseMinigame);
|
||||
//
|
||||
// minigameClockT
|
||||
//
|
||||
|
@ -484,6 +488,9 @@ namespace LaptopSimulator2015
|
|||
// optionsWindow
|
||||
//
|
||||
this.optionsWindow.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowQualityBox);
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowQualityLabel);
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowCredit);
|
||||
this.optionsWindow.Controls.Add(this.devWindowOpen);
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowReset);
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowLang);
|
||||
|
@ -499,12 +506,34 @@ namespace LaptopSimulator2015
|
|||
this.optionsWindow.TabIndex = 6;
|
||||
this.optionsWindow.Visible = false;
|
||||
//
|
||||
// optionsWindowCredit
|
||||
//
|
||||
this.optionsWindowCredit.Location = new System.Drawing.Point(328, 60);
|
||||
this.optionsWindowCredit.Name = "optionsWindowCredit";
|
||||
this.optionsWindowCredit.Size = new System.Drawing.Size(51, 23);
|
||||
this.optionsWindowCredit.TabIndex = 9;
|
||||
this.optionsWindowCredit.Text = "Credits";
|
||||
this.optionsWindowCredit.UseVisualStyleBackColor = true;
|
||||
this.optionsWindowCredit.Click += new System.EventHandler(this.optionsWindowCredit_Click);
|
||||
//
|
||||
// devWindowOpen
|
||||
//
|
||||
this.devWindowOpen.Location = new System.Drawing.Point(254, 60);
|
||||
this.devWindowOpen.Name = "devWindowOpen";
|
||||
this.devWindowOpen.Size = new System.Drawing.Size(75, 23);
|
||||
this.devWindowOpen.TabIndex = 8;
|
||||
this.devWindowOpen.TabStop = false;
|
||||
this.devWindowOpen.Text = "DevTools";
|
||||
this.devWindowOpen.UseVisualStyleBackColor = true;
|
||||
this.devWindowOpen.Visible = false;
|
||||
this.devWindowOpen.Click += new System.EventHandler(this.DevWindowOpen_Click);
|
||||
//
|
||||
// optionsWindowReset
|
||||
//
|
||||
this.optionsWindowReset.BackColor = System.Drawing.Color.Red;
|
||||
this.optionsWindowReset.Location = new System.Drawing.Point(355, 60);
|
||||
this.optionsWindowReset.Location = new System.Drawing.Point(378, 60);
|
||||
this.optionsWindowReset.Name = "optionsWindowReset";
|
||||
this.optionsWindowReset.Size = new System.Drawing.Size(93, 23);
|
||||
this.optionsWindowReset.Size = new System.Drawing.Size(81, 23);
|
||||
this.optionsWindowReset.TabIndex = 7;
|
||||
this.optionsWindowReset.TabStop = false;
|
||||
this.optionsWindowReset.Text = "Reset";
|
||||
|
@ -517,16 +546,16 @@ namespace LaptopSimulator2015
|
|||
this.optionsWindowLang.Items.AddRange(new object[] {
|
||||
"de",
|
||||
"en"});
|
||||
this.optionsWindowLang.Location = new System.Drawing.Point(180, 62);
|
||||
this.optionsWindowLang.Location = new System.Drawing.Point(161, 61);
|
||||
this.optionsWindowLang.Name = "optionsWindowLang";
|
||||
this.optionsWindowLang.Size = new System.Drawing.Size(169, 21);
|
||||
this.optionsWindowLang.Size = new System.Drawing.Size(168, 21);
|
||||
this.optionsWindowLang.TabIndex = 6;
|
||||
this.optionsWindowLang.TabStop = false;
|
||||
//
|
||||
// optionsWindowSubs
|
||||
//
|
||||
this.optionsWindowSubs.AutoSize = true;
|
||||
this.optionsWindowSubs.Location = new System.Drawing.Point(108, 64);
|
||||
this.optionsWindowSubs.Location = new System.Drawing.Point(90, 64);
|
||||
this.optionsWindowSubs.Name = "optionsWindowSubs";
|
||||
this.optionsWindowSubs.Size = new System.Drawing.Size(66, 17);
|
||||
this.optionsWindowSubs.TabIndex = 5;
|
||||
|
@ -536,9 +565,9 @@ namespace LaptopSimulator2015
|
|||
//
|
||||
// optionsWindowExit
|
||||
//
|
||||
this.optionsWindowExit.Location = new System.Drawing.Point(454, 60);
|
||||
this.optionsWindowExit.Location = new System.Drawing.Point(458, 60);
|
||||
this.optionsWindowExit.Name = "optionsWindowExit";
|
||||
this.optionsWindowExit.Size = new System.Drawing.Size(34, 23);
|
||||
this.optionsWindowExit.Size = new System.Drawing.Size(30, 23);
|
||||
this.optionsWindowExit.TabIndex = 4;
|
||||
this.optionsWindowExit.TabStop = false;
|
||||
this.optionsWindowExit.Text = "OK";
|
||||
|
@ -572,7 +601,7 @@ namespace LaptopSimulator2015
|
|||
//
|
||||
this.optionsWindowWam.Location = new System.Drawing.Point(108, 26);
|
||||
this.optionsWindowWam.Name = "optionsWindowWam";
|
||||
this.optionsWindowWam.Size = new System.Drawing.Size(380, 45);
|
||||
this.optionsWindowWam.Size = new System.Drawing.Size(271, 45);
|
||||
this.optionsWindowWam.TabIndex = 1;
|
||||
this.optionsWindowWam.TabStop = false;
|
||||
this.optionsWindowWam.Scroll += new System.EventHandler(this.OptionsWindowWam_Scroll);
|
||||
|
@ -637,6 +666,7 @@ namespace LaptopSimulator2015
|
|||
// devWindow
|
||||
//
|
||||
this.devWindow.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.devWindow.Controls.Add(this.devWindowOverlay);
|
||||
this.devWindow.Controls.Add(this.devWindowSkip);
|
||||
this.devWindow.Controls.Add(this.devWindowLevelList);
|
||||
this.devWindow.Controls.Add(this.devWindowLevelLabel);
|
||||
|
@ -649,6 +679,71 @@ namespace LaptopSimulator2015
|
|||
this.devWindow.TabIndex = 8;
|
||||
this.devWindow.Visible = false;
|
||||
//
|
||||
// devWindowOverlay
|
||||
//
|
||||
this.devWindowOverlay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.devWindowOverlay.Location = new System.Drawing.Point(394, 227);
|
||||
this.devWindowOverlay.Name = "devWindowOverlay";
|
||||
this.devWindowOverlay.Size = new System.Drawing.Size(94, 23);
|
||||
this.devWindowOverlay.TabIndex = 6;
|
||||
this.devWindowOverlay.Text = "Overlay Console";
|
||||
this.devWindowOverlay.UseVisualStyleBackColor = true;
|
||||
this.devWindowOverlay.Click += new System.EventHandler(this.devWindowOverlay_Click);
|
||||
//
|
||||
// devWindowSkip
|
||||
//
|
||||
this.devWindowSkip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.devWindowSkip.Location = new System.Drawing.Point(13, 227);
|
||||
this.devWindowSkip.Name = "devWindowSkip";
|
||||
this.devWindowSkip.Size = new System.Drawing.Size(75, 23);
|
||||
this.devWindowSkip.TabIndex = 5;
|
||||
this.devWindowSkip.TabStop = false;
|
||||
this.devWindowSkip.Text = "Skip Step";
|
||||
this.devWindowSkip.UseVisualStyleBackColor = true;
|
||||
this.devWindowSkip.Click += new System.EventHandler(this.DevWindowSkip_Click);
|
||||
//
|
||||
// devWindowLevelList
|
||||
//
|
||||
this.devWindowLevelList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.devWindowLevelList.FormattingEnabled = true;
|
||||
this.devWindowLevelList.Location = new System.Drawing.Point(51, 127);
|
||||
this.devWindowLevelList.Name = "devWindowLevelList";
|
||||
this.devWindowLevelList.Size = new System.Drawing.Size(437, 95);
|
||||
this.devWindowLevelList.TabIndex = 4;
|
||||
this.devWindowLevelList.TabStop = false;
|
||||
this.devWindowLevelList.SelectedIndexChanged += new System.EventHandler(this.DevWindowLevelList_SelectedIndexChanged);
|
||||
//
|
||||
// devWindowLevelLabel
|
||||
//
|
||||
this.devWindowLevelLabel.AutoSize = true;
|
||||
this.devWindowLevelLabel.Location = new System.Drawing.Point(10, 131);
|
||||
this.devWindowLevelLabel.Name = "devWindowLevelLabel";
|
||||
this.devWindowLevelLabel.Size = new System.Drawing.Size(41, 13);
|
||||
this.devWindowLevelLabel.TabIndex = 3;
|
||||
this.devWindowLevelLabel.Text = "Levels:";
|
||||
//
|
||||
// devWindowDllLabel
|
||||
//
|
||||
this.devWindowDllLabel.AutoSize = true;
|
||||
this.devWindowDllLabel.Location = new System.Drawing.Point(10, 29);
|
||||
this.devWindowDllLabel.Name = "devWindowDllLabel";
|
||||
this.devWindowDllLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.devWindowDllLabel.TabIndex = 2;
|
||||
this.devWindowDllLabel.Text = "DLLs:";
|
||||
//
|
||||
// devWindowDllList
|
||||
//
|
||||
this.devWindowDllList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.devWindowDllList.FormattingEnabled = true;
|
||||
this.devWindowDllList.Location = new System.Drawing.Point(51, 26);
|
||||
this.devWindowDllList.Name = "devWindowDllList";
|
||||
this.devWindowDllList.Size = new System.Drawing.Size(437, 95);
|
||||
this.devWindowDllList.TabIndex = 1;
|
||||
this.devWindowDllList.TabStop = false;
|
||||
this.devWindowDllList.SelectedIndexChanged += new System.EventHandler(this.DevWindowDllList_SelectedIndexChanged);
|
||||
//
|
||||
// devWindowHeader
|
||||
//
|
||||
this.devWindowHeader.BackColor = System.Drawing.SystemColors.WindowFrame;
|
||||
|
@ -701,66 +796,29 @@ namespace LaptopSimulator2015
|
|||
this.devWindowTitle.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DevWindowHeader_MouseMove);
|
||||
this.devWindowTitle.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DevWindowHeader_MouseUp);
|
||||
//
|
||||
// devWindowOpen
|
||||
// optionsWindowQualityLabel
|
||||
//
|
||||
this.devWindowOpen.Location = new System.Drawing.Point(274, 60);
|
||||
this.devWindowOpen.Name = "devWindowOpen";
|
||||
this.devWindowOpen.Size = new System.Drawing.Size(75, 23);
|
||||
this.devWindowOpen.TabIndex = 8;
|
||||
this.devWindowOpen.TabStop = false;
|
||||
this.devWindowOpen.Text = "DevTools";
|
||||
this.devWindowOpen.UseVisualStyleBackColor = true;
|
||||
this.devWindowOpen.Visible = false;
|
||||
this.devWindowOpen.Click += new System.EventHandler(this.DevWindowOpen_Click);
|
||||
this.optionsWindowQualityLabel.AutoSize = true;
|
||||
this.optionsWindowQualityLabel.Location = new System.Drawing.Point(385, 23);
|
||||
this.optionsWindowQualityLabel.Name = "optionsWindowQualityLabel";
|
||||
this.optionsWindowQualityLabel.Size = new System.Drawing.Size(42, 13);
|
||||
this.optionsWindowQualityLabel.TabIndex = 10;
|
||||
this.optionsWindowQualityLabel.Text = "Quality:";
|
||||
//
|
||||
// devWindowDllList
|
||||
// optionsWindowQualityBox
|
||||
//
|
||||
this.devWindowDllList.FormattingEnabled = true;
|
||||
this.devWindowDllList.Location = new System.Drawing.Point(51, 26);
|
||||
this.devWindowDllList.Name = "devWindowDllList";
|
||||
this.devWindowDllList.Size = new System.Drawing.Size(437, 95);
|
||||
this.devWindowDllList.TabIndex = 1;
|
||||
this.devWindowDllList.TabStop = false;
|
||||
this.devWindowDllList.SelectedIndexChanged += new System.EventHandler(this.DevWindowDllList_SelectedIndexChanged);
|
||||
//
|
||||
// devWindowDllLabel
|
||||
//
|
||||
this.devWindowDllLabel.AutoSize = true;
|
||||
this.devWindowDllLabel.Location = new System.Drawing.Point(10, 29);
|
||||
this.devWindowDllLabel.Name = "devWindowDllLabel";
|
||||
this.devWindowDllLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.devWindowDllLabel.TabIndex = 2;
|
||||
this.devWindowDllLabel.Text = "DLLs:";
|
||||
//
|
||||
// devWindowLevelLabel
|
||||
//
|
||||
this.devWindowLevelLabel.AutoSize = true;
|
||||
this.devWindowLevelLabel.Location = new System.Drawing.Point(10, 131);
|
||||
this.devWindowLevelLabel.Name = "devWindowLevelLabel";
|
||||
this.devWindowLevelLabel.Size = new System.Drawing.Size(41, 13);
|
||||
this.devWindowLevelLabel.TabIndex = 3;
|
||||
this.devWindowLevelLabel.Text = "Levels:";
|
||||
//
|
||||
// devWindowLevelList
|
||||
//
|
||||
this.devWindowLevelList.FormattingEnabled = true;
|
||||
this.devWindowLevelList.Location = new System.Drawing.Point(51, 127);
|
||||
this.devWindowLevelList.Name = "devWindowLevelList";
|
||||
this.devWindowLevelList.Size = new System.Drawing.Size(437, 95);
|
||||
this.devWindowLevelList.TabIndex = 4;
|
||||
this.devWindowLevelList.TabStop = false;
|
||||
this.devWindowLevelList.SelectedIndexChanged += new System.EventHandler(this.DevWindowLevelList_SelectedIndexChanged);
|
||||
//
|
||||
// devWindowSkip
|
||||
//
|
||||
this.devWindowSkip.Location = new System.Drawing.Point(13, 227);
|
||||
this.devWindowSkip.Name = "devWindowSkip";
|
||||
this.devWindowSkip.Size = new System.Drawing.Size(75, 23);
|
||||
this.devWindowSkip.TabIndex = 5;
|
||||
this.devWindowSkip.TabStop = false;
|
||||
this.devWindowSkip.Text = "Skip Step";
|
||||
this.devWindowSkip.UseVisualStyleBackColor = true;
|
||||
this.devWindowSkip.Click += new System.EventHandler(this.DevWindowSkip_Click);
|
||||
this.optionsWindowQualityBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.optionsWindowQualityBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.optionsWindowQualityBox.FormattingEnabled = true;
|
||||
this.optionsWindowQualityBox.Items.AddRange(new object[] {
|
||||
"Sh*t",
|
||||
"Default",
|
||||
"Good"});
|
||||
this.optionsWindowQualityBox.Location = new System.Drawing.Point(385, 36);
|
||||
this.optionsWindowQualityBox.Name = "optionsWindowQualityBox";
|
||||
this.optionsWindowQualityBox.Size = new System.Drawing.Size(103, 21);
|
||||
this.optionsWindowQualityBox.TabIndex = 11;
|
||||
this.optionsWindowQualityBox.TabStop = false;
|
||||
//
|
||||
// FakeDesktop
|
||||
//
|
||||
|
@ -784,6 +842,7 @@ namespace LaptopSimulator2015
|
|||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FakeDesktop_FormClosing);
|
||||
this.Load += new System.EventHandler(this.FakeDesktop_Load);
|
||||
this.Shown += new System.EventHandler(this.FakeDesktop_Shown);
|
||||
this.winMenuPanel.ResumeLayout(false);
|
||||
this.winTaskbar.ResumeLayout(false);
|
||||
this.winTaskbar.PerformLayout();
|
||||
|
@ -827,7 +886,7 @@ namespace LaptopSimulator2015
|
|||
private System.Windows.Forms.Label levelWindowTitle;
|
||||
private System.Windows.Forms.Panel levelWindowIcon;
|
||||
private System.Windows.Forms.Label levelWindowText1;
|
||||
private System.Windows.Forms.TabControl levelWindowContents;
|
||||
private WizardTab levelWindowContents;
|
||||
private System.Windows.Forms.TabPage levelWindow1;
|
||||
private System.Windows.Forms.TabPage levelWindow2;
|
||||
private System.Windows.Forms.Button levelWindowC1;
|
||||
|
@ -872,5 +931,9 @@ namespace LaptopSimulator2015
|
|||
private System.Windows.Forms.Label devWindowLevelLabel;
|
||||
private System.Windows.Forms.ListBox devWindowLevelList;
|
||||
private System.Windows.Forms.Button devWindowSkip;
|
||||
private System.Windows.Forms.Button optionsWindowCredit;
|
||||
private System.Windows.Forms.Button devWindowOverlay;
|
||||
private System.Windows.Forms.Label optionsWindowQualityLabel;
|
||||
private System.Windows.Forms.ComboBox optionsWindowQualityBox;
|
||||
}
|
||||
}
|
|
@ -35,7 +35,7 @@ namespace LaptopSimulator2015
|
|||
_mode = value;
|
||||
winMenuStart.Enabled = _mode == Mode.mainMenu;
|
||||
winMenuStart.Visible = _mode == Mode.mainMenu;
|
||||
winMenuExit.Text = strings.winMenuExit1;
|
||||
winMenuExit.Text = strings.exit;
|
||||
winMenuPanel.Visible = false | _mode == Mode.mainMenu;
|
||||
winDesktop.Enabled = _mode == Mode.game;
|
||||
levelWindowText1.Text = "";
|
||||
|
@ -47,6 +47,12 @@ namespace LaptopSimulator2015
|
|||
optionsWindowWamLabel.Text = strings.optionsWindowWam;
|
||||
optionsWindowReset.Text = strings.optionsWindowReset;
|
||||
optionsWindowSubs.Text = strings.optionsWindowSubs;
|
||||
optionsWindowQualityBox.Items[0] = strings.optionsWindowQuality1;
|
||||
optionsWindowQualityBox.Items[1] = strings.optionsWindowQuality2;
|
||||
optionsWindowQualityBox.Items[2] = strings.optionsWindowQuality3;
|
||||
Text = strings.fakeDesktopTitle;
|
||||
winMenuStart.Text = strings.start;
|
||||
winMenuText.Text = strings.winMenuText;
|
||||
levelWindow.Visible = false;
|
||||
minigamePanel.Visible = false;
|
||||
optionsWindow.Visible = false;
|
||||
|
@ -66,10 +72,10 @@ namespace LaptopSimulator2015
|
|||
bool tmp__mode_uiv = false;
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume);
|
||||
static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume);
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);
|
||||
static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);
|
||||
|
||||
public FakeDesktop()
|
||||
{
|
||||
|
@ -80,11 +86,9 @@ namespace LaptopSimulator2015
|
|||
toolTip.SetToolTip(options_2, strings.optionsWindowTitle);
|
||||
#if DEBUG
|
||||
devWindowOpen.Visible = true;
|
||||
optionsWindowLang.Size = new Size(88, 21);
|
||||
optionsWindowLang.Size = new Size(93, 21);
|
||||
#endif
|
||||
levelWindowContents.ItemSize = new Size(0, 1);
|
||||
optionsWindowLang.Text = Settings.lang.Name;
|
||||
Thread.CurrentThread.CurrentUICulture = Settings.lang;
|
||||
optionsWindowWam.Value = Settings.wam;
|
||||
int NewVolume = ((ushort.MaxValue / 10) * Settings.wam);
|
||||
uint NewVolumeAllChannels = ((uint)NewVolume & 0x0000ffff) | ((uint)NewVolume << 16);
|
||||
|
@ -92,10 +96,7 @@ namespace LaptopSimulator2015
|
|||
tmpoptionslsdcanchange = Settings.lsd;
|
||||
optionsWindowLSD.Checked = Settings.lsd;
|
||||
optionsWindowSubs.Checked = Settings.subs;
|
||||
Text = strings.fakeDesktopTitle;
|
||||
winMenuExit.Text = strings.winMenuExit1;
|
||||
winMenuStart.Text = strings.winMenuStart;
|
||||
winMenuText.Text = strings.winMenuText;
|
||||
optionsWindowQualityBox.SelectedIndex = Settings.quality;
|
||||
levelWindowTitle.Text = "";
|
||||
winTimeLabel.Text = DateTime.Now.ToString("hh:mm:ss", Settings.lang);
|
||||
fans = new SoundPlayer(Resources.fans);
|
||||
|
@ -200,16 +201,17 @@ namespace LaptopSimulator2015
|
|||
levels[i].desktopIcon.Controls.Add(tmp1);
|
||||
winDesktop.Controls.Add(levels[i].desktopIcon);
|
||||
}
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private void FakeDesktop_Load(object sender, EventArgs e)
|
||||
{
|
||||
mode = Mode.mainMenu;
|
||||
Program.splash.Close();
|
||||
GC.Collect();
|
||||
tmp__mode_uiv = true;
|
||||
}
|
||||
|
||||
private void FakeDesktop_Shown(object sender, EventArgs e) => Program.splash?.Hide();
|
||||
|
||||
void updateIconVisibility(bool ignoreSub = false)
|
||||
{
|
||||
for (int i = 0; i < levels.Count; i++)
|
||||
|
@ -219,13 +221,17 @@ namespace LaptopSimulator2015
|
|||
string[] at = ((Goal)levels[i]).availableText;
|
||||
new Thread(() =>
|
||||
{
|
||||
Invoke((MethodInvoker)delegate () { winDesktop.Enabled = false; });
|
||||
playDialog(at).Join();
|
||||
Invoke((MethodInvoker)delegate ()
|
||||
try
|
||||
{
|
||||
winDesktop.Enabled = true;
|
||||
updateIconVisibility(true);
|
||||
});
|
||||
Invoke((MethodInvoker)delegate () { winDesktop.Enabled = false; });
|
||||
playDialog(at).Join();
|
||||
Invoke((MethodInvoker)delegate ()
|
||||
{
|
||||
winDesktop.Enabled = true;
|
||||
updateIconVisibility(true);
|
||||
});
|
||||
}
|
||||
catch (InvalidOperationException) { }
|
||||
}).Start();
|
||||
}
|
||||
levels[i].desktopIcon.Visible = levels[i].availableAfter <= Settings.level;
|
||||
|
@ -239,12 +245,16 @@ namespace LaptopSimulator2015
|
|||
{
|
||||
var tmp = new Thread(() =>
|
||||
{
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
try
|
||||
{
|
||||
Invoke((MethodInvoker)delegate () { subsLabel.Text = lines[i]; });
|
||||
Thread.Sleep(2000);
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
Invoke((MethodInvoker)delegate () { subsLabel.Text = lines[i]; });
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
Invoke((MethodInvoker)delegate () { subsLabel.Text = ""; });
|
||||
}
|
||||
Invoke((MethodInvoker)delegate () { subsLabel.Text = ""; });
|
||||
catch (InvalidOperationException) { }
|
||||
});
|
||||
tmp.Start();
|
||||
return tmp;
|
||||
|
@ -302,7 +312,7 @@ namespace LaptopSimulator2015
|
|||
else
|
||||
{
|
||||
if (levelWindow.Visible)
|
||||
LevelWindowHeaderExit_Click(sender, new EventArgs());
|
||||
Misc.closeGameWindow.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -312,7 +322,7 @@ namespace LaptopSimulator2015
|
|||
private void WinKey_Click(object sender, EventArgs e)
|
||||
{
|
||||
winMenuPanel.Visible = mode == Mode.mainMenu | !winMenuPanel.Visible;
|
||||
winMenuExit.Text = strings.winMenuExit1;
|
||||
winMenuExit.Text = strings.exit;
|
||||
}
|
||||
|
||||
private void WinMenuExit_Click(object sender, EventArgs e)
|
||||
|
@ -360,6 +370,7 @@ namespace LaptopSimulator2015
|
|||
case 0:
|
||||
CaptchaPanel_Click(sender, e);
|
||||
levelWindowContents.SelectedIndex = 1;
|
||||
captchaBox.Select();
|
||||
break;
|
||||
case 1:
|
||||
if (captchaBox.Text == (string)captchaBox.Tag)
|
||||
|
@ -386,7 +397,7 @@ namespace LaptopSimulator2015
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
LevelWindowHeaderExit_Click(sender, e);
|
||||
Misc.closeGameWindow.Invoke();
|
||||
if (levels[levelInd].availableAfter >= Settings.level)
|
||||
{
|
||||
incrementLevel();
|
||||
|
@ -467,15 +478,14 @@ namespace LaptopSimulator2015
|
|||
}
|
||||
}
|
||||
|
||||
private void LevelWindowHeaderExit_Click(object sender, EventArgs e) => Misc.closeGameWindow.Invoke();
|
||||
private void MinigameClose_Click(object sender, EventArgs e) => Misc.closeGameWindow.Invoke();
|
||||
private void CloseMinigame(object sender, EventArgs e) => Misc.closeGameWindow.Invoke();
|
||||
|
||||
#region Minigame
|
||||
uint minigameTime = 0;
|
||||
uint minigamePrevTime = 0;
|
||||
private void InvadersPanel_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
using (GraphicsWrapper w = new GraphicsWrapper(e.Graphics, levels[levelInd].backColor, new Rectangle(Point.Empty, minigamePanel.Size)))
|
||||
using (GraphicsWrapper w = new GraphicsWrapper(e.Graphics, levels[levelInd].backColor, new Rectangle(Point.Empty, minigamePanel.Size), Settings.quality == 1 ? levels[levelInd].isLowQuality : Settings.quality == 0))
|
||||
{
|
||||
w.Clear();
|
||||
levels[levelInd].draw(w, minigamePanel, minigameClockT, minigameTime);
|
||||
|
@ -531,6 +541,7 @@ namespace LaptopSimulator2015
|
|||
Settings.wam = optionsWindowWam.Value;
|
||||
Settings.lsd = optionsWindowLSD.Checked;
|
||||
Settings.subs = optionsWindowSubs.Checked;
|
||||
Settings.quality = optionsWindowQualityBox.SelectedIndex;
|
||||
int NewVolume = ((ushort.MaxValue / 10) * Settings.wam);
|
||||
uint NewVolumeAllChannels = ((uint)NewVolume & 0x0000ffff) | ((uint)NewVolume << 16);
|
||||
waveOutSetVolume(IntPtr.Zero, NewVolumeAllChannels);
|
||||
|
@ -649,6 +660,18 @@ namespace LaptopSimulator2015
|
|||
}
|
||||
}
|
||||
|
||||
private void optionsWindowCredit_Click(object sender, EventArgs e)
|
||||
{
|
||||
new Thread(() => {
|
||||
string tmp = Path.GetTempFileName();
|
||||
File.Move(tmp, Path.ChangeExtension(tmp, "txt"));
|
||||
tmp = Path.ChangeExtension(tmp, "txt");
|
||||
File.WriteAllLines(tmp, levels.SelectMany(s => s.credits).ToArray());
|
||||
Process.Start(tmp).WaitForExit();
|
||||
File.Delete(tmp);
|
||||
}).Start();
|
||||
}
|
||||
|
||||
bool devWindowMoving = false;
|
||||
Point devWindowDiff = Point.Empty;
|
||||
|
||||
|
@ -668,8 +691,7 @@ namespace LaptopSimulator2015
|
|||
private void DevWindowHeaderExit_Click(object sender, EventArgs e) => devWindow.Visible = false;
|
||||
private void DevWindowOpen_Click(object sender, EventArgs e) => devWindow.Visible = true;
|
||||
private void DevWindowDllList_SelectedIndexChanged(object sender, EventArgs e) => _ = Process.Start("explorer", "/select," + (((string)devWindowDllList.SelectedItem).Contains(" ") ? "\"" + (string)devWindowDllList.SelectedItem + "\"" : (string)devWindowDllList.SelectedItem));
|
||||
#endregion
|
||||
|
||||
|
||||
private void DevWindowLevelList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.level = levels[devWindowLevelList.SelectedIndex].availableAfter;
|
||||
|
@ -685,5 +707,18 @@ namespace LaptopSimulator2015
|
|||
LevelWindowC1_Click(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
private void devWindowOverlay_Click(object sender, EventArgs e) => _ = SetWindowPos(GetConsoleWindow(), HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS);
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
static extern IntPtr GetConsoleWindow();
|
||||
static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);
|
||||
const uint SWP_NOSIZE = 0x0001;
|
||||
const uint SWP_NOMOVE = 0x0002;
|
||||
const uint TOPMOST_FLAGS = SWP_NOMOVE | SWP_NOSIZE;
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -8,10 +8,11 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>LaptopSimulator2015</RootNamespace>
|
||||
<AssemblyName>LaptopSimulator2015</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
@ -79,6 +80,15 @@
|
|||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Tutorial.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Tutorial.Designer.cs">
|
||||
<DependentUpon>Tutorial.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WizardTab.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
|
@ -102,6 +112,9 @@
|
|||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>strings.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Tutorial.resx">
|
||||
<DependentUpon>Tutorial.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\fans.wav" />
|
||||
|
|
|
@ -14,11 +14,13 @@ namespace LaptopSimulator2015
|
|||
class Program
|
||||
{
|
||||
public static Splash splash;
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Settings.Load();
|
||||
Thread.CurrentThread.CurrentUICulture = Settings.lang;
|
||||
Console.Title = "LaptopSimulator2015";
|
||||
splash = new Splash();
|
||||
splash.Show();
|
||||
|
@ -34,6 +36,9 @@ namespace LaptopSimulator2015
|
|||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.Clear();
|
||||
Console.WriteLine(strings.consoleStarting);
|
||||
if (Settings.level == -1)
|
||||
while (Settings.level == -1)
|
||||
Application.Run(new Tutorial());
|
||||
Application.Run(new FakeDesktop());
|
||||
Console.WriteLine(strings.consoleQuit);
|
||||
Thread.Sleep(1000);
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace LaptopSimulator2015 {
|
|||
xmldoc_temp.Add(new XElement("lsd", lsd));
|
||||
xmldoc_temp.Add(new XElement("subs", subs));
|
||||
xmldoc_temp.Add(new XElement("level", level));
|
||||
xmldoc_temp.Add(new XElement("quality", quality));
|
||||
xmldoc_temp.Add(new XElement("lang", lang));
|
||||
xmldoc_temp.Save(_xmlfile);
|
||||
}
|
||||
|
@ -24,7 +25,8 @@ namespace LaptopSimulator2015 {
|
|||
xmldoc_temp.Add(new XElement("wam", 10));
|
||||
xmldoc_temp.Add(new XElement("lsd", false));
|
||||
xmldoc_temp.Add(new XElement("subs", true));
|
||||
xmldoc_temp.Add(new XElement("level", 0));
|
||||
xmldoc_temp.Add(new XElement("level", -1));
|
||||
xmldoc_temp.Add(new XElement("quality", 1));
|
||||
xmldoc_temp.Add(new XElement("lang", CultureInfo.CurrentCulture));
|
||||
xmldoc_temp.Save(_xmlfile);
|
||||
}
|
||||
|
@ -33,12 +35,14 @@ namespace LaptopSimulator2015 {
|
|||
lsd = bool.Parse(xmldoc.Element("lsd").Value);
|
||||
subs = bool.Parse(xmldoc.Element("subs").Value);
|
||||
level = int.Parse(xmldoc.Element("level").Value);
|
||||
quality = int.Parse(xmldoc.Element("quality").Value);
|
||||
lang = CultureInfo.GetCultureInfo(xmldoc.Element("lang").Value);
|
||||
}
|
||||
public static int wam;
|
||||
public static bool lsd;
|
||||
public static bool subs;
|
||||
public static int level;
|
||||
public static int quality;
|
||||
public static CultureInfo lang;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,400 @@
|
|||
namespace LaptopSimulator2015
|
||||
{
|
||||
partial class Tutorial
|
||||
{
|
||||
/// <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.components = new System.ComponentModel.Container();
|
||||
this.skipButton = new System.Windows.Forms.Button();
|
||||
this.dialog = new System.Windows.Forms.Panel();
|
||||
this.tabs = new LaptopSimulator2015.WizardTab();
|
||||
this.p1 = new System.Windows.Forms.TabPage();
|
||||
this.p1descLabel = new System.Windows.Forms.Label();
|
||||
this.p1controlPanel = new System.Windows.Forms.Panel();
|
||||
this.p1continue = new System.Windows.Forms.Button();
|
||||
this.p1lang = new System.Windows.Forms.ComboBox();
|
||||
this.p1titleLabel = new System.Windows.Forms.Label();
|
||||
this.p2 = new System.Windows.Forms.TabPage();
|
||||
this.p2continue = new System.Windows.Forms.Button();
|
||||
this.p2privacyLabel = new System.Windows.Forms.Label();
|
||||
this.p3 = new System.Windows.Forms.TabPage();
|
||||
this.p3spacingPanel1 = new System.Windows.Forms.Panel();
|
||||
this.p3continue = new System.Windows.Forms.Button();
|
||||
this.p3spacingPanel2 = new System.Windows.Forms.Panel();
|
||||
this.p4 = new System.Windows.Forms.TabPage();
|
||||
this.tutorialPanel = new System.Windows.Forms.Panel();
|
||||
this.p5 = new System.Windows.Forms.TabPage();
|
||||
this.p5completeLabel = new System.Windows.Forms.Label();
|
||||
this.p5controlPanel = new System.Windows.Forms.Panel();
|
||||
this.p5reboot = new System.Windows.Forms.Button();
|
||||
this.p5title = new System.Windows.Forms.Label();
|
||||
this.progressBar = new System.Windows.Forms.ProgressBar();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.progressTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.dialog.SuspendLayout();
|
||||
this.tabs.SuspendLayout();
|
||||
this.p1.SuspendLayout();
|
||||
this.p1controlPanel.SuspendLayout();
|
||||
this.p2.SuspendLayout();
|
||||
this.p3.SuspendLayout();
|
||||
this.p4.SuspendLayout();
|
||||
this.p5.SuspendLayout();
|
||||
this.p5controlPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// skipButton
|
||||
//
|
||||
this.skipButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.skipButton.Location = new System.Drawing.Point(1220, 0);
|
||||
this.skipButton.Name = "skipButton";
|
||||
this.skipButton.Size = new System.Drawing.Size(80, 23);
|
||||
this.skipButton.TabIndex = 0;
|
||||
this.skipButton.Text = "SKIP";
|
||||
this.skipButton.UseVisualStyleBackColor = true;
|
||||
this.skipButton.Visible = false;
|
||||
this.skipButton.Click += new System.EventHandler(this.skipButton_Click);
|
||||
//
|
||||
// dialog
|
||||
//
|
||||
this.dialog.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.dialog.BackColor = System.Drawing.Color.Silver;
|
||||
this.dialog.Controls.Add(this.tabs);
|
||||
this.dialog.Location = new System.Drawing.Point(450, 150);
|
||||
this.dialog.Name = "dialog";
|
||||
this.dialog.Size = new System.Drawing.Size(400, 400);
|
||||
this.dialog.TabIndex = 1;
|
||||
//
|
||||
// tabs
|
||||
//
|
||||
this.tabs.Appearance = System.Windows.Forms.TabAppearance.Buttons;
|
||||
this.tabs.Controls.Add(this.p1);
|
||||
this.tabs.Controls.Add(this.p2);
|
||||
this.tabs.Controls.Add(this.p3);
|
||||
this.tabs.Controls.Add(this.p4);
|
||||
this.tabs.Controls.Add(this.p5);
|
||||
this.tabs.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabs.ItemSize = new System.Drawing.Size(10, 21);
|
||||
this.tabs.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabs.Name = "tabs";
|
||||
this.tabs.SelectedIndex = 0;
|
||||
this.tabs.Size = new System.Drawing.Size(400, 400);
|
||||
this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.tabs.TabIndex = 0;
|
||||
this.tabs.TabStop = false;
|
||||
//
|
||||
// p1
|
||||
//
|
||||
this.p1.BackColor = System.Drawing.Color.White;
|
||||
this.p1.Controls.Add(this.p1descLabel);
|
||||
this.p1.Controls.Add(this.p1controlPanel);
|
||||
this.p1.Controls.Add(this.p1titleLabel);
|
||||
this.p1.Location = new System.Drawing.Point(4, 25);
|
||||
this.p1.Name = "p1";
|
||||
this.p1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.p1.Size = new System.Drawing.Size(392, 371);
|
||||
this.p1.TabIndex = 0;
|
||||
//
|
||||
// p1descLabel
|
||||
//
|
||||
this.p1descLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.p1descLabel.Location = new System.Drawing.Point(3, 65);
|
||||
this.p1descLabel.Name = "p1descLabel";
|
||||
this.p1descLabel.Size = new System.Drawing.Size(386, 258);
|
||||
this.p1descLabel.TabIndex = 0;
|
||||
this.p1descLabel.Text = "label2";
|
||||
this.p1descLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// p1controlPanel
|
||||
//
|
||||
this.p1controlPanel.BackColor = System.Drawing.Color.Silver;
|
||||
this.p1controlPanel.Controls.Add(this.p1continue);
|
||||
this.p1controlPanel.Controls.Add(this.p1lang);
|
||||
this.p1controlPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.p1controlPanel.Location = new System.Drawing.Point(3, 323);
|
||||
this.p1controlPanel.Name = "p1controlPanel";
|
||||
this.p1controlPanel.Size = new System.Drawing.Size(386, 45);
|
||||
this.p1controlPanel.TabIndex = 1;
|
||||
//
|
||||
// p1continue
|
||||
//
|
||||
this.p1continue.Location = new System.Drawing.Point(304, 10);
|
||||
this.p1continue.Name = "p1continue";
|
||||
this.p1continue.Size = new System.Drawing.Size(75, 23);
|
||||
this.p1continue.TabIndex = 1;
|
||||
this.p1continue.Text = "Continue";
|
||||
this.p1continue.UseVisualStyleBackColor = true;
|
||||
this.p1continue.Click += new System.EventHandler(this.Continue1_Click);
|
||||
//
|
||||
// p1lang
|
||||
//
|
||||
this.p1lang.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.p1lang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.p1lang.FormattingEnabled = true;
|
||||
this.p1lang.Items.AddRange(new object[] {
|
||||
"de",
|
||||
"en"});
|
||||
this.p1lang.Location = new System.Drawing.Point(12, 12);
|
||||
this.p1lang.Name = "p1lang";
|
||||
this.p1lang.Size = new System.Drawing.Size(121, 21);
|
||||
this.p1lang.TabIndex = 0;
|
||||
this.p1lang.SelectedIndexChanged += new System.EventHandler(this.lang_SelectedIndexChanged);
|
||||
//
|
||||
// p1titleLabel
|
||||
//
|
||||
this.p1titleLabel.BackColor = System.Drawing.Color.Silver;
|
||||
this.p1titleLabel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.p1titleLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.p1titleLabel.Location = new System.Drawing.Point(3, 3);
|
||||
this.p1titleLabel.Name = "p1titleLabel";
|
||||
this.p1titleLabel.Size = new System.Drawing.Size(386, 62);
|
||||
this.p1titleLabel.TabIndex = 0;
|
||||
this.p1titleLabel.Text = "LaptopSimulator2015";
|
||||
this.p1titleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// p2
|
||||
//
|
||||
this.p2.Controls.Add(this.p2continue);
|
||||
this.p2.Controls.Add(this.p2privacyLabel);
|
||||
this.p2.Location = new System.Drawing.Point(4, 25);
|
||||
this.p2.Name = "p2";
|
||||
this.p2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.p2.Size = new System.Drawing.Size(392, 371);
|
||||
this.p2.TabIndex = 1;
|
||||
//
|
||||
// p2continue
|
||||
//
|
||||
this.p2continue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.p2continue.Location = new System.Drawing.Point(311, 345);
|
||||
this.p2continue.Name = "p2continue";
|
||||
this.p2continue.Size = new System.Drawing.Size(75, 23);
|
||||
this.p2continue.TabIndex = 1;
|
||||
this.p2continue.Text = "Continue";
|
||||
this.p2continue.UseVisualStyleBackColor = true;
|
||||
this.p2continue.Click += new System.EventHandler(this.continue2_Click);
|
||||
//
|
||||
// p2privacyLabel
|
||||
//
|
||||
this.p2privacyLabel.AutoSize = true;
|
||||
this.p2privacyLabel.Location = new System.Drawing.Point(6, 3);
|
||||
this.p2privacyLabel.Name = "p2privacyLabel";
|
||||
this.p2privacyLabel.Size = new System.Drawing.Size(209, 13);
|
||||
this.p2privacyLabel.TabIndex = 0;
|
||||
this.p2privacyLabel.Text = "Alan, please add random \"Privacy\"-notices";
|
||||
//
|
||||
// p3
|
||||
//
|
||||
this.p3.BackColor = System.Drawing.Color.White;
|
||||
this.p3.Controls.Add(this.p3spacingPanel1);
|
||||
this.p3.Controls.Add(this.p3continue);
|
||||
this.p3.Controls.Add(this.p3spacingPanel2);
|
||||
this.p3.Location = new System.Drawing.Point(4, 25);
|
||||
this.p3.Name = "p3";
|
||||
this.p3.Size = new System.Drawing.Size(392, 371);
|
||||
this.p3.TabIndex = 2;
|
||||
//
|
||||
// p3spacingPanel1
|
||||
//
|
||||
this.p3spacingPanel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.p3spacingPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.p3spacingPanel1.Name = "p3spacingPanel1";
|
||||
this.p3spacingPanel1.Size = new System.Drawing.Size(392, 100);
|
||||
this.p3spacingPanel1.TabIndex = 2;
|
||||
//
|
||||
// p3continue
|
||||
//
|
||||
this.p3continue.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.p3continue.Font = new System.Drawing.Font("Microsoft Sans Serif", 37F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.p3continue.Location = new System.Drawing.Point(0, 0);
|
||||
this.p3continue.Name = "p3continue";
|
||||
this.p3continue.Size = new System.Drawing.Size(392, 271);
|
||||
this.p3continue.TabIndex = 0;
|
||||
this.p3continue.Text = "INSTALL";
|
||||
this.p3continue.UseVisualStyleBackColor = true;
|
||||
this.p3continue.Click += new System.EventHandler(this.continue3_Click);
|
||||
//
|
||||
// p3spacingPanel2
|
||||
//
|
||||
this.p3spacingPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.p3spacingPanel2.Location = new System.Drawing.Point(0, 271);
|
||||
this.p3spacingPanel2.Name = "p3spacingPanel2";
|
||||
this.p3spacingPanel2.Size = new System.Drawing.Size(392, 100);
|
||||
this.p3spacingPanel2.TabIndex = 1;
|
||||
//
|
||||
// p4
|
||||
//
|
||||
this.p4.BackColor = System.Drawing.Color.White;
|
||||
this.p4.Controls.Add(this.tutorialPanel);
|
||||
this.p4.Location = new System.Drawing.Point(4, 25);
|
||||
this.p4.Name = "p4";
|
||||
this.p4.Size = new System.Drawing.Size(392, 371);
|
||||
this.p4.TabIndex = 3;
|
||||
//
|
||||
// tutorialPanel
|
||||
//
|
||||
this.tutorialPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tutorialPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.tutorialPanel.Name = "tutorialPanel";
|
||||
this.tutorialPanel.Size = new System.Drawing.Size(392, 371);
|
||||
this.tutorialPanel.TabIndex = 0;
|
||||
this.tutorialPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.tutorialPanel_Paint);
|
||||
//
|
||||
// p5
|
||||
//
|
||||
this.p5.BackColor = System.Drawing.Color.White;
|
||||
this.p5.Controls.Add(this.p5completeLabel);
|
||||
this.p5.Controls.Add(this.p5controlPanel);
|
||||
this.p5.Controls.Add(this.p5title);
|
||||
this.p5.Location = new System.Drawing.Point(4, 25);
|
||||
this.p5.Name = "p5";
|
||||
this.p5.Size = new System.Drawing.Size(392, 371);
|
||||
this.p5.TabIndex = 4;
|
||||
//
|
||||
// p5completeLabel
|
||||
//
|
||||
this.p5completeLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.p5completeLabel.Location = new System.Drawing.Point(0, 62);
|
||||
this.p5completeLabel.Name = "p5completeLabel";
|
||||
this.p5completeLabel.Size = new System.Drawing.Size(392, 264);
|
||||
this.p5completeLabel.TabIndex = 2;
|
||||
this.p5completeLabel.Text = "label2";
|
||||
this.p5completeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// p5controlPanel
|
||||
//
|
||||
this.p5controlPanel.Controls.Add(this.p5reboot);
|
||||
this.p5controlPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.p5controlPanel.Location = new System.Drawing.Point(0, 326);
|
||||
this.p5controlPanel.Name = "p5controlPanel";
|
||||
this.p5controlPanel.Size = new System.Drawing.Size(392, 45);
|
||||
this.p5controlPanel.TabIndex = 4;
|
||||
//
|
||||
// p5reboot
|
||||
//
|
||||
this.p5reboot.Location = new System.Drawing.Point(304, 10);
|
||||
this.p5reboot.Name = "p5reboot";
|
||||
this.p5reboot.Size = new System.Drawing.Size(75, 23);
|
||||
this.p5reboot.TabIndex = 1;
|
||||
this.p5reboot.Text = "Reboot";
|
||||
this.p5reboot.UseVisualStyleBackColor = true;
|
||||
this.p5reboot.Click += new System.EventHandler(this.p5reboot_Click);
|
||||
//
|
||||
// p5title
|
||||
//
|
||||
this.p5title.BackColor = System.Drawing.Color.Silver;
|
||||
this.p5title.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.p5title.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.p5title.Location = new System.Drawing.Point(0, 0);
|
||||
this.p5title.Name = "p5title";
|
||||
this.p5title.Size = new System.Drawing.Size(392, 62);
|
||||
this.p5title.TabIndex = 3;
|
||||
this.p5title.Text = "LaptopSimulator2015";
|
||||
this.p5title.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// progressBar
|
||||
//
|
||||
this.progressBar.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.progressBar.Location = new System.Drawing.Point(0, 677);
|
||||
this.progressBar.Name = "progressBar";
|
||||
this.progressBar.Size = new System.Drawing.Size(1300, 23);
|
||||
this.progressBar.Step = 1;
|
||||
this.progressBar.TabIndex = 2;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Location = new System.Drawing.Point(0, 0);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(80, 23);
|
||||
this.cancelButton.TabIndex = 3;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// progressTimer
|
||||
//
|
||||
this.progressTimer.Interval = 120;
|
||||
this.progressTimer.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// Tutorial
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.ClientSize = new System.Drawing.Size(1300, 700);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.progressBar);
|
||||
this.Controls.Add(this.dialog);
|
||||
this.Controls.Add(this.skipButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "Tutorial";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Tutorial";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this.Shown += new System.EventHandler(this.Tutorial_Shown);
|
||||
this.dialog.ResumeLayout(false);
|
||||
this.tabs.ResumeLayout(false);
|
||||
this.p1.ResumeLayout(false);
|
||||
this.p1controlPanel.ResumeLayout(false);
|
||||
this.p2.ResumeLayout(false);
|
||||
this.p2.PerformLayout();
|
||||
this.p3.ResumeLayout(false);
|
||||
this.p4.ResumeLayout(false);
|
||||
this.p5.ResumeLayout(false);
|
||||
this.p5controlPanel.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button skipButton;
|
||||
private System.Windows.Forms.Panel dialog;
|
||||
private System.Windows.Forms.ProgressBar progressBar;
|
||||
private WizardTab tabs;
|
||||
private System.Windows.Forms.TabPage p1;
|
||||
private System.Windows.Forms.TabPage p2;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Label p1titleLabel;
|
||||
private System.Windows.Forms.Label p1descLabel;
|
||||
private System.Windows.Forms.Panel p1controlPanel;
|
||||
private System.Windows.Forms.ComboBox p1lang;
|
||||
private System.Windows.Forms.Button p1continue;
|
||||
private System.Windows.Forms.Label p2privacyLabel;
|
||||
private System.Windows.Forms.Button p2continue;
|
||||
private System.Windows.Forms.TabPage p3;
|
||||
private System.Windows.Forms.Panel p3spacingPanel1;
|
||||
private System.Windows.Forms.Panel p3spacingPanel2;
|
||||
private System.Windows.Forms.Button p3continue;
|
||||
private System.Windows.Forms.Timer progressTimer;
|
||||
private System.Windows.Forms.TabPage p4;
|
||||
private System.Windows.Forms.TabPage p5;
|
||||
private System.Windows.Forms.Label p5completeLabel;
|
||||
private System.Windows.Forms.Panel p5controlPanel;
|
||||
private System.Windows.Forms.Button p5reboot;
|
||||
private System.Windows.Forms.Label p5title;
|
||||
private System.Windows.Forms.Panel tutorialPanel;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Globalization;
|
||||
using System.Drawing.Drawing2D;
|
||||
using Base;
|
||||
|
||||
namespace LaptopSimulator2015
|
||||
{
|
||||
public partial class Tutorial : Form
|
||||
{
|
||||
public Tutorial()
|
||||
{
|
||||
InitializeComponent();
|
||||
#if DEBUG
|
||||
skipButton.Visible = true;
|
||||
#endif
|
||||
p1lang.Text = Settings.lang.Name.Split('-')[0];
|
||||
p1descLabel.Text = strings.winMenuText;
|
||||
cancelButton.Text = strings.cancel;
|
||||
skipButton.Text = strings.skip;
|
||||
p1continue.Text = strings._continue;
|
||||
p2continue.Text = strings._continue;
|
||||
p3continue.Text = strings.install.ToUpper();
|
||||
p5completeLabel.Text = strings.tutorialFinish;
|
||||
}
|
||||
|
||||
private void skipButton_Click(object sender, EventArgs e) => tabs.SelectedIndex = 4;
|
||||
private void Tutorial_Shown(object sender, EventArgs e) => Program.splash.Hide();
|
||||
private void cancelButton_Click(object sender, EventArgs e) => Environment.Exit(0);
|
||||
private void lang_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.lang = CultureInfo.GetCultureInfo(p1lang.Text);
|
||||
Thread.CurrentThread.CurrentUICulture = Settings.lang;
|
||||
p1descLabel.Text = strings.winMenuText;
|
||||
cancelButton.Text = strings.cancel;
|
||||
skipButton.Text = strings.skip;
|
||||
p1continue.Text = strings._continue;
|
||||
p2continue.Text = strings._continue;
|
||||
p3continue.Text = strings.install.ToUpper();
|
||||
p5completeLabel.Text = strings.tutorialFinish;
|
||||
}
|
||||
|
||||
private void Continue1_Click(object sender, EventArgs e)
|
||||
{
|
||||
tabs.SelectedIndex = 1;
|
||||
progressBar.Value = 25;
|
||||
}
|
||||
|
||||
private void continue2_Click(object sender, EventArgs e)
|
||||
{
|
||||
tabs.SelectedIndex = 2;
|
||||
progressBar.Value = 50;
|
||||
}
|
||||
|
||||
private void continue3_Click(object sender, EventArgs e)
|
||||
{
|
||||
tabs.SelectedIndex = 3;
|
||||
progressTimer.Enabled = true;
|
||||
}
|
||||
|
||||
int timertime = 0;
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (timertime <= 50)
|
||||
{
|
||||
progressBar.Value = 50 + timertime;
|
||||
timertime++;
|
||||
tutorialPanel.Invalidate();
|
||||
}
|
||||
else
|
||||
{
|
||||
tabs.SelectedIndex = 4;
|
||||
progressTimer.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void p5reboot_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.level = 0;
|
||||
Settings.Save();
|
||||
Program.splash.Show();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void tutorialPanel_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
using (GraphicsWrapper g = new GraphicsWrapper(e.Graphics, Color.Red, new Rectangle(Point.Empty, tutorialPanel.Size), true))
|
||||
{
|
||||
for (int i = 0; i < 40; i++)
|
||||
for (int j = 0; j < 40; j++)
|
||||
g.DrawLine(new PointF(tutorialPanel.Width / 2, tutorialPanel.Height / 2), new PointF(i * 10 + 5, j * 10 + 5), Color.DarkGray, 1, false);
|
||||
g.DrawSizedString("This is " + ((timertime < 17) ? "bad" : (timertime <= 33) ? "neutral" : "you"), 10, new PointF(tutorialPanel.Width / 2, tutorialPanel.Height / 2), new SolidBrush((timertime < 17) ? Color.Red : (timertime <= 33) ? Color.White : Color.Green), true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +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=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>
|
||||
<metadata name="progressTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
|
||||
namespace LaptopSimulator2015
|
||||
{
|
||||
public class WizardTab : TabControl
|
||||
{
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||
{
|
||||
var filteredKeys = new Keys[]{(Keys.Control | Keys.Tab),
|
||||
(Keys.Control | Keys.Shift | Keys.Tab),
|
||||
Keys.Left, Keys.Right, Keys.Home, Keys.End};
|
||||
if (filteredKeys.Contains(keyData))
|
||||
return true;
|
||||
return base.ProcessCmdKey(ref msg, keyData);
|
||||
}
|
||||
public const int TCM_FIRST = 0x1300;
|
||||
public const int TCM_ADJUSTRECT = TCM_FIRST + 40;
|
||||
public WizardTab()
|
||||
{
|
||||
Appearance = TabAppearance.Buttons;
|
||||
ItemSize = new Size(1, 0);
|
||||
SizeMode = TabSizeMode.Fixed;
|
||||
TabStop = false;
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == TCM_ADJUSTRECT && !DesignMode)
|
||||
m.Result = (IntPtr)1;
|
||||
else
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -69,6 +69,15 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel.
|
||||
/// </summary>
|
||||
internal static string cancel {
|
||||
get {
|
||||
return ResourceManager.GetString("cancel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ABCDEFGHIJKLMNPQRSTUVWXYZ123456789.
|
||||
/// </summary>
|
||||
|
@ -97,7 +106,7 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to E X I T E D ..
|
||||
/// Looks up a localized string similar to Shutting down VM....
|
||||
/// </summary>
|
||||
internal static string consoleQuit {
|
||||
get {
|
||||
|
@ -106,7 +115,7 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to S T A R T I N G . . ..
|
||||
/// Looks up a localized string similar to Starting up VM....
|
||||
/// </summary>
|
||||
internal static string consoleStarting {
|
||||
get {
|
||||
|
@ -114,6 +123,15 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Exit.
|
||||
/// </summary>
|
||||
internal static string exit {
|
||||
get {
|
||||
return ResourceManager.GetString("exit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fake Desktop.
|
||||
/// </summary>
|
||||
|
@ -123,6 +141,15 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Install.
|
||||
/// </summary>
|
||||
internal static string install {
|
||||
get {
|
||||
return ResourceManager.GetString("install", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WARNING: We recommend you restart your game to apply these changes. Restart?.
|
||||
/// </summary>
|
||||
|
@ -141,6 +168,15 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Credits.
|
||||
/// </summary>
|
||||
internal static string optionsWindowCredits {
|
||||
get {
|
||||
return ResourceManager.GetString("optionsWindowCredits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to LSD Mode.
|
||||
/// </summary>
|
||||
|
@ -159,6 +195,33 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sh*t.
|
||||
/// </summary>
|
||||
internal static string optionsWindowQuality1 {
|
||||
get {
|
||||
return ResourceManager.GetString("optionsWindowQuality1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default.
|
||||
/// </summary>
|
||||
internal static string optionsWindowQuality2 {
|
||||
get {
|
||||
return ResourceManager.GetString("optionsWindowQuality2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Good.
|
||||
/// </summary>
|
||||
internal static string optionsWindowQuality3 {
|
||||
get {
|
||||
return ResourceManager.GetString("optionsWindowQuality3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reset.
|
||||
/// </summary>
|
||||
|
@ -232,11 +295,29 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Exit.
|
||||
/// Looks up a localized string similar to Skip.
|
||||
/// </summary>
|
||||
internal static string winMenuExit1 {
|
||||
internal static string skip {
|
||||
get {
|
||||
return ResourceManager.GetString("winMenuExit1", resourceCulture);
|
||||
return ResourceManager.GetString("skip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start.
|
||||
/// </summary>
|
||||
internal static string start {
|
||||
get {
|
||||
return ResourceManager.GetString("start", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Thank you for installing our OS. Please reboot your system to complete the installation!.
|
||||
/// </summary>
|
||||
internal static string tutorialFinish {
|
||||
get {
|
||||
return ResourceManager.GetString("tutorialFinish", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,15 +330,6 @@ namespace LaptopSimulator2015 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start.
|
||||
/// </summary>
|
||||
internal static string winMenuStart {
|
||||
get {
|
||||
return ResourceManager.GetString("winMenuStart", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hello and welcome to my game, I hope you'll like it. My name is CreepyCrafter24, btw. (FunFact: This game was originally created as the result of a conversation with a classmate).
|
||||
/// </summary>
|
||||
|
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="cancel" xml:space="preserve">
|
||||
<value>Abbrechen</value>
|
||||
</data>
|
||||
<data name="captchaLetters" xml:space="preserve">
|
||||
<value>ABCDEFGHIJKLMNPQRSTUVWXYZ123456789</value>
|
||||
</data>
|
||||
|
@ -127,29 +130,47 @@
|
|||
<value>Drücken Sie eine beliebige Taste.</value>
|
||||
</data>
|
||||
<data name="consoleQuit" xml:space="preserve">
|
||||
<value>B E E N D E T . . .</value>
|
||||
<value>VM wird heruntergefahren...</value>
|
||||
</data>
|
||||
<data name="consoleStarting" xml:space="preserve">
|
||||
<value>S T A R T E T . . .</value>
|
||||
<value>VM wird gestartet...</value>
|
||||
</data>
|
||||
<data name="continue" xml:space="preserve">
|
||||
<value>Fortfahren</value>
|
||||
</data>
|
||||
<data name="fakeDesktopTitle1" xml:space="preserve">
|
||||
<data name="exit" xml:space="preserve">
|
||||
<value>Beenden</value>
|
||||
</data>
|
||||
<data name="fakeDesktopTitle" xml:space="preserve">
|
||||
<value>Falscher Desktop</value>
|
||||
</data>
|
||||
<data name="install" xml:space="preserve">
|
||||
<value>Installieren</value>
|
||||
</data>
|
||||
<data name="langWarning" xml:space="preserve">
|
||||
<value>WARNUNG: Wir empfehlen, das Spiel nach der Änderung neu zu starten. Neu starten?</value>
|
||||
</data>
|
||||
<data name="lvPref" xml:space="preserve">
|
||||
<value>Level</value>
|
||||
</data>
|
||||
<data name="optionsWindowCredits" xml:space="preserve">
|
||||
<value>Credits</value>
|
||||
</data>
|
||||
<data name="optionsWindowLSD" xml:space="preserve">
|
||||
<value>LSD-Modus</value>
|
||||
</data>
|
||||
<data name="optionsWindowLSDWarning" xml:space="preserve">
|
||||
<value>Bist du dir sicher? (ALLES wird verbuggt werden!)</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality1" xml:space="preserve">
|
||||
<value>Müll</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality2" xml:space="preserve">
|
||||
<value>Standard</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality3" xml:space="preserve">
|
||||
<value>Supremo</value>
|
||||
</data>
|
||||
<data name="optionsWindowReset" xml:space="preserve">
|
||||
<value>Zurücksetzen</value>
|
||||
</data>
|
||||
|
@ -174,15 +195,18 @@
|
|||
<data name="resetWarning2" xml:space="preserve">
|
||||
<value>Bist du dir wirklich sicher, dass du deinen Fortschritt zurücksetzten möchtest? Dies ist deine letzte Möglichkeit, dies abzubrechen!</value>
|
||||
</data>
|
||||
<data name="winMenuExit1" xml:space="preserve">
|
||||
<value>Beenden</value>
|
||||
<data name="skip" xml:space="preserve">
|
||||
<value>Skip</value>
|
||||
</data>
|
||||
<data name="start" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="tutorialFinish" xml:space="preserve">
|
||||
<value>Vielen Dank, dass sie unser OS installiert haben. Bitte starten sie ihren Rechner neu, um die Installation fertigzustellen</value>
|
||||
</data>
|
||||
<data name="winMenuExit2" xml:space="preserve">
|
||||
<value>Bist du sicher?</value>
|
||||
</data>
|
||||
<data name="winMenuStart" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="winMenuText" xml:space="preserve">
|
||||
<value>Hallo und Willkommen in diesem Spiel. Mein Name ist CreepyCrafter24. (Im Übrigen: Dieses Spiel entstand ursprünglich aus einer Unterhaltung mit einem Klassenkameraden. Lustig, oder?)</value>
|
||||
</data>
|
||||
|
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="cancel" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="captchaLetters" xml:space="preserve">
|
||||
<value>ABCDEFGHIJKLMNPQRSTUVWXYZ123456789</value>
|
||||
</data>
|
||||
|
@ -127,29 +130,47 @@
|
|||
<value>Press any Key to quit.</value>
|
||||
</data>
|
||||
<data name="consoleQuit" xml:space="preserve">
|
||||
<value>E X I T E D .</value>
|
||||
<value>Shutting down VM...</value>
|
||||
</data>
|
||||
<data name="consoleStarting" xml:space="preserve">
|
||||
<value>S T A R T I N G . . .</value>
|
||||
<value>Starting up VM...</value>
|
||||
</data>
|
||||
<data name="continue" xml:space="preserve">
|
||||
<value>Continue</value>
|
||||
</data>
|
||||
<data name="exit" xml:space="preserve">
|
||||
<value>Exit</value>
|
||||
</data>
|
||||
<data name="fakeDesktopTitle" xml:space="preserve">
|
||||
<value>Fake Desktop</value>
|
||||
</data>
|
||||
<data name="install" xml:space="preserve">
|
||||
<value>Install</value>
|
||||
</data>
|
||||
<data name="langWarning" xml:space="preserve">
|
||||
<value>WARNING: We recommend you restart your game to apply these changes. Restart?</value>
|
||||
</data>
|
||||
<data name="lvPref" xml:space="preserve">
|
||||
<value>Level</value>
|
||||
</data>
|
||||
<data name="optionsWindowCredits" xml:space="preserve">
|
||||
<value>Credits</value>
|
||||
</data>
|
||||
<data name="optionsWindowLSD" xml:space="preserve">
|
||||
<value>LSD Mode</value>
|
||||
</data>
|
||||
<data name="optionsWindowLSDWarning" xml:space="preserve">
|
||||
<value>Are you SURE?\r\n(This will break EVERYTHING!)</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality1" xml:space="preserve">
|
||||
<value>Sh*t</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality2" xml:space="preserve">
|
||||
<value>Default</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality3" xml:space="preserve">
|
||||
<value>Good</value>
|
||||
</data>
|
||||
<data name="optionsWindowReset" xml:space="preserve">
|
||||
<value>Reset</value>
|
||||
</data>
|
||||
|
@ -174,15 +195,18 @@
|
|||
<data name="resetWarning2" xml:space="preserve">
|
||||
<value>Are you absolutly sure you want to reset you progress? This is your last chance to turn back!</value>
|
||||
</data>
|
||||
<data name="winMenuExit1" xml:space="preserve">
|
||||
<value>Exit</value>
|
||||
<data name="skip" xml:space="preserve">
|
||||
<value>Skip</value>
|
||||
</data>
|
||||
<data name="start" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="tutorialFinish" xml:space="preserve">
|
||||
<value>Thank you for installing our OS. Please reboot your system to complete the installation!</value>
|
||||
</data>
|
||||
<data name="winMenuExit2" xml:space="preserve">
|
||||
<value>Are you sure?</value>
|
||||
</data>
|
||||
<data name="winMenuStart" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="winMenuText" xml:space="preserve">
|
||||
<value>Hello and welcome to my game, I hope you'll like it. My name is CreepyCrafter24, btw. (FunFact: This game was originally created as the result of a conversation with a classmate)</value>
|
||||
</data>
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
<runtime>
|
||||
<!-- AppContextSwitchOverrides values are in the form of 'key1=true|false;key2=true|false -->
|
||||
<!-- Please note that disabling Switch.UseLegacyAccessibilityFeatures, Switch.UseLegacyAccessibilityFeatures.2 and Switch.UseLegacyAccessibilityFeatures.3 is required to disable Switch.System.Windows.Forms.UseLegacyToolTipDisplay -->
|
||||
<AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false;Switch.UseLegacyAccessibilityFeatures.2=false;Switch.UseLegacyAccessibilityFeatures.3=false;Switch.System.Windows.Forms.UseLegacyToolTipDisplay=false"/>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>LevelTest</RootNamespace>
|
||||
<AssemblyName>LevelTest</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
@ -74,6 +75,7 @@
|
|||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
|
|
|
@ -57,11 +57,12 @@
|
|||
this.Controls.Add(this.minigamePanel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "MainForm";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "Form1";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Resize += new System.EventHandler(this.MainForm_Resize);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
|
@ -46,5 +46,21 @@ namespace LevelTest
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool isFClose = true;
|
||||
private void MainForm_Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (WindowState == FormWindowState.Minimized)
|
||||
{
|
||||
isFClose = false;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (isFClose)
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace LevelTest
|
|||
}
|
||||
else
|
||||
{
|
||||
string[] tmp = Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*.dll", SearchOption.AllDirectories).Where(s => Path.GetFileName(s) != "Base.dll").ToArray();
|
||||
string[] tmp = Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*.dll", SearchOption.AllDirectories).Where(s => Path.GetFileName(s) != "Base.dll" && Path.GetFileName(s) != "CC-Functions.W32.dll").ToArray();
|
||||
if (tmp.Length == 0)
|
||||
using (FolderBrowserDialog openFileDialog = new FolderBrowserDialog())
|
||||
{
|
||||
|
@ -42,26 +42,30 @@ namespace LevelTest
|
|||
throw new Exception("Please select a folder");
|
||||
}
|
||||
}
|
||||
Minigame[] levels = Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*.dll", SearchOption.AllDirectories).Where(s => Path.GetFileName(s) != "Base.dll")
|
||||
.Select(s => Assembly.LoadFrom(s)).SelectMany(s => s.GetTypes()).Distinct()
|
||||
.Where(p => typeof(Minigame).IsAssignableFrom(p)).Distinct().Except(new Type[] { typeof(Minigame), typeof(Level), typeof(Goal) })
|
||||
.Select(s => (Minigame)Activator.CreateInstance(s)).OrderBy(lv => lv.availableAfter).ToArray();
|
||||
Minigame level;
|
||||
if (levels.Length == 0)
|
||||
throw new Exception("No Levels found!");
|
||||
else if (levels.Length == 1)
|
||||
level = levels[0];
|
||||
else
|
||||
Minigame[] levels = Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*.dll", SearchOption.AllDirectories)
|
||||
.Where(s => Path.GetFileName(s) != "Base.dll" && Path.GetFileName(s) != "CC-Functions.W32.dll").Select(s => File.ReadAllBytes(s))
|
||||
.Distinct().Select(s => Assembly.Load(s)).Distinct().SelectMany(s => s.GetTypes()).Distinct().Where(p => typeof(Minigame).IsAssignableFrom(p))
|
||||
.Distinct().Except(new Type[] { typeof(Minigame), typeof(Level), typeof(Goal) }).Select(s => (Minigame)Activator.CreateInstance(s))
|
||||
.Distinct(new comp()).OrderBy(lv => lv.availableAfter).ToArray();
|
||||
while (true)
|
||||
{
|
||||
using (ArrayDialog dialog = new ArrayDialog(levels.Select(s => s.name).ToArray(), "Select a Minigame"))
|
||||
Minigame level;
|
||||
if (levels.Length == 0)
|
||||
throw new Exception("No Levels found!");
|
||||
else if (levels.Length == 1)
|
||||
level = levels[0];
|
||||
else
|
||||
{
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
level = levels[dialog.returnIndex];
|
||||
else
|
||||
throw new Exception("Please select a folder");
|
||||
using (ArrayDialog dialog = new ArrayDialog(levels.Select(s => s.name).ToArray(), "Select a Minigame"))
|
||||
{
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
level = levels[dialog.returnIndex];
|
||||
else
|
||||
throw new Exception("Please select a folder");
|
||||
}
|
||||
}
|
||||
Application.Run(new MainForm(level));
|
||||
}
|
||||
Application.Run(new MainForm(level));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -69,4 +73,13 @@ namespace LevelTest
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
class comp : IEqualityComparer<Minigame>
|
||||
{
|
||||
public bool Equals(Minigame x, Minigame y) => x.name == y.name;
|
||||
|
||||
public int GetHashCode(Minigame x) => x.name.GetHashCode();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace LevelTest.Properties
|
||||
{
|
||||
|
||||
|
||||
namespace LevelTest.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
|
@ -19,44 +19,39 @@ namespace LevelTest.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", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
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()
|
||||
{
|
||||
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
|
||||
{
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LevelTest.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
|
||||
{
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
|
|
|
@ -8,19 +8,16 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace LevelTest.Properties
|
||||
{
|
||||
|
||||
|
||||
namespace LevelTest.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.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
|
||||
{
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
# LaptopSimulator2015
|
||||
If you don't have LaptopSimulator2015/Resources/fans.wav , you can replace it with any sound that reminds you of old PCs fans.
|
||||
If you don't have `LaptopSimulator2015/Resources/fans.wav` , you can replace it with any sound that reminds you of old PCs fans.
|
||||
# Building
|
||||
Either run `make full` or build the solution in Visual Studio. You will not be able to use the Designer until the project is built at least once.
|
18
ToDo.txt
18
ToDo.txt
|
@ -1,5 +1,13 @@
|
|||
Centralize distance functions
|
||||
Fully implement new graphics on Goal and Level 3
|
||||
Handle Subtitle-Exception
|
||||
https://devblogs.nvidia.com/hybridizer-csharp/ (?)
|
||||
OS Install as Tutorial
|
||||
Maybe Linux builds? (Possible with #if, need a function to check whether a key is down in Linux (see Base/Input))
|
||||
|
||||
Ideas for content:
|
||||
- Goals:
|
||||
- MS Word = Sentenz
|
||||
- Powerpoint = WeakClic
|
||||
- Minecraft = InfiniMined
|
||||
- The "you win"-button
|
||||
- Minigames:
|
||||
- Bullet-Hell
|
||||
- Mouse-based games?
|
||||
- Other:
|
||||
- Possibly secrets and alternate paths?
|
5
make.bat
5
make.bat
|
@ -25,7 +25,7 @@ echo Please wait a bit.
|
|||
:clean
|
||||
echo Cleaning...
|
||||
set tmp=%cd%
|
||||
if exist ".NETFramework,Version=v4.7.2.AssemblyAttributes.cs" del ".NETFramework,Version=v4.7.2.AssemblyAttributes.cs"
|
||||
if exist ".NETFramework,Version=v4.8.AssemblyAttributes.cs" del ".NETFramework,Version=v4.8.AssemblyAttributes.cs"
|
||||
if exist "vs.mcj719337969" rmdir /s /q "vs.mcj719337969"
|
||||
if exist "tmp" rmdir /s /q "tmp"
|
||||
if not %full%==4 if exist "BUILD" rmdir /s /q "BUILD"
|
||||
|
@ -77,4 +77,5 @@ if %full%==11 (
|
|||
)
|
||||
:exit
|
||||
echo Done
|
||||
timeout /t 2 /nobreak >nul
|
||||
timeout /t 2 /nobreak >nul
|
||||
exit
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
}
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>zz_CaptchaGlitch_Empty</RootNamespace>
|
||||
<AssemblyName>zz_CaptchaGlitch_Empty</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>zzz_ShuffleChars</RootNamespace>
|
||||
<AssemblyName>zzz_ShuffleChars</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
Reference in New Issue