From 8c11682cc079556d6f616a3e997eb1a990228dfc Mon Sep 17 00:00:00 2001 From: CreepyCrafter24 <33260128+CreepyCrafter24@users.noreply.github.com> Date: Sun, 15 Sep 2019 21:31:36 +0200 Subject: [PATCH] New features to smooth gameplay and storytelling --- 1/1.cs | 6 +- 2/2.cs | 6 +- 3/3.cs | 6 +- 3g/3.cs | 504 ++++++++++++++++++ 3g/3g.csproj | 60 +++ 3g/Properties/AssemblyInfo.cs | 36 ++ 4/4.cs | 6 +- Base/Base.csproj | 2 +- Base/{Level.cs => Minigame.cs} | 22 +- LaptopSimulator2015.sln | 18 +- LaptopSimulator2015/FakeDesktop.Designer.cs | 60 ++- LaptopSimulator2015/FakeDesktop.cs | 211 +++++--- .../LaptopSimulator2015.csproj | 8 +- LaptopSimulator2015/Settings.cs | 2 +- LaptopSimulator2015/strings.Designer.cs | 18 + LaptopSimulator2015/strings.de.resx | 6 + LaptopSimulator2015/strings.resx | 6 + lv3g_t/App.config | 6 + lv3g_t/MainForm.Designer.cs | 93 ++++ lv3g_t/MainForm.cs | 467 ++++++++++++++++ lv3g_t/MainForm.resx | 123 +++++ lv3g_t/Program.cs | 22 + lv3g_t/Properties/AssemblyInfo.cs | 36 ++ lv3g_t/Properties/Resources.Designer.cs | 68 +++ lv3g_t/Properties/Resources.resx | 117 ++++ lv3g_t/Properties/Settings.Designer.cs | 29 + lv3g_t/Properties/Settings.settings | 7 + lv3g_t/lv3g_t.csproj | 89 ++++ 28 files changed, 1928 insertions(+), 106 deletions(-) create mode 100644 3g/3.cs create mode 100644 3g/3g.csproj create mode 100644 3g/Properties/AssemblyInfo.cs rename Base/{Level.cs => Minigame.cs} (59%) create mode 100644 lv3g_t/App.config create mode 100644 lv3g_t/MainForm.Designer.cs create mode 100644 lv3g_t/MainForm.cs create mode 100644 lv3g_t/MainForm.resx create mode 100644 lv3g_t/Program.cs create mode 100644 lv3g_t/Properties/AssemblyInfo.cs create mode 100644 lv3g_t/Properties/Resources.Designer.cs create mode 100644 lv3g_t/Properties/Resources.resx create mode 100644 lv3g_t/Properties/Settings.Designer.cs create mode 100644 lv3g_t/Properties/Settings.settings create mode 100644 lv3g_t/lv3g_t.csproj diff --git a/1/1.cs b/1/1.cs index 9fa154f..cb48e33 100644 --- a/1/1.cs +++ b/1/1.cs @@ -13,7 +13,7 @@ namespace LaptopSimulator2015.Levels class Lvl1 : Level { static Image _installer; - public string installerHeader + public string name { get { switch (CultureInfo.CurrentUICulture.Name.Split('-')[0]) @@ -39,7 +39,7 @@ namespace LaptopSimulator2015.Levels } } - public Image installerIcon + public Image icon { get { if (_installer == null) @@ -53,7 +53,7 @@ namespace LaptopSimulator2015.Levels } } - public int LevelNumber => 1; + public int levelNumber => 1; public int gameClock => 17; diff --git a/2/2.cs b/2/2.cs index d230a7e..a2257fb 100644 --- a/2/2.cs +++ b/2/2.cs @@ -13,7 +13,7 @@ namespace LaptopSimulator2015.Levels { class Lvl2 : Level { - public string installerHeader + public string name { get { switch (CultureInfo.CurrentUICulture.Name.Split('-')[0]) @@ -40,7 +40,7 @@ namespace LaptopSimulator2015.Levels } static Image _installer; - public Image installerIcon + public Image icon { get { if (_installer == null) @@ -54,7 +54,7 @@ namespace LaptopSimulator2015.Levels } } - public int LevelNumber => 2; + public int levelNumber => 2; public int gameClock => 17; diff --git a/3/3.cs b/3/3.cs index bc9df95..d981b69 100644 --- a/3/3.cs +++ b/3/3.cs @@ -13,7 +13,7 @@ namespace LaptopSimulator2015.Levels { class Lvl3 : Level { - public string installerHeader + public string name { get { switch (CultureInfo.CurrentUICulture.Name.Split('-')[0]) @@ -40,7 +40,7 @@ namespace LaptopSimulator2015.Levels } static Image _installer; - public Image installerIcon + public Image icon { get { if (_installer == null) @@ -54,7 +54,7 @@ namespace LaptopSimulator2015.Levels } } - public int LevelNumber => 3; + public int levelNumber => 3; public int gameClock => 17; diff --git a/3g/3.cs b/3g/3.cs new file mode 100644 index 0000000..6c9c36a --- /dev/null +++ b/3g/3.cs @@ -0,0 +1,504 @@ +using Base; +using LaptopSimulator2015; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace LaptopSimulator2015.Goals +{ + public class G3 : Goal + { + private Image _installer; + + public string name => "DropBlox"; + + public Image icon + { + get { + if (_installer == null) + { + string __installer = "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d17tB51Ye7xZ2be2947iRAQkSpmqizl9CIKR4rQdaBFBFR0aK3WVkShKuqcg4CCVRd4tFUrIqevgkAgBLy3ZbiFJEBbPEtEPV5Qa1GpnWRvigG5B3Lb2e97/ph5ITvZl/cyM7+5fD9rsRLXIu/76Fru58lv3nfG6na7ApBvnuuPSdpnkX8mJDUlNeJf+/m9JG2XtCP+tZ/fPyXp4YX+CcL21jT+dwCQHIsBAJjjuX5D0vMluZJW7PLr/ppd7mNmEg5tq2aPgk2SNkgKd/l1KgjbOwzlAyqPAQCkyHN9W9KBml3uu/56gCTbTDrjOpLu1+xRsOuvk0HY7hjKBpQeAwBIiOf6+0r6fUm/F//6+5J+R8X723tebJX0M0k/if/5qaSfBGH7IaOpgJJgAAADio/tD9YzJd8r/OeazFUhv9YugyD+5x4uJwCDYQAAi/Bc/4WSjpR0lKQjJL1EUs1oKOxup6SfS7pL0rck3RmE7V+ZjQTkGwMA2IXn+jVJL9MzhX+kog/koXg2SbpT8SCQ9KMgbO80GwnIDwYAKs1z/WWK/lbfK/zDJY0bDYW0bJH0XT0zCO4KwvYTZiMB5jAAUCnxp/JfIekEScdLOkzV/RR+1XUkfV/SOklrJX2Pbx2gShgAKD3P9feX9GpFhX+cpOVmEyGnHpF0q6JBsD4I25sM5wFSxQBA6cTX8V+pqPCPl3SIJMtoKBRNV9Ldisb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84Vu17Dbt1D5/KB9LDAAAMetXz3/osSUdK3f+urg7qSgdK3f276u7V7XbGu+o2O92O01WnUKcIlizZljNtW/Y2S84TtmU/ZMneaFvWz23L+XHNanzftpwNHNsD5jAAgAI48cDTl810dx7UVfeFUndFV93ndbvdA6Tus7vq7q3oCYlNqVvrSjV1uzVJTlddR5Id/2pJXbvblSV1ra66iqpaXcuyupLVtWR1LFkzsqwZS9ZOSTstWdOSNW1Z1g5L2iFZWyU9LukxSY9IeljSb7rqPtjtdu+X9LPb7/vSr438DwWgb/8feUrSQMeq+7sAAAAASUVORK5CYII="; + Stream s = new MemoryStream(Convert.FromBase64String(__installer)); + _installer = Image.FromStream(s); + s.Close(); + } + return _installer; + } + } + + public int levelNumber => 0; + + public int gameClock => 300; + + public Panel desktopIcon { get; set; } + + public int playableAfter => 4; + + public string[] availableText + { + get { + switch (CultureInfo.CurrentUICulture.Name.Split('-')[0]) + { + case "de": + return new string[] { "Dieses neue Spiel sieht unglaublich aus!", "Schaun' wir mal ob mein PC gut genug dafür ist..." }; + default: + return new string[] { "My gosh, this new game will be so amazing!", "Lets see if my computer can handle it..." }; + } + } + } + + public string[] incompleteText + { + get { + switch (CultureInfo.CurrentUICulture.Name.Split('-')[0]) + { + case "de": + return new string[] { "Scheinbar nicht.", "Mal sehen... ", "Ich brauche eine neue CPU, GPU und mehr RAM...", "Diese Programme sollten meinen PC kompatibel machen!" }; + default: + return new string[] { "Doesn't seem like it.", "Lets see...", "I will need a new CPU, GPU and more RAM...", "These programs should make my PC compatible!" }; + } + } + } + + public string[] completeText + { + get { + switch (CultureInfo.CurrentUICulture.Name.Split('-')[0]) + { + case "de": + return new string[] { "Ich sollte es jetzt nochmal versuchen..." }; + default: + return new string[] { "I should try again now..." }; + } + } + } + + public static uint minigamePrevTime; + + public static int[,] grid = new int[23, 10]; + public static int[,] droppedtetrominoeLocationGrid = new int[23, 10]; + public static bool isDropped = false; + static Tetrominoe tet; + static Tetrominoe nexttet; + public static int linesCleared = 0, score = 0, level = 1; + public static Random rnd; + public void gameTick(Graphics e, Panel minigamePanel, Timer minigameTimer, uint minigameTime) + { + BufferedGraphics buffer = BufferedGraphicsManager.Current.Allocate(e, new Rectangle(0, 0, minigamePanel.Width, minigamePanel.Height)); + Graphics g = buffer.Graphics; + try + { + g.Clear(Color.Black); + for (int y = 0; y < 23; ++y) + { + for (int x = 0; x < 10; x++) + { + if (grid[y, x] == 1 | droppedtetrominoeLocationGrid[y, x] == 1) + g.FillRectangle(Brushes.White, new Rectangle(x * 10, y * 10, 10, 10)); + } + g.DrawLine(new Pen(Color.DarkGray), new Point(0, (y + 1) * 10), new Point(10 * 10, (y + 1) * 10)); + } + for (int x = 0; x < 10; x++) + { + g.DrawLine(new Pen(Color.DarkGray), new Point((x + 1) * 10, 0), new Point((x + 1) * 10, 23 * 10)); + } + Drawing.DrawSizedString(g, "Level " + level, 10, new PointF(150, 10), Brushes.White); + Drawing.DrawSizedString(g, "Score " + score, 10, new PointF(150, 30), Brushes.White); + Drawing.DrawSizedString(g, "LinesCleared " + linesCleared, 10, new PointF(150, 50), Brushes.White); + Random random = new Random(); + if (minigameTime != minigamePrevTime) + { + minigamePrevTime = minigameTime; + tet.Drop(); + if (isDropped == true) + { + tet = nexttet; + nexttet = new Tetrominoe(); + tet.Spawn(); + isDropped = false; + score += 10; + } + int j; for (j = 0; j < 10; j++) + { + if (droppedtetrominoeLocationGrid[0, j] == 1) + Misc.closeGameWindow.Invoke(); + } + Input(); + ClearBlock(); + } + buffer.Render(); + buffer.Dispose(); + } + catch (Exception ex) { if (ex.InnerException?.Message == "0717750f-3508-4bc2-841e-f3b077c676fe") Misc.closeGameWindow.Invoke(); else Console.WriteLine(ex.ToString()); } + } + + public void initGame(Graphics g, Panel minigamePanel, Timer minigameTimer) + { + rnd = new Random(); + grid = new int[23, 10]; + droppedtetrominoeLocationGrid = new int[23, 10]; + isDropped = false; + linesCleared = 0; + score = 0; + level = 1; + nexttet = new Tetrominoe(); + tet = nexttet; + tet.Spawn(); + nexttet = new Tetrominoe(); + } + + private static void ClearBlock() + { + int combo = 0; + for (int i = 0; i < 23; i++) + { + int j; for (j = 0; j < 10; j++) + { + if (droppedtetrominoeLocationGrid[i, j] == 0) + break; + } + if (j == 10) + { + linesCleared++; + combo++; + Console.Beep(400, 200); + for (j = 0; j < 10; j++) + { + droppedtetrominoeLocationGrid[i, j] = 0; + } + int[,] newdroppedtetrominoeLocationGrid = new int[23, 10]; + for (int k = 1; k < i; k++) + { + for (int l = 0; l < 10; l++) + { + newdroppedtetrominoeLocationGrid[k + 1, l] = droppedtetrominoeLocationGrid[k, l]; + } + } + for (int k = 1; k < i; k++) + { + for (int l = 0; l < 10; l++) + { + droppedtetrominoeLocationGrid[k, l] = 0; + } + } + for (int k = 0; k < 23; k++) + for (int l = 0; l < 10; l++) + if (newdroppedtetrominoeLocationGrid[k, l] == 1) + droppedtetrominoeLocationGrid[k, l] = 1; + } + } + score += (int)Math.Round(Math.Sqrt(Math.Max(combo * 50 - 50, 0)) * 5); + level = (int)Math.Round(Math.Sqrt(score * 0.01)) + 1; + } + private static void Input() + { + if (Base.Input.Left & !tet.isSomethingLeft()) + { + for (int i = 0; i < 4; i++) + tet.location[i][1] -= 1; + tet.Update(); + } + else if (Base.Input.Right & !tet.isSomethingRight()) + { + for (int i = 0; i < 4; i++) + tet.location[i][1] += 1; + tet.Update(); + } + if (Base.Input.Down) + tet.Drop(); + if (Base.Input.Up) + for (; tet.isSomethingBelow() != true;) + tet.Drop(); + if (Base.Input.Action) + { + tet.Rotate(); + tet.Update(); + } + } + + public class Tetrominoe + { + public static int[,] I = new int[1, 4] { { 1, 1, 1, 1 } }; + + public static int[,] O = new int[2, 2] { { 1, 1 }, + { 1, 1 } }; + + public static int[,] T = new int[2, 3] { { 0, 1, 0 }, + { 1, 1, 1 } }; + + public static int[,] S = new int[2, 3] { { 0, 1, 1 }, + { 1, 1, 0 } }; + + public static int[,] Z = new int[2, 3] { { 1, 1, 0 }, + { 0, 1, 1 } }; + + public static int[,] J = new int[2, 3] { { 1, 0, 0 }, + { 1, 1, 1 } }; + + public static int[,] L = new int[2, 3] { { 0, 0, 1 }, + { 1, 1, 1 } }; + public static List tetrominoes = new List() { I, O, T, S, Z, J, L }; + private readonly int[,] shape; + public List location = new List(); + public Tetrominoe() + { + shape = tetrominoes[rnd.Next(0, tetrominoes.Count)]; + } + public void Spawn() + { + for (int i = 0; i < shape.GetLength(0); i++) + { + for (int j = 0; j < shape.GetLength(1); j++) + { + if (shape[i, j] == 1) + { + location.Add(new int[] { i, (10 - shape.GetLength(1)) / 2 + j }); + } + } + } + Update(); + } + public void Drop() + { + if (isSomethingBelow()) + { + for (int i = 0; i < 4; i++) + { + droppedtetrominoeLocationGrid[location[i][0], location[i][1]] = 1; + } + isDropped = true; + Console.Beep(800, 200); + } + else + { + for (int numCount = 0; numCount < 4; numCount++) + { + location[numCount][0] += 1; + } + Update(); + } + } + public void Rotate() + { + List templocation = new List(); + for (int i = 0; i < shape.GetLength(0); i++) + { + for (int j = 0; j < shape.GetLength(1); j++) + { + if (shape[i, j] == 1) + { + templocation.Add(new int[] { i, (10 - shape.GetLength(1)) / 2 + j }); + } + } + } + if (shape == tetrominoes[0]) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i] = TransformMatrix(location[i], location[2]); + } + } + else if (shape == tetrominoes[3]) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i] = TransformMatrix(location[i], location[3]); + } + } + else if (shape == tetrominoes[1]) + return; + else + { + for (int i = 0; i < location.Count; i++) + { + templocation[i] = TransformMatrix(location[i], location[2]); + } + } + for (int count = 0; isOverlayLeft(templocation) != false | isOverlayRight(templocation) != false | isOverlayBelow(templocation) != false; count++) + { + if (isOverlayLeft(templocation) == true) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i][1] += 1; + } + } + if (isOverlayRight(templocation) == true) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i][1] -= 1; + } + } + if (isOverlayBelow(templocation) == true) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i][0] -= 1; + } + } + if (count == 3) + { + return; + } + } + location = templocation; + } + public bool notFalse(bool? inp) => (inp ?? true); + public int[] TransformMatrix(int[] coord, int[] axis) => new int[] { axis[0] - axis[1] + coord[1], axis[0] + axis[1] - coord[0] }; + public bool isSomethingBelow() + { + for (int i = 0; i < 4; i++) + { + if (location[i][0] + 1 >= 23) + return true; + if (location[i][0] + 1 < 23 & droppedtetrominoeLocationGrid[location[i][0] + 1, location[i][1]] == 1) + return true; + } + return false; + } + public bool? isOverlayBelow(List location) + { + List ycoords = new List(); + for (int i = 0; i < 4; i++) + { + ycoords.Add(location[i][0]); + if (location[i][0] >= 23) + return true; + if (location[i][0] < 0 | location[i][1] < 0 | location[i][1] > 9) + return null; + } + for (int i = 0; i < 4; i++) + { + if (ycoords.Max() - ycoords.Min() == 3) + { + if ((ycoords.Max() == location[i][0] | ycoords.Max() - 1 == location[i][0]) & (droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1)) + { + return true; + } + } + else + { + if ((ycoords.Max() == location[i][0]) & (droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1)) + { + return true; + } + } + } + return false; + } + public bool isSomethingLeft() + { + for (int i = 0; i < 4; i++) + { + if (location[i][1] == 0) + return true; + else if (droppedtetrominoeLocationGrid[location[i][0], location[i][1] - 1] == 1) + return true; + } + return false; + } + public bool? isOverlayLeft(List location) + { + List xcoords = new List(); + for (int i = 0; i < 4; i++) + { + xcoords.Add(location[i][1]); + if (location[i][1] < 0) + return true; + if (location[i][1] > 9) + return false; + if (location[i][0] >= 23 | location[i][0] < 0) + return null; + } + for (int i = 0; i < 4; i++) + { + if (xcoords.Max() - xcoords.Min() == 3) + { + if (xcoords.Min() == location[i][1] | xcoords.Min() + 1 == location[i][1]) + { + if (droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1) + { + return true; + } + } + } + else + { + if (xcoords.Min() == location[i][1]) + { + if (droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1) + { + return true; + } + } + } + } + return false; + } + public bool isSomethingRight() + { + for (int i = 0; i < 4; i++) + { + if (location[i][1] == 9) + return true; + else if (droppedtetrominoeLocationGrid[location[i][0], location[i][1] + 1] == 1) + return true; + } + return false; + } + public bool? isOverlayRight(List location) + { + List xcoords = new List(); + for (int i = 0; i < 4; i++) + { + xcoords.Add(location[i][1]); + if (location[i][1] > 9) + return true; + if (location[i][1] < 0) + return false; + if (location[i][0] >= 23 | location[i][0] < 0) + return null; + } + for (int i = 0; i < 4; i++) + { + if (xcoords.Max() - xcoords.Min() == 3) + { + if ((xcoords.Max() == location[i][1] | xcoords.Max() - 1 == location[i][1]) & droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1) + { + return true; + } + } + else + { + if (xcoords.Max() == location[i][1] & droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1) + { + return true; + } + } + } + return false; + } + public void Update() + { + for (int i = 0; i < 23; i++) + { + for (int j = 0; j < 10; j++) + { + grid[i, j] = 0; + } + } + for (int i = 0; i < 4; i++) + { + grid[location[i][0], location[i][1]] = 1; + } + } + } + } +} diff --git a/3g/3g.csproj b/3g/3g.csproj new file mode 100644 index 0000000..411d503 --- /dev/null +++ b/3g/3g.csproj @@ -0,0 +1,60 @@ + + + + + Debug + AnyCPU + {E61E2797-62B4-471C-ACBF-31EAB7C746CF} + Library + Properties + LaptopSimulator2015.Levels + 3g + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + {9A9561A7-DD5F-43A5-A3F5-A95F35DA204D} + Base + + + + + if not exist "$(SolutionDir)tmp1" mkdir "$(SolutionDir)tmp1" +copy "$(TargetPath)" "$(SolutionDir)tmp1" + + \ No newline at end of file diff --git a/3g/Properties/AssemblyInfo.cs b/3g/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4e1f46d --- /dev/null +++ b/3g/Properties/AssemblyInfo.cs @@ -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("3g")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3g")] +[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("e61e2797-62b4-471c-acbf-31eab7c746cf")] + +// 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")] diff --git a/4/4.cs b/4/4.cs index f30874c..f3bccba 100644 --- a/4/4.cs +++ b/4/4.cs @@ -10,7 +10,7 @@ namespace LaptopSimulator2015.Levels { class Lvl4 : Level { - public string installerHeader + public string name { get { switch (CultureInfo.CurrentUICulture.Name.Split('-')[0]) @@ -37,7 +37,7 @@ namespace LaptopSimulator2015.Levels } static Image _installer; - public Image installerIcon + public Image icon { get { if (_installer == null) @@ -51,7 +51,7 @@ namespace LaptopSimulator2015.Levels } } - public int LevelNumber => 4; + public int levelNumber => 4; public int gameClock => 17; public Panel desktopIcon { get; set; } public int installerProgressSteps => 500; diff --git a/Base/Base.csproj b/Base/Base.csproj index 2b3b616..63b6c73 100644 --- a/Base/Base.csproj +++ b/Base/Base.csproj @@ -45,7 +45,7 @@ - + diff --git a/Base/Level.cs b/Base/Minigame.cs similarity index 59% rename from Base/Level.cs rename to Base/Minigame.cs index ab48bde..f1b5e5e 100644 --- a/Base/Level.cs +++ b/Base/Minigame.cs @@ -8,16 +8,26 @@ using System.Windows.Forms; namespace LaptopSimulator2015 { - public interface Level + public interface Minigame { - string installerHeader { get; } - string installerText { get; } - Image installerIcon { get; } - int LevelNumber { get; } + string name { get; } + Image icon { get; } + int levelNumber { get; } int gameClock { get; } Panel desktopIcon { get; set; } - int installerProgressSteps { get; } void initGame(Graphics g, Panel minigamePanel, Timer minigameTimer); void gameTick(Graphics g, Panel minigamePanel, Timer minigameTimer, uint minigameTime); } + public interface Level : Minigame + { + string installerText { get; } + int installerProgressSteps { get; } + } + public interface Goal : Minigame + { + int playableAfter { get; } + string[] availableText { get; } + string[] incompleteText { get; } + string[] completeText { get; } + } } diff --git a/LaptopSimulator2015.sln b/LaptopSimulator2015.sln index 2892dc3..2323e25 100644 --- a/LaptopSimulator2015.sln +++ b/LaptopSimulator2015.sln @@ -8,6 +8,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaptopSimulator2015", "Lapt {0965C803-49B2-4311-B62F-1E60DBD9185F} = {0965C803-49B2-4311-B62F-1E60DBD9185F} {8109040E-9D8D-43E7-A461-83475B2939C9} = {8109040E-9D8D-43E7-A461-83475B2939C9} {4AA1EF48-BC5E-4FE4-9B7D-BAE6D6AB9529} = {4AA1EF48-BC5E-4FE4-9B7D-BAE6D6AB9529} + {E61E2797-62B4-471C-ACBF-31EAB7C746CF} = {E61E2797-62B4-471C-ACBF-31EAB7C746CF} {DFA2FB97-D676-4B0D-B281-2685F85781EE} = {DFA2FB97-D676-4B0D-B281-2685F85781EE} EndProjectSection EndProject @@ -40,6 +41,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ToDo.txt = ToDo.txt EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Goals", "Goals", "{7D9F2BFD-61B6-4C6C-97CC-D9AD51A04959}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3g", "3g\3g.csproj", "{E61E2797-62B4-471C-ACBF-31EAB7C746CF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lv3g_t", "lv3g_t\lv3g_t.csproj", "{E6BF80E0-8848-4A6F-B114-FEC5055E1D9E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -90,12 +97,19 @@ Global {4AA1EF48-BC5E-4FE4-9B7D-BAE6D6AB9529}.Debug|Any CPU.Build.0 = Debug|Any CPU {4AA1EF48-BC5E-4FE4-9B7D-BAE6D6AB9529}.Release|Any CPU.ActiveCfg = Release|Any CPU {4AA1EF48-BC5E-4FE4-9B7D-BAE6D6AB9529}.Release|Any CPU.Build.0 = Release|Any CPU + {E61E2797-62B4-471C-ACBF-31EAB7C746CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E61E2797-62B4-471C-ACBF-31EAB7C746CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E61E2797-62B4-471C-ACBF-31EAB7C746CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E61E2797-62B4-471C-ACBF-31EAB7C746CF}.Release|Any CPU.Build.0 = Release|Any CPU + {E6BF80E0-8848-4A6F-B114-FEC5055E1D9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6BF80E0-8848-4A6F-B114-FEC5055E1D9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6BF80E0-8848-4A6F-B114-FEC5055E1D9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6BF80E0-8848-4A6F-B114-FEC5055E1D9E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {9A9561A7-DD5F-43A5-A3F5-A95F35DA204D} = {83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218} {DFA2FB97-D676-4B0D-B281-2685F85781EE} = {83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218} {52CE6BEB-EC81-4A14-85DD-3F8DB8E33202} = {69DC5824-3F89-4B47-BF1A-F25942094195} {D80DBBF2-307F-40A0-86F1-871C8DAA394B} = {69DC5824-3F89-4B47-BF1A-F25942094195} @@ -105,6 +119,8 @@ Global {8109040E-9D8D-43E7-A461-83475B2939C9} = {83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218} {22D618C0-F0A4-417F-A815-C760BF4376B2} = {69DC5824-3F89-4B47-BF1A-F25942094195} {4AA1EF48-BC5E-4FE4-9B7D-BAE6D6AB9529} = {83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218} + {E61E2797-62B4-471C-ACBF-31EAB7C746CF} = {7D9F2BFD-61B6-4C6C-97CC-D9AD51A04959} + {E6BF80E0-8848-4A6F-B114-FEC5055E1D9E} = {69DC5824-3F89-4B47-BF1A-F25942094195} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9631F8FF-AFC1-4583-9D27-6C2D97D3A2E9} diff --git a/LaptopSimulator2015/FakeDesktop.Designer.cs b/LaptopSimulator2015/FakeDesktop.Designer.cs index 70a3dfe..a05e29a 100644 --- a/LaptopSimulator2015/FakeDesktop.Designer.cs +++ b/LaptopSimulator2015/FakeDesktop.Designer.cs @@ -45,6 +45,7 @@ namespace LaptopSimulator2015 this.winMenuExit = new System.Windows.Forms.Button(); this.winTaskbar = new System.Windows.Forms.Panel(); this.subsLabel = new System.Windows.Forms.Label(); + this.winTimeLabel = new System.Windows.Forms.Label(); this.winDesktop = new System.Windows.Forms.FlowLayoutPanel(); this.options_1 = new System.Windows.Forms.Panel(); this.options_2 = new System.Windows.Forms.Panel(); @@ -65,9 +66,9 @@ namespace LaptopSimulator2015 this.levelWindowIcon = new System.Windows.Forms.Panel(); this.levelWindowTitle = new System.Windows.Forms.Label(); this.levelWindowProgressT = new System.Windows.Forms.Timer(this.components); - this.winTimeLabel = new System.Windows.Forms.Label(); this.winTimeTimer = new System.Windows.Forms.Timer(this.components); this.minigamePanel = new System.Windows.Forms.Panel(); + this.minigameClose = new System.Windows.Forms.Label(); this.minigameClockT = new System.Windows.Forms.Timer(this.components); this.optionsWindow = new System.Windows.Forms.Panel(); this.optionsWindowReset = new System.Windows.Forms.Button(); @@ -93,6 +94,7 @@ namespace LaptopSimulator2015 this.levelWindow2.SuspendLayout(); this.levelWindow3.SuspendLayout(); this.levelWindowHeader.SuspendLayout(); + this.minigamePanel.SuspendLayout(); this.optionsWindow.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.optionsWindowWam)).BeginInit(); this.optionsWindowHeader.SuspendLayout(); @@ -190,11 +192,25 @@ namespace LaptopSimulator2015 // this.subsLabel.AutoSize = true; this.subsLabel.BackColor = System.Drawing.Color.Navy; - this.subsLabel.Location = new System.Drawing.Point(6, 9); + this.subsLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.subsLabel.ForeColor = System.Drawing.Color.White; + this.subsLabel.Location = new System.Drawing.Point(6, 7); this.subsLabel.Name = "subsLabel"; - this.subsLabel.Size = new System.Drawing.Size(0, 13); + this.subsLabel.Size = new System.Drawing.Size(0, 16); this.subsLabel.TabIndex = 0; // + // winTimeLabel + // + this.winTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.winTimeLabel.AutoSize = true; + this.winTimeLabel.BackColor = System.Drawing.Color.Navy; + this.winTimeLabel.ForeColor = System.Drawing.Color.White; + this.winTimeLabel.Location = new System.Drawing.Point(1305, 9); + this.winTimeLabel.Name = "winTimeLabel"; + this.winTimeLabel.Size = new System.Drawing.Size(49, 13); + this.winTimeLabel.TabIndex = 0; + this.winTimeLabel.Text = "00:00:00"; + // // winDesktop // this.winDesktop.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -410,18 +426,6 @@ namespace LaptopSimulator2015 // this.levelWindowProgressT.Tick += new System.EventHandler(this.LevelWindowProgressT_Tick); // - // winTimeLabel - // - this.winTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.winTimeLabel.AutoSize = true; - this.winTimeLabel.BackColor = System.Drawing.Color.Navy; - this.winTimeLabel.ForeColor = System.Drawing.Color.White; - this.winTimeLabel.Location = new System.Drawing.Point(1305, 9); - this.winTimeLabel.Name = "winTimeLabel"; - this.winTimeLabel.Size = new System.Drawing.Size(49, 13); - this.winTimeLabel.TabIndex = 0; - this.winTimeLabel.Text = "00:00:00"; - // // winTimeTimer // this.winTimeTimer.Enabled = true; @@ -432,6 +436,7 @@ namespace LaptopSimulator2015 // this.minigamePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.minigamePanel.BackColor = System.Drawing.Color.Black; + this.minigamePanel.Controls.Add(this.minigameClose); this.minigamePanel.Location = new System.Drawing.Point(564, 421); this.minigamePanel.Name = "minigamePanel"; this.minigamePanel.Size = new System.Drawing.Size(800, 450); @@ -439,6 +444,20 @@ namespace LaptopSimulator2015 this.minigamePanel.Visible = false; this.minigamePanel.Paint += new System.Windows.Forms.PaintEventHandler(this.InvadersPanel_Paint); // + // minigameClose + // + this.minigameClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.minigameClose.BackColor = System.Drawing.Color.Red; + this.minigameClose.Font = new System.Drawing.Font("Marlett", 12F); + this.minigameClose.Location = new System.Drawing.Point(760, 0); + this.minigameClose.Name = "minigameClose"; + this.minigameClose.Size = new System.Drawing.Size(40, 20); + this.minigameClose.TabIndex = 4; + this.minigameClose.Text = "r"; + this.minigameClose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.minigameClose.Visible = false; + this.minigameClose.Click += new System.EventHandler(this.MinigameClose_Click); + // // minigameClockT // this.minigameClockT.Interval = 17; @@ -464,9 +483,9 @@ namespace LaptopSimulator2015 // optionsWindowReset // this.optionsWindowReset.BackColor = System.Drawing.Color.Red; - this.optionsWindowReset.Location = new System.Drawing.Point(332, 64); + this.optionsWindowReset.Location = new System.Drawing.Point(355, 64); this.optionsWindowReset.Name = "optionsWindowReset"; - this.optionsWindowReset.Size = new System.Drawing.Size(75, 23); + this.optionsWindowReset.Size = new System.Drawing.Size(93, 23); this.optionsWindowReset.TabIndex = 7; this.optionsWindowReset.Text = "Reset"; this.optionsWindowReset.UseVisualStyleBackColor = false; @@ -495,9 +514,9 @@ namespace LaptopSimulator2015 // // optionsWindowExit // - this.optionsWindowExit.Location = new System.Drawing.Point(413, 64); + this.optionsWindowExit.Location = new System.Drawing.Point(454, 64); this.optionsWindowExit.Name = "optionsWindowExit"; - this.optionsWindowExit.Size = new System.Drawing.Size(75, 23); + this.optionsWindowExit.Size = new System.Drawing.Size(34, 23); this.optionsWindowExit.TabIndex = 4; this.optionsWindowExit.Text = "OK"; this.optionsWindowExit.UseVisualStyleBackColor = true; @@ -604,6 +623,7 @@ namespace LaptopSimulator2015 this.Text = "FakeDesktop"; 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.winMenuPanel.ResumeLayout(false); this.winTaskbar.ResumeLayout(false); this.winTaskbar.PerformLayout(); @@ -618,6 +638,7 @@ namespace LaptopSimulator2015 this.levelWindow3.PerformLayout(); this.levelWindowHeader.ResumeLayout(false); this.levelWindowHeader.PerformLayout(); + this.minigamePanel.ResumeLayout(false); this.optionsWindow.ResumeLayout(false); this.optionsWindow.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.optionsWindowWam)).EndInit(); @@ -675,5 +696,6 @@ namespace LaptopSimulator2015 private System.Windows.Forms.Label optionsWindowHeaderExit; private System.Windows.Forms.Button optionsWindowReset; private System.Windows.Forms.ToolTip toolTip; + private System.Windows.Forms.Label minigameClose; } } \ No newline at end of file diff --git a/LaptopSimulator2015/FakeDesktop.cs b/LaptopSimulator2015/FakeDesktop.cs index 354ec4d..431ac0a 100644 --- a/LaptopSimulator2015/FakeDesktop.cs +++ b/LaptopSimulator2015/FakeDesktop.cs @@ -18,7 +18,7 @@ namespace LaptopSimulator2015 public partial class FakeDesktop : Form { #region Base - List levels = new List(); + List levels = new List(); SoundPlayer fans; bool winShouldClose = false; @@ -45,6 +45,8 @@ namespace LaptopSimulator2015 optionsWindowLSD.Text = strings.optionsWindowLSD; optionsWindowTitle.Text = strings.optionsWindowTitle; optionsWindowWamLabel.Text = strings.optionsWindowWam; + optionsWindowReset.Text = strings.optionsWindowReset; + optionsWindowSubs.Text = strings.optionsWindowSubs; levelWindow.Visible = false; minigamePanel.Visible = false; optionsWindow.Visible = false; @@ -57,10 +59,11 @@ namespace LaptopSimulator2015 subsLabel.Visible = optionsWindowSubs.Checked; if (_mode == Mode.mainMenu) winMenuStart.Select(); - for (int i = 0; i < levels.Count; i++) - levels[i].desktopIcon.Visible = levels[i].LevelNumber <= Settings.level; + if (tmp__mode_uiv) + updateIconVisibility(); } } + bool tmp__mode_uiv = false; [DllImport("winmm.dll")] public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume); @@ -73,6 +76,8 @@ namespace LaptopSimulator2015 Directory.SetCurrentDirectory(Path.GetDirectoryName(Application.ExecutablePath)); if (!Directory.Exists("Levels")) Directory.CreateDirectory("Levels"); + if (!Directory.Exists("Goals")) + Directory.CreateDirectory("Goals"); InitializeComponent(); toolTip.SetToolTip(options_2, strings.optionsWindowTitle); levelWindowContents.ItemSize = new Size(0, 1); @@ -95,48 +100,159 @@ namespace LaptopSimulator2015 fans.PlayLooping(); Control[] controls = getControls(ignore: new List { minigamePanel }).ToArray(); for (int i = 0; i < controls.Length; i++) - { controls[i].Paint += Control_Paint; - } - levels = new List(); - AppDomain ad = AppDomain.CurrentDomain; - ad.AssemblyResolve += AssemblyResolveHandler; - foreach (string s in Directory.GetFiles("Levels")) - if (Path.GetExtension(s) == ".dll") - ad.Load(s); - List tmp = ad.GetAssemblies().SelectMany(s => s.GetTypes()).Where(p => typeof(Level).IsAssignableFrom(p)).ToList(); - tmp.Remove(typeof(Level)); - for (int i = 0; i < tmp.Count; i++) + levels = Directory.GetFiles("Levels").Concat(Directory.GetFiles("Goals")).Where(s => Path.GetExtension(s) == ".dll").Select(s => Assembly.LoadFrom(s)) + .SelectMany(s => s.GetTypes()).Where(p => typeof(Minigame).IsAssignableFrom(p) && p != typeof(Minigame) && p != typeof(Level) && p != typeof(Goal)).Distinct() + .Select(s => (Minigame)Activator.CreateInstance(s)).OrderBy(lv => lv.levelNumber).ToList(); + for (int i = 0; i < levels.Count; i++) { - levels.Add((Level)Activator.CreateInstance(tmp[i])); levels[i].desktopIcon = new Panel(); Panel tmp1 = new Panel(); 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.level; + levels[i].desktopIcon.Visible = levels[i].levelNumber <= Settings.level; tmp1.BackColor = Color.Blue; tmp1.BackgroundImageLayout = ImageLayout.Stretch; - tmp1.BackgroundImage = levels[i].installerIcon; + tmp1.BackgroundImage = levels[i].icon; tmp1.Anchor = (AnchorStyles)15; tmp1.Name = "lvl" + i.ToString() + "_2"; tmp1.Location = new Point(2, 2); tmp1.Size = new Size(46, 46); tmp1.Tag = i; - tmp1.DoubleClick += (sender, e) => { level_Start((int)((Panel)sender).Tag); }; - toolTip.SetToolTip(tmp1, strings.lvPref + " " + (i + 1).ToString() + ": " + levels[i].installerHeader); + tmp1.DoubleClick += (sender, e) => + { + levelInd = (int)((Panel)sender).Tag; + levelWindowIcon.BackgroundImage = levels[levelInd].icon; + levelWindowTitle.Text = levels[levelInd].name; + minigameClockT.Interval = levels[levelInd].gameClock; + winDesktop.Enabled = false; + if (typeof(Level).IsAssignableFrom(levels[levelInd].GetType())) + { + Misc.closeGameWindow = new Action(() => { + base.BackColor = Color.FromArgb(100, 0, 255); + levelWindow.Visible = false; + minigamePanel.Visible = false; + minigamePanel.Enabled = false; + minigameClockT.Enabled = false; + winDesktop.Enabled = true; + levelWindowContents.SelectedIndex = 0; + levelWindowProgress.Value = 0; + levelWindowProgressT.Enabled = false; + levelWindowC1.Enabled = true; + Thread.Sleep(100); + base.BackColor = Color.Blue; + }); + levelWindowProgress.Maximum = ((Level)levels[levelInd]).installerProgressSteps; + levelWindowText1.Text = ((Level)levels[levelInd]).installerText; + levelWindow.Visible = true; + } + else + { + Goal goal = ((Goal)levels[levelInd]); + if (goal.playableAfter <= Settings.level) + { + Graphics g = minigamePanel.CreateGraphics(); + levels[levelInd].initGame(g, minigamePanel, minigameClockT); + minigamePanel.Visible = true; + minigamePanel.Enabled = true; + minigameClockT.Enabled = true; + minigameClose.Visible = true; + g.Flush(); + Misc.closeGameWindow = new Action(() => { + base.BackColor = Color.FromArgb(100, 0, 255); + minigamePanel.Visible = false; + minigamePanel.Enabled = false; + minigameClockT.Enabled = false; + winDesktop.Enabled = true; + minigameClose.Visible = false; + Thread.Sleep(100); + base.BackColor = Color.Blue; + }); + minigamePanel.Show(); + } + else + { + base.BackColor = Color.FromArgb(100, 0, 255); + if (levels[levelInd].levelNumber == Settings.level) + { + playDialog(goal.incompleteText); + incrementLevel(); + } + Thread.Sleep(100); + base.BackColor = Color.Blue; + winDesktop.Enabled = true; + } + } + }; + toolTip.SetToolTip(tmp1, strings.lvPref + " " + (i + 1).ToString() + ": " + levels[i].name); levels[i].desktopIcon.Controls.Add(tmp1); winDesktop.Controls.Add(levels[i].desktopIcon); } - levels = levels.OrderBy(lv => lv.LevelNumber).ToList(); + } + + private void FakeDesktop_Load(object sender, EventArgs e) + { mode = Mode.mainMenu; Program.splash.Close(); - Misc.closeGameWindow = new Action(closeLevelWindow); + GC.Collect(); + tmp__mode_uiv = true; + } + + void updateIconVisibility(bool ignoreSub = false) + { + for (int i = 0; i < levels.Count; i++) + { + if ((!ignoreSub) && ((typeof(Goal).IsAssignableFrom(levels[i].GetType()) && levels[i].desktopIcon.Visible != levels[i].levelNumber <= Settings.level) || (levels[i].levelNumber == 0 && Settings.level == 0))) + { + string[] at = ((Goal)levels[i]).availableText; + new Thread(() => + { + Invoke((MethodInvoker)delegate () { winDesktop.Enabled = false; }); + playDialog(at).Join(); + Invoke((MethodInvoker)delegate () + { + winDesktop.Enabled = true; + updateIconVisibility(true); + }); + }).Start(); + } + levels[i].desktopIcon.Visible = levels[i].levelNumber <= Settings.level; + } + } + + Thread playDialog(string[] lines) + { + var tmp = new Thread(() => + { + for (int i = 0; i < lines.Length; i++) + { + Invoke((MethodInvoker)delegate () { subsLabel.Text = lines[i]; }); + Thread.Sleep(2000); + } + Invoke((MethodInvoker)delegate () { subsLabel.Text = ""; }); + }); + tmp.Start(); + return tmp; + } + + void incrementLevel() + { + int closest = int.MaxValue; + for (int i = 0; i < levels.Count; i++) + if (levels[i].levelNumber < closest & levels[i].levelNumber > levels[levelInd].levelNumber) + closest = levels[i].levelNumber; + if (closest != int.MaxValue) + Settings.level = closest; + Settings.Save(); + updateIconVisibility(); + for (int i = 0; i < levels.Count; i++) + if (typeof(Goal).IsAssignableFrom(levels[i].GetType()) && ((Goal)levels[i]).playableAfter == Settings.level) + playDialog(((Goal)levels[i]).completeText); } - static Assembly AssemblyResolveHandler(object source, ResolveEventArgs e) => Assembly.LoadFrom(e.Name); public List getControls(Control parent = null, List ignore = null) { @@ -203,24 +319,12 @@ namespace LaptopSimulator2015 else winMenuExit.Text = strings.winMenuExit2; } - private void WinMenuStart_Click(object sender, EventArgs e) => mode = Mode.game; private void WinTimeTimer_Tick(object sender, EventArgs e) => winTimeLabel.Text = DateTime.Now.ToString("hh:mm:ss", Settings.lang); #endregion #region Level int levelInd = 0; - private void level_Start(int level) - { - levelInd = level; - levelWindowIcon.BackgroundImage = levels[level].installerIcon; - levelWindowTitle.Text = levels[level].installerHeader; - levelWindowText1.Text = levels[level].installerText; - minigameClockT.Interval = levels[level].gameClock; - levelWindowProgress.Maximum = levels[level].installerProgressSteps; - winDesktop.Enabled = false; - levelWindow.Visible = true; - } bool levelWindowMoving = false; Point levelWindowDiff = Point.Empty; @@ -274,17 +378,9 @@ namespace LaptopSimulator2015 break; case 2: LevelWindowHeaderExit_Click(sender, e); - if (levels[levelInd].LevelNumber >= Settings.level) + if (levels[levelInd].levelNumber >= Settings.level) { - int closest = int.MaxValue; - for (int i = 0; i < levels.Count; i++) - if (levels[i].LevelNumber < closest & levels[i].LevelNumber > levels[levelInd].LevelNumber) - closest = levels[i].LevelNumber; - if (closest != int.MaxValue) - Settings.level = closest; - Settings.Save(); - for (int i = 0; i < levels.Count; i++) - levels[i].desktopIcon.Visible = levels[i].LevelNumber <= Settings.level; + incrementLevel(); mode = Mode.game; } break; @@ -348,25 +444,10 @@ namespace LaptopSimulator2015 } } - private void LevelWindowHeaderExit_Click(object sender, EventArgs e) => closeLevelWindow(); + private void LevelWindowHeaderExit_Click(object sender, EventArgs e) => Misc.closeGameWindow.Invoke(); + private void MinigameClose_Click(object sender, EventArgs e) => Misc.closeGameWindow.Invoke(); - private void closeLevelWindow() - { - BackColor = Color.FromArgb(100, 0, 255); - levelWindow.Visible = false; - minigamePanel.Visible = false; - minigamePanel.Enabled = false; - minigameClockT.Enabled = false; - winDesktop.Enabled = true; - levelWindowContents.SelectedIndex = 0; - levelWindowProgress.Value = 0; - levelWindowProgressT.Enabled = false; - levelWindowC1.Enabled = true; - Thread.Sleep(100); - BackColor = Color.Blue; - } - -#region Minigame + #region Minigame uint minigameTime = 0; private void InvadersPanel_Paint(object sender, PaintEventArgs e) => levels[levelInd].gameTick(e.Graphics, minigamePanel, minigameClockT, minigameTime); @@ -375,10 +456,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; diff --git a/LaptopSimulator2015/LaptopSimulator2015.csproj b/LaptopSimulator2015/LaptopSimulator2015.csproj index 3ba58cb..569543e 100644 --- a/LaptopSimulator2015/LaptopSimulator2015.csproj +++ b/LaptopSimulator2015/LaptopSimulator2015.csproj @@ -134,7 +134,13 @@ if not exist "$(TargetDir)Levels" mkdir "$(TargetDir)Levels" if exist "$(SolutionDir)tmp" copy $(SolutionDir)tmp\* "$(TargetDir)Levels" -rmdir /s /q "$(SolutionDir)tmp" +rmdir /s /q "$(SolutionDir)tmp" + +if not exist "$(TargetDir)Goals" mkdir "$(TargetDir)Goals" +if exist "$(SolutionDir)tmp1" copy $(SolutionDir)tmp1\* "$(TargetDir)Goals" +rmdir /s /q "$(SolutionDir)tmp1" + +del /q "$(TargetDir)save.xml" diff --git a/LaptopSimulator2015/Settings.cs b/LaptopSimulator2015/Settings.cs index 9acae2e..c369e4a 100644 --- a/LaptopSimulator2015/Settings.cs +++ b/LaptopSimulator2015/Settings.cs @@ -24,7 +24,7 @@ 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", 1)); + xmldoc_temp.Add(new XElement("level", 0)); xmldoc_temp.Add(new XElement("lang", CultureInfo.CurrentCulture)); xmldoc_temp.Save(_xmlfile); } diff --git a/LaptopSimulator2015/strings.Designer.cs b/LaptopSimulator2015/strings.Designer.cs index f8a9d35..1836cc8 100644 --- a/LaptopSimulator2015/strings.Designer.cs +++ b/LaptopSimulator2015/strings.Designer.cs @@ -159,6 +159,24 @@ namespace LaptopSimulator2015 { } } + /// + /// Looks up a localized string similar to Reset. + /// + internal static string optionsWindowReset { + get { + return ResourceManager.GetString("optionsWindowReset", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subtitles. + /// + internal static string optionsWindowSubs { + get { + return ResourceManager.GetString("optionsWindowSubs", resourceCulture); + } + } + /// /// Looks up a localized string similar to Options. /// diff --git a/LaptopSimulator2015/strings.de.resx b/LaptopSimulator2015/strings.de.resx index 14f7c2a..e997bdb 100644 --- a/LaptopSimulator2015/strings.de.resx +++ b/LaptopSimulator2015/strings.de.resx @@ -150,6 +150,12 @@ Bist du dir sicher? (ALLES wird verbuggt werden!) + + Zurücksetzen + + + Untertitel + Optionen diff --git a/LaptopSimulator2015/strings.resx b/LaptopSimulator2015/strings.resx index 23bcc24..e37cd71 100644 --- a/LaptopSimulator2015/strings.resx +++ b/LaptopSimulator2015/strings.resx @@ -150,6 +150,12 @@ Are you SURE?\r\n(This will break EVERYTHING!) + + Reset + + + Subtitles + Options diff --git a/lv3g_t/App.config b/lv3g_t/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/lv3g_t/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lv3g_t/MainForm.Designer.cs b/lv3g_t/MainForm.Designer.cs new file mode 100644 index 0000000..81c86b5 --- /dev/null +++ b/lv3g_t/MainForm.Designer.cs @@ -0,0 +1,93 @@ +namespace lv3g_t +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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 = 300; + 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 = 2; + 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; + } +} + diff --git a/lv3g_t/MainForm.cs b/lv3g_t/MainForm.cs new file mode 100644 index 0000000..7e9db22 --- /dev/null +++ b/lv3g_t/MainForm.cs @@ -0,0 +1,467 @@ +using Base; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace lv3g_t +{ + public partial class MainForm : Form + { + #region FRMBD + uint minigameTime; + uint minigamePrevTime; + public MainForm() + { + InitializeComponent(); + _initGame(); + } + + private void Button1_Click(object sender, EventArgs e) => Application.Exit(); + private void MinigameClockT_Tick(object sender, EventArgs e) + { + minigameTime++; + minigamePanel.Invalidate(); + } + + private void _initGame() + { + minigameTime = 0; + minigamePrevTime = 0; + initGame(); + } + #endregion + public static int[,] grid = new int[23, 10]; + public static int[,] droppedtetrominoeLocationGrid = new int[23, 10]; + public static bool isDropped = false; + static Tetrominoe tet; + static Tetrominoe nexttet; + public static int linesCleared = 0, score = 0, level = 1; + public static Random rnd; + private void initGame() + { + rnd = new Random(); + grid = new int[23, 10]; + droppedtetrominoeLocationGrid = new int[23, 10]; + isDropped = false; + linesCleared = 0; + score = 0; + level = 1; + nexttet = new Tetrominoe(); + tet = nexttet; + tet.Spawn(); + nexttet = new Tetrominoe(); + } + + 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); + for (int y = 0; y < 23; ++y) + { + for (int x = 0; x < 10; x++) + { + if (grid[y, x] == 1 | droppedtetrominoeLocationGrid[y, x] == 1) + g.FillRectangle(Brushes.White, new Rectangle(x * 10, y * 10, 10, 10)); + } + g.DrawLine(new Pen(Color.DarkGray), new Point(0, (y + 1) * 10), new Point(10 * 10, (y + 1) * 10)); + } + for (int x = 0; x < 10; x++) + { + g.DrawLine(new Pen(Color.DarkGray), new Point((x + 1) * 10, 0), new Point((x + 1) * 10, 23 * 10)); + } + Drawing.DrawSizedString(g, "Level " + level, 10, new PointF(150, 10), Brushes.White); + Drawing.DrawSizedString(g, "Score " + score, 10, new PointF(150, 30), Brushes.White); + Drawing.DrawSizedString(g, "LinesCleared " + linesCleared, 10, new PointF(150, 50), Brushes.White); + Random random = new Random(); + if (minigameTime != minigamePrevTime) + { + minigamePrevTime = minigameTime; + tet.Drop(); + if (isDropped == true) + { + tet = nexttet; + nexttet = new Tetrominoe(); + tet.Spawn(); + isDropped = false; + score += 10; + } + int j; for (j = 0; j < 10; j++) + { + if (droppedtetrominoeLocationGrid[0, j] == 1) + _initGame(); + } + Input(); + ClearBlock(); + } + buffer.Render(); + } + catch (Exception ex) + { +#if DEBUG + throw; +#else + Console.WriteLine(ex.ToString()); +#endif + } + } + + private static void ClearBlock() + { + int combo = 0; + for (int i = 0; i < 23; i++) + { + int j; for (j = 0; j < 10; j++) + { + if (droppedtetrominoeLocationGrid[i, j] == 0) + break; + } + if (j == 10) + { + linesCleared++; + combo++; + Console.Beep(400, 200); + for (j = 0; j < 10; j++) + { + droppedtetrominoeLocationGrid[i, j] = 0; + } + int[,] newdroppedtetrominoeLocationGrid = new int[23, 10]; + for (int k = 1; k < i; k++) + { + for (int l = 0; l < 10; l++) + { + newdroppedtetrominoeLocationGrid[k + 1, l] = droppedtetrominoeLocationGrid[k, l]; + } + } + for (int k = 1; k < i; k++) + { + for (int l = 0; l < 10; l++) + { + droppedtetrominoeLocationGrid[k, l] = 0; + } + } + for (int k = 0; k < 23; k++) + for (int l = 0; l < 10; l++) + if (newdroppedtetrominoeLocationGrid[k, l] == 1) + droppedtetrominoeLocationGrid[k, l] = 1; + } + } + score += (int)Math.Round(Math.Sqrt(Math.Max(combo * 50 - 50, 0)) * 5); + level = (int)Math.Round(Math.Sqrt(score * 0.01)) + 1; + } + private static void Input() + { + if (Base.Input.Left & !tet.isSomethingLeft()) + { + for (int i = 0; i < 4; i++) + tet.location[i][1] -= 1; + tet.Update(); + } + else if (Base.Input.Right & !tet.isSomethingRight()) + { + for (int i = 0; i < 4; i++) + tet.location[i][1] += 1; + tet.Update(); + } + if (Base.Input.Down) + tet.Drop(); + if (Base.Input.Up) + for (; tet.isSomethingBelow() != true;) + tet.Drop(); + if (Base.Input.Action) + { + tet.Rotate(); + tet.Update(); + } + } + + public class Tetrominoe + { + public static int[,] I = new int[1, 4] { { 1, 1, 1, 1 } }; + + public static int[,] O = new int[2, 2] { { 1, 1 }, + { 1, 1 } }; + + public static int[,] T = new int[2, 3] { { 0, 1, 0 }, + { 1, 1, 1 } }; + + public static int[,] S = new int[2, 3] { { 0, 1, 1 }, + { 1, 1, 0 } }; + + public static int[,] Z = new int[2, 3] { { 1, 1, 0 }, + { 0, 1, 1 } }; + + public static int[,] J = new int[2, 3] { { 1, 0, 0 }, + { 1, 1, 1 } }; + + public static int[,] L = new int[2, 3] { { 0, 0, 1 }, + { 1, 1, 1 } }; + public static List tetrominoes = new List() { I, O, T, S, Z, J, L }; + private readonly int[,] shape; + public List location = new List(); + public Tetrominoe() + { + shape = tetrominoes[rnd.Next(0, tetrominoes.Count)]; + } + public void Spawn() + { + for (int i = 0; i < shape.GetLength(0); i++) + { + for (int j = 0; j < shape.GetLength(1); j++) + { + if (shape[i, j] == 1) + { + location.Add(new int[] { i, (10 - shape.GetLength(1)) / 2 + j }); + } + } + } + Update(); + } + public void Drop() + { + if (isSomethingBelow()) + { + for (int i = 0; i < 4; i++) + { + droppedtetrominoeLocationGrid[location[i][0], location[i][1]] = 1; + } + isDropped = true; + Console.Beep(800, 200); + } + else + { + for (int numCount = 0; numCount < 4; numCount++) + { + location[numCount][0] += 1; + } + Update(); + } + } + public void Rotate() + { + List templocation = new List(); + for (int i = 0; i < shape.GetLength(0); i++) + { + for (int j = 0; j < shape.GetLength(1); j++) + { + if (shape[i, j] == 1) + { + templocation.Add(new int[] { i, (10 - shape.GetLength(1)) / 2 + j }); + } + } + } + if (shape == tetrominoes[0]) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i] = TransformMatrix(location[i], location[2]); + } + } + else if (shape == tetrominoes[3]) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i] = TransformMatrix(location[i], location[3]); + } + } + else if (shape == tetrominoes[1]) + return; + else + { + for (int i = 0; i < location.Count; i++) + { + templocation[i] = TransformMatrix(location[i], location[2]); + } + } + for (int count = 0; isOverlayLeft(templocation) != false | isOverlayRight(templocation) != false | isOverlayBelow(templocation) != false; count++) + { + if (isOverlayLeft(templocation) == true) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i][1] += 1; + } + } + if (isOverlayRight(templocation) == true) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i][1] -= 1; + } + } + if (isOverlayBelow(templocation) == true) + { + for (int i = 0; i < location.Count; i++) + { + templocation[i][0] -= 1; + } + } + if (count == 3) + { + return; + } + } + location = templocation; + } + public bool notFalse(bool? inp) => (inp ?? true); + public int[] TransformMatrix(int[] coord, int[] axis) => new int[] { axis[0] - axis[1] + coord[1], axis[0] + axis[1] - coord[0] }; + public bool isSomethingBelow() + { + for (int i = 0; i < 4; i++) + { + if (location[i][0] + 1 >= 23) + return true; + if (location[i][0] + 1 < 23 & droppedtetrominoeLocationGrid[location[i][0] + 1, location[i][1]] == 1) + return true; + } + return false; + } + public bool? isOverlayBelow(List location) + { + List ycoords = new List(); + for (int i = 0; i < 4; i++) + { + ycoords.Add(location[i][0]); + if (location[i][0] >= 23) + return true; + if (location[i][0] < 0 | location[i][1] < 0 | location[i][1] > 9) + return null; + } + for (int i = 0; i < 4; i++) + { + if (ycoords.Max() - ycoords.Min() == 3) + { + if ((ycoords.Max() == location[i][0] | ycoords.Max() - 1 == location[i][0]) & (droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1)) + { + return true; + } + } + else + { + if ((ycoords.Max() == location[i][0]) & (droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1)) + { + return true; + } + } + } + return false; + } + public bool isSomethingLeft() + { + for (int i = 0; i < 4; i++) + { + if (location[i][1] == 0) + return true; + else if (droppedtetrominoeLocationGrid[location[i][0], location[i][1] - 1] == 1) + return true; + } + return false; + } + public bool? isOverlayLeft(List location) + { + List xcoords = new List(); + for (int i = 0; i < 4; i++) + { + xcoords.Add(location[i][1]); + if (location[i][1] < 0) + return true; + if (location[i][1] > 9) + return false; + if (location[i][0] >= 23 | location[i][0] < 0) + return null; + } + for (int i = 0; i < 4; i++) + { + if (xcoords.Max() - xcoords.Min() == 3) + { + if (xcoords.Min() == location[i][1] | xcoords.Min() + 1 == location[i][1]) + { + if (droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1) + { + return true; + } + } + } + else + { + if (xcoords.Min() == location[i][1]) + { + if (droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1) + { + return true; + } + } + } + } + return false; + } + public bool isSomethingRight() + { + for (int i = 0; i < 4; i++) + { + if (location[i][1] == 9) + return true; + else if (droppedtetrominoeLocationGrid[location[i][0], location[i][1] + 1] == 1) + return true; + } + return false; + } + public bool? isOverlayRight(List location) + { + List xcoords = new List(); + for (int i = 0; i < 4; i++) + { + xcoords.Add(location[i][1]); + if (location[i][1] > 9) + return true; + if (location[i][1] < 0) + return false; + if (location[i][0] >= 23 | location[i][0] < 0) + return null; + } + for (int i = 0; i < 4; i++) + { + if (xcoords.Max() - xcoords.Min() == 3) + { + if ((xcoords.Max() == location[i][1] | xcoords.Max() - 1 == location[i][1]) & droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1) + { + return true; + } + } + else + { + if (xcoords.Max() == location[i][1] & droppedtetrominoeLocationGrid[location[i][0], location[i][1]] == 1) + { + return true; + } + } + } + return false; + } + public void Update() + { + for (int i = 0; i < 23; i++) + { + for (int j = 0; j < 10; j++) + { + grid[i, j] = 0; + } + } + for (int i = 0; i < 4; i++) + { + grid[location[i][0], location[i][1]] = 1; + } + } + } + } +} diff --git a/lv3g_t/MainForm.resx b/lv3g_t/MainForm.resx new file mode 100644 index 0000000..7925979 --- /dev/null +++ b/lv3g_t/MainForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/lv3g_t/Program.cs b/lv3g_t/Program.cs new file mode 100644 index 0000000..344411b --- /dev/null +++ b/lv3g_t/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace lv3g_t +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/lv3g_t/Properties/AssemblyInfo.cs b/lv3g_t/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d91711e --- /dev/null +++ b/lv3g_t/Properties/AssemblyInfo.cs @@ -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("lv3g_t")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("lv3g_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("e6bf80e0-8848-4a6f-b114-fec5055e1d9e")] + +// 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")] diff --git a/lv3g_t/Properties/Resources.Designer.cs b/lv3g_t/Properties/Resources.Designer.cs new file mode 100644 index 0000000..2602f4b --- /dev/null +++ b/lv3g_t/Properties/Resources.Designer.cs @@ -0,0 +1,68 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace lv3g_t.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("lv3g_t.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/lv3g_t/Properties/Resources.resx b/lv3g_t/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/lv3g_t/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/lv3g_t/Properties/Settings.Designer.cs b/lv3g_t/Properties/Settings.Designer.cs new file mode 100644 index 0000000..58dced3 --- /dev/null +++ b/lv3g_t/Properties/Settings.Designer.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace lv3g_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; + } + } + } +} diff --git a/lv3g_t/Properties/Settings.settings b/lv3g_t/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/lv3g_t/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/lv3g_t/lv3g_t.csproj b/lv3g_t/lv3g_t.csproj new file mode 100644 index 0000000..6215dc6 --- /dev/null +++ b/lv3g_t/lv3g_t.csproj @@ -0,0 +1,89 @@ + + + + + Debug + AnyCPU + {E6BF80E0-8848-4A6F-B114-FEC5055E1D9E} + WinExe + lv3g_t + lv3g_t + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + MainForm.cs + + + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {9A9561A7-DD5F-43A5-A3F5-A95F35DA204D} + Base + + + + \ No newline at end of file