fixes, new test-level

This commit is contained in:
CreepyCrafter24 2019-08-25 16:21:07 +02:00
parent d192d7c808
commit 8e70367c52
23 changed files with 896 additions and 267 deletions

12
1/1.cs
View File

@ -119,17 +119,17 @@ namespace LaptopSimulator2015.Levels
invadersBullets = invadersBullets.Except(bulletsToRemove.Distinct()).Distinct().ToList();
speedMod += 0.1;
speedMod = Math.Max(Math.Min(speedMod, 5), 1);
if (Input.IsKeyDown(Keys.W))
if (Input.Up)
invadersPlayer.Y -= speedMod;
if (Input.IsKeyDown(Keys.A))
if (Input.Left)
invadersPlayer.X -= speedMod;
if (Input.IsKeyDown(Keys.S))
if (Input.Down)
invadersPlayer.Y += speedMod;
if (Input.IsKeyDown(Keys.D))
if (Input.Right)
invadersPlayer.X += speedMod;
if (Input.IsKeyDown(Keys.Space) & invadersCanShoot)
if (Input.Action & invadersCanShoot)
{
invadersBullets.Add(new Vector2(invadersPlayer));
invadersBullets.Add(new Vector2(0, 2.5) + invadersPlayer);
invadersCanShoot = false;
speedMod--;
}

8
2/2.cs
View File

@ -92,13 +92,13 @@ namespace LaptopSimulator2015.Levels
else
enemies.Add(new Vector2(0, tst - minigamePanel.Width * 2 - minigamePanel.Height + 10));
}
if (Input.IsKeyDown(Keys.W))
if (Input.Up)
player.Y -= 5;
if (Input.IsKeyDown(Keys.A))
if (Input.Left)
player.X -= 5;
if (Input.IsKeyDown(Keys.S))
if (Input.Down)
player.Y += 5;
if (Input.IsKeyDown(Keys.D))
if (Input.Right)
player.X += 5;
List<Vector2> enemiesToRemove = new List<Vector2>();
for (int i = 0; i < enemies.Count; i++)

10
3/3.cs
View File

@ -111,7 +111,7 @@ namespace LaptopSimulator2015.Levels
}
cannon = new Vector2(center);
cannon.moveInDirection(Misc.deg2rad(playerRot), 20);
if (Input.IsKeyDown(Keys.Space))
if (Input.Action)
{
firing = true;
power = Math.Min(power + 5, 100);
@ -132,13 +132,13 @@ namespace LaptopSimulator2015.Levels
}
targ = new Vector2(center);
targ.Tag = playerRot;
if (Input.IsKeyDown(Keys.W))
if (Input.Up)
cannonL += 100 / power;
if (Input.IsKeyDown(Keys.S))
if (Input.Down)
cannonL -= 100 / power;
if (Input.IsKeyDown(Keys.D))
if (Input.Right)
playerRot += 80 / power;
if (Input.IsKeyDown(Keys.A))
if (Input.Left)
playerRot -= 80 / power;
while (playerRot > 360)
playerRot -= 360;

View File

@ -37,5 +37,11 @@ namespace Base
return false;
return IsKeyDown(k);*/
}
public static bool Up => IsKeyDown(Keys.Up) || IsKeyDown(Keys.W);
public static bool Left => IsKeyDown(Keys.Left) || IsKeyDown(Keys.A);
public static bool Down => IsKeyDown(Keys.Down) || IsKeyDown(Keys.S);
public static bool Right => IsKeyDown(Keys.Right) || IsKeyDown(Keys.D);
public static bool Action => IsKeyDown(Keys.Space) || IsKeyDown(Keys.Q) || IsKeyDown(Keys.E);
}
}

View File

