From d968d36f0d7715633185ae948368cc32e3c751ab Mon Sep 17 00:00:00 2001 From: lempamo Date: Wed, 5 Jul 2017 17:15:09 -0400 Subject: Theme wallpapers work! --- .../Win95Apps/WinClassicThemePanel.Designer.cs | 48 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs') diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs index 9bef59e..e6bdda1 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs @@ -31,6 +31,9 @@ this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.applyButton = new System.Windows.Forms.Button(); + this.cancelButton = new System.Windows.Forms.Button(); + this.okButton = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.SuspendLayout(); @@ -46,31 +49,71 @@ // // comboBox1 // + this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "Default", + "Dangerous Creatures"}); this.comboBox1.Location = new System.Drawing.Point(15, 201); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(269, 21); this.comboBox1.TabIndex = 1; + this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // // pictureBox2 // this.pictureBox2.BackColor = System.Drawing.Color.Teal; + this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.pictureBox2.Location = new System.Drawing.Point(74, 32); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(152, 112); this.pictureBox2.TabIndex = 2; this.pictureBox2.TabStop = false; // + // applyButton + // + this.applyButton.Location = new System.Drawing.Point(209, 245); + this.applyButton.Name = "applyButton"; + this.applyButton.Size = new System.Drawing.Size(75, 23); + this.applyButton.TabIndex = 3; + this.applyButton.Text = "Apply"; + this.applyButton.UseVisualStyleBackColor = true; + this.applyButton.Click += new System.EventHandler(this.applyButton_Click); + // + // cancelButton + // + this.cancelButton.Location = new System.Drawing.Point(128, 245); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 4; + this.cancelButton.Text = "Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // okButton + // + this.okButton.Location = new System.Drawing.Point(47, 245); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 5; + this.okButton.Text = "OK"; + this.okButton.UseVisualStyleBackColor = true; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // // WinClassicThemePanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Silver; + this.Controls.Add(this.okButton); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.applyButton); this.Controls.Add(this.pictureBox2); this.Controls.Add(this.comboBox1); this.Controls.Add(this.pictureBox1); this.Name = "WinClassicThemePanel"; - this.Size = new System.Drawing.Size(301, 314); + this.Size = new System.Drawing.Size(301, 281); + this.Load += new System.EventHandler(this.WinClassicThemePanel_Load); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.ResumeLayout(false); @@ -82,5 +125,8 @@ private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.PictureBox pictureBox2; + private System.Windows.Forms.Button applyButton; + private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.Button okButton; } } -- cgit v1.2.3 From 497b5cf0971964c7dac407cb97b695d28be0c90d Mon Sep 17 00:00:00 2001 From: lempamo Date: Wed, 5 Jul 2017 18:41:55 -0400 Subject: Added "Inside Your Computer" Theme --- TimeHACK.Engine/Properties/Resources.Designer.cs | 28 +++++++++++++++++++++ TimeHACK.Engine/Properties/Resources.resx | 9 +++++++ .../Resources/Win95PlusInsideComputerStart.wav | Bin 0 -> 50162 bytes .../Resources/Win95PlusInsideComputerStop.wav | Bin 0 -> 27780 bytes .../Resources/Win95PlusInsideComputerWallpaper.jpg | Bin 0 -> 76769 bytes TimeHACK.Engine/SaveSystem.cs | 3 +++ TimeHACK.Engine/Theme.cs | 12 +++++++++ TimeHACK.Engine/TimeHACK.Engine.csproj | 3 +++ .../Win95Apps/WinClassicThemePanel.Designer.cs | 3 ++- .../OS/Win95/Win95Apps/WinClassicThemePanel.cs | 20 +++++++++++++++ TimeHACK.Main/Properties/Resources.Designer.cs | 10 ++++++++ TimeHACK.Main/Properties/Resources.resx | 3 +++ TimeHACK.Main/Resources/ICTheme_BG.jpg | Bin 0 -> 76769 bytes TimeHACK.Main/TimeHACK.Main.csproj | 1 + 14 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 TimeHACK.Engine/Resources/Win95PlusInsideComputerStart.wav create mode 100644 TimeHACK.Engine/Resources/Win95PlusInsideComputerStop.wav create mode 100644 TimeHACK.Engine/Resources/Win95PlusInsideComputerWallpaper.jpg create mode 100644 TimeHACK.Main/Resources/ICTheme_BG.jpg (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs') diff --git a/TimeHACK.Engine/Properties/Resources.Designer.cs b/TimeHACK.Engine/Properties/Resources.Designer.cs index b0186e9..6801231 100644 --- a/TimeHACK.Engine/Properties/Resources.Designer.cs +++ b/TimeHACK.Engine/Properties/Resources.Designer.cs @@ -218,6 +218,34 @@ namespace TimeHACK.Engine.Properties { } } + /// + /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. + /// + internal static System.IO.UnmanagedMemoryStream Win95PlusInsideComputerStart { + get { + return ResourceManager.GetStream("Win95PlusInsideComputerStart", resourceCulture); + } + } + + /// + /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. + /// + internal static System.IO.UnmanagedMemoryStream Win95PlusInsideComputerStop { + get { + return ResourceManager.GetStream("Win95PlusInsideComputerStop", resourceCulture); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Win95PlusInsideComputerWallpaper { + get { + object obj = ResourceManager.GetObject("Win95PlusInsideComputerWallpaper", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// diff --git a/TimeHACK.Engine/Properties/Resources.resx b/TimeHACK.Engine/Properties/Resources.resx index aeb1500..08e94f6 100644 --- a/TimeHACK.Engine/Properties/Resources.resx +++ b/TimeHACK.Engine/Properties/Resources.resx @@ -199,4 +199,13 @@ ..\Resources\Win98Stop.WAV;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\Win95PlusInsideComputerStart.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Win95PlusInsideComputerStop.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Win95PlusInsideComputerWallpaper.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/TimeHACK.Engine/Resources/Win95PlusInsideComputerStart.wav b/TimeHACK.Engine/Resources/Win95PlusInsideComputerStart.wav new file mode 100644 index 0000000..22ca7df Binary files /dev/null and b/TimeHACK.Engine/Resources/Win95PlusInsideComputerStart.wav differ diff --git a/TimeHACK.Engine/Resources/Win95PlusInsideComputerStop.wav b/TimeHACK.Engine/Resources/Win95PlusInsideComputerStop.wav new file mode 100644 index 0000000..d7a25a6 Binary files /dev/null and b/TimeHACK.Engine/Resources/Win95PlusInsideComputerStop.wav differ diff --git a/TimeHACK.Engine/Resources/Win95PlusInsideComputerWallpaper.jpg b/TimeHACK.Engine/Resources/Win95PlusInsideComputerWallpaper.jpg new file mode 100644 index 0000000..ae577da Binary files /dev/null and b/TimeHACK.Engine/Resources/Win95PlusInsideComputerWallpaper.jpg differ diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index 5ea5831..cd8bb2f 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -231,6 +231,9 @@ namespace TimeHACK.Engine case "dangeranimals": currentTheme = new DangerousCreaturesTheme(); break; + case "insidepc": + currentTheme = new InsideComputerTheme(); + break; } } } diff --git a/TimeHACK.Engine/Theme.cs b/TimeHACK.Engine/Theme.cs index 804eb88..89c913d 100644 --- a/TimeHACK.Engine/Theme.cs +++ b/TimeHACK.Engine/Theme.cs @@ -51,4 +51,16 @@ namespace TimeHACK.Engine themeName = "dangeranimals"; } } + + public class InsideComputerTheme: Theme + { + public InsideComputerTheme() + { + startSound = Properties.Resources.Win95PlusInsideComputerStart; + stopSound = Properties.Resources.Win95PlusInsideComputerStop; + + defaultWallpaper = Properties.Resources.Win95PlusInsideComputerWallpaper; + themeName = "insidepc"; + } + } } diff --git a/TimeHACK.Engine/TimeHACK.Engine.csproj b/TimeHACK.Engine/TimeHACK.Engine.csproj index 22e9038..695b2d8 100644 --- a/TimeHACK.Engine/TimeHACK.Engine.csproj +++ b/TimeHACK.Engine/TimeHACK.Engine.csproj @@ -118,6 +118,9 @@ + + + diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs index e6bdda1..a82ea29 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.Designer.cs @@ -53,7 +53,8 @@ this.comboBox1.FormattingEnabled = true; this.comboBox1.Items.AddRange(new object[] { "Default", - "Dangerous Creatures"}); + "Dangerous Creatures", + "Inside Your Computer"}); this.comboBox1.Location = new System.Drawing.Point(15, 201); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(269, 21); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.cs index 984de72..98ad7bc 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicThemePanel.cs @@ -31,6 +31,9 @@ namespace TimeHACK.OS.Win95.Win95Apps case "Dangerous Creatures": pictureBox2.BackgroundImage = Properties.Resources.DCTheme_BG; break; + case "Inside Your Computer": + pictureBox2.BackgroundImage = Properties.Resources.ICTheme_BG; + break; } } @@ -44,6 +47,9 @@ namespace TimeHACK.OS.Win95.Win95Apps case "dangeranimals": comboBox1.SelectedItem = "Dangerous Creatures"; break; + case "insidepc": + comboBox1.SelectedItem = "Inside Your Computer"; + break; } } @@ -60,11 +66,19 @@ namespace TimeHACK.OS.Win95.Win95Apps SaveSystem.CurrentSave.ThemeName = "default95"; SaveSystem.currentTheme = new Default95Theme(); TitleScreen.frm95.BackgroundImage = null; + TitleScreen.frm95.desktopicons.BackgroundImage = null; break; case "Dangerous Creatures": SaveSystem.CurrentSave.ThemeName = "dangeranimals"; SaveSystem.currentTheme = new DangerousCreaturesTheme(); TitleScreen.frm95.BackgroundImage = Properties.Resources.DCTheme_BG; + TitleScreen.frm95.desktopicons.BackgroundImage = new Bitmap(Properties.Resources.DCTheme_BG, TitleScreen.frm95.desktopicons.Width, TitleScreen.frm95.desktopicons.Height); + break; + case "Inside Your Computer": + SaveSystem.CurrentSave.ThemeName = "insidepc"; + SaveSystem.currentTheme = new InsideComputerTheme(); + TitleScreen.frm95.BackgroundImage = Properties.Resources.ICTheme_BG; + TitleScreen.frm95.desktopicons.BackgroundImage = new Bitmap(Properties.Resources.ICTheme_BG, TitleScreen.frm95.desktopicons.Width, TitleScreen.frm95.desktopicons.Height); break; } } @@ -85,6 +99,12 @@ namespace TimeHACK.OS.Win95.Win95Apps TitleScreen.frm95.BackgroundImage = Properties.Resources.DCTheme_BG; TitleScreen.frm95.desktopicons.BackgroundImage = new Bitmap(Properties.Resources.DCTheme_BG, TitleScreen.frm95.desktopicons.Width, TitleScreen.frm95.desktopicons.Height); break; + case "Inside Your Computer": + SaveSystem.CurrentSave.ThemeName = "insidepc"; + SaveSystem.currentTheme = new InsideComputerTheme(); + TitleScreen.frm95.BackgroundImage = Properties.Resources.ICTheme_BG; + TitleScreen.frm95.desktopicons.BackgroundImage = new Bitmap(Properties.Resources.DCTheme_BG, TitleScreen.frm95.desktopicons.Width, TitleScreen.frm95.desktopicons.Height); + break; } ParentForm.Close(); } diff --git a/TimeHACK.Main/Properties/Resources.Designer.cs b/TimeHACK.Main/Properties/Resources.Designer.cs index 3797b07..abdd38c 100644 --- a/TimeHACK.Main/Properties/Resources.Designer.cs +++ b/TimeHACK.Main/Properties/Resources.Designer.cs @@ -165,6 +165,16 @@ namespace TimeHACK.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ICTheme_BG { + get { + object obj = ResourceManager.GetObject("ICTheme_BG", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/TimeHACK.Main/Properties/Resources.resx b/TimeHACK.Main/Properties/Resources.resx index 355e0eb..af91fe3 100644 --- a/TimeHACK.Main/Properties/Resources.resx +++ b/TimeHACK.Main/Properties/Resources.resx @@ -579,4 +579,7 @@ ..\Resources\DCTheme_BG.JPG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ICTheme_BG.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/TimeHACK.Main/Resources/ICTheme_BG.jpg b/TimeHACK.Main/Resources/ICTheme_BG.jpg new file mode 100644 index 0000000..ae577da Binary files /dev/null and b/TimeHACK.Main/Resources/ICTheme_BG.jpg differ diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index ffcd0ca..6fba178 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -414,6 +414,7 @@ + -- cgit v1.2.3