aboutsummaryrefslogtreecommitdiff
path: root/Histacom2
diff options
context:
space:
mode:
Diffstat (limited to 'Histacom2')
-rw-r--r--Histacom2/GlobalPrograms/WinClassicNotepad.cs20
-rw-r--r--Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs2
-rw-r--r--Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs2
-rw-r--r--Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs2
-rw-r--r--Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs186
-rw-r--r--Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs53
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs113
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs1
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs135
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs82
-rw-r--r--Histacom2/SaveDialogs/LoadGameProfileItem.cs6
-rw-r--r--Histacom2/SaveDialogs/NewGameDialog.cs4
-rw-r--r--Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs13
-rw-r--r--Histacom2/SaveDialogs/SaveFileTroubleShooter.cs2
-rw-r--r--Histacom2/TitleScreen.cs144
-rw-r--r--Histacom2/TitleScreen.resx3
16 files changed, 460 insertions, 308 deletions
diff --git a/Histacom2/GlobalPrograms/WinClassicNotepad.cs b/Histacom2/GlobalPrograms/WinClassicNotepad.cs
index 1a58d8e..de838e0 100644
--- a/Histacom2/GlobalPrograms/WinClassicNotepad.cs
+++ b/Histacom2/GlobalPrograms/WinClassicNotepad.cs
@@ -100,16 +100,21 @@ namespace Histacom2.GlobalPrograms
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (CurrentFilePath == "")
+ try
{
- // We aren't in a file right now
+ if (CurrentFilePath == "")
+ {
+ // We aren't in a file right now
- SaveAs();
- } else {
+ SaveAs();
+ }
+ else
+ {
- File.Delete(CurrentFilePath);
- SaveSystem.CreateWindowsFile(new FileInfo(CurrentFilePath).Directory.FullName, CurrentFilePath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length);
- }
+ File.Delete(CurrentFilePath);
+ SaveSystem.CreateWindowsFile(new FileInfo(CurrentFilePath).Directory.FullName, CurrentFilePath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length);
+ }
+ } catch { } // This try catch loop was added due the game crashing if the desktop is updating the same time the notepad is saving... which I got!
}
void SaveAs()
@@ -118,6 +123,7 @@ namespace Histacom2.GlobalPrograms
{
ActivateSaveFileDialog(".txt");
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
+ DeactivateFileDialog();
if (selectedPath != "")
{
diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs
index 4f80240..2ebb319 100644
--- a/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs
+++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/Square.cs
@@ -108,7 +108,7 @@ namespace Histacom2.OS.Win95.Win95Apps.MineSweeper
this.Open();
}
}
- if (_game.ftime == true && !Minded)
+ if (_game.ftime && !Minded)
{
_game.ftime = false;
_game._timer = new Timer();
diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
index 2a03c7e..958e8a0 100644
--- a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
+++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs
@@ -129,7 +129,7 @@ namespace Histacom2.OS.Win95.Win95Apps
private void timer1_Tick(object sender, EventArgs e)
{
- if (_game.win == true)
+ if (_game.win)
{
button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperWin;
switch (level)
diff --git a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs
index 2c12029..a918cda 100644
--- a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs
+++ b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs
@@ -75,7 +75,7 @@ namespace Histacom2.OS.Win95.Win95Apps.Story
public static void CheckIfSoundFinished(Object sender, EventArgs e)
{
- if (soundThread.IsAlive == false)
+ if (!soundThread.IsAlive)
{
// Continue from where we were
System.Windows.Forms.Timer trm = sender as System.Windows.Forms.Timer;
diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs
index 8939b84..a4bd611 100644
--- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs
+++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs
@@ -30,10 +30,6 @@
{
this.components = new System.ComponentModel.Container();
this.program = new System.Windows.Forms.Panel();
- this.pnlSave = new System.Windows.Forms.Panel();
- this.Button1 = new System.Windows.Forms.Button();
- this.Label1 = new System.Windows.Forms.Label();
- this.txtSave = new System.Windows.Forms.TextBox();
this.mainView = new System.Windows.Forms.ListView();
this.diskView = new System.Windows.Forms.TreeView();
this.MenuStrip1 = new System.Windows.Forms.MenuStrip();
@@ -55,13 +51,18 @@
this.HelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.AboutWindows95ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toprightcorner = new System.Windows.Forms.Panel();
- this.bottomrightcorner = new System.Windows.Forms.Panel();
- this.bottomleftcorner = new System.Windows.Forms.Panel();
this.topleftcorner = new System.Windows.Forms.Panel();
+ this.pnlSave = new System.Windows.Forms.Panel();
this.refresh = new System.Windows.Forms.Timer(this.components);
+ this.btnCanc = new Histacom2.Engine.UI.ClassicButton();
+ this.cmbType = new Histacom2.Engine.UI.ClassicDropDown();
+ this.txtSave = new Histacom2.Engine.UI.ClassicTextBox();
+ this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel();
+ this.btnSave = new Histacom2.Engine.UI.ClassicButton();
this.program.SuspendLayout();
- this.pnlSave.SuspendLayout();
this.MenuStrip1.SuspendLayout();
+ this.pnlSave.SuspendLayout();
this.SuspendLayout();
//
// program
@@ -71,8 +72,6 @@
this.program.Controls.Add(this.diskView);
this.program.Controls.Add(this.MenuStrip1);
this.program.Controls.Add(this.toprightcorner);
- this.program.Controls.Add(this.bottomrightcorner);
- this.program.Controls.Add(this.bottomleftcorner);
this.program.Controls.Add(this.topleftcorner);
this.program.Controls.Add(this.pnlSave);
this.program.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -81,54 +80,12 @@
this.program.Size = new System.Drawing.Size(704, 517);
this.program.TabIndex = 13;
//
- // pnlSave
- //
- this.pnlSave.Controls.Add(this.Button1);
- this.pnlSave.Controls.Add(this.Label1);
- this.pnlSave.Controls.Add(this.txtSave);
- this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.pnlSave.Location = new System.Drawing.Point(0, 482);
- this.pnlSave.Name = "pnlSave";
- this.pnlSave.Size = new System.Drawing.Size(704, 35);
- this.pnlSave.TabIndex = 18;
- this.pnlSave.Visible = false;
- //
- // Button1
- //
- this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.Button1.Location = new System.Drawing.Point(629, 1);
- this.Button1.Name = "Button1";
- this.Button1.Size = new System.Drawing.Size(75, 23);
- this.Button1.TabIndex = 17;
- this.Button1.Text = "Save";
- this.Button1.UseVisualStyleBackColor = true;
- this.Button1.Click += new System.EventHandler(this.Button1_Click);
- //
- // Label1
- //
- this.Label1.AutoSize = true;
- this.Label1.Location = new System.Drawing.Point(3, 6);
- this.Label1.Name = "Label1";
- this.Label1.Size = new System.Drawing.Size(57, 13);
- this.Label1.TabIndex = 16;
- this.Label1.Text = "File Name:";
- //
- // txtSave
- //
- this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.txtSave.Location = new System.Drawing.Point(60, 3);
- this.txtSave.Name = "txtSave";
- this.txtSave.Size = new System.Drawing.Size(563, 20);
- this.txtSave.TabIndex = 15;
- //
// mainView
//
this.mainView.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainView.Location = new System.Drawing.Point(213, 24);
this.mainView.Name = "mainView";
- this.mainView.Size = new System.Drawing.Size(491, 458);
+ this.mainView.Size = new System.Drawing.Size(491, 439);
this.mainView.TabIndex = 10;
this.mainView.UseCompatibleStateImageBehavior = false;
this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit);
@@ -139,7 +96,7 @@
this.diskView.Dock = System.Windows.Forms.DockStyle.Left;
this.diskView.Location = new System.Drawing.Point(0, 24);
this.diskView.Name = "diskView";
- this.diskView.Size = new System.Drawing.Size(213, 458);
+ this.diskView.Size = new System.Drawing.Size(213, 439);
this.diskView.TabIndex = 13;
this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect);
//
@@ -297,23 +254,6 @@
this.toprightcorner.Size = new System.Drawing.Size(4, 4);
this.toprightcorner.TabIndex = 6;
//
- // bottomrightcorner
- //
- this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE;
- this.bottomrightcorner.Location = new System.Drawing.Point(700, 513);
- this.bottomrightcorner.Name = "bottomrightcorner";
- this.bottomrightcorner.Size = new System.Drawing.Size(4, 4);
- this.bottomrightcorner.TabIndex = 4;
- //
- // bottomleftcorner
- //
- this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.bottomleftcorner.Location = new System.Drawing.Point(0, 513);
- this.bottomleftcorner.Name = "bottomleftcorner";
- this.bottomleftcorner.Size = new System.Drawing.Size(4, 4);
- this.bottomleftcorner.TabIndex = 2;
- //
// topleftcorner
//
this.topleftcorner.Location = new System.Drawing.Point(0, 0);
@@ -321,11 +261,103 @@
this.topleftcorner.Size = new System.Drawing.Size(4, 4);
this.topleftcorner.TabIndex = 1;
//
+ // pnlSave
+ //
+ this.pnlSave.Controls.Add(this.btnCanc);
+ this.pnlSave.Controls.Add(this.cmbType);
+ this.pnlSave.Controls.Add(this.txtSave);
+ this.pnlSave.Controls.Add(this.classicLabel2);
+ this.pnlSave.Controls.Add(this.classicLabel1);
+ this.pnlSave.Controls.Add(this.btnSave);
+ this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.pnlSave.Location = new System.Drawing.Point(0, 463);
+ this.pnlSave.Name = "pnlSave";
+ this.pnlSave.Size = new System.Drawing.Size(704, 54);
+ this.pnlSave.TabIndex = 18;
+ this.pnlSave.Visible = false;
+ //
// refresh
//
this.refresh.Interval = 15000;
this.refresh.Tick += new System.EventHandler(this.refresh_Tick);
//
+ // btnCanc
+ //
+ this.btnCanc.AdaptBackColorWithTheme = true;
+ this.btnCanc.AdaptFontWithTheme = true;
+ this.btnCanc.AdaptForeColorWithTheme = true;
+ this.btnCanc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCanc.BackColor = System.Drawing.Color.Silver;
+ this.btnCanc.DialogResult = System.Windows.Forms.DialogResult.None;
+ this.btnCanc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.btnCanc.ForeColor = System.Drawing.Color.Black;
+ this.btnCanc.Location = new System.Drawing.Point(611, 27);
+ this.btnCanc.Name = "btnCanc";
+ this.btnCanc.Size = new System.Drawing.Size(75, 25);
+ this.btnCanc.TabIndex = 24;
+ this.btnCanc.Text = "Cancel";
+ this.btnCanc.Click += new System.EventHandler(this.btnCanc_Click);
+ //
+ // cmbType
+ //
+ this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.cmbType.BackColor = System.Drawing.Color.White;
+ this.cmbType.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.cmbType.Location = new System.Drawing.Point(56, 31);
+ this.cmbType.Name = "cmbType";
+ this.cmbType.Size = new System.Drawing.Size(549, 20);
+ this.cmbType.TabIndex = 23;
+ this.cmbType.UseSystemPasswordChar = false;
+ //
+ // txtSave
+ //
+ this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtSave.BackColor = System.Drawing.Color.White;
+ this.txtSave.Location = new System.Drawing.Point(56, 6);
+ this.txtSave.Name = "txtSave";
+ this.txtSave.Size = new System.Drawing.Size(549, 20);
+ this.txtSave.TabIndex = 22;
+ this.txtSave.UseSystemPasswordChar = false;
+ //
+ // classicLabel2
+ //
+ this.classicLabel2.DropShadow = false;
+ this.classicLabel2.Location = new System.Drawing.Point(3, 32);
+ this.classicLabel2.Name = "classicLabel2";
+ this.classicLabel2.Size = new System.Drawing.Size(64, 13);
+ this.classicLabel2.TabIndex = 19;
+ this.classicLabel2.Text = "File type:";
+ //
+ // classicLabel1
+ //
+ this.classicLabel1.DropShadow = false;
+ this.classicLabel1.Location = new System.Drawing.Point(3, 6);
+ this.classicLabel1.Name = "classicLabel1";
+ this.classicLabel1.Size = new System.Drawing.Size(64, 13);
+ this.classicLabel1.TabIndex = 19;
+ this.classicLabel1.Text = "File name:";
+ //
+ // btnSave
+ //
+ this.btnSave.AdaptBackColorWithTheme = true;
+ this.btnSave.AdaptFontWithTheme = true;
+ this.btnSave.AdaptForeColorWithTheme = true;
+ this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnSave.BackColor = System.Drawing.Color.Silver;
+ this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None;
+ this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.btnSave.ForeColor = System.Drawing.Color.Black;
+ this.btnSave.Location = new System.Drawing.Point(611, 1);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(75, 25);
+ this.btnSave.TabIndex = 17;
+ this.btnSave.Text = "Save";
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+ //
// Win95WindowsExplorer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -336,10 +368,9 @@
this.Load += new System.EventHandler(this.WinClassicWindowsExplorer_Load);
this.program.ResumeLayout(false);
this.program.PerformLayout();
- this.pnlSave.ResumeLayout(false);
- this.pnlSave.PerformLayout();
this.MenuStrip1.ResumeLayout(false);
this.MenuStrip1.PerformLayout();
+ this.pnlSave.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -367,14 +398,15 @@
internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem1;
internal System.Windows.Forms.ToolStripMenuItem AboutWindows95ToolStripMenuItem;
internal System.Windows.Forms.Panel toprightcorner;
- internal System.Windows.Forms.Panel bottomrightcorner;
- internal System.Windows.Forms.Panel bottomleftcorner;
internal System.Windows.Forms.Panel topleftcorner;
internal System.Windows.Forms.ListView mainView;
internal System.Windows.Forms.Panel pnlSave;
- internal System.Windows.Forms.Button Button1;
- internal System.Windows.Forms.Label Label1;
- internal System.Windows.Forms.TextBox txtSave;
private System.Windows.Forms.Timer refresh;
+ private Engine.UI.ClassicButton btnSave;
+ private Engine.UI.ClassicLabel classicLabel2;
+ private Engine.UI.ClassicLabel classicLabel1;
+ private Engine.UI.ClassicTextBox txtSave;
+ private Engine.UI.ClassicDropDown cmbType;
+ private Engine.UI.ClassicButton btnCanc;
}
}
diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
index 2542eba..8f946ab 100644
--- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
+++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
@@ -36,6 +36,18 @@ namespace Histacom2.OS.Win95.Win95Apps
public Win95WindowsExplorer()
{
InitializeComponent();
+
+
+ // Fonts! yoy!
+
+ foreach (Control ctrl in this.Controls)
+ {
+ ctrl.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ }
+
+ txtSave.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ cmbType.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ //Histacom2.Engine.UI.CustomTextBox ctb = new Histacom2.Engine.UI.CustomTextBox(textBox1);
}
void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
@@ -97,17 +109,17 @@ namespace Histacom2.OS.Win95.Win95Apps
IsFileSaveDialog = true;
}
- if (IsFileOpenDialog == true)
+ if (IsFileOpenDialog)
{
pnlSave.Show();
- Button1.Text = "Open";
+ btnSave.Text = "Open";
}
else
{
- if (IsFileSaveDialog == true)
+ if (IsFileSaveDialog)
{
pnlSave.Show();
- Button1.Text = "Save";
+ btnSave.Text = "Save";
}
}
@@ -121,9 +133,9 @@ namespace Histacom2.OS.Win95.Win95Apps
FileSystemFolderInfo toRead = new FileSystemFolderInfo();
toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
- if (returnYesIfProtected == true)
+ if (returnYesIfProtected)
{
- if (toRead.IsProtected == true) return "yes";
+ if (toRead.IsProtected) return "yes";
}
else return toRead.Label;
return Val;
@@ -707,36 +719,30 @@ namespace Histacom2.OS.Win95.Win95Apps
RefreshTreeNode();
}
- private void Button1_Click(object sender, EventArgs e)
+ private void btnSave_Click(object sender, EventArgs e)
{
try
{
- bool OpenFile = false;
if (mainView.FocusedItem != null)
{
if (mainView.FocusedItem.Tag.ToString() == "")
{ // If it isn't a file
GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString()));
}
- else OpenFile = true; // If it is a file
+ else txtSave.Text = mainView.FocusedItem.Tag.ToString();
}
- else OpenFile = true;
- if (OpenFile == true)
+ if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
+ else
{
- if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
- else
- {
- if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
+ if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
- FileDialogBoxManager.IsInOpenDialog = false;
- FileDialogBoxManager.IsInSaveDialog = false;
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
- ((Form)this.TopLevelControl).Close();
- }
+ ((Form)this.TopLevelControl).Close();
}
- } catch {
-
}
+ catch { }
}
private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
@@ -1036,5 +1042,10 @@ namespace Histacom2.OS.Win95.Win95Apps
RefreshTreeNode();
}
+
+ private void btnCanc_Click(object sender, EventArgs e)
+ {
+ ((Form)this.TopLevelControl).Close();
+ }
}
}
diff --git a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
index bc28c3a..df531c3 100644
--- a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
+++ b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
@@ -74,64 +74,67 @@ namespace Histacom2.OS.Win95.Win95Apps
private void ftpFiles_DoubleClick(object sender, EventArgs e)
{
- Point objDrawingPoint = ftpFiles.PointToClient(Cursor.Position);
- ListViewItem objListViewItem = new ListViewItem();
- if (objDrawingPoint != null)
+ try
{
- objListViewItem = ftpFiles.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
- if (objListViewItem.Text == "/software/")
+ Point objDrawingPoint = ftpFiles.PointToClient(Cursor.Position);
+ ListViewItem objListViewItem = new ListViewItem();
+ if (objDrawingPoint != null)
{
- ftpFiles.Clear();
- ListViewItem listViewItem1 = new ListViewItem(new string[] { "/downloads/" }, 0, Color.Black, Color.Empty, null);
- ListViewItem listViewItem2 = new ListViewItem(new string[] { "skindows.html" }, 1, Color.Black, Color.Empty, null);
- ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2 });
- }
- else if (objListViewItem.Text == "/downloads/")
- {
- ftpFiles.Clear();
- ListViewItem listViewItem1 = new ListViewItem(new string[] { "/totallynotthetimedistorter/" }, 0, Color.Black, Color.Empty, null);
- ListViewItem listViewItem2 = new ListViewItem(new string[] { "FTP Client Setup.exe" }, 2, Color.Black, Color.Empty, null);
- ListViewItem listViewItem3 = new ListViewItem(new string[] { "Web Chat Setup.exe" }, 2, Color.Black, Color.Empty, null);
- ListViewItem listViewItem4 = new ListViewItem(new string[] { "Guess The Number V1 Setup.exe" }, 2, Color.Black, Color.Empty, null);
- ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2, listViewItem3, listViewItem4 });
- }
- else if (objListViewItem.Text == "/totallynotthetimedistorter/")
- {
- ftpFiles.Clear();
- ListViewItem listViewItem1 = new ListViewItem(new string[] { "Time Distorter Setup.exe" }, 2, Color.Black, Color.Empty, null);
- ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1 });
- }
- else if (objListViewItem.Text == "FTP Client Setup.exe")
- {
- WinClassicDownloader opendownload = new WinClassicDownloader();
- WindowManager wm = new WindowManager();
- wm.Init(opendownload, "Downloader", null, false, true);
- opendownload.appName.Text = "Downloading: FTP Client";
- }
- else if (objListViewItem.Text == "Web Chat Setup.exe")
- {
- WinClassicDownloader opendownload = new WinClassicDownloader();
- WindowManager wm = new WindowManager();
- wm.Init(opendownload, "Downloader", null, false, true);
- opendownload.appName.Text = "Downloading: Web Chat 1998";
- opendownload.amountToDL = 35;
- }
- else if (objListViewItem.Text == "Time Distorter Setup.exe")
- {
- WinClassicDownloader opendownload = new WinClassicDownloader();
- WindowManager wm = new WindowManager();
- wm.Init(opendownload, "Downloader", null, false, true);
- opendownload.appName.Text = "Downloading: Time Distorter 0.1";
- }
- else if (objListViewItem.Text == "Guess The Number V1 Setup.exe")
- {
- WinClassicDownloader opendownload = new WinClassicDownloader();
- WindowManager wm = new WindowManager();
- wm.Init(opendownload, "Downloader", null, false, true);
- opendownload.appName.Text = "Downloading: Guess The Number V1";
- opendownload.amountToDL = 16;
+ objListViewItem = ftpFiles.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
+ if (objListViewItem.Text == "/software/")
+ {
+ ftpFiles.Clear();
+ ListViewItem listViewItem1 = new ListViewItem(new string[] { "/downloads/" }, 0, Color.Black, Color.Empty, null);
+ ListViewItem listViewItem2 = new ListViewItem(new string[] { "skindows.html" }, 1, Color.Black, Color.Empty, null);
+ ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2 });
+ }
+ else if (objListViewItem.Text == "/downloads/")
+ {
+ ftpFiles.Clear();
+ ListViewItem listViewItem1 = new ListViewItem(new string[] { "/totallynotthetimedistorter/" }, 0, Color.Black, Color.Empty, null);
+ ListViewItem listViewItem2 = new ListViewItem(new string[] { "FTP Client Setup.exe" }, 2, Color.Black, Color.Empty, null);
+ ListViewItem listViewItem3 = new ListViewItem(new string[] { "Web Chat Setup.exe" }, 2, Color.Black, Color.Empty, null);
+ ListViewItem listViewItem4 = new ListViewItem(new string[] { "Guess The Number V1 Setup.exe" }, 2, Color.Black, Color.Empty, null);
+ ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2, listViewItem3, listViewItem4 });
+ }
+ else if (objListViewItem.Text == "/totallynotthetimedistorter/")
+ {
+ ftpFiles.Clear();
+ ListViewItem listViewItem1 = new ListViewItem(new string[] { "Time Distorter Setup.exe" }, 2, Color.Black, Color.Empty, null);
+ ftpFiles.Items.AddRange(new ListViewItem[] { listViewItem1 });
+ }
+ else if (objListViewItem.Text == "FTP Client Setup.exe")
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WindowManager wm = new WindowManager();
+ wm.Init(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: FTP Client";
+ }
+ else if (objListViewItem.Text == "Web Chat Setup.exe")
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WindowManager wm = new WindowManager();
+ wm.Init(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: Web Chat 1998";
+ opendownload.amountToDL = 35;
+ }
+ else if (objListViewItem.Text == "Time Distorter Setup.exe")
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WindowManager wm = new WindowManager();
+ wm.Init(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: Time Distorter 0.1";
+ }
+ else if (objListViewItem.Text == "Guess The Number V1 Setup.exe")
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WindowManager wm = new WindowManager();
+ wm.Init(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: Guess The Number V1";
+ opendownload.amountToDL = 16;
+ }
}
- }
+ } catch { } // Try catch due to if you have more then one item selected the game crashing.
}
}
}
diff --git a/Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs
index 91d9368..381f5ee 100644
--- a/Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs
+++ b/Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs
@@ -225,6 +225,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
ActivateSaveFileDialog(".rtf");
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
+ DeactivateFileDialog();
if (selectedPath != "")
{
diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
index af2570c..f88d451 100644
--- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
+++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
@@ -52,9 +52,12 @@
this.bottomleftcorner = new System.Windows.Forms.Panel();
this.topleftcorner = new System.Windows.Forms.Panel();
this.pnlSave = new System.Windows.Forms.Panel();
- this.Button1 = new System.Windows.Forms.Button();
- this.Label1 = new System.Windows.Forms.Label();
- this.txtSave = new System.Windows.Forms.TextBox();
+ this.btnCanc = new Histacom2.Engine.UI.ClassicButton();
+ this.cmbType = new Histacom2.Engine.UI.ClassicDropDown();
+ this.txtSave = new Histacom2.Engine.UI.ClassicTextBox();
+ this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel();
+ this.btnSave = new Histacom2.Engine.UI.ClassicButton();
this.MenuStrip1 = new System.Windows.Forms.MenuStrip();
this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -112,7 +115,7 @@
this.mainView.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainView.Location = new System.Drawing.Point(396, 24);
this.mainView.Name = "mainView";
- this.mainView.Size = new System.Drawing.Size(308, 458);
+ this.mainView.Size = new System.Drawing.Size(308, 439);
this.mainView.TabIndex = 10;
this.mainView.UseCompatibleStateImageBehavior = false;
this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit);
@@ -130,7 +133,7 @@
this.pnlInfo.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlInfo.Location = new System.Drawing.Point(196, 24);
this.pnlInfo.Name = "pnlInfo";
- this.pnlInfo.Size = new System.Drawing.Size(200, 458);
+ this.pnlInfo.Size = new System.Drawing.Size(200, 439);
this.pnlInfo.TabIndex = 19;
//
// pictureBox1
@@ -165,7 +168,7 @@
this.pnlInfoContent.Controls.Add(this.txtInfoTip);
this.pnlInfoContent.Location = new System.Drawing.Point(0, 95);
this.pnlInfoContent.Name = "pnlInfoContent";
- this.pnlInfoContent.Size = new System.Drawing.Size(199, 362);
+ this.pnlInfoContent.Size = new System.Drawing.Size(199, 343);
this.pnlInfoContent.TabIndex = 22;
//
// InfoDesc
@@ -245,7 +248,7 @@
this.pnlFolders.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlFolders.Location = new System.Drawing.Point(0, 24);
this.pnlFolders.Name = "pnlFolders";
- this.pnlFolders.Size = new System.Drawing.Size(196, 458);
+ this.pnlFolders.Size = new System.Drawing.Size(196, 439);
this.pnlFolders.TabIndex = 0;
//
// diskView
@@ -253,7 +256,7 @@
this.diskView.Dock = System.Windows.Forms.DockStyle.Fill;
this.diskView.Location = new System.Drawing.Point(0, 22);
this.diskView.Name = "diskView";
- this.diskView.Size = new System.Drawing.Size(196, 436);
+ this.diskView.Size = new System.Drawing.Size(196, 417);
this.diskView.TabIndex = 13;
this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect);
//
@@ -325,45 +328,95 @@
//
// pnlSave
//
- this.pnlSave.Controls.Add(this.Button1);
- this.pnlSave.Controls.Add(this.Label1);
+ this.pnlSave.Controls.Add(this.btnCanc);
+ this.pnlSave.Controls.Add(this.cmbType);
this.pnlSave.Controls.Add(this.txtSave);
+ this.pnlSave.Controls.Add(this.classicLabel2);
+ this.pnlSave.Controls.Add(this.classicLabel1);
+ this.pnlSave.Controls.Add(this.btnSave);
this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.pnlSave.Location = new System.Drawing.Point(0, 482);
+ this.pnlSave.Location = new System.Drawing.Point(0, 463);
this.pnlSave.Name = "pnlSave";
- this.pnlSave.Size = new System.Drawing.Size(704, 35);
+ this.pnlSave.Size = new System.Drawing.Size(704, 54);
this.pnlSave.TabIndex = 18;
this.pnlSave.Visible = false;
//
- // Button1
- //
- this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.Button1.Location = new System.Drawing.Point(626, 3);
- this.Button1.Name = "Button1";
- this.Button1.Size = new System.Drawing.Size(75, 23);
- this.Button1.TabIndex = 17;
- this.Button1.Text = "Save";
- this.Button1.UseVisualStyleBackColor = true;
- this.Button1.Click += new System.EventHandler(this.Button1_Click);
- //
- // Label1
- //
- this.Label1.AutoSize = true;
- this.Label1.Location = new System.Drawing.Point(3, 6);
- this.Label1.Name = "Label1";
- this.Label1.Size = new System.Drawing.Size(57, 13);
- this.Label1.TabIndex = 16;
- this.Label1.Text = "File Name:";
+ // btnCanc
+ //
+ this.btnCanc.AdaptBackColorWithTheme = true;
+ this.btnCanc.AdaptFontWithTheme = true;
+ this.btnCanc.AdaptForeColorWithTheme = true;
+ this.btnCanc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCanc.BackColor = System.Drawing.Color.Silver;
+ this.btnCanc.DialogResult = System.Windows.Forms.DialogResult.None;
+ this.btnCanc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.btnCanc.ForeColor = System.Drawing.Color.Black;
+ this.btnCanc.Location = new System.Drawing.Point(619, 28);
+ this.btnCanc.Name = "btnCanc";
+ this.btnCanc.Size = new System.Drawing.Size(75, 25);
+ this.btnCanc.TabIndex = 30;
+ this.btnCanc.Text = "Cancel";
+ this.btnCanc.Click += new System.EventHandler(this.btnCanc_Click);
+ //
+ // cmbType
+ //
+ this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.cmbType.BackColor = System.Drawing.Color.White;
+ this.cmbType.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.cmbType.Location = new System.Drawing.Point(64, 32);
+ this.cmbType.Name = "cmbType";
+ this.cmbType.Size = new System.Drawing.Size(549, 20);
+ this.cmbType.TabIndex = 29;
+ this.cmbType.UseSystemPasswordChar = false;
//
// txtSave
//
- this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.txtSave.Location = new System.Drawing.Point(60, 3);
+ this.txtSave.BackColor = System.Drawing.Color.White;
+ this.txtSave.Location = new System.Drawing.Point(64, 7);
this.txtSave.Name = "txtSave";
- this.txtSave.Size = new System.Drawing.Size(560, 20);
- this.txtSave.TabIndex = 15;
+ this.txtSave.Size = new System.Drawing.Size(549, 20);
+ this.txtSave.TabIndex = 28;
+ this.txtSave.UseSystemPasswordChar = false;
+ //
+ // classicLabel2
+ //
+ this.classicLabel2.DropShadow = false;
+ this.classicLabel2.Location = new System.Drawing.Point(11, 33);
+ this.classicLabel2.Name = "classicLabel2";
+ this.classicLabel2.Size = new System.Drawing.Size(64, 13);
+ this.classicLabel2.TabIndex = 26;
+ this.classicLabel2.Text = "File type:";
+ //
+ // classicLabel1
+ //
+ this.classicLabel1.DropShadow = false;
+ this.classicLabel1.Location = new System.Drawing.Point(11, 7);
+ this.classicLabel1.Name = "classicLabel1";
+ this.classicLabel1.Size = new System.Drawing.Size(64, 13);
+ this.classicLabel1.TabIndex = 27;
+ this.classicLabel1.Text = "File name:";
+ //
+ // btnSave
+ //
+ this.btnSave.AdaptBackColorWithTheme = true;
+ this.btnSave.AdaptFontWithTheme = true;
+ this.btnSave.AdaptForeColorWithTheme = true;
+ this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnSave.BackColor = System.Drawing.Color.Silver;
+ this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None;
+ this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.btnSave.ForeColor = System.Drawing.Color.Black;
+ this.btnSave.Location = new System.Drawing.Point(619, 2);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(75, 25);
+ this.btnSave.TabIndex = 25;
+ this.btnSave.Text = "Save";
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// MenuStrip1
//
@@ -553,7 +606,6 @@
this.pnlFoldersTop.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.btnFolderClose)).EndInit();
this.pnlSave.ResumeLayout(false);
- this.pnlSave.PerformLayout();
this.MenuStrip1.ResumeLayout(false);
this.MenuStrip1.PerformLayout();
this.ResumeLayout(false);
@@ -590,9 +642,6 @@
internal System.Windows.Forms.Panel topleftcorner;
internal System.Windows.Forms.ListView mainView;
internal System.Windows.Forms.Panel pnlSave;
- internal System.Windows.Forms.Button Button1;
- internal System.Windows.Forms.Label Label1;
- internal System.Windows.Forms.TextBox txtSave;
private System.Windows.Forms.Panel pnlInfo;
private System.Windows.Forms.Panel pnlFolders;
private System.Windows.Forms.Panel pnlFoldersTop;
@@ -609,5 +658,11 @@
private System.Windows.Forms.Label txtInfoDescName;
private System.Windows.Forms.Label txtInfoDescSize;
private System.Windows.Forms.Timer refresh;
+ private Engine.UI.ClassicButton btnCanc;
+ private Engine.UI.ClassicDropDown cmbType;
+ private Engine.UI.ClassicTextBox txtSave;
+ private Engine.UI.ClassicLabel classicLabel2;
+ private Engine.UI.ClassicLabel classicLabel1;
+ private Engine.UI.ClassicButton btnSave;
}
}
diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
index f261cb2..5cc075e 100644
--- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
+++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
@@ -102,17 +102,17 @@ namespace Histacom2.OS.Win95.Win95Apps
IsFileSaveDialog = true;
}
- if (IsFileOpenDialog == true)
+ if (IsFileOpenDialog)
{
pnlSave.Show();
- Button1.Text = "Open";
+ btnSave.Text = "Open";
}
else
{
- if (IsFileSaveDialog == true)
+ if (IsFileSaveDialog)
{
pnlSave.Show();
- Button1.Text = "Save";
+ btnSave.Text = "Save";
}
}
@@ -139,9 +139,9 @@ namespace Histacom2.OS.Win95.Win95Apps
FileSystemFolderInfo toRead = new FileSystemFolderInfo();
toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
- if (returnYesIfProtected == true)
+ if (returnYesIfProtected)
{
- if (toRead.IsProtected == true)
+ if (toRead.IsProtected)
{
return "yes";
}
@@ -655,7 +655,7 @@ namespace Histacom2.OS.Win95.Win95Apps
}
else
{ // If it is a file
- if (IsFileOpenDialog == true || IsFileSaveDialog == true)
+ if (IsFileOpenDialog || IsFileSaveDialog)
{
if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension)
{
@@ -734,41 +734,26 @@ namespace Histacom2.OS.Win95.Win95Apps
{
try
{
- bool OpenFile = false;
if (mainView.FocusedItem != null)
{
- if ((string)mainView.FocusedItem.Tag == "")
+ if (mainView.FocusedItem.Tag.ToString() == "")
{ // If it isn't a file
GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString()));
}
- else OpenFile = true; // If it is a file
+ else txtSave.Text = mainView.FocusedItem.Tag.ToString();
}
- else OpenFile = true;
- if (OpenFile == true)
+ if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
+ else
{
- if (txtSave.Text == "")
- {
- wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
- }
- else
- {
- if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension)
- {
-
- Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
-
- }
+ if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
- FileDialogBoxManager.IsInOpenDialog = false;
- FileDialogBoxManager.IsInSaveDialog = false;
-
- ((Form)this.TopLevelControl).Close();
- }
+ ((Form)this.TopLevelControl).Close();
}
- } catch {
-
}
+ catch { }
}
private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
@@ -929,7 +914,7 @@ namespace Histacom2.OS.Win95.Win95Apps
private void FoldersToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (FoldersToolStripMenuItem.Checked == true)
+ if (FoldersToolStripMenuItem.Checked)
{
FoldersToolStripMenuItem.Checked = false;
pnlFolders.Hide();
@@ -973,7 +958,7 @@ namespace Histacom2.OS.Win95.Win95Apps
}
}
- if (recognized == true)
+ if (recognized)
{
// TODO:
} else {
@@ -1137,5 +1122,36 @@ namespace Histacom2.OS.Win95.Win95Apps
item.Selected = true;
}
}
+
+ private void btnCanc_Click(object sender, EventArgs e)
+ {
+ ((Form)this.TopLevelControl).Close();
+ }
+
+ private void btnSave_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (mainView.FocusedItem != null)
+ {
+ if (mainView.FocusedItem.Tag.ToString() == "")
+ { // If it isn't a file
+ GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString()));
+ }
+ else txtSave.Text = mainView.FocusedItem.Tag.ToString();
+ }
+ if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
+ else
+ {
+ if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
+
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
+
+ ((Form)this.TopLevelControl).Close();
+ }
+ }
+ catch { }
+ }
}
}
diff --git a/Histacom2/SaveDialogs/LoadGameProfileItem.cs b/Histacom2/SaveDialogs/LoadGameProfileItem.cs
index bdc0b7c..646601b 100644
--- a/Histacom2/SaveDialogs/LoadGameProfileItem.cs
+++ b/Histacom2/SaveDialogs/LoadGameProfileItem.cs
@@ -37,7 +37,7 @@ namespace Histacom2
if (!ClientRectangle.Contains(PointToClient(Control.MousePosition)))
{
sidebar.Hide();
- if (OnceRemoveHeight == false)
+ if (!OnceRemoveHeight)
{
this.Height -= 28;
OnceRemoveHeight = true;
@@ -49,7 +49,7 @@ namespace Histacom2
} else
{
sidebar.Show();
- if (OnceAddHeight == false)
+ if (!OnceAddHeight)
{
this.Height += 28;
OnceAddHeight = true;
@@ -95,7 +95,7 @@ namespace Histacom2
{
try
{
- if (!RequestingNewName == false)
+ if (!RequestingNewName)
{
if (textBox1.Text == "")
{
diff --git a/Histacom2/SaveDialogs/NewGameDialog.cs b/Histacom2/SaveDialogs/NewGameDialog.cs
index eb8d44f..e3ecd00 100644
--- a/Histacom2/SaveDialogs/NewGameDialog.cs
+++ b/Histacom2/SaveDialogs/NewGameDialog.cs
@@ -46,7 +46,7 @@ namespace Histacom2
if (!(txtProfName.Text.Length > 20))
{
ProfileName = txtProfName.Text;
- if (DevMode == true)
+ if (DevMode)
{
if (Directory.Exists(ProfileDirectory))
{
@@ -84,7 +84,7 @@ namespace Histacom2
private void NewGameDialog_Load(object sender, EventArgs e)
{
- if (DevMode == true)
+ if (DevMode)
{
btnDevMode.Show();
}
diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs
index 85c04fb..ff7b5c0 100644
--- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs
+++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs
@@ -59,7 +59,7 @@
this.pnlResolved.Controls.Add(this.label2);
this.pnlResolved.Location = new System.Drawing.Point(12, 38);
this.pnlResolved.Name = "pnlResolved";
- this.pnlResolved.Size = new System.Drawing.Size(589, 275);
+ this.pnlResolved.Size = new System.Drawing.Size(518, 243);
this.pnlResolved.TabIndex = 1;
this.pnlResolved.Visible = false;
//
@@ -73,7 +73,7 @@
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
- this.textBox1.Size = new System.Drawing.Size(567, 208);
+ this.textBox1.Size = new System.Drawing.Size(496, 176);
this.textBox1.TabIndex = 3;
//
// label3
@@ -100,15 +100,15 @@
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.panel2.Controls.Add(this.btnClose);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panel2.Location = new System.Drawing.Point(0, 315);
+ this.panel2.Location = new System.Drawing.Point(0, 283);
this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(612, 30);
+ this.panel2.Size = new System.Drawing.Size(541, 30);
this.panel2.TabIndex = 2;
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnClose.Location = new System.Drawing.Point(526, 4);
+ this.btnClose.Location = new System.Drawing.Point(455, 4);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 0;
@@ -120,12 +120,11 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(612, 345);
+ this.ClientSize = new System.Drawing.Size(541, 313);
this.Controls.Add(this.panel2);
this.Controls.Add(this.pnlResolved);
this.Controls.Add(this.label1);
this.Name = "SaveFileTroubleShooter";
- this.Text = "Save File Troubleshooter";
this.Load += new System.EventHandler(this.SaveFileTroubleShooter_Load);
this.pnlResolved.ResumeLayout(false);
this.pnlResolved.PerformLayout();
diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
index eceff04..3283ca1 100644
--- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
+++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
@@ -193,7 +193,7 @@ namespace Histacom2.SaveDialogs
{
pnlResolved.Visible = true;
label1.Hide();
- if (successful == true)
+ if (successful)
{
label2.Text = "The issue has been resolved.";
diff --git a/Histacom2/TitleScreen.cs b/Histacom2/TitleScreen.cs
index 3909798..4108204 100644
--- a/Histacom2/TitleScreen.cs
+++ b/Histacom2/TitleScreen.cs
@@ -59,59 +59,59 @@ namespace Histacom2
{
// Time to decide which OS to start up!
- switch (CurrentSave.CurrentOS)
- {
- case "95":
- frm95 = new Windows95();
- frm95.TopMost = true;
- frm95.FormBorderStyle = FormBorderStyle.None;
- frm95.WindowState = FormWindowState.Maximized;
- //if (vm_mode.Checked == true)
- //{
- // frm95.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
- // frm95.FormBorderStyle = FormBorderStyle.Fixed3D;
- //}
- frm95.Show();
- Hide();
-
- break;
- case "98":
- frm98 = new Windows98();
- frm98.TopMost = true;
- frm98.FormBorderStyle = FormBorderStyle.None;
- frm98.WindowState = FormWindowState.Maximized;
- //if (vm_mode.Checked == true)
- //{
- // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
- // frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
- //}
- frm98.Show();
- Hide();
-
- break;
- case "xpbad":
- frmBadXP = new WindowsXPBad();
- frmBadXP.TopMost = true;
- frmBadXP.FormBorderStyle = FormBorderStyle.None;
- frmBadXP.WindowState = FormWindowState.Maximized;
- //if (vm_mode.Checked == true)
- //{
- // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
- // frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
- //}
- frmBadXP.Show();
- Hide();
-
- break;
- default:
- MessageBox.Show("WARNING! It looks like this save is corrupt!");
- MessageBox.Show("We will now open the Save troubleshooter");
-
- SaveFileTroubleShooter troubleshooter = new SaveFileTroubleShooter();
-
- troubleshooter.ShowDialog();
- break;
- }
+ switch (CurrentSave.CurrentOS)
+ {
+ case "95":
+ frm95 = new Windows95();
+ frm95.TopMost = true;
+ frm95.FormBorderStyle = FormBorderStyle.None;
+ frm95.WindowState = FormWindowState.Maximized;
+ //if (vm_mode.Checked)
+ //{
+ // frm95.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
+ // frm95.FormBorderStyle = FormBorderStyle.Fixed3D;
+ //}
+ frm95.Show();
+ Hide();
+
+ break;
+ case "98":
+ frm98 = new Windows98();
+ frm98.TopMost = true;
+ frm98.FormBorderStyle = FormBorderStyle.None;
+ frm98.WindowState = FormWindowState.Maximized;
+ //if (vm_mode.Checked)
+ //{
+ // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
+ // frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
+ //}
+ frm98.Show();
+ Hide();
+
+ break;
+ case "xpbad":
+ frmBadXP = new WindowsXPBad();
+ frmBadXP.TopMost = true;
+ frmBadXP.FormBorderStyle = FormBorderStyle.None;
+ frmBadXP.WindowState = FormWindowState.Maximized;
+ //if (vm_mode.Checked)
+ //{
+ // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
+ // frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
+ //}
+ frmBadXP.Show();
+ Hide();
+
+ break;
+ default:
+ MessageBox.Show("WARNING! It looks like this save is corrupt!");
+ MessageBox.Show("We will now open the Save troubleshooter");
+
+ SaveFileTroubleShooter troubleshooter = new SaveFileTroubleShooter();
+
+ troubleshooter.ShowDialog();
+ break;
+ }
}
private void VM_WidthHeight_KeyPress(object sender, KeyPressEventArgs e)
@@ -150,6 +150,22 @@ namespace Histacom2
ShutdownToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
}
+<<<<<<< HEAD
+ private static void leet()
+ {
+ WindowManager wm = new WindowManager();
+ UserControl leet = new UserControl();
+ leet.Width = 500;
+ leet.Height = 500;
+ Label label1 = new Label();
+ label1.Parent = leet;
+ label1.AutoSize = true;
+ label1.Text = "Thank you for making Histacom2 possible.";
+ wm.Init(leet, "Thank You", null, true, true);
+ }
+
+=======
+>>>>>>> 382f0167714bbcad00ab710fe7dcfa05eaeb88ac
#region Menu Buttons
#region NewGame
@@ -160,7 +176,7 @@ namespace Histacom2
newGameBox = new NewGameDialog();
newGameBox.ShowDialog();
- if (newGameBox.Successful == true)
+ if (newGameBox.Successful)
{
NewGame();
StartGame();
@@ -199,7 +215,7 @@ namespace Histacom2
loadGameBox = new LoadGameDialog();
loadGameBox.ShowDialog();
- if (loadGameBox.successful == true)
+ if (loadGameBox.successful)
{
LoadSave();
SetTheme();
@@ -229,7 +245,7 @@ namespace Histacom2
private void startbutton_Click(object sender, EventArgs e)
{
- if (DevMode == true)
+ if (DevMode)
{
DevMode = false;
gameversion.Text = "Developer Mode Deactivated";
@@ -259,5 +275,21 @@ namespace Histacom2
AchievementScreen achievelist = new AchievementScreen();
achievelist.ShowDialog();
}
+
+ private void vm_mode_CheckStateChanged(object sender, EventArgs e)
+ {
+ // Check for VM mode
+ if (vm_mode.Checked)
+ {
+ VM_Width.Visible = true;
+ VM_Height.Visible = true;
+ }
+ // If VM Mode is disabled
+ else
+ {
+ VM_Width.Visible = false;
+ VM_Height.Visible = false;
+ }
+ }
}
}
diff --git a/Histacom2/TitleScreen.resx b/Histacom2/TitleScreen.resx
index 5ab2508..76952a9 100644
--- a/Histacom2/TitleScreen.resx
+++ b/Histacom2/TitleScreen.resx
@@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="vmModeTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="panel2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>