aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/OS/Win98
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-11-04 09:43:02 +0000
committerAlex-TIMEHACK <[email protected]>2017-11-04 09:43:02 +0000
commit6ab1468786f1e865e9ff408d32149f9c9620d844 (patch)
tree45bac91aba019027213bdd37bac9f43c0a93853e /Histacom2/OS/Win98
parent2a473d05a34afe51cf0f5340cbdd48ad4e771657 (diff)
downloadhistacom2-6ab1468786f1e865e9ff408d32149f9c9620d844.tar.gz
histacom2-6ab1468786f1e865e9ff408d32149f9c9620d844.tar.bz2
histacom2-6ab1468786f1e865e9ff408d32149f9c9620d844.zip
Fix bugs
...and get rid of all == false and == true
Diffstat (limited to 'Histacom2/OS/Win98')
-rw-r--r--Histacom2/OS/Win98/Win98.cs2
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs135
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs82
3 files changed, 145 insertions, 74 deletions
diff --git a/Histacom2/OS/Win98/Win98.cs b/Histacom2/OS/Win98/Win98.cs
index e10904e..efaa31b 100644
--- a/Histacom2/OS/Win98/Win98.cs
+++ b/Histacom2/OS/Win98/Win98.cs
@@ -116,7 +116,7 @@ namespace Histacom2.OS.Win98
this.BringToFront();
//Check if it is the first time
- if (CurrentSave.FTime98 == false)
+ if (!CurrentSave.FTime98)
{
CurrentSave.FTime98 = true;
SaveGame();
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 { }
+ }
}
}