@ -20,17 +20,17 @@ namespace Base
{
if (bounds_wrap)
{
if (bounds.Width < 0)
if (bounds.X != 0 & bounds.Width < 0)
throw new ArgumentException("bounds.Width must be greater than or equal to 0");
while (bounds.X != 0 & x_unchecked > bounds.X + bounds.Width)
x_unchecked -= bounds.Width;
while (x_unchecked < bounds.X)
while (bounds.X != 0 & x_unchecked < bounds.X)
x_unchecked += bounds.Width;
if (bounds.Height < 0)
if (bounds.Y != 0 & bounds.Height < 0)
throw new ArgumentException("bounds.Height must be greater than or equal to 0");
while (bounds.Y != 0 & y_unchecked > bounds.Y + bounds.Height)
y_unchecked -= bounds.Height;
while (y_unchecked < bounds.Y)
while (bounds.Y != 0 & y_unchecked < bounds.Y)
y_unchecked += bounds.Height;
}
else
@ -82,16 +82,24 @@ namespace Base
Y = from.Y;
}
public Vector2(Vector2 from)
public Vector2(Vector2 from, bool useProperties = false)
{
X = from.X;
Y = from.Y;
if (useProperties)
{
Tag = from.Tag;
bounds = from.bounds;
bounds_wrap = from.bounds_wrap;
}
}
public Point toPoint() => new Point((int)Math.Round(X), (int)Math.Round(Y));
public PointF toPointF() => new PointF(Misc.d2f(X), Misc.d2f(Y));
public double distanceFromSquared(Vector2 other) => Math.Pow(X - other.X, 2) + Math.Pow(Y - other.Y, 2);
public double distanceFrom(Vector2 other) => Math.Sqrt(distanceFromSquared(other));
public double magnitude { get { return distanceFrom(Zero); } }
public double sqrMagnitude { get { return distanceFromSquared(Zero); } }
public void moveInDirection(double radians = 0, double distance = 1)
{
X += Math.Cos(radians) * distance;
@ -118,10 +126,23 @@ namespace Base
}
}
public Vector2 addTag(object Tag) { this.Tag = Tag; return this; }
public Vector2 addBounds(Rectangle bounds) { this.bounds = bounds; return this; }
public Vector2 addBoundsW(bool bounds_wrap) { this.bounds_wrap = bounds_wrap; return this; }
public override string ToString() => "{X=" + X.ToString() + ", Y=" + Y.ToString() + "}";
public static Vector2 operator +(Vector2 left, Vector2 right) => new Vector2(left.X + right.X, left.Y + right.Y);
public static Vector2 operator -(Vector2 left, Vector2 right) => new Vector2(left.X - right.X, left.Y - right.Y);
public static Vector2 operator *(Vector2 left, Vector2 right) => new Vector2(left.X * right.X, left.Y * right.Y);
public static Vector2 operator +(Vector2 left, Vector2 right) => new Vector2(left.X + right.X, left.Y + right.Y).addTag(left.Tag).addBounds(left.bounds).addBoundsW(left.bounds_wrap);
public static Vector2 operator +(Vector2 left, Point right) => new Vector2(left.X + right.X, left.Y + right.Y).addTag(left.Tag).addBounds(left.bounds).addBoundsW(left.bounds_wrap);
public static Vector2 operator +(Vector2 left, PointF right) => new Vector2(left.X + right.X, left.Y + right.Y).addTag(left.Tag).addBounds(left.bounds).addBoundsW(left.bounds_wrap);
public static Vector2 operator -(Vector2 left, Vector2 right) => new Vector2(left.X - right.X, left.Y - right.Y).addTag(left.Tag).addBounds(left.bounds).addBoundsW(left.bounds_wrap);
public static Vector2 operator -(Vector2 left, Point right) => new Vector2(left.X - right.X, left.Y - right.Y).addTag(left.Tag).addBounds(left.bounds).addBoundsW(left.bounds_wrap);
public static Vector2 operator -(Vector2 left, PointF right) => new Vector2(left.X - right.X, left.Y - right.Y).addTag(left.Tag).addBounds(left.bounds).addBoundsW(left.bounds_wrap);
public static Vector2 operator *(Vector2 left, Vector2 right) => new Vector2(left.X * right.X, left.Y * right.Y).addTag(left.Tag).addBounds(left.bounds).addBoundsW(left.bounds_wrap);
public static Vector2 operator *(Vector2 left, Point right) => new Vector2(left.X * right.X, left.Y * right.Y);
public static Vector2 operator *(Vector2 left, PointF right) => new Vector2(left.X * right.X, left.Y * right.Y);
public static Vector2 operator /(Vector2 left, Vector2 right) => new Vector2(left.X / right.X, left.Y / right.Y);
public static Vector2 operator /(Vector2 left, Point right) => new Vector2(left.X / right.X, left.Y / right.Y);
public static Vector2 operator /(Vector2 left, PointF right) => new Vector2(left.X / right.X, left.Y / right.Y);
public static Vector2 operator ^(Vector2 left, double right) => new Vector2(Math.Pow(left.X, right), Math.Pow(left.Y, right));
}
}

