aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/OS
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-11-05 09:25:55 -0500
committerGitHub <[email protected]>2017-11-05 09:25:55 -0500
commitf0e2d14a959db1e5d35c4dc5f77ed3523c93200a (patch)
tree7ae4244e5f5c3dc38f4b228f15efe4ea5be0fe3a /Histacom2/OS
parent458cc4ee0dbc67f547ea851b5a67a88af119a4c0 (diff)
parent55bc23bd3797debcfc461ef23df344d16212f235 (diff)
downloadhistacom2-f0e2d14a959db1e5d35c4dc5f77ed3523c93200a.tar.gz
histacom2-f0e2d14a959db1e5d35c4dc5f77ed3523c93200a.tar.bz2
histacom2-f0e2d14a959db1e5d35c4dc5f77ed3523c93200a.zip
Merge pull request #180 from Alex-TIMEHACK/master
ClassicTextBox and ClassicDropDown
Diffstat (limited to 'Histacom2/OS')
-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.cs271
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.Designer.cs217
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs119
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.resx2
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicWordPad.cs1
-rw-r--r--Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs8
-rw-r--r--Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs29
-rw-r--r--Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs197
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs285
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs474
-rw-r--r--Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx9
15 files changed, 905 insertions, 899 deletions
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..e743b30 100644
--- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
+++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
@@ -22,20 +22,30 @@ namespace Histacom2.OS.Win95.Win95Apps
{
public bool IsFileOpenDialog = false;
public bool IsFileSaveDialog = false;
- public string onlyViewExtension = "";
+ public List<string> onlyViewExtension = new List<string>();
string ToReplaceWith = ProfileDirectory;
public string CurrentDirectory = ProfileMyComputerDirectory;
string OldLabelText;
string CurrentCopyFile;
-
- int fileType = 6;
//string attemptedDirectory = "";
WindowManager wm = new WindowManager();
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)
@@ -77,7 +87,8 @@ namespace Histacom2.OS.Win95.Win95Apps
Properties.Resources.TimeDistorter1,
Properties.Resources.WinClassicGTN,
Properties.Resources.WinClassicFTP,
- Properties.Resources.WinClassicRtfFile}); //20
+ Properties.Resources.WinClassicRtfFile, // 20
+ Properties.Resources.WinClassicAddressBookBig});
program.BringToFront();
@@ -97,21 +108,24 @@ 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";
}
}
onlyViewExtension = FileDialogBoxManager.OnlyViewExtension;
+
+ foreach (string str in onlyViewExtension)
+ cmbType.Items.Add(str);
}
string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) {
@@ -121,9 +135,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;
@@ -150,7 +164,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
if (!(Path.GetFileName(str) == "_data.info"))
{
- if (new FileInfo(str).Extension == onlyViewExtension)
+ if (onlyViewExtension.Contains(new FileInfo(str).Extension))
{
itm = this.mainView.Items.Add(Path.GetFileName(str));
itm.Tag = str;
@@ -220,8 +234,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
try
{
- ReturnType(new FileInfo(fileDir).Extension);
- switch (fileType)
+ switch (ReturnType(new FileInfo(fileDir).Extension))
{
case 1:
WinClassicNotepad np = new WinClassicNotepad();
@@ -385,228 +398,89 @@ namespace Histacom2.OS.Win95.Win95Apps
}
}
- string ReturnType(string extension) {
- string returnVal = "File";
- fileType = 0;
+ int ReturnType(string extension) {
switch (extension) {
case ".txt":
- fileType = 1;
- returnVal = "Text Document \n createtext";
- break;
- case ".dat":
- fileType = 1;
- returnVal = "Text Document \n createtext";
- break;
- case ".rtf":
- fileType = 2;
- returnVal = "Rich Text Document \n createtext";
- break;
case ".cfg":
- fileType = 1;
- returnVal = "Config file \n createtext";
- break;
case ".log":
- fileType = 1;
- returnVal = "log text file \n createtext";
- break;
case ".ini":
- fileType = 1;
- returnVal = "initialization \n createtext";
- break;
case ".properties":
- fileType = 1;
- returnVal = "Config file \n createtext";
- break;
case ".json":
- fileType = 1;
- returnVal = "Config file \n createtext";
- break;
+ case ".dat":
+ return 1;
+
+ case ".rtf":
+ return 2;
+
case ".doc":
- fileType = 3;
- returnVal = "Word Document \n word";
- break;
+ return 3;
case ".docm":
- fileType = 3;
- returnVal = "Macro-Enabled Word Document \n word";
- break;
+ return 3;
case ".xls":
- fileType = 4;
- returnVal = "Excel Spreadsheets \n excel";
- break;
+ return 4;
case ".ppt":
- fileType = 5;
- returnVal = "Powerpoint Presentation \n powerpoint";
- break;
+ return 5;
case ".pub":
- fileType = 7;
- returnVal = "Publisher Document \n powerpoint";
- break;
+ return 7;
case ".xps":
- fileType = 8;
- returnVal = "XPS Document \n xpsview";
- break;
+ return 8;
case ".htm":
- fileType = 9;
- returnVal = "HTML web page \n html";
- break;
+ return 9;
case ".html":
- fileType = 9;
- returnVal = "HTML web page \n html";
- break;
+ return 9;
case ".wps":
- fileType = 10;
- returnVal = "Works document \n works";
- break;
+ return 10;
case ".wmf":
- fileType = 11;
- returnVal = "Windows Metafile (A picture) \n createart";
- break;
case ".emf":
- fileType = 11;
- returnVal = "Enhanced Metafile (A picture) \n createart";
- break;
case ".png":
- fileType = 11;
- returnVal = "Picture file (Portable Network Graphics) \n createart";
- break;
case ".jpg":
- fileType = 11;
- returnVal = "Picture file \n createart";
- break;
case ".jpeg":
- fileType = 11;
- returnVal = "Picture file \n createart";
- break;
case ".gif":
- fileType = 12;
- returnVal = "Picture file \n gifman";
- break;
case ".tif":
- fileType = 11;
- returnVal = "Picture file \n createart";
- break;
case ".bmp":
- fileType = 11;
- returnVal = "Picture file \n createart";
- break;
case ".zip":
- fileType = 11;
- returnVal = "Compressed ZIP file \n winrar";
- break;
+ return 11;
+
case ".exe":
- fileType = 12;
- returnVal = "Program \n exe";
- break;
- case ".avi":
- fileType = 15;
- returnVal = "Video \n video";
- break;
+ return 12;
+ case ".avi":
case ".m4v":
- fileType = 15;
- returnVal = "Video (MPEG-4) \n video";
- break;
case ".mp4":
- fileType = 15;
- returnVal = "Video (MPEG-4) \n video";
- break;
case ".wmv":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m2v":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m3u":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mts":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".dv":
- fileType = 15;
- returnVal = "Video (Digital Video) \n video";
- break;
case ".flv":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m1v":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m2ts":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mkv":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mov":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mpeg4":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mpeg":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mpg":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".3gp":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m4p":
- fileType = 15;
- returnVal = "Video \n video";
- break;
+ return 15;
+
case ".mp2":
- fileType = 21;
- returnVal = "Audio \n video";
- break;
case ".mp3":
- fileType = 21;
- returnVal = "Audio \n video";
- break;
case ".wav":
- fileType = 21;
- returnVal = "Audio \n video";
- break;
+ return 21;
case ".nls":
- fileType = 16;
- returnVal = "Font file \n font";
- break;
+ return 16;
case ".dll":
- fileType = 17;
- returnVal = "System File \n sys";
- break;
+ return 17;
case ".bat":
- fileType = 18;
- returnVal = "MS-DOS Batch File \n winterm";
- break;
+ return 18;
case ".url":
- fileType = 19;
- returnVal = "Shortcut \n short";
- break;
+ return 19;
case ".sh":
- fileType = 20;
- returnVal = "BASH file \n winterm";
- break;
+ return 20;
case ".win":
- fileType = 17;
- returnVal = "System file \n sys";
- break;
+ return 17;
}
- return returnVal;
+ return 0;
}
//Private Sub windows_explorer_Closed(sender As Object, e As EventArgs) Handles Me.Closed
@@ -628,7 +502,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{ // If it is a file
if (IsFileOpenDialog || IsFileSaveDialog)
{
- if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension)
+ if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension))
{
Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
}
@@ -640,9 +514,7 @@ namespace Histacom2.OS.Win95.Win95Apps
((Form)this.TopLevelControl).Close();
}
else
- {
OpenFile(mainView.FocusedItem.Tag.ToString());
- }
}
} catch { /* TODO: Illegal operation */ }
}
@@ -707,36 +579,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 (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension)) 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 +902,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.Designer.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.Designer.cs
index c112e61..ead2483 100644
--- a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.Designer.cs
+++ b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.Designer.cs
@@ -38,21 +38,21 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinClassicFTPClient));
this.topBar = new System.Windows.Forms.Panel();
this.btnLogin = new Histacom2.Engine.UI.ClassicButton();
- this.infoLabel = new System.Windows.Forms.Label();
- this.label4 = new System.Windows.Forms.Label();
- this.textBox4 = new System.Windows.Forms.TextBox();
- this.label3 = new System.Windows.Forms.Label();
- this.passBox = new System.Windows.Forms.TextBox();
- this.label2 = new System.Windows.Forms.Label();
- this.usernameBox = new System.Windows.Forms.TextBox();
- this.label1 = new System.Windows.Forms.Label();
- this.hostnameBox = new System.Windows.Forms.TextBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.btnCancel = new Histacom2.Engine.UI.ClassicButton();
this.welcomeLabel = new System.Windows.Forms.Label();
this.ftpFiles = new System.Windows.Forms.ListView();
this.fileIcons = new System.Windows.Forms.ImageList(this.components);
+ this.hostnameBox = new Histacom2.Engine.UI.ClassicTextBox();
+ this.usernameBox = new Histacom2.Engine.UI.ClassicTextBox();
+ this.passBox = new Histacom2.Engine.UI.ClassicTextBox();
+ this.infoLabel = new Histacom2.Engine.UI.ClassicLabel();
+ this.textBox4 = new Histacom2.Engine.UI.ClassicTextBox();
+ this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel3 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel4 = new Histacom2.Engine.UI.ClassicLabel();
this.topBar.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
@@ -60,16 +60,16 @@
// topBar
//
this.topBar.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
- this.topBar.Controls.Add(this.btnLogin);
this.topBar.Controls.Add(this.infoLabel);
- this.topBar.Controls.Add(this.label4);
this.topBar.Controls.Add(this.textBox4);
- this.topBar.Controls.Add(this.label3);
this.topBar.Controls.Add(this.passBox);
- this.topBar.Controls.Add(this.label2);
this.topBar.Controls.Add(this.usernameBox);
- this.topBar.Controls.Add(this.label1);
this.topBar.Controls.Add(this.hostnameBox);
+ this.topBar.Controls.Add(this.btnLogin);
+ this.topBar.Controls.Add(this.classicLabel4);
+ this.topBar.Controls.Add(this.classicLabel3);
+ this.topBar.Controls.Add(this.classicLabel2);
+ this.topBar.Controls.Add(this.classicLabel1);
this.topBar.Dock = System.Windows.Forms.DockStyle.Top;
this.topBar.Location = new System.Drawing.Point(0, 0);
this.topBar.Name = "topBar";
@@ -85,91 +85,13 @@
this.btnLogin.DialogResult = System.Windows.Forms.DialogResult.None;
this.btnLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.btnLogin.ForeColor = System.Drawing.Color.Black;
- this.btnLogin.Location = new System.Drawing.Point(585, 4);
+ this.btnLogin.Location = new System.Drawing.Point(571, 4);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(44, 20);
this.btnLogin.TabIndex = 9;
this.btnLogin.Text = "Login";
this.btnLogin.Click += new System.EventHandler(this.button1_Click);
//
- // infoLabel
- //
- this.infoLabel.AutoSize = true;
- this.infoLabel.ForeColor = System.Drawing.Color.Red;
- this.infoLabel.Location = new System.Drawing.Point(635, 7);
- this.infoLabel.Name = "infoLabel";
- this.infoLabel.Size = new System.Drawing.Size(35, 13);
- this.infoLabel.TabIndex = 8;
- this.infoLabel.Text = "label5";
- this.infoLabel.Visible = false;
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(503, 7);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(29, 13);
- this.label4.TabIndex = 6;
- this.label4.Text = "&Port:";
- //
- // textBox4
- //
- this.textBox4.Enabled = false;
- this.textBox4.Location = new System.Drawing.Point(538, 4);
- this.textBox4.Name = "textBox4";
- this.textBox4.Size = new System.Drawing.Size(41, 20);
- this.textBox4.TabIndex = 7;
- this.textBox4.Text = "21";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(335, 7);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(56, 13);
- this.label3.TabIndex = 4;
- this.label3.Text = "Pass&word:";
- //
- // passBox
- //
- this.passBox.Location = new System.Drawing.Point(397, 4);
- this.passBox.Name = "passBox";
- this.passBox.PasswordChar = '*';
- this.passBox.Size = new System.Drawing.Size(100, 20);
- this.passBox.TabIndex = 5;
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(156, 7);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(58, 13);
- this.label2.TabIndex = 2;
- this.label2.Text = "&Username:";
- //
- // usernameBox
- //
- this.usernameBox.Location = new System.Drawing.Point(214, 4);
- this.usernameBox.Name = "usernameBox";
- this.usernameBox.Size = new System.Drawing.Size(100, 20);
- this.usernameBox.TabIndex = 3;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(8, 7);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(32, 13);
- this.label1.TabIndex = 1;
- this.label1.Text = "&Host:";
- //
- // hostnameBox
- //
- this.hostnameBox.Location = new System.Drawing.Point(41, 4);
- this.hostnameBox.Name = "hostnameBox";
- this.hostnameBox.Size = new System.Drawing.Size(100, 20);
- this.hostnameBox.TabIndex = 1;
- //
// contextMenuStrip1
//
this.contextMenuStrip1.Name = "contextMenuStrip1";
@@ -246,6 +168,96 @@
this.fileIcons.Images.SetKeyName(1, "WinClassicNotepad.png");
this.fileIcons.Images.SetKeyName(2, "WinClassicSetup.png");
//
+ // hostnameBox
+ //
+ this.hostnameBox.BackColor = System.Drawing.Color.White;
+ this.hostnameBox.Location = new System.Drawing.Point(37, 4);
+ this.hostnameBox.Name = "hostnameBox";
+ this.hostnameBox.Size = new System.Drawing.Size(113, 20);
+ this.hostnameBox.TabIndex = 10;
+ this.hostnameBox.UseSystemPasswordChar = false;
+ //
+ // usernameBox
+ //
+ this.usernameBox.BackColor = System.Drawing.Color.White;
+ this.usernameBox.Location = new System.Drawing.Point(220, 4);
+ this.usernameBox.Name = "usernameBox";
+ this.usernameBox.Size = new System.Drawing.Size(109, 20);
+ this.usernameBox.TabIndex = 10;
+ this.usernameBox.UseSystemPasswordChar = false;
+ //
+ // passBox
+ //
+ this.passBox.BackColor = System.Drawing.Color.White;
+ this.passBox.Location = new System.Drawing.Point(392, 4);
+ this.passBox.Name = "passBox";
+ this.passBox.Size = new System.Drawing.Size(105, 20);
+ this.passBox.TabIndex = 10;
+ this.passBox.UseSystemPasswordChar = true;
+ //
+ // infoLabel
+ //
+ this.infoLabel.DropShadow = false;
+ this.infoLabel.ForeColor = System.Drawing.Color.Red;
+ this.infoLabel.Location = new System.Drawing.Point(621, 7);
+ this.infoLabel.Name = "infoLabel";
+ this.infoLabel.Size = new System.Drawing.Size(75, 13);
+ this.infoLabel.TabIndex = 11;
+ this.infoLabel.Text = "classicLabel1";
+ //
+ // textBox4
+ //
+ this.textBox4.BackColor = System.Drawing.Color.White;
+ this.textBox4.Location = new System.Drawing.Point(530, 4);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(36, 20);
+ this.textBox4.TabIndex = 10;
+ this.textBox4.UseSystemPasswordChar = false;
+ //
+ // classicLabel1
+ //
+ this.classicLabel1.BackColor = System.Drawing.Color.Transparent;
+ this.classicLabel1.DropShadow = false;
+ this.classicLabel1.ForeColor = System.Drawing.Color.Black;
+ this.classicLabel1.Location = new System.Drawing.Point(3, 7);
+ this.classicLabel1.Name = "classicLabel1";
+ this.classicLabel1.Size = new System.Drawing.Size(75, 13);
+ this.classicLabel1.TabIndex = 11;
+ this.classicLabel1.Text = "Host:";
+ //
+ // classicLabel2
+ //
+ this.classicLabel2.BackColor = System.Drawing.Color.Transparent;
+ this.classicLabel2.DropShadow = false;
+ this.classicLabel2.ForeColor = System.Drawing.Color.Black;
+ this.classicLabel2.Location = new System.Drawing.Point(156, 7);
+ this.classicLabel2.Name = "classicLabel2";
+ this.classicLabel2.Size = new System.Drawing.Size(75, 13);
+ this.classicLabel2.TabIndex = 11;
+ this.classicLabel2.Text = "Username:";
+ //
+ // classicLabel3
+ //
+ this.classicLabel3.BackColor = System.Drawing.Color.Transparent;
+ this.classicLabel3.DropShadow = false;
+ this.classicLabel3.ForeColor = System.Drawing.Color.Black;
+ this.classicLabel3.Location = new System.Drawing.Point(335, 7);
+ this.classicLabel3.Name = "classicLabel3";
+ this.classicLabel3.Size = new System.Drawing.Size(75, 13);
+ this.classicLabel3.TabIndex = 11;
+ this.classicLabel3.Text = "Password:";
+ //
+ // classicLabel4
+ //
+ this.classicLabel4.BackColor = System.Drawing.Color.Transparent;
+ this.classicLabel4.DropShadow = false;
+ this.classicLabel4.ForeColor = System.Drawing.Color.Black;
+ this.classicLabel4.Location = new System.Drawing.Point(503, 7);
+ this.classicLabel4.Name = "classicLabel4";
+ this.classicLabel4.Size = new System.Drawing.Size(75, 13);
+ this.classicLabel4.TabIndex = 11;
+ this.classicLabel4.Text = "Port:";
+ //
// WinClassicFTPClient
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -257,7 +269,6 @@
this.Size = new System.Drawing.Size(762, 499);
this.Load += new System.EventHandler(this.WinClassicFTPClient_Load);
this.topBar.ResumeLayout(false);
- this.topBar.PerformLayout();
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
@@ -266,21 +277,21 @@
#endregion
private System.Windows.Forms.Panel topBar;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.TextBox textBox4;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.TextBox passBox;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.TextBox usernameBox;
- private System.Windows.Forms.Label label1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
- public System.Windows.Forms.TextBox hostnameBox;
- private System.Windows.Forms.Label infoLabel;
private System.Windows.Forms.Panel panel1;
private Engine.UI.ClassicButton btnCancel;
private System.Windows.Forms.Label welcomeLabel;
internal System.Windows.Forms.ListView ftpFiles;
private System.Windows.Forms.ImageList fileIcons;
private Engine.UI.ClassicButton btnLogin;
+ private Engine.UI.ClassicTextBox hostnameBox;
+ private Engine.UI.ClassicTextBox passBox;
+ private Engine.UI.ClassicTextBox usernameBox;
+ private Engine.UI.ClassicLabel infoLabel;
+ private Engine.UI.ClassicTextBox textBox4;
+ private Engine.UI.ClassicLabel classicLabel1;
+ private Engine.UI.ClassicLabel classicLabel3;
+ private Engine.UI.ClassicLabel classicLabel2;
+ private Engine.UI.ClassicLabel classicLabel4;
}
}
diff --git a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
index bc28c3a..d20563e 100644
--- a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
+++ b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs
@@ -17,6 +17,10 @@ namespace Histacom2.OS.Win95.Win95Apps
public WinClassicFTPClient()
{
InitializeComponent();
+
+ hostnameBox.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
+ usernameBox.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
+ passBox.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
}
@@ -64,7 +68,7 @@ namespace Histacom2.OS.Win95.Win95Apps
private void WinClassicFTPClient_Load(object sender, EventArgs e)
{
-
+ textBox4.Text = "21";
}
private void topBar_Paint(object sender, PaintEventArgs e)
@@ -74,64 +78,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/")
- {
- 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")
+ Point objDrawingPoint = ftpFiles.PointToClient(Cursor.Position);
+ ListViewItem objListViewItem = new ListViewItem();
+ if (objDrawingPoint != null)
{
- 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/WinClassicFTPClient.resx b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.resx
index e03fcd1..067a121 100644
--- a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.resx
+++ b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.resx
@@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABe
- EgAAAk1TRnQBSQFMAgEBAwEAAUABAAFAAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ EgAAAk1TRnQBSQFMAgEBAwEAAUgBAAFIAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
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/AddressBook/FRMWinClassicAddressBookNewContact.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs
index 9facd7b..45384fa 100644
--- a/Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs
+++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs
@@ -7,12 +7,13 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
-
+using Histacom2.Engine;
namespace Histacom2.OS.Win95.Win95Apps
{
public partial class FRMWinClassicAddressBookNewContact : UserControl
{
+ WindowManager wm = new WindowManager();
public AddressBookContact toSet = new AddressBookContact();
public FRMWinClassicAddressBookNewContact()
{
@@ -37,7 +38,7 @@ namespace Histacom2.OS.Win95.Win95Apps
Program.AddressBookSelectedContact = toSet;
((Form)this.TopLevelControl).Close();
} else {
- MessageBox.Show("Please fill out the First, Middle and Last name.");
+ wm.StartInfobox95("Address Book", "Please fill out the First, Middle and Last name.", Engine.Template.InfoboxType.Info, Engine.Template.InfoboxButtons.OK);
}
}
@@ -62,9 +63,6 @@ namespace Histacom2.OS.Win95.Win95Apps
emails.Items.Add(email);
}
}
- } else
- {
- MessageBox.Show("NULL CONTACT!");
}
}
}
diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs
index cbe2600..f76bb99 100644
--- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs
+++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs
@@ -105,67 +105,69 @@
// newContactToolStripMenuItem
//
this.newContactToolStripMenuItem.Name = "newContactToolStripMenuItem";
- this.newContactToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
+ this.newContactToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.newContactToolStripMenuItem.Text = "New contact...";
this.newContactToolStripMenuItem.Click += new System.EventHandler(this.newContactToolStripMenuItem_Click);
//
// newFolderToolStripMenuItem
//
this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem";
- this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
+ this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.newFolderToolStripMenuItem.Text = "New folder...";
this.newFolderToolStripMenuItem.Click += new System.EventHandler(this.newFolderToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(147, 6);
+ this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
//
// propertiesToolStripMenuItem
//
this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem";
- this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
+ this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.propertiesToolStripMenuItem.Text = "Properties";
this.propertiesToolStripMenuItem.Click += new System.EventHandler(this.propertiesToolStripMenuItem_Click);
//
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
- this.deleteToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
+ this.deleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.deleteToolStripMenuItem.Text = "Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
- this.toolStripSeparator2.Size = new System.Drawing.Size(147, 6);
+ this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6);
//
// importToolStripMenuItem
//
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
- this.importToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
+ this.importToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.importToolStripMenuItem.Text = "Import...";
+ this.importToolStripMenuItem.Click += new System.EventHandler(this.importToolStripMenuItem_Click);
//
// exportToolStripMenuItem
//
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
- this.exportToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
+ this.exportToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exportToolStripMenuItem.Text = "Export...";
+ this.exportToolStripMenuItem.Click += new System.EventHandler(this.exportToolStripMenuItem_Click);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
- this.toolStripSeparator3.Size = new System.Drawing.Size(147, 6);
+ this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
- this.toolStripSeparator4.Size = new System.Drawing.Size(147, 6);
+ this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
- this.exitToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
+ this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@@ -247,6 +249,7 @@
this.aboutAddressBookToolStripMenuItem.Name = "aboutAddressBookToolStripMenuItem";
this.aboutAddressBookToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.aboutAddressBookToolStripMenuItem.Text = "About Address Book";
+ this.aboutAddressBookToolStripMenuItem.Click += new System.EventHandler(this.aboutAddressBookToolStripMenuItem_Click);
//
// contactsView
//
@@ -304,6 +307,7 @@
this.toolNew.Size = new System.Drawing.Size(43, 39);
this.toolNew.TabIndex = 0;
this.toolNew.TabStop = false;
+ this.toolNew.Click += new System.EventHandler(this.toolNew_Click);
//
// toolDelete
//
@@ -348,6 +352,7 @@
this.Controls.Add(this.topmenu);
this.Name = "WinClassicAddressBook";
this.Size = new System.Drawing.Size(666, 425);
+ this.Load += new System.EventHandler(this.WinClassicAddressBook_Load);
this.topmenu.ResumeLayout(false);
this.topmenu.PerformLayout();
this.toolbar.ResumeLayout(false);
@@ -378,7 +383,7 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ListView contactsView;
- private System.Windows.Forms.TreeView treeView1;
+ public System.Windows.Forms.TreeView treeView1;
private System.Windows.Forms.ToolStripMenuItem toolbarToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem foldersToolStripMenuItem;
private System.Windows.Forms.Panel toolbar;
diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs
index ccd22f0..fd2bf0f 100644
--- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs
+++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs
@@ -9,6 +9,9 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using Histacom2.Engine;
using Histacom2.Engine.Template;
+using System.IO;
+using static Histacom2.Engine.SaveSystem;
+using static Histacom2.Engine.FileDialogBoxManager;
namespace Histacom2.OS.Win95.Win95Apps
{
@@ -42,14 +45,30 @@ namespace Histacom2.OS.Win95.Win95Apps
{
new AddressBookContactList()
{
- AttachedNode = treeView1.Nodes[0].Text,
+ NodePath = treeView1.Nodes[0].Text
}
};
+
+ if (File.Exists(Path.Combine(ProfileWindowsDirectory, "Application Data", "Microsoft", "Address Book", $"{ProfileName}.wab")))
+ LoadData();
+ else
+ SaveData();
+
+
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
- UpdateContactListFromNodeName(treeView1.SelectedNode.Text);
+ previousParent = treeView1.SelectedNode.Parent;
+ UpdateContactListFromNodeName(treeView1.SelectedNode);
+
+ // Remove the focus from contactsView
+
+ if (contactsView.SelectedItems.Count != 0)
+ contactsView.SelectedItems[0].Selected = false;
+
+ if (contactsView.FocusedItem != null)
+ contactsView.FocusedItem.Focused = false;
}
//AddressBookContactList GetAddressBookContactListFromNode(string NodeText)
@@ -71,28 +90,20 @@ namespace Histacom2.OS.Win95.Win95Apps
// return toReturn;
//}
- public void UpdateContactListFromNodeName(string NodeName)
+ public void UpdateContactListFromNodeName(TreeNode Node)
{
+ previousParent = Node.Parent;
contactsView.Items.Clear();
try
{
foreach (AddressBookContactList ContactList in AddressBookObjects)
{
- if (ContactList.AttachedNode == NodeName)
+ if (ContactList.NodePath == FindNodePath(Node))
{
foreach (AddressBookContact contact in ContactList.Contacts)
{
- if (contact != null)
- {
- if (contact.FirstName != null)
- {
- contactsView.Items.Add(contact.FirstName + " " + contact.MiddleName + " " + contact.LastName);
- }
- }
- else
- {
- MessageBox.Show("Null contact!");
- }
+ if (contact.FirstName != null)
+ contactsView.Items.Add(contact.FirstName + " " + contact.MiddleName + " " + contact.LastName);
}
}
}
@@ -106,15 +117,29 @@ namespace Histacom2.OS.Win95.Win95Apps
{
if (OldTreeNode != null)
{
- OldTreeNode.Nodes.Add(NewNodeName);
+ TreeNode nde = OldTreeNode.Nodes.Add(NewNodeName);
AddressBookObjects.Add(new AddressBookContactList
{
- AttachedNode = NewNodeName,
+ NodePath = FindNodePath(nde)
});
}
}
+ TreeNode previousParent;
+ public string FindNodePath(TreeNode nde)
+ {
+ if (nde != null)
+ {
+ string ret = nde.Text;
+ previousParent = nde.Parent;
+ while (previousParent != null)
+ ret = $"{FindNodePath(nde.Parent)}\\{ret}";
+ return ret;
+ }
+ else return "";
+ }
+
private void newFolderToolStripMenuItem_Click(object sender, EventArgs e)
{
NewFolder();
@@ -154,7 +179,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
foreach (AddressBookContactList ContactList in AddressBookObjects)
{
- if (ContactList.AttachedNode == treeView1.SelectedNode.Text)
+ if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
{
ContactList.Contacts.Add(Program.AddressBookSelectedContact);
contactsView.Items.Add(Program.AddressBookSelectedContact.FirstName + " " + Program.AddressBookSelectedContact.MiddleName + " " + Program.AddressBookSelectedContact.LastName);
@@ -178,13 +203,20 @@ namespace Histacom2.OS.Win95.Win95Apps
{
foreach (AddressBookContactList ContactList in AddressBookObjects)
{
- if (ContactList.AttachedNode == treeView1.SelectedNode.Text)
+ if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
{
foreach (AddressBookContact Contact in ContactList.Contacts)
{
- if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text)
+ if (contactsView.FocusedItem == null)
+ { // Most likely they are trying to view a whole folder!
+ wm.StartInfobox95("Properties of a folder", "You cannot view the properties of a contact folder.", InfoboxType.Warning, InfoboxButtons.OK);
+ }
+ else
{
- abnc.toSet = Contact;
+ if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text)
+ {
+ abnc.toSet = Contact;
+ }
}
}
}
@@ -197,7 +229,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
foreach (AddressBookContactList ContactList in AddressBookObjects)
{
- if (ContactList.AttachedNode == treeView1.SelectedNode.Text)
+ if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
{
foreach (AddressBookContact Contact in ContactList.Contacts)
{
@@ -228,22 +260,38 @@ namespace Histacom2.OS.Win95.Win95Apps
void DeleteContact()
{
- if (treeView1.SelectedNode != null)
+ try
{
foreach (AddressBookContactList ContactList in AddressBookObjects)
{
- if (ContactList.AttachedNode == treeView1.SelectedNode.Text)
+ if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
{
foreach (AddressBookContact Contact in ContactList.Contacts)
{
- if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text)
+ if (contactsView.FocusedItem == null)
+ { // Most likely they are trying to delete a whole folder!
+ if (treeView1.SelectedNode.Text != "Shared Contacts")
+ if (treeView1.SelectedNode != null)
+ {
+ AddressBookObjects.Remove(ContactList);
+ treeView1.Nodes.Remove(treeView1.SelectedNode);
+ previousParent = null;
+ UpdateContactListFromNodeName(treeView1.Nodes[0]);
+ }
+ }
+ else
{
- ContactList.Contacts.Remove(Contact);
+ if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text)
+ {
+ ContactList.Contacts.Remove(Contact);
+ previousParent = treeView1.SelectedNode.Parent;
+ UpdateContactListFromNodeName(treeView1.SelectedNode);
+ }
}
}
}
}
- }
+ } catch { }
}
private void toolDelete_Click(object sender, EventArgs e)
@@ -275,6 +323,99 @@ namespace Histacom2.OS.Win95.Win95Apps
{
((Form)this.TopLevelControl).Close();
}
+
+ private void toolNew_Click(object sender, EventArgs e)
+ {
+ newContext.Show(MousePosition);
+ }
+
+ private void aboutAddressBookToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void WinClassicAddressBook_Load(object sender, EventArgs e)
+ {
+ ((Form)this.TopLevelControl).FormClosed += (sender2, e2) =>
+ {
+ SaveData();
+ };
+ }
+
+ public void SaveData()
+ {
+ string toSave = Newtonsoft.Json.JsonConvert.SerializeObject(AddressBookObjects, Newtonsoft.Json.Formatting.Indented);
+ CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "Application Data", "Microsoft", "Address Book"), $"{ProfileName}.wab", toSave, 21, toSave.Length);
+ }
+
+ public void SaveDataAs()
+ {
+ try
+ {
+ string toSave = Newtonsoft.Json.JsonConvert.SerializeObject(AddressBookObjects, Newtonsoft.Json.Formatting.Indented);
+
+ ActivateSaveFileDialog(".wab");
+ string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
+ DeactivateFileDialog();
+
+ if (selectedPath != "")
+ CreateWindowsFile(new FileInfo(selectedPath).Directory.FullName, selectedPath.Split('\\').Last(), toSave, 21, toSave.Length);
+ } catch { }
+ }
+
+ public void LoadData()
+ {
+ AddressBookObjects = Newtonsoft.Json.JsonConvert.DeserializeObject<List<AddressBookContactList>>(File.ReadAllText(Path.Combine(ProfileWindowsDirectory, "Application Data", "Microsoft", "Address Book", $"{ProfileName}.wab")));
+
+ foreach (AddressBookContactList lst in AddressBookObjects)
+ UpdateTreeView(lst);
+ }
+
+ public void LoadDataAs()
+ {
+ ActivateOpenFileDialog(".wab");
+ string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
+ DeactivateFileDialog();
+
+ if (selectedPath != "")
+ AddressBookObjects = Newtonsoft.Json.JsonConvert.DeserializeObject<List<AddressBookContactList>>(File.ReadAllText(selectedPath));
+
+ foreach (AddressBookContactList lst in AddressBookObjects)
+ UpdateTreeView(lst);
+ }
+
+ TreeNode UpdatePrevParent;
+ public void UpdateTreeView(AddressBookContactList lst, int count = 0)
+ {
+ try
+ {
+ string[] parts = new string[] { "Shared Contacts" };
+ if (lst.NodePath != null)
+ parts = lst.NodePath.Split('\\');
+
+ if (count == 0) UpdatePrevParent = treeView1.Nodes[0];
+ if (lst.NodePath != FindNodePath(treeView1.Nodes[0]))
+ {
+ if (UpdatePrevParent.Nodes.ContainsKey(parts[count + 1]))
+ UpdatePrevParent.Nodes.RemoveByKey(parts[count + 1]);
+
+ TreeNode newNde = UpdatePrevParent.Nodes.Add(parts[count + 1], parts[count + 1]);
+ UpdatePrevParent = newNde;
+ if (count != parts.Length - 2) UpdateTreeView(lst, ++count);
+ }
+
+ } catch { }
+ }
+
+ private void importToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ LoadDataAs();
+ }
+
+ private void exportToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ SaveDataAs();
+ }
}
public class AddressBookContact
@@ -287,7 +428,7 @@ namespace Histacom2.OS.Win95.Win95Apps
public class AddressBookContactList
{
- public string AttachedNode;
+ public string NodePath;
public List<AddressBookContact> Contacts = new List<AddressBookContact>();
}
}
diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
index af2570c..586c6c2 100644
--- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
+++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs
@@ -29,32 +29,36 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinClassicWindowsExplorer));
this.program = new System.Windows.Forms.Panel();
this.mainView = new System.Windows.Forms.ListView();
this.pnlInfo = new System.Windows.Forms.Panel();
+ this.txtInfoTitle = new Histacom2.Engine.UI.ClassicLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.txtInfoTitle = new System.Windows.Forms.Label();
this.pnlInfoContent = new System.Windows.Forms.Panel();
this.InfoDesc = new System.Windows.Forms.Panel();
- this.txtInfoDescSize = new System.Windows.Forms.Label();
- this.txtInfoDescModified = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.txtInfoDescType = new System.Windows.Forms.Label();
- this.txtInfoDescName = new System.Windows.Forms.Label();
- this.txtInfoTip = new System.Windows.Forms.Label();
+ this.classicLabel3 = new Histacom2.Engine.UI.ClassicLabel();
+ this.txtInfoDescSize = new Histacom2.Engine.UI.ClassicLabel();
+ this.txtInfoDescModified = new Histacom2.Engine.UI.ClassicLabel();
+ this.txtInfoDescType = new Histacom2.Engine.UI.ClassicLabel();
+ this.txtInfoDescName = new Histacom2.Engine.UI.ClassicLabel();
+ this.txtInfoTip = new Histacom2.Engine.UI.ClassicLabel();
this.pnlFolders = new System.Windows.Forms.Panel();
this.diskView = new System.Windows.Forms.TreeView();
this.pnlFoldersTop = new System.Windows.Forms.Panel();
- this.label2 = new System.Windows.Forms.Label();
this.btnFolderClose = new System.Windows.Forms.PictureBox();
+ this.classicLabel4 = new Histacom2.Engine.UI.ClassicLabel();
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.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 +116,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);
@@ -124,37 +128,37 @@
this.pnlInfo.BackColor = System.Drawing.Color.White;
this.pnlInfo.BackgroundImage = global::Histacom2.Properties.Resources.Win98WebBackground;
this.pnlInfo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
- this.pnlInfo.Controls.Add(this.pictureBox1);
this.pnlInfo.Controls.Add(this.txtInfoTitle);
+ this.pnlInfo.Controls.Add(this.pictureBox1);
this.pnlInfo.Controls.Add(this.pnlInfoContent);
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;
//
+ // txtInfoTitle
+ //
+ this.txtInfoTitle.BackColor = System.Drawing.Color.Transparent;
+ this.txtInfoTitle.DropShadow = false;
+ this.txtInfoTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F);
+ this.txtInfoTitle.Location = new System.Drawing.Point(13, 56);
+ this.txtInfoTitle.Name = "txtInfoTitle";
+ this.txtInfoTitle.Size = new System.Drawing.Size(194, 30);
+ this.txtInfoTitle.TabIndex = 23;
+ this.txtInfoTitle.Text = "FOLDER_NAME";
+ //
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
- this.pictureBox1.Image = global::Histacom2.Properties.Resources.WinClassicFolderSmall;
+ this.pictureBox1.Image = global::Histacom2.Properties.Resources.WinClassicFolder;
this.pictureBox1.Location = new System.Drawing.Point(15, 18);
this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(30, 30);
+ this.pictureBox1.Size = new System.Drawing.Size(32, 32);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 20;
this.pictureBox1.TabStop = false;
//
- // txtInfoTitle
- //
- this.txtInfoTitle.AutoSize = true;
- this.txtInfoTitle.BackColor = System.Drawing.Color.Transparent;
- this.txtInfoTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.txtInfoTitle.Location = new System.Drawing.Point(3, 51);
- this.txtInfoTitle.Name = "txtInfoTitle";
- this.txtInfoTitle.Size = new System.Drawing.Size(192, 29);
- this.txtInfoTitle.TabIndex = 0;
- this.txtInfoTitle.Text = "FOLDER_NAME";
- //
// pnlInfoContent
//
this.pnlInfoContent.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -165,78 +169,77 @@
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
//
+ this.InfoDesc.Controls.Add(this.classicLabel3);
this.InfoDesc.Controls.Add(this.txtInfoDescSize);
this.InfoDesc.Controls.Add(this.txtInfoDescModified);
- this.InfoDesc.Controls.Add(this.label5);
this.InfoDesc.Controls.Add(this.txtInfoDescType);
this.InfoDesc.Controls.Add(this.txtInfoDescName);
this.InfoDesc.Dock = System.Windows.Forms.DockStyle.Top;
- this.InfoDesc.Location = new System.Drawing.Point(0, 25);
+ this.InfoDesc.Location = new System.Drawing.Point(0, 26);
this.InfoDesc.Name = "InfoDesc";
this.InfoDesc.Size = new System.Drawing.Size(199, 94);
this.InfoDesc.TabIndex = 22;
this.InfoDesc.Visible = false;
//
+ // classicLabel3
+ //
+ this.classicLabel3.DropShadow = false;
+ this.classicLabel3.Location = new System.Drawing.Point(13, 38);
+ this.classicLabel3.Name = "classicLabel3";
+ this.classicLabel3.Size = new System.Drawing.Size(179, 13);
+ this.classicLabel3.TabIndex = 1;
+ this.classicLabel3.Text = "Last modified:";
+ //
// txtInfoDescSize
//
- this.txtInfoDescSize.AutoSize = true;
- this.txtInfoDescSize.Location = new System.Drawing.Point(12, 81);
+ this.txtInfoDescSize.DropShadow = false;
+ this.txtInfoDescSize.Location = new System.Drawing.Point(15, 76);
this.txtInfoDescSize.Name = "txtInfoDescSize";
- this.txtInfoDescSize.Size = new System.Drawing.Size(59, 13);
- this.txtInfoDescSize.TabIndex = 0;
+ this.txtInfoDescSize.Size = new System.Drawing.Size(179, 13);
+ this.txtInfoDescSize.TabIndex = 1;
this.txtInfoDescSize.Text = "FILE_SIZE";
//
// txtInfoDescModified
//
- this.txtInfoDescModified.AutoSize = true;
- this.txtInfoDescModified.Location = new System.Drawing.Point(12, 54);
+ this.txtInfoDescModified.DropShadow = false;
+ this.txtInfoDescModified.Location = new System.Drawing.Point(13, 57);
this.txtInfoDescModified.Name = "txtInfoDescModified";
- this.txtInfoDescModified.Size = new System.Drawing.Size(92, 13);
- this.txtInfoDescModified.TabIndex = 0;
- this.txtInfoDescModified.Text = "LAST_MODIFIED";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(12, 41);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(73, 13);
- this.label5.TabIndex = 0;
- this.label5.Text = "Last Modified:";
+ this.txtInfoDescModified.Size = new System.Drawing.Size(179, 13);
+ this.txtInfoDescModified.TabIndex = 1;
+ this.txtInfoDescModified.Text = "DATE_MODIFIED";
//
// txtInfoDescType
//
- this.txtInfoDescType.AutoSize = true;
- this.txtInfoDescType.Location = new System.Drawing.Point(12, 18);
+ this.txtInfoDescType.DropShadow = false;
+ this.txtInfoDescType.Location = new System.Drawing.Point(13, 19);
this.txtInfoDescType.Name = "txtInfoDescType";
- this.txtInfoDescType.Size = new System.Drawing.Size(63, 13);
- this.txtInfoDescType.TabIndex = 0;
+ this.txtInfoDescType.Size = new System.Drawing.Size(183, 13);
+ this.txtInfoDescType.TabIndex = 1;
this.txtInfoDescType.Text = "FILE_TYPE";
//
// txtInfoDescName
//
- this.txtInfoDescName.AutoSize = true;
- this.txtInfoDescName.Location = new System.Drawing.Point(12, 5);
+ this.txtInfoDescName.DropShadow = false;
+ this.txtInfoDescName.Location = new System.Drawing.Point(13, 2);
this.txtInfoDescName.Name = "txtInfoDescName";
- this.txtInfoDescName.Size = new System.Drawing.Size(66, 13);
- this.txtInfoDescName.TabIndex = 0;
+ this.txtInfoDescName.Size = new System.Drawing.Size(179, 13);
+ this.txtInfoDescName.TabIndex = 1;
this.txtInfoDescName.Text = "FILE_NAME";
//
// txtInfoTip
//
- this.txtInfoTip.BackColor = System.Drawing.Color.Transparent;
this.txtInfoTip.Dock = System.Windows.Forms.DockStyle.Top;
+ this.txtInfoTip.DropShadow = false;
this.txtInfoTip.Location = new System.Drawing.Point(0, 0);
this.txtInfoTip.Name = "txtInfoTip";
- this.txtInfoTip.Size = new System.Drawing.Size(199, 25);
- this.txtInfoTip.TabIndex = 21;
- this.txtInfoTip.Text = "Select an item to view its description.";
- this.txtInfoTip.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.txtInfoTip.Size = new System.Drawing.Size(199, 26);
+ this.txtInfoTip.TabIndex = 23;
+ this.txtInfoTip.Text = "Please choose an item to view it\'s description.";
//
// pnlFolders
//
@@ -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,30 +256,21 @@
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);
//
// pnlFoldersTop
//
this.pnlFoldersTop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200)))));
- this.pnlFoldersTop.Controls.Add(this.label2);
this.pnlFoldersTop.Controls.Add(this.btnFolderClose);
+ this.pnlFoldersTop.Controls.Add(this.classicLabel4);
this.pnlFoldersTop.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlFoldersTop.Location = new System.Drawing.Point(0, 0);
this.pnlFoldersTop.Name = "pnlFoldersTop";
this.pnlFoldersTop.Size = new System.Drawing.Size(196, 22);
this.pnlFoldersTop.TabIndex = 20;
//
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(3, 3);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(41, 13);
- this.label2.TabIndex = 1;
- this.label2.Text = "Folders";
- //
// btnFolderClose
//
this.btnFolderClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200)))));
@@ -291,6 +285,15 @@
this.btnFolderClose.MouseEnter += new System.EventHandler(this.pictureBox1_MouseEnter);
this.btnFolderClose.MouseLeave += new System.EventHandler(this.btnFolderClose_MouseLeave);
//
+ // classicLabel4
+ //
+ this.classicLabel4.DropShadow = false;
+ this.classicLabel4.Location = new System.Drawing.Point(3, 5);
+ this.classicLabel4.Name = "classicLabel4";
+ this.classicLabel4.Size = new System.Drawing.Size(179, 13);
+ this.classicLabel4.TabIndex = 1;
+ this.classicLabel4.Text = "Folders";
+ //
// toprightcorner
//
this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -325,45 +328,96 @@
//
// 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.Items = ((System.Collections.Generic.List<string>)(resources.GetObject("cmbType.Items")));
+ 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
//
@@ -543,17 +597,13 @@
this.program.ResumeLayout(false);
this.program.PerformLayout();
this.pnlInfo.ResumeLayout(false);
- this.pnlInfo.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.pnlInfoContent.ResumeLayout(false);
this.InfoDesc.ResumeLayout(false);
- this.InfoDesc.PerformLayout();
this.pnlFolders.ResumeLayout(false);
this.pnlFoldersTop.ResumeLayout(false);
- 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,24 +640,27 @@
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;
private System.Windows.Forms.PictureBox btnFolderClose;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label txtInfoTitle;
private System.Windows.Forms.PictureBox pictureBox1;
- private System.Windows.Forms.Label txtInfoTip;
private System.Windows.Forms.Panel pnlInfoContent;
private System.Windows.Forms.Panel InfoDesc;
- private System.Windows.Forms.Label txtInfoDescModified;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.Label txtInfoDescType;
- 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;
+ private Engine.UI.ClassicLabel txtInfoTitle;
+ private Engine.UI.ClassicLabel txtInfoTip;
+ private Engine.UI.ClassicLabel txtInfoDescName;
+ private Engine.UI.ClassicLabel txtInfoDescType;
+ private Engine.UI.ClassicLabel classicLabel3;
+ private Engine.UI.ClassicLabel txtInfoDescModified;
+ private Engine.UI.ClassicLabel txtInfoDescSize;
+ private Engine.UI.ClassicLabel classicLabel4;
}
}
diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
index f261cb2..bc121e6 100644
--- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
+++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs
@@ -22,13 +22,12 @@ namespace Histacom2.OS.Win95.Win95Apps
{
public bool IsFileOpenDialog = false;
public bool IsFileSaveDialog = false;
- public string onlyViewExtension = "";
+ public List<string> onlyViewExtension = new List<string>();
string ToReplaceWith = ProfileDirectory;
public string CurrentDirectory = ProfileMyComputerDirectory;
string OldLabelText;
string CurrentCopyFile;
- int fileType = 6;
//string attemptedDirectory = "";
WindowManager wm = new WindowManager();
@@ -39,11 +38,6 @@ namespace Histacom2.OS.Win95.Win95Apps
void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
{
- if (SaveSystem.CurrentSave.CurrentOS == "2000")
- {
- pnlInfo.Width = 200;
- txtInfoTitle.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
- }
diskView.ImageList = new ImageList();
@@ -82,7 +76,8 @@ namespace Histacom2.OS.Win95.Win95Apps
Properties.Resources.TimeDistorter1,
Properties.Resources.WinClassicGTN,
Properties.Resources.WinClassicFTP,
- Properties.Resources.WinClassicRtfFile}); //20
+ Properties.Resources.WinClassicRtfFile, // 20
+ Properties.Resources.WinClassicAddressBookBig});
program.BringToFront();
@@ -102,21 +97,29 @@ 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";
}
}
onlyViewExtension = FileDialogBoxManager.OnlyViewExtension;
+
+ foreach (string str in onlyViewExtension)
+ cmbType.Items.Add(str);
+
+ cmbType.Text = onlyViewExtension.FirstOrDefault();
+
+ 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)));
}
//'Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs)
@@ -139,9 +142,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";
}
@@ -157,6 +160,19 @@ namespace Histacom2.OS.Win95.Win95Apps
//try {
this.mainView.Items.Clear();
+ if (CurrentDirectory == ProfileFileSystemDirectory)
+ {
+ txtInfoTitle.Text = "My Computer";
+ pictureBox1.Image = Properties.Resources.Win95ComputerIcon;
+ } else if (CurrentDirectory == ProfileMyComputerDirectory) {
+ txtInfoTitle.Text = "C:";
+ pictureBox1.Image = Properties.Resources.WinClassicDrive;
+ } else {
+ txtInfoTitle.Text = Path.GetFileName(CurrentDirectory);
+ pictureBox1.Image = Properties.Resources.WinClassicFolder;
+ }
+
+
foreach (string str in Directory.GetDirectories(CurrentDirectory))
{
string label = ReadDataFile(str, false);
@@ -172,14 +188,14 @@ namespace Histacom2.OS.Win95.Win95Apps
{
if (!(Path.GetFileName(str) == "_data.info"))
{
- if (new FileInfo(str).Extension == onlyViewExtension)
+ if (onlyViewExtension.Contains(new FileInfo(str).Extension))
{
itm = this.mainView.Items.Add(Path.GetFileName(str));
itm.Tag = str;
}
- else break;
+ else continue;
}
- else break;
+ else continue;
}
else
{
@@ -188,7 +204,7 @@ namespace Histacom2.OS.Win95.Win95Apps
itm = this.mainView.Items.Add(Path.GetFileName(str));
itm.Tag = str;
}
- else break;
+ else continue;
}
FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(CurrentDirectory, "_data.info")));
foreach (var item in fsfi.Files)
@@ -244,8 +260,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
try
{
- ReturnType(new FileInfo(fileDir).Extension);
- switch (fileType)
+ switch (ReturnType(new FileInfo(fileDir).Extension))
{
case 1:
WinClassicNotepad np = new WinClassicNotepad();
@@ -266,6 +281,19 @@ namespace Histacom2.OS.Win95.Win95Apps
case 12:
OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir), fileDir);
break;
+ case 13:
+ WinClassicAddressBook wcab = new WinClassicAddressBook();
+ wcab.AddressBookObjects = JsonConvert.DeserializeObject<List<AddressBookContactList>>(File.ReadAllText(fileDir));
+
+ wcab.treeView1.Nodes.Clear();
+ wcab.treeView1.Nodes.Add("Shared Contacts");
+ foreach (AddressBookContactList lst in wcab.AddressBookObjects)
+ wcab.UpdateTreeView(lst);
+
+ WinClassic app3 = wm.Init(wcab, "Address Book", Properties.Resources.WinClassicAddressBook, true, true);
+
+ Program.AddTaskbarItem(app3, app3.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook);
+ break;
}
}
catch
@@ -346,301 +374,97 @@ namespace Histacom2.OS.Win95.Win95Apps
}
}
- string ReturnType(string extension) {
- string returnVal = "";
- fileType = 1;
- switch (extension) {
+ int ReturnType(string extension)
+ {
+ switch (extension)
+ {
case ".txt":
- fileType = 1;
- returnVal = "Text Document \n createtext";
- break;
- case ".dat":
- fileType = 1;
- returnVal = "Text Document \n createtext";
- break;
- case ".rtf":
- fileType = 2;
- returnVal = "Rich Text Document \n createtext";
- break;
case ".cfg":
- fileType = 1;
- returnVal = "Config file \n createtext";
- break;
case ".log":
- fileType = 1;
- returnVal = "log text file \n createtext";
- break;
+ case ".ini":
case ".properties":
- fileType = 1;
- returnVal = "Config file \n createtext";
- break;
case ".json":
- fileType = 1;
- returnVal = "Config file \n createtext";
- break;
+ case ".dat":
+ return 1;
+
+ case ".rtf":
+ return 2;
+
case ".doc":
- fileType = 3;
- returnVal = "Word Document (Old) \n word";
- break;
- case ".docx":
- fileType = 3;
- returnVal = "Word Document \n word";
- break;
+ return 3;
case ".docm":
- fileType = 3;
- returnVal = "Macro-Enabled Word Document \n word";
- break;
+ return 3;
case ".xls":
- fileType = 4;
- returnVal = "Excel Spreadsheets (Old) \n excel";
- break;
- case ".xlsx":
- fileType = 4;
- returnVal = "Excel Spreadsheets \n excel";
- break;
+ return 4;
case ".ppt":
- fileType = 5;
- returnVal = "Powerpoint Presentation (Old) \n powerpoint";
- break;
- case ".pptx":
- fileType = 5;
- returnVal = "Powerpoint Presentation \n powerpoint";
- break;
+ return 5;
case ".pub":
- fileType = 7;
- returnVal = "Publisher Document \n powerpoint";
- break;
+ return 7;
case ".xps":
- fileType = 8;
- returnVal = "XPS Document \n xpsview";
- break;
+ return 8;
case ".htm":
- fileType = 9;
- returnVal = "HTML web page \n html";
- break;
+ return 9;
case ".html":
- fileType = 9;
- returnVal = "HTML web page \n html";
- break;
+ return 9;
case ".wps":
- fileType = 10;
- returnVal = "Works document \n works";
- break;
+ return 10;
case ".wmf":
- fileType = 11;
- returnVal = "Windows Metafile (A picture) \n createart";
- break;
case ".emf":
- fileType = 11;
- returnVal = "Enhanced Metafile (A picture) \n createart";
- break;
case ".png":
- fileType = 11;
- returnVal = "Picture file (Portable Network Graphics) \n createart";
- break;
case ".jpg":
- fileType = 11;
- returnVal = "Picture file \n createart";
- break;
case ".jpeg":
- fileType = 11;
- returnVal = "Picture file \n createart";
- break;
case ".gif":
- fileType = 12;
- returnVal = "Picture file \n gifman";
- break;
case ".tif":
- fileType = 11;
- returnVal = "Picture file \n createart";
- break;
case ".bmp":
- fileType = 11;
- returnVal = "Picture file \n createart";
- break;
case ".zip":
- fileType = 11;
- returnVal = "Compressed ZIP file \n winrar";
- break;
- case ".rar":
- fileType = 11;
- returnVal = "WINRAR Compressed file \n winrar";
- break;
- case ".gz":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".7z":
- fileType = 11;
- returnVal = "7ZIP file \n 7z";
- break;
- case ".ace":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".arj":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".bz2":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".gzip":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".lzh":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".tar":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".uue":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".xz":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".z":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
- case ".001":
- fileType = 11;
- returnVal = "WINRAR file \n winrar";
- break;
+ return 11;
case ".exe":
- fileType = 12;
- returnVal = "Program \n exe";
- break;
- case ".jar":
- fileType = 13;
- returnVal = "Java file \n java";
- break;
- case ".iso":
- fileType = 14;
- returnVal = "CD Image file \n iso";
- break;
+ return 12;
+ case ".wab":
+ return 13;
case ".avi":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m4v":
- fileType = 15;
- returnVal = "Video (MPEG-4) \n video";
- break;
case ".mp4":
- fileType = 15;
- returnVal = "Video (MPEG-4) \n video";
- break;
case ".wmv":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m2v":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m3u":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mts":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".dv":
- fileType = 15;
- returnVal = "Video (Digital Video) \n video";
- break;
case ".flv":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m1v":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m2ts":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mkv":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mov":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mpeg4":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mpeg":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".mpg":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".3gp":
- fileType = 15;
- returnVal = "Video \n video";
- break;
case ".m4p":
- fileType = 15;
- returnVal = "Video \n video";
- break;
+ return 15;
+
case ".mp2":
- fileType = 21;
- returnVal = "Audio \n video";
- break;
case ".mp3":
- fileType = 21;
- returnVal = "Audio \n video";
- break;
case ".wav":
- fileType = 21;
- returnVal = "Audio \n video";
- break;
+ return 21;
case ".nls":
- fileType = 16;
- returnVal = "Font file \n font";
- break;
+ return 16;
case ".dll":
- fileType = 17;
- returnVal = "System File \n sys";
- break;
+ return 17;
case ".bat":
- fileType = 18;
- returnVal = "MS-DOS Batch file \n winterm";
- break;
+ return 18;
case ".url":
- fileType = 19;
- returnVal = "Shortcut \n short";
- break;
+ return 19;
case ".sh":
- fileType = 20;
- returnVal = "BASH file \n winterm";
- break;
+ return 20;
case ".win":
- fileType = 17;
- returnVal = "System file \n sys";
- break;
+ return 17;
}
- return returnVal;
+ return 0;
}
- //Private Sub windows_explorer_Closed(sender As Object, e As EventArgs) Handles Me.Closed
- // IsFileDialog = False
- //End Sub
+ //Private Sub windows_explorer_Closed(sender As Object, e As EventArgs) Handles Me.Closed
+ // IsFileDialog = False
+ //End Sub
void mainView_DoubleClick(object sender, EventArgs e)
{
@@ -655,9 +479,9 @@ 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)
+ if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension))
{
Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
}
@@ -669,9 +493,7 @@ namespace Histacom2.OS.Win95.Win95Apps
((Form)this.TopLevelControl).Close();
}
else
- {
OpenFile(mainView.FocusedItem.Tag.ToString());
- }
}
} catch { /* TODO: Illegal operation */ }
}
@@ -682,7 +504,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
if (diskView.SelectedNode != null)
{
- if (diskView.SelectedNode.Text == "My Computer")
+ if (diskView.SelectedNode.Text == "My Computer" || diskView.SelectedNode.Text == "Desktop")
{
GoToDir(ProfileFileSystemDirectory);
}
@@ -696,11 +518,7 @@ namespace Histacom2.OS.Win95.Win95Apps
{
// It is a directory:
- try
- {
- GoToDir(diskView.SelectedNode.Tag.ToString());
- }
- catch { }
+ GoToDir(diskView.SelectedNode.Tag.ToString());
}
}
}
@@ -734,41 +552,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)
- {
+ if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension)) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
- 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 +732,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 +776,7 @@ namespace Histacom2.OS.Win95.Win95Apps
}
}
- if (recognized == true)
+ if (recognized)
{
// TODO:
} else {
@@ -981,7 +784,7 @@ namespace Histacom2.OS.Win95.Win95Apps
FileInfo fi = new FileInfo(Path.Combine(CurrentDirectory, mainView.FocusedItem.Text));
txtInfoDescName.Text = mainView.FocusedItem.Text;
- txtInfoDescType.Text = ReturnType(fi.Extension).Split('\n')[0];
+ txtInfoDescType.Text = GetDescription(ReturnType(fi.Extension));
txtInfoDescModified.Text = fi.CreationTime.ToString();
txtInfoDescSize.Show();
@@ -1003,6 +806,50 @@ namespace Histacom2.OS.Win95.Win95Apps
}
}
+ public string GetDescription(int type)
+ {
+ switch (type)
+ {
+ case 1:
+ return "Text Document";
+ case 2:
+ return "Rich Text Document";
+ case 3:
+ return "Word Document";
+ case 4:
+ return "Excel Document";
+ case 5:
+ return "Powerpoint Document";
+ case 7:
+ return "Publisher Document";
+ case 8:
+ return "XPS File";
+ case 9:
+ return "HTML Document";
+ case 10:
+ return "Microsoft Works Document";
+ case 11:
+ return "Image File";
+ case 12:
+ return "Executable File";
+ case 13:
+ return "Address Book File";
+ case 21:
+ return "Video File";
+ case 16:
+ case 17:
+ return "System File";
+ case 18:
+ return "Batch File";
+ case 19:
+ return "Online Shortcut";
+ case 20:
+ return "Bash Script";
+
+ }
+ return "File";
+ }
+
private void CutCtrlXToolStripMenuItem_Click(object sender, EventArgs e)
{
try
@@ -1137,5 +984,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 (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension)) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
+
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
+
+ ((Form)this.TopLevelControl).Close();
+ }
+ }
+ catch { }
+ }
}
}
diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx
index e1edd06..3b47ace 100644
--- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx
+++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx
@@ -120,6 +120,15 @@
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
+ <data name="cmbType.Items" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>
+ AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
+ ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
+ PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
+ AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
+ ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs=
+</value>
+ </data>
<metadata name="refresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>