aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/OS/Win98
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/Win98
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/Win98')
-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
6 files changed, 543 insertions, 459 deletions
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>