View File

@ -30,6 +30,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lv3_t", "lv3_t\lv3_t.csproj
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3", "3\3.csproj", "{8109040E-9D8D-43E7-A461-83475B2939C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lv4_t", "lv4_t\lv4_t.csproj", "{22D618C0-F0A4-417F-A815-C760BF4376B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -72,6 +74,10 @@ Global
{8109040E-9D8D-43E7-A461-83475B2939C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8109040E-9D8D-43E7-A461-83475B2939C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8109040E-9D8D-43E7-A461-83475B2939C9}.Release|Any CPU.Build.0 = Release|Any CPU
{22D618C0-F0A4-417F-A815-C760BF4376B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{22D618C0-F0A4-417F-A815-C760BF4376B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{22D618C0-F0A4-417F-A815-C760BF4376B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{22D618C0-F0A4-417F-A815-C760BF4376B2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -85,6 +91,7 @@ Global
{0965C803-49B2-4311-B62F-1E60DBD9185F} = {83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218}
{244E68E6-90D2-447D-B380-13CA8DD3D4EC} = {69DC5824-3F89-4B47-BF1A-F25942094195}
{8109040E-9D8D-43E7-A461-83475B2939C9} = {83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218}
{22D618C0-F0A4-417F-A815-C760BF4376B2} = {69DC5824-3F89-4B47-BF1A-F25942094195}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9631F8FF-AFC1-4583-9D27-6C2D97D3A2E9}

View File

@ -1,213 +0,0 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LaptopSimulator2015
{
/// <summary>
/// Stellt Methoden und Eigenschaften zum erzeugen eines Captchas bereit.
/// </summary>
class CaptchaGenerator : IDisposable
{
protected Random rnd;
private Bitmap _Captcha = null;
protected const int spacePerChar = 25;//Abstand zwischen den Zeichen
protected void DrawChar(int c, Graphics g)
{
int y = rnd.Next(8, 13);
int fontSize = this.rnd.Next(12, 18);
//move rotation point to center of image
g.TranslateTransform(spacePerChar * (c) + 10, (30 - fontSize) / 2);
g.RotateTransform(rnd.Next(this.RotateRange.Min, this.RotateRange.Max));
g.DrawString(GetRandomChar(), GetRandomFont(fontSize), GetRandomFontBrush(), new PointF(5, y));
g.ResetTransform();
}
protected Font GetRandomFont(int fontSize)
{
return new Font(new string[] { "Arial", "Consolas", "Verdena" }[this.rnd.Next(3)], fontSize);
}
protected string GetRandomChar()
{
string s = this.Chars[this.rnd.Next(this.Chars.Length)].ToString();
this.Text += s;
return s;
}
protected Brush GetRandomFontBrush()
{
int r = rnd.Next(0, 200);
int g = rnd.Next(0, (200 - r) / 2);
int b = 200 - r - g;
if (b < 0)
b = 0;
return new SolidBrush(Color.FromArgb(r, g, b));
}
protected Brush GetRandomBackgroundHatchBrush()
{
return new HatchBrush((HatchStyle)this.rnd.Next(53), this.GetRandomBackgroundColor(), Color.Transparent);
}
protected Color GetRandomBackgroundColor()
{
int r = rnd.Next(180, 255);
int g = rnd.Next(180, 255);
int b = rnd.Next(180, 255);
return Color.FromArgb(r, g, b);
}
protected Brush GetRandomForegroundHatchBrush()
{
return new HatchBrush((HatchStyle)this.rnd.Next(53), this.GetRandomForegroundColor(), this.GetRandomForegroundColor());
}
protected Color GetRandomForegroundColor()
{
int r = rnd.Next(180, 255);
int g = rnd.Next(180, 255);
int b = rnd.Next(180, 255);
return Color.FromArgb(this.rnd.Next(10, 50), r, g, b);
}
#region .ctor
private CaptchaGenerator()
{
this.RotateRange = new CaptchaCharRotateRange(-20, 20);
this.IntegrateHatch = true;
}
/// <summary>
/// Initialisiert eine neue Instanz der CaptchaGenerator-Klasse.
/// </summary>
/// <param name="length">Die Länge der Zeichenkette im Captcha.</param>
/// <param name="chars">Die zu verwendenden Zeichen im Captcha.</param>
public CaptchaGenerator(int length, string chars)
: this()
{
this.rnd = new Random();
this.Length = length;
this.Chars = chars;
this.Generate();
}
#endregion
#region Methoden
/// <summary>
/// Erzeugt ein neues, zufälliges Captcha.
/// </summary>
public void Generate()
{
this.Text = string.Empty;
//Größe des Bildes festlegen und dieses erzeugen
int width = (this.Length + 1) * spacePerChar;
int height = 60;
_Captcha = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
using (Graphics g = Graphics.FromImage(_Captcha))
{
Rectangle rect = new Rectangle(0, 0, width, height);
//Hintergundmalen
g.FillRectangle(new LinearGradientBrush(new Point(0, 0), new Point(width, height), GetRandomBackgroundColor(), GetRandomBackgroundColor()), rect);
if (this.IntegrateHatch)
g.FillRectangle(GetRandomBackgroundHatchBrush(), rect);
//Zeichen malen
for (int i = 0; i < this.Length; i++)
{
DrawChar(i, g);
}
//Muster über den Text malen
if (this.IntegrateHatch)
g.FillRectangle(GetRandomForegroundHatchBrush(), rect);
}
}
#endregion
#region Eigenschaften
/// <summary>
/// Ruft den angezeigten Text im Cpatcha ab.
/// </summary>
public string Text { get; private set; }
/// <summary>
/// Ruft das Captcha ab.
/// </summary>
public Bitmap Captcha
{
get {
return _Captcha;
}
}
/// <summary>
/// Ruft die Anzahl der Zeichen im Captcha ab bzw. legt diese fest.
/// </summary>
public int Length { get; set; }
/// <summary>
/// Ruft die Verwendbaren Zeichen im Cpatcha ab oder legt diese fest.
/// </summary>
public string Chars { get; set; }
/// <summary>
/// Ruft den Drehbereich der einzelnen Zeichen ab oder legt diese fest. Der Idealwert liegt zwischen einschließlich -20 und 20.
/// </summary>
public CaptchaCharRotateRange RotateRange { get; set; }
/// <summary>
/// Ruft einen Wert ab, der angibt ob ein zufälliger Hatchbruch integriert werden soll oder legt diesen fest.
/// </summary>
public bool IntegrateHatch { get; set; }
#endregion
#region IDisposable Member
/// <summary>
/// Gibt alle von diesem Objekt verwendeten Resourcen wieder frei.
/// </summary>
public void Dispose()
{
if (this._Captcha != null)
this._Captcha.Dispose();
}
#endregion
}
/// <summary>
/// Stellt den Bereich dar, in dem ein Zeichen im Captcha gedrht werden kann.
/// </summary>
struct CaptchaCharRotateRange
{
/// <summary>
/// Initialisiert eine neue Instanz der CaptchaCharRotateRange-Klasse.
/// </summary>
/// <param name="min">Die höchste Drehung in Grad nach links.</param>
/// <param name="max">Die höchste Drehung in Grad nach rechts.</param>
public CaptchaCharRotateRange(int min, int max)
: this()
{
if (min > max)
throw new ArgumentOutOfRangeException("min <= max!");
this.Min = min;
this.Max = max;
}
/// <summary>
/// Ruft die maximale Drehung in Grad nach links ab.
/// </summary>
public int Min { get; private set; }
/// <summary>
/// Ruft die maximale Drehung in Grad nach rechts ab.
/// </summary>
public int Max { get; private set; }
}
}

View File

@ -9,6 +9,7 @@ using System.Media;
using System.Reflection;
using System.Diagnostics;
using System.IO;
using System.Drawing.Drawing2D;
namespace LaptopSimulator2015
{
@ -54,10 +55,7 @@ namespace LaptopSimulator2015
if (_mode == Mode.mainMenu)
winMenuStart.Select();
for (int i = 0; i < levels.Count; i++)
{
levels[i].desktopIcon.Visible = levels[i].LevelNumber >= Settings.Default.level;
Console.WriteLine(levels[i].LevelNumber + " - " + _mode.ToString() + ": " + levels[i].desktopIcon.Visible.ToString());
}
levels[i].desktopIcon.Visible = levels[i].LevelNumber <= Settings.Default.level;
}
}
@ -103,7 +101,7 @@ namespace LaptopSimulator2015
levels[i].desktopIcon.Size = new Size(50, 50);
levels[i].desktopIcon.BackColor = Color.FromArgb(128, 128, 255);
levels[i].desktopIcon.Name = "lvl" + i.ToString() + "_1";
levels[i].desktopIcon.Visible = levels[i].LevelNumber >= Settings.Default.level;
levels[i].desktopIcon.Visible = levels[i].LevelNumber <= Settings.Default.level;
tmp1.BackColor = Color.Blue;
tmp1.BackgroundImageLayout = ImageLayout.Stretch;
@ -242,7 +240,9 @@ namespace LaptopSimulator2015
minigamePanel.Visible = true;
minigamePanel.Enabled = true;
minigameClockT.Enabled = true;
#if !DEBUG
levelWindowC1.Enabled = false;
#endif
g.Clear(Color.Red);
g.DrawString("DANGER!", new Font("Microsoft Sans Serif", 100f), new SolidBrush(Color.White), 100, 150);
g.DrawString("VIRUS DETECTED", new Font("Microsoft Sans Serif", 20f), new SolidBrush(Color.White), 0, 300);
@ -267,7 +267,7 @@ namespace LaptopSimulator2015
Settings.Default.level = closest;
Settings.Default.Save();
for (int i = 0; i < levels.Count; i++)
levels[i].desktopIcon.Visible = levels[i].LevelNumber >= Settings.Default.level;
levels[i].desktopIcon.Visible = levels[i].LevelNumber <= Settings.Default.level;
mode = Mode.game;
}
break;
@ -295,10 +295,29 @@ namespace LaptopSimulator2015
private void CaptchaPanel_Click(object sender, EventArgs e)
{
CaptchaGenerator cap = new CaptchaGenerator(6, strings.captchaLetters);
cap.Generate();
captchaPanel.BackgroundImage = cap.Captcha;
captchaBox.Tag = cap.Text;
Random rnd = new Random();
string Chars = strings.captchaLetters;
captchaBox.Tag = "";
captchaPanel.BackgroundImage = new Bitmap(175, 60, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
using (Graphics g = Graphics.FromImage(captchaPanel.BackgroundImage))
{
g.FillRectangle(new LinearGradientBrush(new Point(0, 0), new Point(175, 60), Color.FromArgb(rnd.Next(180, 255), rnd.Next(180, 255), rnd.Next(180, 255)), Color.FromArgb(rnd.Next(180, 255), rnd.Next(180, 255), rnd.Next(180, 255))), new Rectangle(0, 0, 175, 60));
g.FillRectangle(new HatchBrush((HatchStyle)rnd.Next(53), Color.FromArgb(rnd.Next(180, 255), rnd.Next(180, 255), rnd.Next(180, 255)), Color.Transparent), new Rectangle(0, 0, 175, 60));
for (int i = 0; i < 6; i++)
{
int y = rnd.Next(8, 13);
int fontSize = rnd.Next(12, 18);
g.TranslateTransform(25 * (i) + 10, (30 - fontSize) / 2);
g.RotateTransform(rnd.Next(-20, 20));
int tmpR = rnd.Next(0, 200);
int tmpG = rnd.Next(0, (200 - tmpR) / 2);
string s = Chars[rnd.Next(Chars.Length)].ToString();
captchaBox.Tag = (string)captchaBox.Tag + s;
g.DrawString(s, new Font(new string[] { "Arial", "Consolas", "Verdena" }[rnd.Next(3)], fontSize), new SolidBrush(Color.FromArgb(tmpR, tmpG, Math.Max(0, 200 - tmpR - tmpG))), new PointF(5, y));
g.ResetTransform();
}
g.FillRectangle(new HatchBrush((HatchStyle)rnd.Next(Enum.GetValues(typeof(HatchStyle)).Length), Color.FromArgb(rnd.Next(10, 50), rnd.Next(180, 255), rnd.Next(180, 255), rnd.Next(180, 255)), Color.FromArgb(rnd.Next(10, 50), rnd.Next(180, 255), rnd.Next(180, 255), rnd.Next(180, 255))), new Rectangle(0, 0, 175, 60));
}
captchaBox.Text = "";
}
@ -325,7 +344,7 @@ namespace LaptopSimulator2015
levelWindowC1.Enabled = true;
}
#region Minigame
#region Minigame
uint minigameTime = 0;
private void InvadersPanel_Paint(object sender, PaintEventArgs e) => levels[levelInd].gameTick(e.Graphics, minigamePanel, minigameClockT, minigameTime);
@ -334,10 +353,10 @@ namespace LaptopSimulator2015
minigameTime++;
minigamePanel.Invalidate();
}
#endregion
#endregion
#endregion
#region Options
#endregion
#region Options
private void Options_2_DoubleClick(object sender, EventArgs e)
{
winDesktop.Enabled = false;
@ -393,6 +412,7 @@ namespace LaptopSimulator2015
});
Application.Exit();
}
mode = Mode.game;
}
bool tmpoptionsmlgcanchange = false;
@ -467,8 +487,9 @@ namespace LaptopSimulator2015
Settings.Default.subs = true;
Settings.Default.level = 1;
Settings.Default.Save();
mode = Mode.game;
}
}
#endregion
#endregion
}
}

