aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/AchievementBox.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-08-23 13:38:40 -0400
committerlempamo <[email protected]>2017-08-23 13:38:40 -0400
commit3306d36ecbc024775972e5cf7971b2a7a70671d0 (patch)
tree0a79e67b6723a8c75ffd66c7828bdd0ebb1bf74d /Histacom2/AchievementBox.cs
parent99fef5c57360f07259fc86f433bed8a9ab59c48e (diff)
downloadhistacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.gz
histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.bz2
histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.zip
Renaming the game!
Diffstat (limited to 'Histacom2/AchievementBox.cs')
-rw-r--r--Histacom2/AchievementBox.cs62
1 files changed, 62 insertions, 0 deletions
diff --git a/Histacom2/AchievementBox.cs b/Histacom2/AchievementBox.cs
new file mode 100644
index 0000000..e6d714a
--- /dev/null
+++ b/Histacom2/AchievementBox.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Histacom2.Engine;
+
+namespace Histacom2
+{
+ public partial class AchievementBox : Form
+ {
+ private bool stayOnScreen = false;
+
+ public AchievementBox(int type)
+ {
+ InitializeComponent();
+ this.BringToFront();
+ this.Show();
+ switch (type)
+ {
+ case 0: //Piracy Ending
+ BackgroundImage = Properties.Resources.EndingPiracy;
+ stayOnScreen = true;
+ break;
+ case 20:
+ BackgroundImage = Properties.Resources.AchievementMines;
+ button1.Hide();
+ break;
+ }
+ Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - 202, -102);
+ while (this.Location.Y != 0)
+ {
+ Thread.Sleep(5);
+ Location = new Point(Location.X, Location.Y + 1);
+ }
+ if (!stayOnScreen)
+ {
+ Thread.Sleep(3000);
+ while (this.Location.Y != -102)
+ {
+ Thread.Sleep(5);
+ Location = new Point(Location.X, Location.Y - 1);
+ }
+ this.Close();
+ }
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ Program.title.Show();
+ SaveSystem.CurrentSave = null;
+ SaveSystem.currentTheme = null;
+ foreach (Form f in Application.OpenForms) if (!(f is TitleScreen) && !(f is AchievementBox)) f.Close();
+ this.Close();
+ }
+ }
+}