From 6ab1468786f1e865e9ff408d32149f9c9620d844 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 4 Nov 2017 09:43:02 +0000 Subject: Fix bugs ...and get rid of all == false and == true --- .../WinClassicWindowsExplorer.Designer.cs | 135 +++++++++++++++------ .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 82 ++++++++----- 2 files changed, 144 insertions(+), 73 deletions(-) (limited to 'Histacom2/OS/Win98/Win98Apps') diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs index af2570c..f88d451 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs @@ -52,9 +52,12 @@ this.bottomleftcorner = new System.Windows.Forms.Panel(); this.topleftcorner = new System.Windows.Forms.Panel(); this.pnlSave = new System.Windows.Forms.Panel(); - this.Button1 = new System.Windows.Forms.Button(); - this.Label1 = new System.Windows.Forms.Label(); - this.txtSave = new System.Windows.Forms.TextBox(); + this.btnCanc = new Histacom2.Engine.UI.ClassicButton(); + this.cmbType = new Histacom2.Engine.UI.ClassicDropDown(); + this.txtSave = new Histacom2.Engine.UI.ClassicTextBox(); + this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel(); + this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel(); + this.btnSave = new Histacom2.Engine.UI.ClassicButton(); this.MenuStrip1 = new System.Windows.Forms.MenuStrip(); this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -112,7 +115,7 @@ this.mainView.Dock = System.Windows.Forms.DockStyle.Fill; this.mainView.Location = new System.Drawing.Point(396, 24); this.mainView.Name = "mainView"; - this.mainView.Size = new System.Drawing.Size(308, 458); + this.mainView.Size = new System.Drawing.Size(308, 439); this.mainView.TabIndex = 10; this.mainView.UseCompatibleStateImageBehavior = false; this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit); @@ -130,7 +133,7 @@ this.pnlInfo.Dock = System.Windows.Forms.DockStyle.Left; this.pnlInfo.Location = new System.Drawing.Point(196, 24); this.pnlInfo.Name = "pnlInfo"; - this.pnlInfo.Size = new System.Drawing.Size(200, 458); + this.pnlInfo.Size = new System.Drawing.Size(200, 439); this.pnlInfo.TabIndex = 19; // // pictureBox1 @@ -165,7 +168,7 @@ this.pnlInfoContent.Controls.Add(this.txtInfoTip); this.pnlInfoContent.Location = new System.Drawing.Point(0, 95); this.pnlInfoContent.Name = "pnlInfoContent"; - this.pnlInfoContent.Size = new System.Drawing.Size(199, 362); + this.pnlInfoContent.Size = new System.Drawing.Size(199, 343); this.pnlInfoContent.TabIndex = 22; // // InfoDesc @@ -245,7 +248,7 @@ this.pnlFolders.Dock = System.Windows.Forms.DockStyle.Left; this.pnlFolders.Location = new System.Drawing.Point(0, 24); this.pnlFolders.Name = "pnlFolders"; - this.pnlFolders.Size = new System.Drawing.Size(196, 458); + this.pnlFolders.Size = new System.Drawing.Size(196, 439); this.pnlFolders.TabIndex = 0; // // diskView @@ -253,7 +256,7 @@ this.diskView.Dock = System.Windows.Forms.DockStyle.Fill; this.diskView.Location = new System.Drawing.Point(0, 22); this.diskView.Name = "diskView"; - this.diskView.Size = new System.Drawing.Size(196, 436); + this.diskView.Size = new System.Drawing.Size(196, 417); this.diskView.TabIndex = 13; this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect); // @@ -325,45 +328,95 @@ // // pnlSave // - this.pnlSave.Controls.Add(this.Button1); - this.pnlSave.Controls.Add(this.Label1); + this.pnlSave.Controls.Add(this.btnCanc); + this.pnlSave.Controls.Add(this.cmbType); this.pnlSave.Controls.Add(this.txtSave); + this.pnlSave.Controls.Add(this.classicLabel2); + this.pnlSave.Controls.Add(this.classicLabel1); + this.pnlSave.Controls.Add(this.btnSave); this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlSave.Location = new System.Drawing.Point(0, 482); + this.pnlSave.Location = new System.Drawing.Point(0, 463); this.pnlSave.Name = "pnlSave"; - this.pnlSave.Size = new System.Drawing.Size(704, 35); + this.pnlSave.Size = new System.Drawing.Size(704, 54); this.pnlSave.TabIndex = 18; this.pnlSave.Visible = false; // - // Button1 - // - this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.Button1.Location = new System.Drawing.Point(626, 3); - this.Button1.Name = "Button1"; - this.Button1.Size = new System.Drawing.Size(75, 23); - this.Button1.TabIndex = 17; - this.Button1.Text = "Save"; - this.Button1.UseVisualStyleBackColor = true; - this.Button1.Click += new System.EventHandler(this.Button1_Click); - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.Location = new System.Drawing.Point(3, 6); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(57, 13); - this.Label1.TabIndex = 16; - this.Label1.Text = "File Name:"; + // btnCanc + // + this.btnCanc.AdaptBackColorWithTheme = true; + this.btnCanc.AdaptFontWithTheme = true; + this.btnCanc.AdaptForeColorWithTheme = true; + this.btnCanc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnCanc.BackColor = System.Drawing.Color.Silver; + this.btnCanc.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnCanc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.btnCanc.ForeColor = System.Drawing.Color.Black; + this.btnCanc.Location = new System.Drawing.Point(619, 28); + this.btnCanc.Name = "btnCanc"; + this.btnCanc.Size = new System.Drawing.Size(75, 25); + this.btnCanc.TabIndex = 30; + this.btnCanc.Text = "Cancel"; + this.btnCanc.Click += new System.EventHandler(this.btnCanc_Click); + // + // cmbType + // + this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cmbType.BackColor = System.Drawing.Color.White; + this.cmbType.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.cmbType.Location = new System.Drawing.Point(64, 32); + this.cmbType.Name = "cmbType"; + this.cmbType.Size = new System.Drawing.Size(549, 20); + this.cmbType.TabIndex = 29; + this.cmbType.UseSystemPasswordChar = false; // // txtSave // - this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtSave.Location = new System.Drawing.Point(60, 3); + this.txtSave.BackColor = System.Drawing.Color.White; + this.txtSave.Location = new System.Drawing.Point(64, 7); this.txtSave.Name = "txtSave"; - this.txtSave.Size = new System.Drawing.Size(560, 20); - this.txtSave.TabIndex = 15; + this.txtSave.Size = new System.Drawing.Size(549, 20); + this.txtSave.TabIndex = 28; + this.txtSave.UseSystemPasswordChar = false; + // + // classicLabel2 + // + this.classicLabel2.DropShadow = false; + this.classicLabel2.Location = new System.Drawing.Point(11, 33); + this.classicLabel2.Name = "classicLabel2"; + this.classicLabel2.Size = new System.Drawing.Size(64, 13); + this.classicLabel2.TabIndex = 26; + this.classicLabel2.Text = "File type:"; + // + // classicLabel1 + // + this.classicLabel1.DropShadow = false; + this.classicLabel1.Location = new System.Drawing.Point(11, 7); + this.classicLabel1.Name = "classicLabel1"; + this.classicLabel1.Size = new System.Drawing.Size(64, 13); + this.classicLabel1.TabIndex = 27; + this.classicLabel1.Text = "File name:"; + // + // btnSave + // + this.btnSave.AdaptBackColorWithTheme = true; + this.btnSave.AdaptFontWithTheme = true; + this.btnSave.AdaptForeColorWithTheme = true; + this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSave.BackColor = System.Drawing.Color.Silver; + this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.btnSave.ForeColor = System.Drawing.Color.Black; + this.btnSave.Location = new System.Drawing.Point(619, 2); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(75, 25); + this.btnSave.TabIndex = 25; + this.btnSave.Text = "Save"; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); // // MenuStrip1 // @@ -553,7 +606,6 @@ this.pnlFoldersTop.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.btnFolderClose)).EndInit(); this.pnlSave.ResumeLayout(false); - this.pnlSave.PerformLayout(); this.MenuStrip1.ResumeLayout(false); this.MenuStrip1.PerformLayout(); this.ResumeLayout(false); @@ -590,9 +642,6 @@ internal System.Windows.Forms.Panel topleftcorner; internal System.Windows.Forms.ListView mainView; internal System.Windows.Forms.Panel pnlSave; - internal System.Windows.Forms.Button Button1; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.TextBox txtSave; private System.Windows.Forms.Panel pnlInfo; private System.Windows.Forms.Panel pnlFolders; private System.Windows.Forms.Panel pnlFoldersTop; @@ -609,5 +658,11 @@ private System.Windows.Forms.Label txtInfoDescName; private System.Windows.Forms.Label txtInfoDescSize; private System.Windows.Forms.Timer refresh; + private Engine.UI.ClassicButton btnCanc; + private Engine.UI.ClassicDropDown cmbType; + private Engine.UI.ClassicTextBox txtSave; + private Engine.UI.ClassicLabel classicLabel2; + private Engine.UI.ClassicLabel classicLabel1; + private Engine.UI.ClassicButton btnSave; } } diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index f261cb2..5cc075e 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -102,17 +102,17 @@ namespace Histacom2.OS.Win95.Win95Apps IsFileSaveDialog = true; } - if (IsFileOpenDialog == true) + if (IsFileOpenDialog) { pnlSave.Show(); - Button1.Text = "Open"; + btnSave.Text = "Open"; } else { - if (IsFileSaveDialog == true) + if (IsFileSaveDialog) { pnlSave.Show(); - Button1.Text = "Save"; + btnSave.Text = "Save"; } } @@ -139,9 +139,9 @@ namespace Histacom2.OS.Win95.Win95Apps FileSystemFolderInfo toRead = new FileSystemFolderInfo(); toRead = JsonConvert.DeserializeObject(directoryFileInfo); - if (returnYesIfProtected == true) + if (returnYesIfProtected) { - if (toRead.IsProtected == true) + if (toRead.IsProtected) { return "yes"; } @@ -655,7 +655,7 @@ namespace Histacom2.OS.Win95.Win95Apps } else { // If it is a file - if (IsFileOpenDialog == true || IsFileSaveDialog == true) + if (IsFileOpenDialog || IsFileSaveDialog) { if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) { @@ -734,41 +734,26 @@ namespace Histacom2.OS.Win95.Win95Apps { try { - bool OpenFile = false; if (mainView.FocusedItem != null) { - if ((string)mainView.FocusedItem.Tag == "") + if (mainView.FocusedItem.Tag.ToString() == "") { // If it isn't a file GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString())); } - else OpenFile = true; // If it is a file + else txtSave.Text = mainView.FocusedItem.Tag.ToString(); } - else OpenFile = true; - if (OpenFile == true) + if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK); + else { - if (txtSave.Text == "") - { - wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK); - } - else - { - if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) - { - - Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text); - - } + if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text); + FileDialogBoxManager.IsInOpenDialog = false; + FileDialogBoxManager.IsInSaveDialog = false; - FileDialogBoxManager.IsInOpenDialog = false; - FileDialogBoxManager.IsInSaveDialog = false; - - ((Form)this.TopLevelControl).Close(); - } + ((Form)this.TopLevelControl).Close(); } - } catch { - } + catch { } } private void DeleteToolStripMenuItem_Click(object sender, EventArgs e) @@ -929,7 +914,7 @@ namespace Histacom2.OS.Win95.Win95Apps private void FoldersToolStripMenuItem_Click(object sender, EventArgs e) { - if (FoldersToolStripMenuItem.Checked == true) + if (FoldersToolStripMenuItem.Checked) { FoldersToolStripMenuItem.Checked = false; pnlFolders.Hide(); @@ -973,7 +958,7 @@ namespace Histacom2.OS.Win95.Win95Apps } } - if (recognized == true) + if (recognized) { // TODO: } else { @@ -1137,5 +1122,36 @@ namespace Histacom2.OS.Win95.Win95Apps item.Selected = true; } } + + private void btnCanc_Click(object sender, EventArgs e) + { + ((Form)this.TopLevelControl).Close(); + } + + private void btnSave_Click(object sender, EventArgs e) + { + try + { + if (mainView.FocusedItem != null) + { + if (mainView.FocusedItem.Tag.ToString() == "") + { // If it isn't a file + GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString())); + } + else txtSave.Text = mainView.FocusedItem.Tag.ToString(); + } + if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK); + else + { + if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text); + + FileDialogBoxManager.IsInOpenDialog = false; + FileDialogBoxManager.IsInSaveDialog = false; + + ((Form)this.TopLevelControl).Close(); + } + } + catch { } + } } } -- cgit v1.2.3 From e7a1221130047f442ae7fb36ab399eca51d0ba33 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 4 Nov 2017 09:56:30 +0000 Subject: Fix moar bugs --- .../AddressBook/WinClassicAddressBook.Designer.cs | 23 +++++++-------- .../Win98Apps/AddressBook/WinClassicAddressBook.cs | 5 ++++ Histacom2/Program.cs | 4 +-- Histacom2/TitleScreen.cs | 33 ---------------------- 4 files changed, 19 insertions(+), 46 deletions(-) (limited to 'Histacom2/OS/Win98/Win98Apps') diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs index cbe2600..85bccf0 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs @@ -105,67 +105,67 @@ // 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..."; // // 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..."; // // 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); // @@ -304,6 +304,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 // diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index ccd22f0..c4c6960 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -275,6 +275,11 @@ namespace Histacom2.OS.Win95.Win95Apps { ((Form)this.TopLevelControl).Close(); } + + private void toolNew_Click(object sender, EventArgs e) + { + newContext.Show(); + } } public class AddressBookContact diff --git a/Histacom2/Program.cs b/Histacom2/Program.cs index 97fee5f..e19c770 100644 --- a/Histacom2/Program.cs +++ b/Histacom2/Program.cs @@ -96,8 +96,8 @@ namespace Histacom2 public static void AddTaskbarItem(Form Application, string ApplicationID, string ApplicationName, Image ApplicationIcon) { - TitleScreen.frm95.AddTaskBarItem(Application, ApplicationID, ApplicationName, ApplicationIcon); - TitleScreen.frm98.AddTaskBarItem(Application, ApplicationID, ApplicationName, ApplicationIcon); + if (TitleScreen.frm95 != null) TitleScreen.frm95.AddTaskBarItem(Application, ApplicationID, ApplicationName, ApplicationIcon); + if (TitleScreen.frm98 != null) TitleScreen.frm98.AddTaskBarItem(Application, ApplicationID, ApplicationName, ApplicationIcon); } public static void NonImportantApp_Closing(object sender, FormClosingEventArgs e) diff --git a/Histacom2/TitleScreen.cs b/Histacom2/TitleScreen.cs index 4108204..ef235cf 100644 --- a/Histacom2/TitleScreen.cs +++ b/Histacom2/TitleScreen.cs @@ -149,23 +149,6 @@ namespace Histacom2 HelpToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); ShutdownToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); } - -<<<<<<< HEAD - private static void leet() - { - WindowManager wm = new WindowManager(); - UserControl leet = new UserControl(); - leet.Width = 500; - leet.Height = 500; - Label label1 = new Label(); - label1.Parent = leet; - label1.AutoSize = true; - label1.Text = "Thank you for making Histacom2 possible."; - wm.Init(leet, "Thank You", null, true, true); - } - -======= ->>>>>>> 382f0167714bbcad00ab710fe7dcfa05eaeb88ac #region Menu Buttons #region NewGame @@ -275,21 +258,5 @@ namespace Histacom2 AchievementScreen achievelist = new AchievementScreen(); achievelist.ShowDialog(); } - - private void vm_mode_CheckStateChanged(object sender, EventArgs e) - { - // Check for VM mode - if (vm_mode.Checked) - { - VM_Width.Visible = true; - VM_Height.Visible = true; - } - // If VM Mode is disabled - else - { - VM_Width.Visible = false; - VM_Height.Visible = false; - } - } } } -- cgit v1.2.3 From fd13d9d4f6484a0ad29556d2c1b6b9871066a385 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 4 Nov 2017 10:51:45 +0000 Subject: Made code neater and fixed Address Book bugs! --- .../OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 199 ++----------- .../AddressBook/WinClassicAddressBook.Designer.cs | 23 +- .../Win98Apps/AddressBook/WinClassicAddressBook.cs | 63 ++-- .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 321 +++++---------------- 4 files changed, 162 insertions(+), 444 deletions(-) (limited to 'Histacom2/OS/Win98/Win98Apps') diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index 8f946ab..4efdd6f 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -397,228 +397,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 diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs index 85bccf0..20f5af2 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs @@ -105,67 +105,67 @@ // newContactToolStripMenuItem // this.newContactToolStripMenuItem.Name = "newContactToolStripMenuItem"; - this.newContactToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.newContactToolStripMenuItem.Size = new System.Drawing.Size(150, 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(152, 22); + this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(150, 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(149, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(147, 6); // // propertiesToolStripMenuItem // this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem"; - this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(150, 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(152, 22); + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(150, 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(149, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(147, 6); // // importToolStripMenuItem // this.importToolStripMenuItem.Name = "importToolStripMenuItem"; - this.importToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.importToolStripMenuItem.Size = new System.Drawing.Size(150, 22); this.importToolStripMenuItem.Text = "Import..."; // // exportToolStripMenuItem // this.exportToolStripMenuItem.Name = "exportToolStripMenuItem"; - this.exportToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exportToolStripMenuItem.Size = new System.Drawing.Size(150, 22); this.exportToolStripMenuItem.Text = "Export..."; // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); + this.toolStripSeparator3.Size = new System.Drawing.Size(147, 6); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(147, 6); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(150, 22); this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // @@ -247,6 +247,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 // diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index c4c6960..0c6701a 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -42,7 +42,7 @@ namespace Histacom2.OS.Win95.Win95Apps { new AddressBookContactList() { - AttachedNode = treeView1.Nodes[0].Text, + AttachedNode = treeView1.Nodes[0].Text } }; } @@ -82,17 +82,8 @@ namespace Histacom2.OS.Win95.Win95Apps { 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); } } } @@ -182,9 +173,16 @@ namespace Histacom2.OS.Win95.Win95Apps { 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; + } } } } @@ -228,22 +226,38 @@ namespace Histacom2.OS.Win95.Win95Apps void DeleteContact() { - if (treeView1.SelectedNode != null) + try { - foreach (AddressBookContactList ContactList in AddressBookObjects) + if (treeView1.SelectedNode != null) { - if (ContactList.AttachedNode == treeView1.SelectedNode.Text) + foreach (AddressBookContactList ContactList in AddressBookObjects) { - foreach (AddressBookContact Contact in ContactList.Contacts) + if (ContactList.AttachedNode == treeView1.SelectedNode.Text) { - if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) + foreach (AddressBookContact Contact in ContactList.Contacts) { - ContactList.Contacts.Remove(Contact); + 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); + UpdateContactListFromNodeName("Shared Contacts"); + } + } + else + { + if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) + { + ContactList.Contacts.Remove(Contact); + } + } } } } } - } + } catch { } } private void toolDelete_Click(object sender, EventArgs e) @@ -278,7 +292,12 @@ namespace Histacom2.OS.Win95.Win95Apps private void toolNew_Click(object sender, EventArgs e) { - newContext.Show(); + newContext.Show(MousePosition); + } + + private void aboutAddressBookToolStripMenuItem_Click(object sender, EventArgs e) + { + } } diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index 5cc075e..c7369b4 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -346,301 +346,96 @@ 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 ".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) { @@ -966,7 +761,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(); @@ -988,6 +783,48 @@ 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 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 -- cgit v1.2.3 From 4af08fc6e341a45158e23beb13be10aa1a6a3590 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 4 Nov 2017 11:09:57 +0000 Subject: Slight SaveSystem change... read the description WARNING: FROM THIS POINT ON ALL OLD SAVES ARE OUTDATED AND WILL NOT WORK kthx --- Histacom2.Engine/SaveSystem.cs | 3 +++ .../AddressBook/WinClassicAddressBook.Designer.cs | 23 +++++++++++----------- .../Win98Apps/AddressBook/WinClassicAddressBook.cs | 19 ++++++++++++++++++ 3 files changed, 34 insertions(+), 11 deletions(-) (limited to 'Histacom2/OS/Win98/Win98Apps') diff --git a/Histacom2.Engine/SaveSystem.cs b/Histacom2.Engine/SaveSystem.cs index 0975a2b..a3fd2ef 100644 --- a/Histacom2.Engine/SaveSystem.cs +++ b/Histacom2.Engine/SaveSystem.cs @@ -190,6 +190,7 @@ namespace Histacom2.Engine public static void CreateWindowsDirectory() { + SaveDirectoryInfo(ProfileWindowsDirectory, "Application Data", true, "Application Data", true); SaveDirectoryInfo(ProfileWindowsDirectory, "System", true, "System", true); SaveDirectoryInfo(ProfileWindowsDirectory, "Config", true, "Config", true); SaveDirectoryInfo(ProfileWindowsDirectory, "Cursors", true, "Cursors", true); @@ -337,6 +338,8 @@ namespace Histacom2.Engine // Add Address Book into existance! SaveDirectoryInfo(ProfileProgramsDirectory, "Outlook Express", false, "Outlook Express", true); + SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Application Data"), "Microsoft", false, "Microsoft", true); + SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Application Data", "Microsoft"), "Address Book", false, "Address Book", true); CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), "WAB.exe", "addressbook", 8, 512); // There is no "The Microsoft Network" folder! diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs index 20f5af2..09030fb 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs @@ -105,67 +105,67 @@ // 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..."; // // 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..."; // // 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); // @@ -350,6 +350,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); diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index 0c6701a..e4d6c7b 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -299,6 +299,25 @@ namespace Histacom2.OS.Win95.Win95Apps { } + + private void WinClassicAddressBook_Load(object sender, EventArgs e) + { + ((Form)this.TopLevelControl).FormClosed += (sender2, e2) => + { + SaveData(); + }; + } + + public void SaveData() + { + + } + + public void SaveDataAs() + { + + } + } public class AddressBookContact -- cgit v1.2.3 From cc07981aa3603c74507c9ea0acb6dd0d8418d58e Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 4 Nov 2017 17:48:05 +0000 Subject: Address Book can now save data! --- Histacom2.Engine/FileDialogBoxManager.cs | 12 +- Histacom2.Engine/UI/ClassicDropDown.cs | 4 +- .../OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 21 ++- .../FRMWinClassicAddressBookNewContact.cs | 8 +- .../AddressBook/WinClassicAddressBook.Designer.cs | 2 + .../Win98Apps/AddressBook/WinClassicAddressBook.cs | 157 +++++++++++++++++---- .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 51 ++++--- 7 files changed, 180 insertions(+), 75 deletions(-) (limited to 'Histacom2/OS/Win98/Win98Apps') diff --git a/Histacom2.Engine/FileDialogBoxManager.cs b/Histacom2.Engine/FileDialogBoxManager.cs index 9f0b2ce..d4d025c 100644 --- a/Histacom2.Engine/FileDialogBoxManager.cs +++ b/Histacom2.Engine/FileDialogBoxManager.cs @@ -12,27 +12,27 @@ namespace Histacom2.Engine { public static bool IsInOpenDialog = false; public static bool IsInSaveDialog = false; - public static string OnlyViewExtension = ""; + public static List OnlyViewExtension = new List(); - public static void ActivateOpenFileDialog(string ExtensionToView) + public static void ActivateOpenFileDialog(params string[] ExtensionToView) { IsInOpenDialog = true; IsInSaveDialog = false; - OnlyViewExtension = ExtensionToView; + OnlyViewExtension = ExtensionToView.ToList(); } - public static void ActivateSaveFileDialog(string ExtensionToView) + public static void ActivateSaveFileDialog(params string[] ExtensionToView) { IsInOpenDialog = false; IsInSaveDialog = true; - OnlyViewExtension = ExtensionToView; + OnlyViewExtension = ExtensionToView.ToList(); } public static void DeactivateFileDialog() { IsInOpenDialog = false; IsInSaveDialog = false; - OnlyViewExtension = ""; + OnlyViewExtension = new List(); } public static string ReadTextFile(string path) diff --git a/Histacom2.Engine/UI/ClassicDropDown.cs b/Histacom2.Engine/UI/ClassicDropDown.cs index 93b4a62..edf2268 100644 --- a/Histacom2.Engine/UI/ClassicDropDown.cs +++ b/Histacom2.Engine/UI/ClassicDropDown.cs @@ -34,7 +34,7 @@ namespace Histacom2.Engine.UI public static Color _lightBack = Color.Silver; public static Color _darkBack = Color.Silver; - public List items = new List { "TestItem" }; + public List Items { get; set; } = new List(); public ClassicDropDown() { @@ -117,7 +117,7 @@ namespace Histacom2.Engine.UI } else { thisOverlay = new DropDownOverlay(); int applyHeight = 0; - foreach (string str in items) + foreach (string str in Items) { DropDownItem itm = new DropDownItem(); itm.ChangeText(str, Font); diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index 4efdd6f..1ac4512 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -22,14 +22,12 @@ namespace Histacom2.OS.Win95.Win95Apps { public bool IsFileOpenDialog = false; public bool IsFileSaveDialog = false; - public string onlyViewExtension = ""; + public List onlyViewExtension = new List(); string ToReplaceWith = ProfileDirectory; public string CurrentDirectory = ProfileMyComputerDirectory; string OldLabelText; string CurrentCopyFile; - - int fileType = 6; //string attemptedDirectory = ""; WindowManager wm = new WindowManager(); @@ -89,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.WinClassicAddressBook}); program.BringToFront(); @@ -124,6 +123,9 @@ namespace Histacom2.OS.Win95.Win95Apps } onlyViewExtension = FileDialogBoxManager.OnlyViewExtension; + + foreach (string str in onlyViewExtension) + cmbType.Items.Add(str); } string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) { @@ -162,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; @@ -232,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(); @@ -501,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); } @@ -513,9 +514,7 @@ namespace Histacom2.OS.Win95.Win95Apps ((Form)this.TopLevelControl).Close(); } else - { OpenFile(mainView.FocusedItem.Tag.ToString()); - } } } catch { /* TODO: Illegal operation */ } } @@ -595,7 +594,7 @@ namespace Histacom2.OS.Win95.Win95Apps 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; 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 09030fb..5452184 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs @@ -145,12 +145,14 @@ this.importToolStripMenuItem.Name = "importToolStripMenuItem"; 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(152, 22); this.exportToolStripMenuItem.Text = "Export..."; + this.exportToolStripMenuItem.Click += new System.EventHandler(this.exportToolStripMenuItem_Click); // // toolStripSeparator3 // diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index e4d6c7b..bf4f648 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,14 +90,15 @@ 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) { @@ -97,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(); @@ -145,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); @@ -169,7 +203,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) { @@ -195,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,31 +262,31 @@ namespace Histacom2.OS.Win95.Win95Apps { try { - if (treeView1.SelectedNode != null) + foreach (AddressBookContactList ContactList in AddressBookObjects) { - foreach (AddressBookContactList ContactList in AddressBookObjects) + if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode)) { - if (ContactList.AttachedNode == treeView1.SelectedNode.Text) + foreach (AddressBookContact Contact in ContactList.Contacts) { - foreach (AddressBookContact Contact in ContactList.Contacts) - { - 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); - UpdateContactListFromNodeName("Shared Contacts"); - } - } - else - { - 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) { - ContactList.Contacts.Remove(Contact); + AddressBookObjects.Remove(ContactList); + treeView1.Nodes.Remove(treeView1.SelectedNode); + previousParent = null; + UpdateContactListFromNodeName(treeView1.Nodes[0]); } - } + } + else + { + if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) + { + ContactList.Contacts.Remove(Contact); + previousParent = treeView1.SelectedNode.Parent; + UpdateContactListFromNodeName(treeView1.SelectedNode); + } } } } @@ -310,14 +344,75 @@ namespace Histacom2.OS.Win95.Win95Apps 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>(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>(File.ReadAllText(selectedPath)); + foreach (AddressBookContactList lst in AddressBookObjects) + UpdateTreeView(lst); } + TreeNode UpdatePrevParent; + public void UpdateTreeView(AddressBookContactList lst, int count = 0) + { + try + { + string[] 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 @@ -330,7 +425,7 @@ namespace Histacom2.OS.Win95.Win95Apps public class AddressBookContactList { - public string AttachedNode; + public string NodePath; public List Contacts = new List(); } } diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index c7369b4..947f9ba 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 onlyViewExtension = new List(); string ToReplaceWith = ProfileDirectory; public string CurrentDirectory = ProfileMyComputerDirectory; string OldLabelText; string CurrentCopyFile; - int fileType = 6; //string attemptedDirectory = ""; WindowManager wm = new WindowManager(); @@ -82,7 +81,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.WinClassicAddressBook}); program.BringToFront(); @@ -117,6 +117,11 @@ namespace Histacom2.OS.Win95.Win95Apps } onlyViewExtension = FileDialogBoxManager.OnlyViewExtension; + + foreach (string str in onlyViewExtension) + cmbType.Items.Add(str); + + cmbType.Text = onlyViewExtension.FirstOrDefault(); } //'Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) @@ -157,6 +162,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.WinClassicFolderSmall; // TODO: ADD DRIVE ICON + } else { + txtInfoTitle.Text = Path.GetFileName(CurrentDirectory); + pictureBox1.Image = Properties.Resources.WinClassicFolderSmall; + } + + foreach (string str in Directory.GetDirectories(CurrentDirectory)) { string label = ReadDataFile(str, false); @@ -172,14 +190,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 +206,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(File.ReadAllText(Path.Combine(CurrentDirectory, "_data.info"))); foreach (var item in fsfi.Files) @@ -244,8 +262,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(); @@ -452,7 +469,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); } @@ -464,9 +481,7 @@ namespace Histacom2.OS.Win95.Win95Apps ((Form)this.TopLevelControl).Close(); } else - { OpenFile(mainView.FocusedItem.Tag.ToString()); - } } } catch { /* TODO: Illegal operation */ } } @@ -477,7 +492,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); } @@ -491,11 +506,7 @@ namespace Histacom2.OS.Win95.Win95Apps { // It is a directory: - try - { - GoToDir(diskView.SelectedNode.Tag.ToString()); - } - catch { } + GoToDir(diskView.SelectedNode.Tag.ToString()); } } } @@ -540,7 +551,7 @@ namespace Histacom2.OS.Win95.Win95Apps 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; @@ -980,7 +991,7 @@ namespace Histacom2.OS.Win95.Win95Apps 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; -- cgit v1.2.3 From 1cdbf9659b0153285bb56bd35ab58e0a70f4d632 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 4 Nov 2017 22:00:05 +0000 Subject: Final commit! --- Histacom2.Engine/UI/ClassicDropDown.cs | 13 +- Histacom2.Engine/UI/ClassicTextBox.Designer.cs | 8 +- Histacom2.Engine/UI/ClassicTextbox.cs | 14 +- Histacom2/Histacom2.csproj | 3 + .../OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 2 +- .../Win95Apps/WinClassicFTPClient.Designer.cs | 217 +++++++++++---------- .../OS/Win95/Win95Apps/WinClassicFTPClient.cs | 6 +- .../OS/Win95/Win95Apps/WinClassicFTPClient.resx | 2 +- .../AddressBook/WinClassicAddressBook.Designer.cs | 2 +- .../Win98Apps/AddressBook/WinClassicAddressBook.cs | 7 +- .../WinClassicWindowsExplorer.Designer.cs | 150 +++++++------- .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 32 ++- .../Win98/Win98Apps/WinClassicWindowsExplorer.resx | 9 + Histacom2/Properties/Resources.resx | 6 + Histacom2/Properties/Resources1.Designer.cs | 26 ++- Histacom2/Resources/WinClassicAddressBookBig.png | Bin 0 -> 2146 bytes Histacom2/Resources/WinClassicDrive.png | Bin 0 -> 238 bytes Histacom2/Resources/addrbook.ico_32x32[1].png | Bin 0 -> 2146 bytes 18 files changed, 294 insertions(+), 203 deletions(-) create mode 100644 Histacom2/Resources/WinClassicAddressBookBig.png create mode 100644 Histacom2/Resources/WinClassicDrive.png create mode 100644 Histacom2/Resources/addrbook.ico_32x32[1].png (limited to 'Histacom2/OS/Win98/Win98Apps') diff --git a/Histacom2.Engine/UI/ClassicDropDown.cs b/Histacom2.Engine/UI/ClassicDropDown.cs index edf2268..e01ca2a 100644 --- a/Histacom2.Engine/UI/ClassicDropDown.cs +++ b/Histacom2.Engine/UI/ClassicDropDown.cs @@ -14,7 +14,6 @@ namespace Histacom2.Engine.UI public partial class ClassicDropDown : UserControl { public DropDownOverlay thisOverlay = new DropDownOverlay(); - public bool UseSystemPasswordChar { get; set; } public bool dropDownShown; public override string Text @@ -29,6 +28,18 @@ namespace Histacom2.Engine.UI } } + public bool UseSystemPasswordChar + { + get + { + return textBox1.UseSystemPasswordChar; + } + set + { + textBox1.UseSystemPasswordChar = value; + } + } + public static Color textboxcolor = Color.Black; public static Color _lightBack = Color.Silver; diff --git a/Histacom2.Engine/UI/ClassicTextBox.Designer.cs b/Histacom2.Engine/UI/ClassicTextBox.Designer.cs index af6b199..06df3fb 100644 --- a/Histacom2.Engine/UI/ClassicTextBox.Designer.cs +++ b/Histacom2.Engine/UI/ClassicTextBox.Designer.cs @@ -42,7 +42,7 @@ // bborder // this.bborder.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bborder.Location = new System.Drawing.Point(2, 15); + this.bborder.Location = new System.Drawing.Point(2, 18); this.bborder.Name = "bborder"; this.bborder.Size = new System.Drawing.Size(96, 2); this.bborder.TabIndex = 0; @@ -53,7 +53,7 @@ this.lborder.Dock = System.Windows.Forms.DockStyle.Left; this.lborder.Location = new System.Drawing.Point(0, 0); this.lborder.Name = "lborder"; - this.lborder.Size = new System.Drawing.Size(2, 17); + this.lborder.Size = new System.Drawing.Size(2, 20); this.lborder.TabIndex = 1; this.lborder.TabStop = false; // @@ -62,7 +62,7 @@ this.rborder.Dock = System.Windows.Forms.DockStyle.Right; this.rborder.Location = new System.Drawing.Point(98, 0); this.rborder.Name = "rborder"; - this.rborder.Size = new System.Drawing.Size(2, 17); + this.rborder.Size = new System.Drawing.Size(2, 20); this.rborder.TabIndex = 2; this.rborder.TabStop = false; // @@ -94,7 +94,7 @@ this.Controls.Add(this.rborder); this.Controls.Add(this.lborder); this.Name = "ClassicTextBox"; - this.Size = new System.Drawing.Size(100, 17); + this.Size = new System.Drawing.Size(100, 20); ((System.ComponentModel.ISupportInitialize)(this.bborder)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lborder)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rborder)).EndInit(); diff --git a/Histacom2.Engine/UI/ClassicTextbox.cs b/Histacom2.Engine/UI/ClassicTextbox.cs index f89df03..4847ed5 100644 --- a/Histacom2.Engine/UI/ClassicTextbox.cs +++ b/Histacom2.Engine/UI/ClassicTextbox.cs @@ -12,8 +12,6 @@ namespace Histacom2.Engine.UI { public partial class ClassicTextBox : UserControl { - public bool UseSystemPasswordChar { get; set; } - public static Color textboxcolor = Color.Black; public static Color _lightBack = Color.Silver; @@ -31,6 +29,18 @@ namespace Histacom2.Engine.UI } } + public bool UseSystemPasswordChar + { + get + { + return textBox1.UseSystemPasswordChar; + } + set + { + textBox1.UseSystemPasswordChar = value; + } + } + public ClassicTextBox() { InitializeComponent(); diff --git a/Histacom2/Histacom2.csproj b/Histacom2/Histacom2.csproj index 1c34422..19cf5dc 100644 --- a/Histacom2/Histacom2.csproj +++ b/Histacom2/Histacom2.csproj @@ -759,6 +759,7 @@ + @@ -878,6 +879,8 @@ + + diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index 1ac4512..e743b30 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -88,7 +88,7 @@ namespace Histacom2.OS.Win95.Win95Apps Properties.Resources.WinClassicGTN, Properties.Resources.WinClassicFTP, Properties.Resources.WinClassicRtfFile, // 20 - Properties.Resources.WinClassicAddressBook}); + Properties.Resources.WinClassicAddressBookBig}); program.BringToFront(); 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 df531c3..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) 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/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs index 5452184..f76bb99 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs @@ -383,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 bf4f648..fd2bf0f 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -388,8 +388,11 @@ namespace Histacom2.OS.Win95.Win95Apps public void UpdateTreeView(AddressBookContactList lst, int count = 0) { try - { - string[] parts = lst.NodePath.Split('\\'); + { + 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])) { diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs index f88d451..586c6c2 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs @@ -29,24 +29,25 @@ 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(); @@ -127,8 +128,8 @@ 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); @@ -136,28 +137,28 @@ 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) @@ -173,73 +174,72 @@ // // 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 // @@ -263,23 +263,14 @@ // 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))))); @@ -294,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))); @@ -365,6 +365,7 @@ | 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)(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); @@ -596,14 +597,11 @@ 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.MenuStrip1.ResumeLayout(false); @@ -646,17 +644,9 @@ 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; @@ -664,5 +654,13 @@ 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 947f9ba..bc121e6 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -38,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 +77,7 @@ namespace Histacom2.OS.Win95.Win95Apps Properties.Resources.WinClassicGTN, Properties.Resources.WinClassicFTP, Properties.Resources.WinClassicRtfFile, // 20 - Properties.Resources.WinClassicAddressBook}); + Properties.Resources.WinClassicAddressBookBig}); program.BringToFront(); @@ -122,6 +117,9 @@ namespace Histacom2.OS.Win95.Win95Apps 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) @@ -168,10 +166,10 @@ namespace Histacom2.OS.Win95.Win95Apps pictureBox1.Image = Properties.Resources.Win95ComputerIcon; } else if (CurrentDirectory == ProfileMyComputerDirectory) { txtInfoTitle.Text = "C:"; - pictureBox1.Image = Properties.Resources.WinClassicFolderSmall; // TODO: ADD DRIVE ICON + pictureBox1.Image = Properties.Resources.WinClassicDrive; } else { txtInfoTitle.Text = Path.GetFileName(CurrentDirectory); - pictureBox1.Image = Properties.Resources.WinClassicFolderSmall; + pictureBox1.Image = Properties.Resources.WinClassicFolder; } @@ -283,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>(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 @@ -407,9 +418,10 @@ namespace Histacom2.OS.Win95.Win95Apps case ".bmp": case ".zip": return 11; - case ".exe": return 12; + case ".wab": + return 13; case ".avi": case ".m4v": case ".mp4": @@ -820,6 +832,8 @@ namespace Histacom2.OS.Win95.Win95Apps return "Image File"; case 12: return "Executable File"; + case 13: + return "Address Book File"; case 21: return "Video File"; case 16: 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 @@ 17, 17 + + + AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u + ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u + PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB + AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 + ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= + + 132, 17 diff --git a/Histacom2/Properties/Resources.resx b/Histacom2/Properties/Resources.resx index c34dd0c..605ba09 100644 --- a/Histacom2/Properties/Resources.resx +++ b/Histacom2/Properties/Resources.resx @@ -2123,4 +2123,10 @@ ..\Resources\distort fail.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\WinClassicAddressBookBig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\WinClassicDrive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Histacom2/Properties/Resources1.Designer.cs b/Histacom2/Properties/Resources1.Designer.cs index a053ed4..69aefb6 100644 --- a/Histacom2/Properties/Resources1.Designer.cs +++ b/Histacom2/Properties/Resources1.Designer.cs @@ -19,7 +19,7 @@ namespace Histacom2.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -976,7 +976,9 @@ namespace Histacom2.Properties { /// "btn4txt": "", /// "btn4tag": "", /// "btn5txt": "", - /// "btn5tag": " [rest of string was truncated]";. + /// "btn5tag": "" + /// }, + /// "inthe [rest of string was truncated]";. /// public static string std_story { get { @@ -1613,6 +1615,16 @@ namespace Histacom2.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap WinClassicAddressBookBig { + get { + object obj = ResourceManager.GetObject("WinClassicAddressBookBig", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -1703,6 +1715,16 @@ namespace Histacom2.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap WinClassicDrive { + get { + object obj = ResourceManager.GetObject("WinClassicDrive", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Histacom2/Resources/WinClassicAddressBookBig.png b/Histacom2/Resources/WinClassicAddressBookBig.png new file mode 100644 index 0000000..ceee626 Binary files /dev/null and b/Histacom2/Resources/WinClassicAddressBookBig.png differ diff --git a/Histacom2/Resources/WinClassicDrive.png b/Histacom2/Resources/WinClassicDrive.png new file mode 100644 index 0000000..5ac1517 Binary files /dev/null and b/Histacom2/Resources/WinClassicDrive.png differ diff --git a/Histacom2/Resources/addrbook.ico_32x32[1].png b/Histacom2/Resources/addrbook.ico_32x32[1].png new file mode 100644 index 0000000..ceee626 Binary files /dev/null and b/Histacom2/Resources/addrbook.ico_32x32[1].png differ -- cgit v1.2.3