View File

@ -31,6 +31,8 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
@ -46,7 +48,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CaptchaGenerator.cs" />
<Compile Include="FakeDesktop.cs">
<SubType>Form</SubType>
</Compile>

View File

@ -78,17 +78,17 @@ namespace SIT
invadersBullets = invadersBullets.Except(bulletsToRemove.Distinct()).Distinct().ToList();
speedMod += 0.1;
speedMod = Math.Max(Math.Min(speedMod, 5), 1);
if (Input.IsKeyDown(Keys.W))
if (Input.Up)
invadersPlayer.Y -= speedMod;
if (Input.IsKeyDown(Keys.A))
if (Input.Left)
invadersPlayer.X -= speedMod;
if (Input.IsKeyDown(Keys.S))
if (Input.Down)
invadersPlayer.Y += speedMod;
if (Input.IsKeyDown(Keys.D))
if (Input.Right)
invadersPlayer.X += speedMod;
if (Input.IsKeyDown(Keys.Space) & invadersCanShoot)
if (Input.Action & invadersCanShoot)
{
invadersBullets.Add(new Vector2(invadersPlayer));
invadersBullets.Add(new Vector2(0, 2.5) + invadersPlayer);
invadersCanShoot = false;
speedMod--;
}

View File

@ -61,13 +61,13 @@ namespace lv2_t
else
enemies.Add(new Vector2(0, tst - minigamePanel.Width * 2 - minigamePanel.Height + 10));
}
if (Input.IsKeyDown(Keys.W))
if (Input.Up)
player.Y -= 5;
if (Input.IsKeyDown(Keys.A))
if (Input.Left)
player.X -= 5;
if (Input.IsKeyDown(Keys.S))
if (Input.Down)
player.Y += 5;
if (Input.IsKeyDown(Keys.D))
if (Input.Right)
player.X += 5;
List<Vector2> enemiesToRemove = new List<Vector2>();
for (int i = 0; i < enemies.Count; i++)

View File

@ -80,7 +80,7 @@ namespace lv3_t
}
cannon = new Vector2(center);
cannon.moveInDirection(Misc.deg2rad(playerRot), 20);
if (Input.IsKeyDown(Keys.Space))
if (Input.Action)
{
firing = true;
power = Math.Min(power + 5, 100);
@ -101,13 +101,13 @@ namespace lv3_t
}
targ = new Vector2(center);
targ.Tag = playerRot;
if (Input.IsKeyDown(Keys.W))
if (Input.Up)
cannonL += 100 / power;
if (Input.IsKeyDown(Keys.S))
if (Input.Down)
cannonL -= 100 / power;
if (Input.IsKeyDown(Keys.D))
if (Input.Right)
playerRot += 80 / power;
if (Input.IsKeyDown(Keys.A))
if (Input.Left)
playerRot -= 80 / power;
while (playerRot > 360)
playerRot -= 360;

6
lv4_t/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

93
lv4_t/MainForm.Designer.cs generated Normal file
View File

@ -0,0 +1,93 @@
namespace lv4_t
{
partial class MainForm
{
/// <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.minigameClockT = new System.Windows.Forms.Timer(this.components);
this.button1 = new System.Windows.Forms.Button();
this.minigamePanel = new System.Windows.Forms.Panel();
this.minigamePanel.SuspendLayout();
this.SuspendLayout();
//
// minigameClockT
//
this.minigameClockT.Enabled = true;
this.minigameClockT.Interval = 17;
this.minigameClockT.Tick += new System.EventHandler(this.MinigameClockT_Tick);
//
// button1
//
this.button1.Location = new System.Drawing.Point(777, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(23, 23);
this.button1.TabIndex = 0;
this.button1.TabStop = false;
this.button1.Text = "X";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// minigamePanel
//
this.minigamePanel.BackColor = System.Drawing.Color.Black;
this.minigamePanel.Controls.Add(this.button1);
this.minigamePanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.minigamePanel.Location = new System.Drawing.Point(0, 0);
this.minigamePanel.Name = "minigamePanel";
this.minigamePanel.Size = new System.Drawing.Size(800, 450);
this.minigamePanel.TabIndex = 1;
this.minigamePanel.Paint += new System.Windows.Forms.PaintEventHandler(this.MinigamePanel_Paint);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.ControlBox = false;
this.Controls.Add(this.minigamePanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MainForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
this.minigamePanel.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Timer minigameClockT;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Panel minigamePanel;
}
}

196
lv4_t/MainForm.cs Normal file
View File

@ -0,0 +1,196 @@
using Base;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace lv4_t
{
public partial class MainForm : Form
{
#region FRMBD
uint minigameTime = 0;
uint minigamePrevTime = 0;
public MainForm()
{
InitializeComponent();
player = new Vector2(minigamePanel.Width / 2, 0);
player.bounds = new Rectangle(-5, 0, minigamePanel.Width + 10, 0);
player.bounds_wrap = true;
playerV = new Vector2();
playerV.bounds = new Rectangle(-5, -20, 10, 40);
playerV.bounds_wrap = false;
for (int i = 0; i < 5; i++)
for (int j = 0; j < 2; j++)
platforms.Add(new Vector2(rnd.Next(minigamePanel.Width), i * (minigamePanel.Height / 5)));
}
private void Button1_Click(object sender, EventArgs e) => Application.Exit();
private void MinigameClockT_Tick(object sender, EventArgs e)
{
minigameTime++;
minigamePanel.Invalidate();
}
#endregion
Random rnd = new Random();
Vector2 player = new Vector2();
Vector2 playerV = new Vector2();
int jmpj;
List<Vector2> platforms = new List<Vector2>();
private void MinigamePanel_Paint(object sender, PaintEventArgs e)
{
BufferedGraphics buffer = BufferedGraphicsManager.Current.Allocate(e.Graphics, new Rectangle(0, 0, minigamePanel.Width, minigamePanel.Height));
Graphics g = buffer.Graphics;
try
{
g.Clear(Color.Black);
g.FillRectangle(new SolidBrush(Color.Green), player2rect());
bool onPlatform = false;
for (int i = 0; i < platforms.Count; i++)
{
g.FillRectangle(new SolidBrush(Color.White), plat2rect(i));
onPlatform |= isOnPlatform(i);
}
Random random = new Random();
if (minigameTime != minigamePrevTime)
{
minigamePrevTime = minigameTime;
if (onPlatform)
playerV.Y = Math.Min(playerV.Y, 0);
else
playerV.Y += 0.05f + Math.Pow(0.9, Math.Max(playerV.Y + 1, 0));
playerV.X /= 1.2f;
if (onPlatform)
jmpj = 10;
else
if (!Input.Up)
jmpj = 0;
if ((onPlatform || jmpj > 0) && Input.Up)
{
playerV.Y -= Math.Sqrt(jmpj);
jmpj--;
}
if (Input.Left)
playerV.X -= 5;
if (Input.Right)
playerV.X += 5;
player.X += playerV.X;
onPlatform = false;
if (playerV.Y < 0)
player.Y += playerV.Y;
else
for (int i = 0; i < playerV.Y / 2; i++)
{
for (int j = 0; j < platforms.Count; j++)
onPlatform |= isOnPlatform(j);
if (!onPlatform)
player.Y += 2;
}
List<Vector2> platformsToRemove = new List<Vector2>();
for (int i = 0; i < platforms.Count; i++)
{
platforms[i].Y++;
if (platforms[i].Y > minigamePanel.Height)
{
platforms[i].Y = 0;
platforms[i].X = rnd.Next(minigamePanel.Width);
}
}
if (player.Y > minigamePanel.Height)
throw new Exception("The VM was shut down to prevent damage to your Machine.", new Exception("0717750f-3508-4bc2-841e-f3b077c676fe"));
}
buffer.Render();
}
catch (Exception ex)
{
if (ex.InnerException?.Message == "0717750f-3508-4bc2-841e-f3b077c676fe")
{
minigameClockT.Enabled = false;
g.Clear(Color.Red);
g.SmoothingMode = SmoothingMode.AntiAlias;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
SizeF sLen = g.MeasureString("Lost.", new Font("Tahoma", 20));
RectangleF rectf = new RectangleF(minigamePanel.Width / 2 - sLen.Width / 2, minigamePanel.Height / 2 - sLen.Height / 2, 90, 50);
g.DrawString("Lost.", new Font("Tahoma", 20), Brushes.Black, rectf);
buffer.Render();
}
else
#if DEBUG
throw;
#else
Console.WriteLine(ex.ToString());
#endif
}
}
RectangleF plat2rect(int platform) => new RectangleF((platforms[platform] - new Vector2(50, 5)).toPointF(), new SizeF(100, 10));
RectangleF player2rect() => new RectangleF((player - new Vector2(5, 5)).toPointF(), new SizeF(10, 10));
bool isOnPlatform(int platform)
{
calcDist(platform);
return ((double)platforms[platform].Tag) <= 20 && RectangleF.Intersect(player2rect(), plat2rect(platform)) != RectangleF.Empty && player.Y < platforms[platform].Y - 8;
}
void calcDist(int platform)
{
RectangleF rect = plat2rect(platform);
if (player.X < rect.X)
{
if (player.Y < rect.Y)
{
Vector2 diff = player - new Vector2(rect.X, rect.Y);
platforms[platform].Tag = diff.magnitude;
}
else if (player.Y > rect.Y + rect.Height)
{
Vector2 diff = player - new Vector2(rect.X, rect.Y + rect.Height);
platforms[platform].Tag = diff.magnitude;
}
else
{
platforms[platform].Tag = rect.X - player.X;
}
}
else if (player.X > rect.X + rect.Width)
{
if (player.Y < rect.Y)
{
Vector2 diff = player - new Vector2(rect.X + rect.Width, rect.Y);
platforms[platform].Tag = diff.magnitude;
}
else if (player.Y > rect.Y + rect.Height)
{
Vector2 diff = player - new Vector2(rect.X + rect.Width, rect.Y + rect.Height);
platforms[platform].Tag = diff.magnitude;
}
else
{
platforms[platform].Tag = player.X - rect.X + rect.Width;
}
}
else
{
if (player.Y < rect.Y)
{
platforms[platform].Tag = rect.Y - player.Y;
}
else if (player.Y > rect.Y + rect.Height)
{
platforms[platform].Tag = player.Y - (rect.Y + rect.Height);
}
else
{
platforms[platform].Tag = 0d;
}
}
}
}
}

123
lv4_t/MainForm.resx Normal file
View File

@ -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="minigameClockT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

22
lv4_t/Program.cs Normal file
View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace lv4_t
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("lv4_t")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("lv4_t")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("22d618c0-f0a4-417f-a815-c760bf4376b2")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

68
lv4_t/Properties/Resources.Designer.cs generated Normal file
View File

@ -0,0 +1,68 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace lv4_t.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get {
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("lv4_t.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

29
lv4_t/Properties/Settings.Designer.cs generated Normal file
View File

@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace lv4_t.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
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get {
return defaultInstance;
}
}
}
}

View File

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

89
lv4_t/lv4_t.csproj Normal file
View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{22D618C0-F0A4-417F-A815-C760BF4376B2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>lv4_t</RootNamespace>
<AssemblyName>lv4_t</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.csproj">
<Project>{9a9561a7-dd5f-43a5-a3f5-a95f35da204d}</Project>
<Name>Base</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>