mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
Merge pull request #180 from Alex-TIMEHACK/master
ClassicTextBox and ClassicDropDown
This commit is contained in:
commit
f0e2d14a95
52 changed files with 2276 additions and 1034 deletions
|
@ -17,9 +17,9 @@ public static string ReadDataFile(string reqDirectory, bool returnYesIfProtected
|
|||
string directoryFileInfo = File.ReadAllText(Path.Combine(reqDirectory, "_data.info"));
|
||||
FileSystemFolderInfo toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
|
||||
|
||||
if (returnYesIfProtected == true)
|
||||
if (returnYesIfProtected)
|
||||
{
|
||||
if (toRead.IsProtected == true)
|
||||
if (toRead.IsProtected)
|
||||
{
|
||||
return "yes";
|
||||
}
|
||||
|
|
|
@ -12,20 +12,27 @@ public static class FileDialogBoxManager
|
|||
{
|
||||
public static bool IsInOpenDialog = false;
|
||||
public static bool IsInSaveDialog = false;
|
||||
public static string OnlyViewExtension = "";
|
||||
public static List<string> OnlyViewExtension = new List<string>();
|
||||
|
||||
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 = new List<string>();
|
||||
}
|
||||
|
||||
public static string ReadTextFile(string path)
|
||||
|
|
|
@ -54,6 +54,18 @@
|
|||
<Compile Include="Paintbrush.cs" />
|
||||
<Compile Include="SaveSystem.cs" />
|
||||
<Compile Include="TaskBarController.cs" />
|
||||
<Compile Include="Template\DropDownItem.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Template\DropDownItem.Designer.cs">
|
||||
<DependentUpon>DropDownItem.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Template\DropDownOverlay.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Template\DropDownOverlay.Designer.cs">
|
||||
<DependentUpon>DropDownOverlay.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Template\ResizeOverlay.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -94,14 +106,23 @@
|
|||
<Compile Include="UI\ClassicButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\ClassicDropDown.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\ClassicDropDown.Designer.cs">
|
||||
<DependentUpon>ClassicDropDown.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\ClassicLabel.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\ClassicStartMenuItem.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\ClassicTextbox.cs">
|
||||
<SubType>Component</SubType>
|
||||
<Compile Include="UI\ClassicTextBox.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\ClassicTextBox.Designer.cs">
|
||||
<DependentUpon>ClassicTextBox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\IProgressBar.cs">
|
||||
<SubType>Component</SubType>
|
||||
|
@ -120,6 +141,12 @@
|
|||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Template\DropDownItem.resx">
|
||||
<DependentUpon>DropDownItem.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Template\DropDownOverlay.resx">
|
||||
<DependentUpon>DropDownOverlay.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Template\ResizeOverlay.resx">
|
||||
<DependentUpon>ResizeOverlay.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -138,9 +165,16 @@
|
|||
<EmbeddedResource Include="Template\WinXP.resx">
|
||||
<DependentUpon>WinXP.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\ClassicDropDown.resx">
|
||||
<DependentUpon>ClassicDropDown.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\ClassicTextBox.resx">
|
||||
<DependentUpon>ClassicTextBox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\chord.wav" />
|
||||
<None Include="Resources\ClassicDropDownButton.png" />
|
||||
<Content Include="Resources\Icon128x.ico" />
|
||||
<None Include="Resources\WinBadXPStart.wav" />
|
||||
<None Include="Resources\WinXPWallpaper.png" />
|
||||
|
|
12
Histacom2.Engine/Properties/Resources.Designer.cs
generated
12
Histacom2.Engine/Properties/Resources.Designer.cs
generated
|
@ -19,7 +19,7 @@ namespace Histacom2.Engine.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 {
|
||||
|
@ -69,6 +69,16 @@ public static System.IO.UnmanagedMemoryStream CHORD {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap ClassicDropDownButton {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ClassicDropDownButton", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
|
|
|
@ -265,6 +265,9 @@
|
|||
<data name="WinXP_TopRight" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\winxp\window\winxp_trcorner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ClassicDropDownButton" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ClassicDropDownButton.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WinBadXPStart" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WinBadXPStart.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
|
|
BIN
Histacom2.Engine/Resources/ClassicDropDownButton.png
Normal file
BIN
Histacom2.Engine/Resources/ClassicDropDownButton.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 222 B |
|
@ -127,7 +127,7 @@ public static void NewGame()
|
|||
{
|
||||
var save = new Save();
|
||||
save.ExperiencedStories = new List<string>();
|
||||
if (DevMode == true)
|
||||
if (DevMode)
|
||||
{
|
||||
if (ProfileName == "xpbad")
|
||||
{
|
||||
|
@ -190,6 +190,7 @@ public static void CheckFiles()
|
|||
|
||||
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 @@ public static void UpgradeFileSystem(string newOS)
|
|||
// 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!
|
||||
|
@ -382,7 +385,7 @@ public static void SaveDirectoryInfo(string parent, string dirname, bool isProte
|
|||
info.SubDirs = new List<THDirInfo>(256);
|
||||
info.ByteSize = 0;
|
||||
|
||||
if (updateParent == true)
|
||||
if (updateParent)
|
||||
{
|
||||
if ((parent != ProfileDirectory))
|
||||
{
|
||||
|
|
63
Histacom2.Engine/Template/DropDownItem.Designer.cs
generated
Normal file
63
Histacom2.Engine/Template/DropDownItem.Designer.cs
generated
Normal file
|
@ -0,0 +1,63 @@
|
|||
namespace Histacom2.Engine.Template
|
||||
{
|
||||
partial class DropDownItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(315, 20);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "label1";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
this.label1.Click += new System.EventHandler(this.label1_Click);
|
||||
this.label1.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
|
||||
this.label1.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
|
||||
//
|
||||
// DropDownItem
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "DropDownItem";
|
||||
this.Size = new System.Drawing.Size(315, 20);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
42
Histacom2.Engine/Template/DropDownItem.cs
Normal file
42
Histacom2.Engine/Template/DropDownItem.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Histacom2.Engine.Template
|
||||
{
|
||||
public partial class DropDownItem : UserControl
|
||||
{
|
||||
public UI.ClassicDropDown dpdw;
|
||||
public DropDownItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void ChangeText(string newText, Font fnt)
|
||||
{
|
||||
label1.Font = fnt;
|
||||
label1.Text = newText;
|
||||
}
|
||||
|
||||
private void label1_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
label1.BackColor = Color.Transparent;
|
||||
}
|
||||
|
||||
private void label1_Click(object sender, EventArgs e)
|
||||
{
|
||||
dpdw.ChooseItem(label1.Text);
|
||||
}
|
||||
|
||||
private void label1_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
label1.BackColor = Color.Blue;
|
||||
}
|
||||
}
|
||||
}
|
120
Histacom2.Engine/Template/DropDownItem.resx
Normal file
120
Histacom2.Engine/Template/DropDownItem.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
64
Histacom2.Engine/Template/DropDownOverlay.Designer.cs
generated
Normal file
64
Histacom2.Engine/Template/DropDownOverlay.Designer.cs
generated
Normal file
|
@ -0,0 +1,64 @@
|
|||
namespace Histacom2.Engine.Template
|
||||
{
|
||||
partial class DropDownOverlay
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.outline = new System.Windows.Forms.Panel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// outline
|
||||
//
|
||||
this.outline.BackColor = System.Drawing.Color.White;
|
||||
this.outline.Location = new System.Drawing.Point(230, 56);
|
||||
this.outline.Name = "outline";
|
||||
this.outline.Size = new System.Drawing.Size(200, 100);
|
||||
this.outline.TabIndex = 0;
|
||||
this.outline.Paint += new System.Windows.Forms.PaintEventHandler(this.outline_Paint);
|
||||
//
|
||||
// DropDownOverlay
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(0)))), ((int)(((byte)(1)))));
|
||||
this.ClientSize = new System.Drawing.Size(628, 210);
|
||||
this.Controls.Add(this.outline);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "DropDownOverlay";
|
||||
this.Text = "DropDownOverlay";
|
||||
this.TopMost = true;
|
||||
this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(0)))), ((int)(((byte)(1)))));
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public System.Windows.Forms.Panel outline;
|
||||
}
|
||||
}
|
26
Histacom2.Engine/Template/DropDownOverlay.cs
Normal file
26
Histacom2.Engine/Template/DropDownOverlay.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Histacom2.Engine.Template
|
||||
{
|
||||
public partial class DropDownOverlay : Form
|
||||
{
|
||||
public DropDownOverlay()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void outline_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
e.Graphics.DrawRectangle(Pens.Black, 0, 0, outline.Width - 1, outline.Height - 1); // Draws a 1 pixel border around the dropdown's drop area!
|
||||
if (SaveSystem.currentTheme != null) outline.BackColor = SaveSystem.currentTheme.threeDObjectsColor;
|
||||
}
|
||||
}
|
||||
}
|
120
Histacom2.Engine/Template/DropDownOverlay.resx
Normal file
120
Histacom2.Engine/Template/DropDownOverlay.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
1
Histacom2.Engine/Template/WinClassic.Designer.cs
generated
1
Histacom2.Engine/Template/WinClassic.Designer.cs
generated
|
@ -288,7 +288,6 @@ private void InitializeComponent()
|
|||
this.Text = "WinClassic";
|
||||
this.Activated += new System.EventHandler(this.WinClassic_Activated);
|
||||
this.Deactivate += new System.EventHandler(this.WinClassic_Deactivate);
|
||||
this.Paint += new System.Windows.Forms.PaintEventHandler(this.WinClassic_Paint);
|
||||
this.program.ResumeLayout(false);
|
||||
this.programtopbar.ResumeLayout(false);
|
||||
this.programtopbar.PerformLayout();
|
||||
|
|
|
@ -45,7 +45,7 @@ public static extern int SendMessage(IntPtr hWnd,
|
|||
|
||||
private void Programtopbar_drag(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left && max == false)
|
||||
if (e.Button == MouseButtons.Left && !max)
|
||||
{
|
||||
ReleaseCapture();
|
||||
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
|
||||
|
@ -194,15 +194,6 @@ private void toprightcorner_MouseMove(object sender, MouseEventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
private void WinClassic_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (Resizing)
|
||||
{
|
||||
MessageBox.Show("HIT IT");
|
||||
e.Graphics.DrawImage(ResizingBmp, 0, 0, this.Width, this.Height);
|
||||
}
|
||||
}
|
||||
|
||||
private void border_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
this.Bounds = resizer.ToDraw;
|
||||
|
@ -349,7 +340,7 @@ private void minimizebutton_Click(object sender, EventArgs e)
|
|||
private void maximizebutton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (max == false)
|
||||
if (!max)
|
||||
{
|
||||
this.right.Hide();
|
||||
this.left.Hide();
|
||||
|
|
|
@ -67,7 +67,7 @@ private void closebutton_Click(object sender, EventArgs e)
|
|||
|
||||
private void top_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left && max == false)
|
||||
if (e.Button == MouseButtons.Left && !max)
|
||||
{
|
||||
ReleaseCapture();
|
||||
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
|
||||
|
|
133
Histacom2.Engine/UI/ClassicDropDown.Designer.cs
generated
Normal file
133
Histacom2.Engine/UI/ClassicDropDown.Designer.cs
generated
Normal file
|
@ -0,0 +1,133 @@
|
|||
namespace Histacom2.Engine.UI
|
||||
{
|
||||
partial class ClassicDropDown
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.dropDownSwitch = new System.Windows.Forms.PictureBox();
|
||||
this.tborder = new System.Windows.Forms.PictureBox();
|
||||
this.bborder = new System.Windows.Forms.PictureBox();
|
||||
this.rborder = new System.Windows.Forms.PictureBox();
|
||||
this.lborder = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dropDownSwitch)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tborder)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bborder)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rborder)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lborder)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.textBox1.Location = new System.Drawing.Point(2, 2);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(96, 13);
|
||||
this.textBox1.TabIndex = 9;
|
||||
//
|
||||
// dropDownSwitch
|
||||
//
|
||||
this.dropDownSwitch.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.dropDownSwitch.Image = global::Histacom2.Engine.Properties.Resources.ClassicDropDownButton;
|
||||
this.dropDownSwitch.Location = new System.Drawing.Point(82, 2);
|
||||
this.dropDownSwitch.Name = "dropDownSwitch";
|
||||
this.dropDownSwitch.Size = new System.Drawing.Size(16, 16);
|
||||
this.dropDownSwitch.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.dropDownSwitch.TabIndex = 10;
|
||||
this.dropDownSwitch.TabStop = false;
|
||||
this.dropDownSwitch.Click += new System.EventHandler(this.dropDownSwitch_Click);
|
||||
//
|
||||
// tborder
|
||||
//
|
||||
this.tborder.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tborder.Location = new System.Drawing.Point(2, 0);
|
||||
this.tborder.Name = "tborder";
|
||||
this.tborder.Size = new System.Drawing.Size(96, 2);
|
||||
this.tborder.TabIndex = 8;
|
||||
this.tborder.TabStop = false;
|
||||
//
|
||||
// bborder
|
||||
//
|
||||
this.bborder.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
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 = 5;
|
||||
this.bborder.TabStop = false;
|
||||
//
|
||||
// rborder
|
||||
//
|
||||
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, 20);
|
||||
this.rborder.TabIndex = 7;
|
||||
this.rborder.TabStop = false;
|
||||
//
|
||||
// lborder
|
||||
//
|
||||
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, 20);
|
||||
this.lborder.TabIndex = 6;
|
||||
this.lborder.TabStop = false;
|
||||
//
|
||||
// ClassicDropDown
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.dropDownSwitch);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.tborder);
|
||||
this.Controls.Add(this.bborder);
|
||||
this.Controls.Add(this.rborder);
|
||||
this.Controls.Add(this.lborder);
|
||||
this.Name = "ClassicDropDown";
|
||||
this.Size = new System.Drawing.Size(100, 20);
|
||||
this.Load += new System.EventHandler(this.ClassicDropDown_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dropDownSwitch)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tborder)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bborder)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rborder)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lborder)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.PictureBox tborder;
|
||||
private System.Windows.Forms.PictureBox bborder;
|
||||
private System.Windows.Forms.PictureBox rborder;
|
||||
private System.Windows.Forms.PictureBox lborder;
|
||||
private System.Windows.Forms.PictureBox dropDownSwitch;
|
||||
}
|
||||
}
|
178
Histacom2.Engine/UI/ClassicDropDown.cs
Normal file
178
Histacom2.Engine/UI/ClassicDropDown.cs
Normal file
|
@ -0,0 +1,178 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Histacom2.Engine.Template;
|
||||
|
||||
namespace Histacom2.Engine.UI
|
||||
{
|
||||
public partial class ClassicDropDown : UserControl
|
||||
{
|
||||
public DropDownOverlay thisOverlay = new DropDownOverlay();
|
||||
public bool dropDownShown;
|
||||
|
||||
public override string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return textBox1.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
textBox1.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseSystemPasswordChar
|
||||
{
|
||||
get
|
||||
{
|
||||
return textBox1.UseSystemPasswordChar;
|
||||
}
|
||||
set
|
||||
{
|
||||
textBox1.UseSystemPasswordChar = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static Color textboxcolor = Color.Black;
|
||||
|
||||
public static Color _lightBack = Color.Silver;
|
||||
public static Color _darkBack = Color.Silver;
|
||||
|
||||
public List<string> Items { get; set; } = new List<string>();
|
||||
|
||||
public ClassicDropDown()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// Draw the border
|
||||
|
||||
this.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
// Update a bunch of variables!
|
||||
textBox1.Font = Font;
|
||||
|
||||
if (SaveSystem.currentTheme != null)
|
||||
{
|
||||
textBox1.BackColor = SaveSystem.currentTheme.threeDObjectsColor;
|
||||
BackColor = SaveSystem.currentTheme.threeDObjectsColor;
|
||||
|
||||
textboxcolor = SaveSystem.currentTheme.windowColor;
|
||||
|
||||
_lightBack = Paintbrush.GetLightFromColor(textboxcolor);
|
||||
_darkBack = Paintbrush.GetDarkFromColor(textboxcolor);
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox1.BackColor = Color.White;
|
||||
BackColor = Color.White;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
tborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, tborder.Width, 0);
|
||||
e.Graphics.DrawLine(Pens.Black, 0, 1, tborder.Width, 1);
|
||||
|
||||
});
|
||||
|
||||
lborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, 0, Height);
|
||||
e.Graphics.DrawLine(Pens.Black, 1, 0, 1, Height);
|
||||
});
|
||||
|
||||
rborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, 0, Height - 1);
|
||||
e.Graphics.DrawLine(new Pen(textboxcolor), 1, 0, 1, Height - 1);
|
||||
});
|
||||
|
||||
bborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, Width - 1, 0);
|
||||
e.Graphics.DrawLine(new Pen(textboxcolor), 0, 1, Width - 2, 1);
|
||||
});
|
||||
|
||||
tborder.Invalidate();
|
||||
lborder.Invalidate();
|
||||
rborder.Invalidate();
|
||||
bborder.Invalidate();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public void ChooseItem(string str)
|
||||
{
|
||||
textBox1.Text = str;
|
||||
ShowHideDropDown();
|
||||
}
|
||||
|
||||
public void ShowHideDropDown()
|
||||
{
|
||||
if (dropDownShown)
|
||||
{
|
||||
thisOverlay.Close();
|
||||
dropDownShown = false;
|
||||
} else {
|
||||
thisOverlay = new DropDownOverlay();
|
||||
int applyHeight = 0;
|
||||
foreach (string str in Items)
|
||||
{
|
||||
DropDownItem itm = new DropDownItem();
|
||||
itm.ChangeText(str, Font);
|
||||
itm.dpdw = this;
|
||||
itm.Dock = DockStyle.Top;
|
||||
applyHeight += itm.Height;
|
||||
thisOverlay.outline.Controls.Add(itm);
|
||||
}
|
||||
thisOverlay.outline.Location = this.PointToScreen(Point.Empty);
|
||||
thisOverlay.outline.Top += this.Height;
|
||||
thisOverlay.outline.Size = new Size(this.Width, applyHeight);
|
||||
|
||||
thisOverlay.Deactivate += (sender2, e2) => { thisOverlay.Close(); dropDownShown = false; };
|
||||
|
||||
thisOverlay.Show();
|
||||
dropDownShown = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void dropDownSwitch_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowHideDropDown();
|
||||
}
|
||||
|
||||
private void ClassicDropDown_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
((Form)this.TopLevelControl).FormClosed += (sender2, e2) => { thisOverlay.Close(); };
|
||||
((Form)this.TopLevelControl).Resize += (sender2, e2) =>
|
||||
{
|
||||
thisOverlay.outline.Location = this.PointToScreen(Point.Empty);
|
||||
thisOverlay.outline.Top += this.Height;
|
||||
thisOverlay.BringToFront();
|
||||
};
|
||||
|
||||
((Form)this.TopLevelControl).Move += (sender2, e2) =>
|
||||
{
|
||||
thisOverlay.outline.Location = this.PointToScreen(Point.Empty);
|
||||
thisOverlay.outline.Top += this.Height;
|
||||
thisOverlay.BringToFront();
|
||||
};
|
||||
} catch { }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
120
Histacom2.Engine/UI/ClassicDropDown.resx
Normal file
120
Histacom2.Engine/UI/ClassicDropDown.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
115
Histacom2.Engine/UI/ClassicTextBox.Designer.cs
generated
Normal file
115
Histacom2.Engine/UI/ClassicTextBox.Designer.cs
generated
Normal file
|
@ -0,0 +1,115 @@
|
|||
namespace Histacom2.Engine.UI
|
||||
{
|
||||
partial class ClassicTextBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.bborder = new System.Windows.Forms.PictureBox();
|
||||
this.lborder = new System.Windows.Forms.PictureBox();
|
||||
this.rborder = new System.Windows.Forms.PictureBox();
|
||||
this.tborder = new System.Windows.Forms.PictureBox();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bborder)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lborder)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rborder)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tborder)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// bborder
|
||||
//
|
||||
this.bborder.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
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;
|
||||
this.bborder.TabStop = false;
|
||||
//
|
||||
// lborder
|
||||
//
|
||||
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, 20);
|
||||
this.lborder.TabIndex = 1;
|
||||
this.lborder.TabStop = false;
|
||||
//
|
||||
// rborder
|
||||
//
|
||||
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, 20);
|
||||
this.rborder.TabIndex = 2;
|
||||
this.rborder.TabStop = false;
|
||||
//
|
||||
// tborder
|
||||
//
|
||||
this.tborder.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tborder.Location = new System.Drawing.Point(2, 0);
|
||||
this.tborder.Name = "tborder";
|
||||
this.tborder.Size = new System.Drawing.Size(96, 2);
|
||||
this.tborder.TabIndex = 3;
|
||||
this.tborder.TabStop = false;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.textBox1.Location = new System.Drawing.Point(2, 2);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(96, 13);
|
||||
this.textBox1.TabIndex = 4;
|
||||
//
|
||||
// ClassicTextBox
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.tborder);
|
||||
this.Controls.Add(this.bborder);
|
||||
this.Controls.Add(this.rborder);
|
||||
this.Controls.Add(this.lborder);
|
||||
this.Name = "ClassicTextBox";
|
||||
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();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tborder)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox bborder;
|
||||
private System.Windows.Forms.PictureBox lborder;
|
||||
private System.Windows.Forms.PictureBox rborder;
|
||||
private System.Windows.Forms.PictureBox tborder;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
}
|
||||
}
|
120
Histacom2.Engine/UI/ClassicTextBox.resx
Normal file
120
Histacom2.Engine/UI/ClassicTextBox.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -8,47 +10,101 @@
|
|||
|
||||
namespace Histacom2.Engine.UI
|
||||
{
|
||||
public class ClassicTextbox : Control
|
||||
public partial class ClassicTextBox : UserControl
|
||||
{
|
||||
public bool UseSystemPasswordChar { get; set; }
|
||||
public static Color textboxcolor = Color.Black;
|
||||
|
||||
public ClassicTextbox() : base()
|
||||
public static Color _lightBack = Color.Silver;
|
||||
public static Color _darkBack = Color.Silver;
|
||||
|
||||
public override string Text
|
||||
{
|
||||
if (SaveSystem.currentTheme != null) Font = SaveSystem.currentTheme.buttonFont;
|
||||
else Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
|
||||
get
|
||||
{
|
||||
return textBox1.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
textBox1.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
public bool UseSystemPasswordChar
|
||||
{
|
||||
base.OnPaint(e);
|
||||
get
|
||||
{
|
||||
return textBox1.UseSystemPasswordChar;
|
||||
}
|
||||
set
|
||||
{
|
||||
textBox1.UseSystemPasswordChar = value;
|
||||
}
|
||||
}
|
||||
|
||||
var textboxcolor = Color.Silver;
|
||||
if (SaveSystem.currentTheme != null) textboxcolor = SaveSystem.currentTheme.windowColor;
|
||||
public ClassicTextBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (SaveSystem.currentTheme != null) BackColor = SaveSystem.currentTheme.threeDObjectsColor;
|
||||
else BackColor = Color.White;
|
||||
try
|
||||
{
|
||||
// Draw the border
|
||||
|
||||
var _lightBack = Paintbrush.GetLightFromColor(textboxcolor);
|
||||
var _darkBack = Paintbrush.GetDarkFromColor(textboxcolor);
|
||||
this.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
// Update a bunch of variables!
|
||||
textBox1.Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
|
||||
|
||||
if (SaveSystem.currentTheme != null) Font = SaveSystem.currentTheme.buttonFont;
|
||||
else Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
|
||||
if (SaveSystem.currentTheme != null)
|
||||
{
|
||||
textBox1.BackColor = SaveSystem.currentTheme.threeDObjectsColor;
|
||||
BackColor = SaveSystem.currentTheme.threeDObjectsColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox1.BackColor = Color.White;
|
||||
BackColor = Color.White;
|
||||
}
|
||||
|
||||
var g = e.Graphics;
|
||||
g.Clear(BackColor);
|
||||
if (SaveSystem.currentTheme != null)
|
||||
{
|
||||
textboxcolor = SaveSystem.currentTheme.windowColor;
|
||||
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
|
||||
if (UseSystemPasswordChar) g.DrawString(new string('●', Text.Length), Font, Brushes.Black, 3, 3);
|
||||
else g.DrawString(Text, Font, Brushes.Black, 3, 3);
|
||||
_lightBack = Paintbrush.GetLightFromColor(textboxcolor);
|
||||
_darkBack = Paintbrush.GetDarkFromColor(textboxcolor);
|
||||
}
|
||||
});
|
||||
|
||||
g.DrawLine(new Pen(_darkBack), 0, 0, Width - 2, 0);
|
||||
g.DrawLine(new Pen(_lightBack), Width - 1, 0, Width - 1, Height - 1);
|
||||
g.DrawLine(new Pen(_lightBack), 0, Height - 1, Width - 1, Height - 1);
|
||||
g.DrawLine(new Pen(_darkBack), 0, 0, 0, Height - 2);
|
||||
g.DrawLine(Pens.Black, 1, 1, Width - 3, 1);
|
||||
g.DrawLine(Pens.Black, 1, 1, 1, Height - 3);
|
||||
g.DrawLine(new Pen(textboxcolor), 1, Height - 2, Width - 2, Height - 2);
|
||||
g.DrawLine(new Pen(textboxcolor), Width - 2, Height - 2, Width - 2, 1);
|
||||
|
||||
tborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, tborder.Width, 0);
|
||||
e.Graphics.DrawLine(Pens.Black, 0, 1, tborder.Width, 1);
|
||||
|
||||
});
|
||||
|
||||
lborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, 0, Height);
|
||||
e.Graphics.DrawLine(Pens.Black, 1, 0, 1, Height);
|
||||
});
|
||||
|
||||
rborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, 0, Height - 1);
|
||||
e.Graphics.DrawLine(new Pen(textboxcolor), 1, 0, 1, Height - 1);
|
||||
});
|
||||
|
||||
bborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
|
||||
{
|
||||
e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, Width - 1, 0);
|
||||
e.Graphics.DrawLine(new Pen(textboxcolor), 0, 1, Width - 2, 1);
|
||||
});
|
||||
|
||||
tborder.Invalidate();
|
||||
lborder.Invalidate();
|
||||
rborder.Invalidate();
|
||||
bborder.Invalidate();
|
||||
} catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,14 +50,14 @@ public WinClassic Init(UserControl content, string title, Image icon, bool MaxBu
|
|||
else app.programIcon.Image = icon;
|
||||
|
||||
// Check if Max button is enabled and set proper X for Min button
|
||||
if (MaxButton == false)
|
||||
if (!MaxButton)
|
||||
{
|
||||
app.maximizebutton.Visible = false;
|
||||
app.minimizebutton.Location = new Point(app.closebutton.Location.X - 14, app.minimizebutton.Location.Y);
|
||||
}
|
||||
|
||||
// Check if Min button is enabled
|
||||
if (MinButton == false)
|
||||
if (!MinButton)
|
||||
{
|
||||
app.minimizebutton.Visible = false;
|
||||
app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y);
|
||||
|
@ -85,7 +85,7 @@ public WinClassic Init(UserControl content, string title, Image icon, bool MaxBu
|
|||
|
||||
// Show the app
|
||||
app.TopMost = true;
|
||||
if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); }
|
||||
if (!ShowApplicationAsDialog) { app.Show(); } else { app.ShowDialog(); }
|
||||
return app;
|
||||
}
|
||||
|
||||
|
@ -117,14 +117,14 @@ public WinXP InitXP(UserControl content, string title, Image icon, bool MaxButto
|
|||
else app.programIcon.Image = icon;
|
||||
|
||||
// Check if Max button is enabled and set proper X for Min button
|
||||
if (MaxButton == false)
|
||||
if (!MaxButton)
|
||||
{
|
||||
app.maximizebutton.Visible = false;
|
||||
app.minimizebutton.Location = new Point(app.closebutton.Location.X - 14, app.minimizebutton.Location.Y);
|
||||
}
|
||||
|
||||
// Check if Min button is enabled
|
||||
if (MinButton == false)
|
||||
if (!MinButton)
|
||||
{
|
||||
app.minimizebutton.Visible = false;
|
||||
app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y);
|
||||
|
@ -148,7 +148,7 @@ public WinXP InitXP(UserControl content, string title, Image icon, bool MaxButto
|
|||
|
||||
// Show the app
|
||||
app.TopMost = true;
|
||||
if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); }
|
||||
if (!ShowApplicationAsDialog) { app.Show(); } else { app.ShowDialog(); }
|
||||
return app;
|
||||
}
|
||||
|
||||
|
|
|
@ -99,17 +99,22 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
}
|
||||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (CurrentFilePath == "")
|
||||
{
|
||||
// We aren't in a file right now
|
||||
|
||||
SaveAs();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
File.Delete(CurrentFilePath);
|
||||
SaveSystem.CreateWindowsFile(new FileInfo(CurrentFilePath).Directory.FullName, CurrentFilePath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length);
|
||||
}
|
||||
} catch { } // This try catch loop was added due the game crashing if the desktop is updating the same time the notepad is saving... which I got!
|
||||
}
|
||||
|
||||
void SaveAs()
|
||||
|
@ -118,6 +123,7 @@ void SaveAs()
|
|||
{
|
||||
ActivateSaveFileDialog(".txt");
|
||||
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
|
||||
DeactivateFileDialog();
|
||||
|
||||
if (selectedPath != "")
|
||||
{
|
||||
|
|
|
@ -759,6 +759,7 @@
|
|||
<None Include="Resources\GuessTheNumber\GTN95_Lower.png" />
|
||||
<None Include="Resources\GuessTheNumber\GTN95_Error.png" />
|
||||
<None Include="Resources\distort fail.wav" />
|
||||
<None Include="Resources\addrbook.ico_32x32[1].png" />
|
||||
<Content Include="Resources\Icon128x.ico" />
|
||||
<None Include="Resources\ICTheme_BG.jpg" />
|
||||
<None Include="Resources\IE3\IE3_SwirlyThings.png" />
|
||||
|
@ -878,6 +879,8 @@
|
|||
<None Include="Resources\win95plussportswallpaper.jpg" />
|
||||
<None Include="Resources\win95plusthe60wallpaper.jpg" />
|
||||
<None Include="Resources\win95plustravelwallpaper.jpg" />
|
||||
<None Include="Resources\WinClassicDrive.png" />
|
||||
<None Include="Resources\WinClassicAddressBookBig.png" />
|
||||
<Content Include="Resources\WinClassic\16Color.png" />
|
||||
<Content Include="Resources\WinClassic\256Color.png" />
|
||||
<None Include="Resources\WinClassic\tada.wav" />
|
||||
|
|
|
@ -108,7 +108,7 @@ private void Click(object sender, EventArgs e)
|
|||
this.Open();
|
||||
}
|
||||
}
|
||||
if (_game.ftime == true && !Minded)
|
||||
if (_game.ftime && !Minded)
|
||||
{
|
||||
_game.ftime = false;
|
||||
_game._timer = new Timer();
|
||||
|
|
|
@ -129,7 +129,7 @@ private void bestTimesToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (_game.win == true)
|
||||
if (_game.win)
|
||||
{
|
||||
button1.BackgroundImage = Properties.Resources.WinClassicMinesweeperWin;
|
||||
switch (level)
|
||||
|
|
|
@ -75,7 +75,7 @@ public static async void ContinueObjective()
|
|||
|
||||
public static void CheckIfSoundFinished(Object sender, EventArgs e)
|
||||
{
|
||||
if (soundThread.IsAlive == false)
|
||||
if (!soundThread.IsAlive)
|
||||
{
|
||||
// Continue from where we were
|
||||
System.Windows.Forms.Timer trm = sender as System.Windows.Forms.Timer;
|
||||
|
|
|
@ -30,10 +30,6 @@ private void InitializeComponent()
|
|||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.program = new System.Windows.Forms.Panel();
|
||||
this.pnlSave = new System.Windows.Forms.Panel();
|
||||
this.Button1 = new System.Windows.Forms.Button();
|
||||
this.Label1 = new System.Windows.Forms.Label();
|
||||
this.txtSave = new System.Windows.Forms.TextBox();
|
||||
this.mainView = new System.Windows.Forms.ListView();
|
||||
this.diskView = new System.Windows.Forms.TreeView();
|
||||
this.MenuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
|
@ -55,13 +51,18 @@ private void InitializeComponent()
|
|||
this.HelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.AboutWindows95ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toprightcorner = new System.Windows.Forms.Panel();
|
||||
this.bottomrightcorner = new System.Windows.Forms.Panel();
|
||||
this.bottomleftcorner = new System.Windows.Forms.Panel();
|
||||
this.topleftcorner = new System.Windows.Forms.Panel();
|
||||
this.pnlSave = new System.Windows.Forms.Panel();
|
||||
this.refresh = new System.Windows.Forms.Timer(this.components);
|
||||
this.btnCanc = new Histacom2.Engine.UI.ClassicButton();
|
||||
this.cmbType = new Histacom2.Engine.UI.ClassicDropDown();
|
||||
this.txtSave = new Histacom2.Engine.UI.ClassicTextBox();
|
||||
this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.btnSave = new Histacom2.Engine.UI.ClassicButton();
|
||||
this.program.SuspendLayout();
|
||||
this.pnlSave.SuspendLayout();
|
||||
this.MenuStrip1.SuspendLayout();
|
||||
this.pnlSave.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// program
|
||||
|
@ -71,8 +72,6 @@ private void InitializeComponent()
|
|||
this.program.Controls.Add(this.diskView);
|
||||
this.program.Controls.Add(this.MenuStrip1);
|
||||
this.program.Controls.Add(this.toprightcorner);
|
||||
this.program.Controls.Add(this.bottomrightcorner);
|
||||
this.program.Controls.Add(this.bottomleftcorner);
|
||||
this.program.Controls.Add(this.topleftcorner);
|
||||
this.program.Controls.Add(this.pnlSave);
|
||||
this.program.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
|
@ -81,54 +80,12 @@ private void InitializeComponent()
|
|||
this.program.Size = new System.Drawing.Size(704, 517);
|
||||
this.program.TabIndex = 13;
|
||||
//
|
||||
// pnlSave
|
||||
//
|
||||
this.pnlSave.Controls.Add(this.Button1);
|
||||
this.pnlSave.Controls.Add(this.Label1);
|
||||
this.pnlSave.Controls.Add(this.txtSave);
|
||||
this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.pnlSave.Location = new System.Drawing.Point(0, 482);
|
||||
this.pnlSave.Name = "pnlSave";
|
||||
this.pnlSave.Size = new System.Drawing.Size(704, 35);
|
||||
this.pnlSave.TabIndex = 18;
|
||||
this.pnlSave.Visible = false;
|
||||
//
|
||||
// Button1
|
||||
//
|
||||
this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.Button1.Location = new System.Drawing.Point(629, 1);
|
||||
this.Button1.Name = "Button1";
|
||||
this.Button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.Button1.TabIndex = 17;
|
||||
this.Button1.Text = "Save";
|
||||
this.Button1.UseVisualStyleBackColor = true;
|
||||
this.Button1.Click += new System.EventHandler(this.Button1_Click);
|
||||
//
|
||||
// Label1
|
||||
//
|
||||
this.Label1.AutoSize = true;
|
||||
this.Label1.Location = new System.Drawing.Point(3, 6);
|
||||
this.Label1.Name = "Label1";
|
||||
this.Label1.Size = new System.Drawing.Size(57, 13);
|
||||
this.Label1.TabIndex = 16;
|
||||
this.Label1.Text = "File Name:";
|
||||
//
|
||||
// txtSave
|
||||
//
|
||||
this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSave.Location = new System.Drawing.Point(60, 3);
|
||||
this.txtSave.Name = "txtSave";
|
||||
this.txtSave.Size = new System.Drawing.Size(563, 20);
|
||||
this.txtSave.TabIndex = 15;
|
||||
//
|
||||
// mainView
|
||||
//
|
||||
this.mainView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.mainView.Location = new System.Drawing.Point(213, 24);
|
||||
this.mainView.Name = "mainView";
|
||||
this.mainView.Size = new System.Drawing.Size(491, 458);
|
||||
this.mainView.Size = new System.Drawing.Size(491, 439);
|
||||
this.mainView.TabIndex = 10;
|
||||
this.mainView.UseCompatibleStateImageBehavior = false;
|
||||
this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit);
|
||||
|
@ -139,7 +96,7 @@ private void InitializeComponent()
|
|||
this.diskView.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.diskView.Location = new System.Drawing.Point(0, 24);
|
||||
this.diskView.Name = "diskView";
|
||||
this.diskView.Size = new System.Drawing.Size(213, 458);
|
||||
this.diskView.Size = new System.Drawing.Size(213, 439);
|
||||
this.diskView.TabIndex = 13;
|
||||
this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect);
|
||||
//
|
||||
|
@ -297,23 +254,6 @@ private void InitializeComponent()
|
|||
this.toprightcorner.Size = new System.Drawing.Size(4, 4);
|
||||
this.toprightcorner.TabIndex = 6;
|
||||
//
|
||||
// bottomrightcorner
|
||||
//
|
||||
this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE;
|
||||
this.bottomrightcorner.Location = new System.Drawing.Point(700, 513);
|
||||
this.bottomrightcorner.Name = "bottomrightcorner";
|
||||
this.bottomrightcorner.Size = new System.Drawing.Size(4, 4);
|
||||
this.bottomrightcorner.TabIndex = 4;
|
||||
//
|
||||
// bottomleftcorner
|
||||
//
|
||||
this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.bottomleftcorner.Location = new System.Drawing.Point(0, 513);
|
||||
this.bottomleftcorner.Name = "bottomleftcorner";
|
||||
this.bottomleftcorner.Size = new System.Drawing.Size(4, 4);
|
||||
this.bottomleftcorner.TabIndex = 2;
|
||||
//
|
||||
// topleftcorner
|
||||
//
|
||||
this.topleftcorner.Location = new System.Drawing.Point(0, 0);
|
||||
|
@ -321,11 +261,103 @@ private void InitializeComponent()
|
|||
this.topleftcorner.Size = new System.Drawing.Size(4, 4);
|
||||
this.topleftcorner.TabIndex = 1;
|
||||
//
|
||||
// pnlSave
|
||||
//
|
||||
this.pnlSave.Controls.Add(this.btnCanc);
|
||||
this.pnlSave.Controls.Add(this.cmbType);
|
||||
this.pnlSave.Controls.Add(this.txtSave);
|
||||
this.pnlSave.Controls.Add(this.classicLabel2);
|
||||
this.pnlSave.Controls.Add(this.classicLabel1);
|
||||
this.pnlSave.Controls.Add(this.btnSave);
|
||||
this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.pnlSave.Location = new System.Drawing.Point(0, 463);
|
||||
this.pnlSave.Name = "pnlSave";
|
||||
this.pnlSave.Size = new System.Drawing.Size(704, 54);
|
||||
this.pnlSave.TabIndex = 18;
|
||||
this.pnlSave.Visible = false;
|
||||
//
|
||||
// refresh
|
||||
//
|
||||
this.refresh.Interval = 15000;
|
||||
this.refresh.Tick += new System.EventHandler(this.refresh_Tick);
|
||||
//
|
||||
// btnCanc
|
||||
//
|
||||
this.btnCanc.AdaptBackColorWithTheme = true;
|
||||
this.btnCanc.AdaptFontWithTheme = true;
|
||||
this.btnCanc.AdaptForeColorWithTheme = true;
|
||||
this.btnCanc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCanc.BackColor = System.Drawing.Color.Silver;
|
||||
this.btnCanc.DialogResult = System.Windows.Forms.DialogResult.None;
|
||||
this.btnCanc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.btnCanc.ForeColor = System.Drawing.Color.Black;
|
||||
this.btnCanc.Location = new System.Drawing.Point(611, 27);
|
||||
this.btnCanc.Name = "btnCanc";
|
||||
this.btnCanc.Size = new System.Drawing.Size(75, 25);
|
||||
this.btnCanc.TabIndex = 24;
|
||||
this.btnCanc.Text = "Cancel";
|
||||
this.btnCanc.Click += new System.EventHandler(this.btnCanc_Click);
|
||||
//
|
||||
// cmbType
|
||||
//
|
||||
this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmbType.BackColor = System.Drawing.Color.White;
|
||||
this.cmbType.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.cmbType.Location = new System.Drawing.Point(56, 31);
|
||||
this.cmbType.Name = "cmbType";
|
||||
this.cmbType.Size = new System.Drawing.Size(549, 20);
|
||||
this.cmbType.TabIndex = 23;
|
||||
this.cmbType.UseSystemPasswordChar = false;
|
||||
//
|
||||
// txtSave
|
||||
//
|
||||
this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSave.BackColor = System.Drawing.Color.White;
|
||||
this.txtSave.Location = new System.Drawing.Point(56, 6);
|
||||
this.txtSave.Name = "txtSave";
|
||||
this.txtSave.Size = new System.Drawing.Size(549, 20);
|
||||
this.txtSave.TabIndex = 22;
|
||||
this.txtSave.UseSystemPasswordChar = false;
|
||||
//
|
||||
// classicLabel2
|
||||
//
|
||||
this.classicLabel2.DropShadow = false;
|
||||
this.classicLabel2.Location = new System.Drawing.Point(3, 32);
|
||||
this.classicLabel2.Name = "classicLabel2";
|
||||
this.classicLabel2.Size = new System.Drawing.Size(64, 13);
|
||||
this.classicLabel2.TabIndex = 19;
|
||||
this.classicLabel2.Text = "File type:";
|
||||
//
|
||||
// classicLabel1
|
||||
//
|
||||
this.classicLabel1.DropShadow = false;
|
||||
this.classicLabel1.Location = new System.Drawing.Point(3, 6);
|
||||
this.classicLabel1.Name = "classicLabel1";
|
||||
this.classicLabel1.Size = new System.Drawing.Size(64, 13);
|
||||
this.classicLabel1.TabIndex = 19;
|
||||
this.classicLabel1.Text = "File name:";
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.AdaptBackColorWithTheme = true;
|
||||
this.btnSave.AdaptFontWithTheme = true;
|
||||
this.btnSave.AdaptForeColorWithTheme = true;
|
||||
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSave.BackColor = System.Drawing.Color.Silver;
|
||||
this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None;
|
||||
this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.btnSave.ForeColor = System.Drawing.Color.Black;
|
||||
this.btnSave.Location = new System.Drawing.Point(611, 1);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(75, 25);
|
||||
this.btnSave.TabIndex = 17;
|
||||
this.btnSave.Text = "Save";
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// Win95WindowsExplorer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -336,10 +368,9 @@ private void InitializeComponent()
|
|||
this.Load += new System.EventHandler(this.WinClassicWindowsExplorer_Load);
|
||||
this.program.ResumeLayout(false);
|
||||
this.program.PerformLayout();
|
||||
this.pnlSave.ResumeLayout(false);
|
||||
this.pnlSave.PerformLayout();
|
||||
this.MenuStrip1.ResumeLayout(false);
|
||||
this.MenuStrip1.PerformLayout();
|
||||
this.pnlSave.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -367,14 +398,15 @@ private void InitializeComponent()
|
|||
internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem1;
|
||||
internal System.Windows.Forms.ToolStripMenuItem AboutWindows95ToolStripMenuItem;
|
||||
internal System.Windows.Forms.Panel toprightcorner;
|
||||
internal System.Windows.Forms.Panel bottomrightcorner;
|
||||
internal System.Windows.Forms.Panel bottomleftcorner;
|
||||
internal System.Windows.Forms.Panel topleftcorner;
|
||||
internal System.Windows.Forms.ListView mainView;
|
||||
internal System.Windows.Forms.Panel pnlSave;
|
||||
internal System.Windows.Forms.Button Button1;
|
||||
internal System.Windows.Forms.Label Label1;
|
||||
internal System.Windows.Forms.TextBox txtSave;
|
||||
private System.Windows.Forms.Timer refresh;
|
||||
private Engine.UI.ClassicButton btnSave;
|
||||
private Engine.UI.ClassicLabel classicLabel2;
|
||||
private Engine.UI.ClassicLabel classicLabel1;
|
||||
private Engine.UI.ClassicTextBox txtSave;
|
||||
private Engine.UI.ClassicDropDown cmbType;
|
||||
private Engine.UI.ClassicButton btnCanc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,20 +22,30 @@ public partial class Win95WindowsExplorer : UserControl
|
|||
{
|
||||
public bool IsFileOpenDialog = false;
|
||||
public bool IsFileSaveDialog = false;
|
||||
public string onlyViewExtension = "";
|
||||
public List<string> onlyViewExtension = new List<string>();
|
||||
|
||||
string ToReplaceWith = ProfileDirectory;
|
||||
public string CurrentDirectory = ProfileMyComputerDirectory;
|
||||
string OldLabelText;
|
||||
string CurrentCopyFile;
|
||||
|
||||
int fileType = 6;
|
||||
//string attemptedDirectory = "";
|
||||
WindowManager wm = new WindowManager();
|
||||
|
||||
public Win95WindowsExplorer()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
// Fonts! yoy!
|
||||
|
||||
foreach (Control ctrl in this.Controls)
|
||||
{
|
||||
ctrl.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
||||
}
|
||||
|
||||
txtSave.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
||||
cmbType.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
||||
//Histacom2.Engine.UI.CustomTextBox ctb = new Histacom2.Engine.UI.CustomTextBox(textBox1);
|
||||
}
|
||||
|
||||
void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
|
||||
|
@ -77,7 +87,8 @@ void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
|
|||
Properties.Resources.TimeDistorter1,
|
||||
Properties.Resources.WinClassicGTN,
|
||||
Properties.Resources.WinClassicFTP,
|
||||
Properties.Resources.WinClassicRtfFile}); //20
|
||||
Properties.Resources.WinClassicRtfFile, // 20
|
||||
Properties.Resources.WinClassicAddressBookBig});
|
||||
|
||||
program.BringToFront();
|
||||
|
||||
|
@ -97,21 +108,24 @@ void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
|
|||
IsFileSaveDialog = true;
|
||||
}
|
||||
|
||||
if (IsFileOpenDialog == true)
|
||||
if (IsFileOpenDialog)
|
||||
{
|
||||
pnlSave.Show();
|
||||
Button1.Text = "Open";
|
||||
btnSave.Text = "Open";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsFileSaveDialog == true)
|
||||
if (IsFileSaveDialog)
|
||||
{
|
||||
pnlSave.Show();
|
||||
Button1.Text = "Save";
|
||||
btnSave.Text = "Save";
|
||||
}
|
||||
}
|
||||
|
||||
onlyViewExtension = FileDialogBoxManager.OnlyViewExtension;
|
||||
|
||||
foreach (string str in onlyViewExtension)
|
||||
cmbType.Items.Add(str);
|
||||
}
|
||||
|
||||
string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) {
|
||||
|
@ -121,9 +135,9 @@ string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) {
|
|||
FileSystemFolderInfo toRead = new FileSystemFolderInfo();
|
||||
toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
|
||||
|
||||
if (returnYesIfProtected == true)
|
||||
if (returnYesIfProtected)
|
||||
{
|
||||
if (toRead.IsProtected == true) return "yes";
|
||||
if (toRead.IsProtected) return "yes";
|
||||
}
|
||||
else return toRead.Label;
|
||||
return Val;
|
||||
|
@ -150,7 +164,7 @@ private void RefreshAll()
|
|||
{
|
||||
if (!(Path.GetFileName(str) == "_data.info"))
|
||||
{
|
||||
if (new FileInfo(str).Extension == onlyViewExtension)
|
||||
if (onlyViewExtension.Contains(new FileInfo(str).Extension))
|
||||
{
|
||||
itm = this.mainView.Items.Add(Path.GetFileName(str));
|
||||
itm.Tag = str;
|
||||
|
@ -220,8 +234,7 @@ public void OpenFile(string fileDir)
|
|||
{
|
||||
try
|
||||
{
|
||||
ReturnType(new FileInfo(fileDir).Extension);
|
||||
switch (fileType)
|
||||
switch (ReturnType(new FileInfo(fileDir).Extension))
|
||||
{
|
||||
case 1:
|
||||
WinClassicNotepad np = new WinClassicNotepad();
|
||||
|
@ -385,228 +398,89 @@ void OpenApplication(string appname, string path)
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
|
@ -628,7 +502,7 @@ void mainView_DoubleClick(object sender, EventArgs e)
|
|||
{ // If it is a file
|
||||
if (IsFileOpenDialog || IsFileSaveDialog)
|
||||
{
|
||||
if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension)
|
||||
if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension))
|
||||
{
|
||||
Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
|
||||
}
|
||||
|
@ -640,10 +514,8 @@ void mainView_DoubleClick(object sender, EventArgs e)
|
|||
((Form)this.TopLevelControl).Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenFile(mainView.FocusedItem.Tag.ToString());
|
||||
}
|
||||
}
|
||||
} catch { /* TODO: Illegal operation */ }
|
||||
}
|
||||
|
||||
|
@ -707,26 +579,22 @@ private void FolderToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
RefreshTreeNode();
|
||||
}
|
||||
|
||||
private void Button1_Click(object sender, EventArgs e)
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool OpenFile = false;
|
||||
if (mainView.FocusedItem != null)
|
||||
{
|
||||
if (mainView.FocusedItem.Tag.ToString() == "")
|
||||
{ // If it isn't a file
|
||||
GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString()));
|
||||
}
|
||||
else OpenFile = true; // If it is a file
|
||||
else txtSave.Text = mainView.FocusedItem.Tag.ToString();
|
||||
}
|
||||
else OpenFile = true;
|
||||
if (OpenFile == true)
|
||||
{
|
||||
if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
|
||||
else
|
||||
{
|
||||
if (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;
|
||||
|
@ -734,9 +602,7 @@ private void Button1_Click(object sender, EventArgs e)
|
|||
((Form)this.TopLevelControl).Close();
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -1036,5 +902,10 @@ private void TextDocumentToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
|
||||
RefreshTreeNode();
|
||||
}
|
||||
|
||||
private void btnCanc_Click(object sender, EventArgs e)
|
||||
{
|
||||
((Form)this.TopLevelControl).Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,21 +38,21 @@ private void InitializeComponent()
|
|||
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 @@ private void InitializeComponent()
|
|||
// 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 @@ private void InitializeComponent()
|
|||
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 @@ private void InitializeComponent()
|
|||
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 @@ private void InitializeComponent()
|
|||
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 @@ private void InitializeComponent()
|
|||
#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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,10 @@ public partial class WinClassicFTPClient : UserControl
|
|||
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 @@ private void btnCancel_Click(object sender, EventArgs e)
|
|||
|
||||
private void WinClassicFTPClient_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
textBox4.Text = "21";
|
||||
}
|
||||
|
||||
private void topBar_Paint(object sender, PaintEventArgs e)
|
||||
|
@ -73,6 +77,8 @@ private void topBar_Paint(object sender, PaintEventArgs e)
|
|||
}
|
||||
|
||||
private void ftpFiles_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Point objDrawingPoint = ftpFiles.PointToClient(Cursor.Position);
|
||||
ListViewItem objListViewItem = new ListViewItem();
|
||||
|
@ -132,6 +138,7 @@ private void ftpFiles_DoubleClick(object sender, EventArgs e)
|
|||
opendownload.amountToDL = 16;
|
||||
}
|
||||
}
|
||||
} catch { } // Try catch due to if you have more then one item selected the game crashing.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABe
|
||||
EgAAAk1TRnQBSQFMAgEBAwEAAUABAAFAAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
EgAAAk1TRnQBSQFMAgEBAwEAAUgBAAFIAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
|
|
@ -225,6 +225,7 @@ void SaveAs()
|
|||
{
|
||||
ActivateSaveFileDialog(".rtf");
|
||||
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
|
||||
DeactivateFileDialog();
|
||||
|
||||
if (selectedPath != "")
|
||||
{
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
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 @@ private void button1_Click(object sender, EventArgs e)
|
|||
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 @@ private void FRMWinClassicAddressBookNewContact_Load(object sender, EventArgs e)
|
|||
emails.Items.Add(email);
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
MessageBox.Show("NULL CONTACT!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,67 +105,69 @@ private void InitializeComponent()
|
|||
// newContactToolStripMenuItem
|
||||
//
|
||||
this.newContactToolStripMenuItem.Name = "newContactToolStripMenuItem";
|
||||
this.newContactToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.newContactToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.newContactToolStripMenuItem.Text = "New contact...";
|
||||
this.newContactToolStripMenuItem.Click += new System.EventHandler(this.newContactToolStripMenuItem_Click);
|
||||
//
|
||||
// newFolderToolStripMenuItem
|
||||
//
|
||||
this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem";
|
||||
this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.newFolderToolStripMenuItem.Text = "New folder...";
|
||||
this.newFolderToolStripMenuItem.Click += new System.EventHandler(this.newFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(147, 6);
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// propertiesToolStripMenuItem
|
||||
//
|
||||
this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem";
|
||||
this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.propertiesToolStripMenuItem.Text = "Properties";
|
||||
this.propertiesToolStripMenuItem.Click += new System.EventHandler(this.propertiesToolStripMenuItem_Click);
|
||||
//
|
||||
// deleteToolStripMenuItem
|
||||
//
|
||||
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.deleteToolStripMenuItem.Text = "Delete";
|
||||
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(147, 6);
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// importToolStripMenuItem
|
||||
//
|
||||
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
|
||||
this.importToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.importToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.importToolStripMenuItem.Text = "Import...";
|
||||
this.importToolStripMenuItem.Click += new System.EventHandler(this.importToolStripMenuItem_Click);
|
||||
//
|
||||
// exportToolStripMenuItem
|
||||
//
|
||||
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
|
||||
this.exportToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.exportToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.exportToolStripMenuItem.Text = "Export...";
|
||||
this.exportToolStripMenuItem.Click += new System.EventHandler(this.exportToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(147, 6);
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(147, 6);
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.exitToolStripMenuItem.Text = "Exit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -247,6 +249,7 @@ private void InitializeComponent()
|
|||
this.aboutAddressBookToolStripMenuItem.Name = "aboutAddressBookToolStripMenuItem";
|
||||
this.aboutAddressBookToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
|
||||
this.aboutAddressBookToolStripMenuItem.Text = "About Address Book";
|
||||
this.aboutAddressBookToolStripMenuItem.Click += new System.EventHandler(this.aboutAddressBookToolStripMenuItem_Click);
|
||||
//
|
||||
// contactsView
|
||||
//
|
||||
|
@ -304,6 +307,7 @@ private void InitializeComponent()
|
|||
this.toolNew.Size = new System.Drawing.Size(43, 39);
|
||||
this.toolNew.TabIndex = 0;
|
||||
this.toolNew.TabStop = false;
|
||||
this.toolNew.Click += new System.EventHandler(this.toolNew_Click);
|
||||
//
|
||||
// toolDelete
|
||||
//
|
||||
|
@ -348,6 +352,7 @@ private void InitializeComponent()
|
|||
this.Controls.Add(this.topmenu);
|
||||
this.Name = "WinClassicAddressBook";
|
||||
this.Size = new System.Drawing.Size(666, 425);
|
||||
this.Load += new System.EventHandler(this.WinClassicAddressBook_Load);
|
||||
this.topmenu.ResumeLayout(false);
|
||||
this.topmenu.PerformLayout();
|
||||
this.toolbar.ResumeLayout(false);
|
||||
|
@ -378,7 +383,7 @@ private void InitializeComponent()
|
|||
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;
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
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 @@ public WinClassicAddressBook()
|
|||
{
|
||||
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,30 +90,22 @@ private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
|
|||
// return toReturn;
|
||||
//}
|
||||
|
||||
public void UpdateContactListFromNodeName(string NodeName)
|
||||
public void UpdateContactListFromNodeName(TreeNode Node)
|
||||
{
|
||||
previousParent = Node.Parent;
|
||||
contactsView.Items.Clear();
|
||||
try
|
||||
{
|
||||
foreach (AddressBookContactList ContactList in AddressBookObjects)
|
||||
{
|
||||
if (ContactList.AttachedNode == NodeName)
|
||||
if (ContactList.NodePath == FindNodePath(Node))
|
||||
{
|
||||
foreach (AddressBookContact contact in ContactList.Contacts)
|
||||
{
|
||||
if (contact != null)
|
||||
{
|
||||
if (contact.FirstName != null)
|
||||
{
|
||||
contactsView.Items.Add(contact.FirstName + " " + contact.MiddleName + " " + contact.LastName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Null contact!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch
|
||||
{
|
||||
|
@ -106,15 +117,29 @@ public void AddFolderToNode(TreeNode OldTreeNode, string NewNodeName)
|
|||
{
|
||||
if (OldTreeNode != null)
|
||||
{
|
||||
OldTreeNode.Nodes.Add(NewNodeName);
|
||||
TreeNode nde = OldTreeNode.Nodes.Add(NewNodeName);
|
||||
|
||||
AddressBookObjects.Add(new AddressBookContactList
|
||||
{
|
||||
AttachedNode = NewNodeName,
|
||||
NodePath = FindNodePath(nde)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
TreeNode previousParent;
|
||||
public string FindNodePath(TreeNode nde)
|
||||
{
|
||||
if (nde != null)
|
||||
{
|
||||
string ret = nde.Text;
|
||||
previousParent = nde.Parent;
|
||||
while (previousParent != null)
|
||||
ret = $"{FindNodePath(nde.Parent)}\\{ret}";
|
||||
return ret;
|
||||
}
|
||||
else return "";
|
||||
}
|
||||
|
||||
private void newFolderToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
NewFolder();
|
||||
|
@ -154,7 +179,7 @@ void NewContact()
|
|||
{
|
||||
foreach (AddressBookContactList ContactList in AddressBookObjects)
|
||||
{
|
||||
if (ContactList.AttachedNode == treeView1.SelectedNode.Text)
|
||||
if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
|
||||
{
|
||||
ContactList.Contacts.Add(Program.AddressBookSelectedContact);
|
||||
contactsView.Items.Add(Program.AddressBookSelectedContact.FirstName + " " + Program.AddressBookSelectedContact.MiddleName + " " + Program.AddressBookSelectedContact.LastName);
|
||||
|
@ -178,9 +203,15 @@ void OpenProperties()
|
|||
{
|
||||
foreach (AddressBookContactList ContactList in AddressBookObjects)
|
||||
{
|
||||
if (ContactList.AttachedNode == treeView1.SelectedNode.Text)
|
||||
if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
|
||||
{
|
||||
foreach (AddressBookContact Contact in ContactList.Contacts)
|
||||
{
|
||||
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
|
||||
{
|
||||
if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text)
|
||||
{
|
||||
|
@ -189,6 +220,7 @@ void OpenProperties()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
WinClassic app = wm.Init(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true);
|
||||
|
||||
if (treeView1.SelectedNode != null)
|
||||
|
@ -197,7 +229,7 @@ void OpenProperties()
|
|||
{
|
||||
foreach (AddressBookContactList ContactList in AddressBookObjects)
|
||||
{
|
||||
if (ContactList.AttachedNode == treeView1.SelectedNode.Text)
|
||||
if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
|
||||
{
|
||||
foreach (AddressBookContact Contact in ContactList.Contacts)
|
||||
{
|
||||
|
@ -228,22 +260,38 @@ private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
|
||||
void DeleteContact()
|
||||
{
|
||||
if (treeView1.SelectedNode != null)
|
||||
try
|
||||
{
|
||||
foreach (AddressBookContactList ContactList in AddressBookObjects)
|
||||
{
|
||||
if (ContactList.AttachedNode == treeView1.SelectedNode.Text)
|
||||
if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
|
||||
{
|
||||
foreach (AddressBookContact Contact in ContactList.Contacts)
|
||||
{
|
||||
if (contactsView.FocusedItem == null)
|
||||
{ // Most likely they are trying to delete a whole folder!
|
||||
if (treeView1.SelectedNode.Text != "Shared Contacts")
|
||||
if (treeView1.SelectedNode != null)
|
||||
{
|
||||
AddressBookObjects.Remove(ContactList);
|
||||
treeView1.Nodes.Remove(treeView1.SelectedNode);
|
||||
previousParent = null;
|
||||
UpdateContactListFromNodeName(treeView1.Nodes[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text)
|
||||
{
|
||||
ContactList.Contacts.Remove(Contact);
|
||||
previousParent = treeView1.SelectedNode.Parent;
|
||||
UpdateContactListFromNodeName(treeView1.SelectedNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch { }
|
||||
}
|
||||
|
||||
private void toolDelete_Click(object sender, EventArgs e)
|
||||
|
@ -275,6 +323,99 @@ private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
{
|
||||
((Form)this.TopLevelControl).Close();
|
||||
}
|
||||
|
||||
private void toolNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
newContext.Show(MousePosition);
|
||||
}
|
||||
|
||||
private void aboutAddressBookToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void WinClassicAddressBook_Load(object sender, EventArgs e)
|
||||
{
|
||||
((Form)this.TopLevelControl).FormClosed += (sender2, e2) =>
|
||||
{
|
||||
SaveData();
|
||||
};
|
||||
}
|
||||
|
||||
public void SaveData()
|
||||
{
|
||||
string toSave = Newtonsoft.Json.JsonConvert.SerializeObject(AddressBookObjects, Newtonsoft.Json.Formatting.Indented);
|
||||
CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "Application Data", "Microsoft", "Address Book"), $"{ProfileName}.wab", toSave, 21, toSave.Length);
|
||||
}
|
||||
|
||||
public void SaveDataAs()
|
||||
{
|
||||
try
|
||||
{
|
||||
string toSave = Newtonsoft.Json.JsonConvert.SerializeObject(AddressBookObjects, Newtonsoft.Json.Formatting.Indented);
|
||||
|
||||
ActivateSaveFileDialog(".wab");
|
||||
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
|
||||
DeactivateFileDialog();
|
||||
|
||||
if (selectedPath != "")
|
||||
CreateWindowsFile(new FileInfo(selectedPath).Directory.FullName, selectedPath.Split('\\').Last(), toSave, 21, toSave.Length);
|
||||
} catch { }
|
||||
}
|
||||
|
||||
public void LoadData()
|
||||
{
|
||||
AddressBookObjects = Newtonsoft.Json.JsonConvert.DeserializeObject<List<AddressBookContactList>>(File.ReadAllText(Path.Combine(ProfileWindowsDirectory, "Application Data", "Microsoft", "Address Book", $"{ProfileName}.wab")));
|
||||
|
||||
foreach (AddressBookContactList lst in AddressBookObjects)
|
||||
UpdateTreeView(lst);
|
||||
}
|
||||
|
||||
public void LoadDataAs()
|
||||
{
|
||||
ActivateOpenFileDialog(".wab");
|
||||
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
|
||||
DeactivateFileDialog();
|
||||
|
||||
if (selectedPath != "")
|
||||
AddressBookObjects = Newtonsoft.Json.JsonConvert.DeserializeObject<List<AddressBookContactList>>(File.ReadAllText(selectedPath));
|
||||
|
||||
foreach (AddressBookContactList lst in AddressBookObjects)
|
||||
UpdateTreeView(lst);
|
||||
}
|
||||
|
||||
TreeNode UpdatePrevParent;
|
||||
public void UpdateTreeView(AddressBookContactList lst, int count = 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] parts = new string[] { "Shared Contacts" };
|
||||
if (lst.NodePath != null)
|
||||
parts = lst.NodePath.Split('\\');
|
||||
|
||||
if (count == 0) UpdatePrevParent = treeView1.Nodes[0];
|
||||
if (lst.NodePath != FindNodePath(treeView1.Nodes[0]))
|
||||
{
|
||||
if (UpdatePrevParent.Nodes.ContainsKey(parts[count + 1]))
|
||||
UpdatePrevParent.Nodes.RemoveByKey(parts[count + 1]);
|
||||
|
||||
TreeNode newNde = UpdatePrevParent.Nodes.Add(parts[count + 1], parts[count + 1]);
|
||||
UpdatePrevParent = newNde;
|
||||
if (count != parts.Length - 2) UpdateTreeView(lst, ++count);
|
||||
}
|
||||
|
||||
} catch { }
|
||||
}
|
||||
|
||||
private void importToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadDataAs();
|
||||
}
|
||||
|
||||
private void exportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveDataAs();
|
||||
}
|
||||
}
|
||||
|
||||
public class AddressBookContact
|
||||
|
@ -287,7 +428,7 @@ public class AddressBookContact
|
|||
|
||||
public class AddressBookContactList
|
||||
{
|
||||
public string AttachedNode;
|
||||
public string NodePath;
|
||||
public List<AddressBookContact> Contacts = new List<AddressBookContact>();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,32 +29,36 @@ protected override void Dispose(bool disposing)
|
|||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinClassicWindowsExplorer));
|
||||
this.program = new System.Windows.Forms.Panel();
|
||||
this.mainView = new System.Windows.Forms.ListView();
|
||||
this.pnlInfo = new System.Windows.Forms.Panel();
|
||||
this.txtInfoTitle = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.txtInfoTitle = new System.Windows.Forms.Label();
|
||||
this.pnlInfoContent = new System.Windows.Forms.Panel();
|
||||
this.InfoDesc = new System.Windows.Forms.Panel();
|
||||
this.txtInfoDescSize = new System.Windows.Forms.Label();
|
||||
this.txtInfoDescModified = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtInfoDescType = new System.Windows.Forms.Label();
|
||||
this.txtInfoDescName = new System.Windows.Forms.Label();
|
||||
this.txtInfoTip = new System.Windows.Forms.Label();
|
||||
this.classicLabel3 = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.txtInfoDescSize = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.txtInfoDescModified = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.txtInfoDescType = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.txtInfoDescName = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.txtInfoTip = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.pnlFolders = new System.Windows.Forms.Panel();
|
||||
this.diskView = new System.Windows.Forms.TreeView();
|
||||
this.pnlFoldersTop = new System.Windows.Forms.Panel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.btnFolderClose = new System.Windows.Forms.PictureBox();
|
||||
this.classicLabel4 = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.toprightcorner = new System.Windows.Forms.Panel();
|
||||
this.bottomrightcorner = new System.Windows.Forms.Panel();
|
||||
this.bottomleftcorner = new System.Windows.Forms.Panel();
|
||||
this.topleftcorner = new System.Windows.Forms.Panel();
|
||||
this.pnlSave = new System.Windows.Forms.Panel();
|
||||
this.Button1 = new System.Windows.Forms.Button();
|
||||
this.Label1 = new System.Windows.Forms.Label();
|
||||
this.txtSave = new System.Windows.Forms.TextBox();
|
||||
this.btnCanc = new Histacom2.Engine.UI.ClassicButton();
|
||||
this.cmbType = new Histacom2.Engine.UI.ClassicDropDown();
|
||||
this.txtSave = new Histacom2.Engine.UI.ClassicTextBox();
|
||||
this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel();
|
||||
this.btnSave = new Histacom2.Engine.UI.ClassicButton();
|
||||
this.MenuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -112,7 +116,7 @@ private void InitializeComponent()
|
|||
this.mainView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.mainView.Location = new System.Drawing.Point(396, 24);
|
||||
this.mainView.Name = "mainView";
|
||||
this.mainView.Size = new System.Drawing.Size(308, 458);
|
||||
this.mainView.Size = new System.Drawing.Size(308, 439);
|
||||
this.mainView.TabIndex = 10;
|
||||
this.mainView.UseCompatibleStateImageBehavior = false;
|
||||
this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit);
|
||||
|
@ -124,37 +128,37 @@ private void InitializeComponent()
|
|||
this.pnlInfo.BackColor = System.Drawing.Color.White;
|
||||
this.pnlInfo.BackgroundImage = global::Histacom2.Properties.Resources.Win98WebBackground;
|
||||
this.pnlInfo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.pnlInfo.Controls.Add(this.pictureBox1);
|
||||
this.pnlInfo.Controls.Add(this.txtInfoTitle);
|
||||
this.pnlInfo.Controls.Add(this.pictureBox1);
|
||||
this.pnlInfo.Controls.Add(this.pnlInfoContent);
|
||||
this.pnlInfo.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.pnlInfo.Location = new System.Drawing.Point(196, 24);
|
||||
this.pnlInfo.Name = "pnlInfo";
|
||||
this.pnlInfo.Size = new System.Drawing.Size(200, 458);
|
||||
this.pnlInfo.Size = new System.Drawing.Size(200, 439);
|
||||
this.pnlInfo.TabIndex = 19;
|
||||
//
|
||||
// txtInfoTitle
|
||||
//
|
||||
this.txtInfoTitle.BackColor = System.Drawing.Color.Transparent;
|
||||
this.txtInfoTitle.DropShadow = false;
|
||||
this.txtInfoTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F);
|
||||
this.txtInfoTitle.Location = new System.Drawing.Point(13, 56);
|
||||
this.txtInfoTitle.Name = "txtInfoTitle";
|
||||
this.txtInfoTitle.Size = new System.Drawing.Size(194, 30);
|
||||
this.txtInfoTitle.TabIndex = 23;
|
||||
this.txtInfoTitle.Text = "FOLDER_NAME";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pictureBox1.Image = global::Histacom2.Properties.Resources.WinClassicFolderSmall;
|
||||
this.pictureBox1.Image = global::Histacom2.Properties.Resources.WinClassicFolder;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(15, 18);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(30, 30);
|
||||
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.TabIndex = 20;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// txtInfoTitle
|
||||
//
|
||||
this.txtInfoTitle.AutoSize = true;
|
||||
this.txtInfoTitle.BackColor = System.Drawing.Color.Transparent;
|
||||
this.txtInfoTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtInfoTitle.Location = new System.Drawing.Point(3, 51);
|
||||
this.txtInfoTitle.Name = "txtInfoTitle";
|
||||
this.txtInfoTitle.Size = new System.Drawing.Size(192, 29);
|
||||
this.txtInfoTitle.TabIndex = 0;
|
||||
this.txtInfoTitle.Text = "FOLDER_NAME";
|
||||
//
|
||||
// pnlInfoContent
|
||||
//
|
||||
this.pnlInfoContent.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
|
@ -165,78 +169,77 @@ private void InitializeComponent()
|
|||
this.pnlInfoContent.Controls.Add(this.txtInfoTip);
|
||||
this.pnlInfoContent.Location = new System.Drawing.Point(0, 95);
|
||||
this.pnlInfoContent.Name = "pnlInfoContent";
|
||||
this.pnlInfoContent.Size = new System.Drawing.Size(199, 362);
|
||||
this.pnlInfoContent.Size = new System.Drawing.Size(199, 343);
|
||||
this.pnlInfoContent.TabIndex = 22;
|
||||
//
|
||||
// InfoDesc
|
||||
//
|
||||
this.InfoDesc.Controls.Add(this.classicLabel3);
|
||||
this.InfoDesc.Controls.Add(this.txtInfoDescSize);
|
||||
this.InfoDesc.Controls.Add(this.txtInfoDescModified);
|
||||
this.InfoDesc.Controls.Add(this.label5);
|
||||
this.InfoDesc.Controls.Add(this.txtInfoDescType);
|
||||
this.InfoDesc.Controls.Add(this.txtInfoDescName);
|
||||
this.InfoDesc.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.InfoDesc.Location = new System.Drawing.Point(0, 25);
|
||||
this.InfoDesc.Location = new System.Drawing.Point(0, 26);
|
||||
this.InfoDesc.Name = "InfoDesc";
|
||||
this.InfoDesc.Size = new System.Drawing.Size(199, 94);
|
||||
this.InfoDesc.TabIndex = 22;
|
||||
this.InfoDesc.Visible = false;
|
||||
//
|
||||
// classicLabel3
|
||||
//
|
||||
this.classicLabel3.DropShadow = false;
|
||||
this.classicLabel3.Location = new System.Drawing.Point(13, 38);
|
||||
this.classicLabel3.Name = "classicLabel3";
|
||||
this.classicLabel3.Size = new System.Drawing.Size(179, 13);
|
||||
this.classicLabel3.TabIndex = 1;
|
||||
this.classicLabel3.Text = "Last modified:";
|
||||
//
|
||||
// txtInfoDescSize
|
||||
//
|
||||
this.txtInfoDescSize.AutoSize = true;
|
||||
this.txtInfoDescSize.Location = new System.Drawing.Point(12, 81);
|
||||
this.txtInfoDescSize.DropShadow = false;
|
||||
this.txtInfoDescSize.Location = new System.Drawing.Point(15, 76);
|
||||
this.txtInfoDescSize.Name = "txtInfoDescSize";
|
||||
this.txtInfoDescSize.Size = new System.Drawing.Size(59, 13);
|
||||
this.txtInfoDescSize.TabIndex = 0;
|
||||
this.txtInfoDescSize.Size = new System.Drawing.Size(179, 13);
|
||||
this.txtInfoDescSize.TabIndex = 1;
|
||||
this.txtInfoDescSize.Text = "FILE_SIZE";
|
||||
//
|
||||
// txtInfoDescModified
|
||||
//
|
||||
this.txtInfoDescModified.AutoSize = true;
|
||||
this.txtInfoDescModified.Location = new System.Drawing.Point(12, 54);
|
||||
this.txtInfoDescModified.DropShadow = false;
|
||||
this.txtInfoDescModified.Location = new System.Drawing.Point(13, 57);
|
||||
this.txtInfoDescModified.Name = "txtInfoDescModified";
|
||||
this.txtInfoDescModified.Size = new System.Drawing.Size(92, 13);
|
||||
this.txtInfoDescModified.TabIndex = 0;
|
||||
this.txtInfoDescModified.Text = "LAST_MODIFIED";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(12, 41);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(73, 13);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "Last Modified:";
|
||||
this.txtInfoDescModified.Size = new System.Drawing.Size(179, 13);
|
||||
this.txtInfoDescModified.TabIndex = 1;
|
||||
this.txtInfoDescModified.Text = "DATE_MODIFIED";
|
||||
//
|
||||
// txtInfoDescType
|
||||
//
|
||||
this.txtInfoDescType.AutoSize = true;
|
||||
this.txtInfoDescType.Location = new System.Drawing.Point(12, 18);
|
||||
this.txtInfoDescType.DropShadow = false;
|
||||
this.txtInfoDescType.Location = new System.Drawing.Point(13, 19);
|
||||
this.txtInfoDescType.Name = "txtInfoDescType";
|
||||
this.txtInfoDescType.Size = new System.Drawing.Size(63, 13);
|
||||
this.txtInfoDescType.TabIndex = 0;
|
||||
this.txtInfoDescType.Size = new System.Drawing.Size(183, 13);
|
||||
this.txtInfoDescType.TabIndex = 1;
|
||||
this.txtInfoDescType.Text = "FILE_TYPE";
|
||||
//
|
||||
// txtInfoDescName
|
||||
//
|
||||
this.txtInfoDescName.AutoSize = true;
|
||||
this.txtInfoDescName.Location = new System.Drawing.Point(12, 5);
|
||||
this.txtInfoDescName.DropShadow = false;
|
||||
this.txtInfoDescName.Location = new System.Drawing.Point(13, 2);
|
||||
this.txtInfoDescName.Name = "txtInfoDescName";
|
||||
this.txtInfoDescName.Size = new System.Drawing.Size(66, 13);
|
||||
this.txtInfoDescName.TabIndex = 0;
|
||||
this.txtInfoDescName.Size = new System.Drawing.Size(179, 13);
|
||||
this.txtInfoDescName.TabIndex = 1;
|
||||
this.txtInfoDescName.Text = "FILE_NAME";
|
||||
//
|
||||
// txtInfoTip
|
||||
//
|
||||
this.txtInfoTip.BackColor = System.Drawing.Color.Transparent;
|
||||
this.txtInfoTip.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.txtInfoTip.DropShadow = false;
|
||||
this.txtInfoTip.Location = new System.Drawing.Point(0, 0);
|
||||
this.txtInfoTip.Name = "txtInfoTip";
|
||||
this.txtInfoTip.Size = new System.Drawing.Size(199, 25);
|
||||
this.txtInfoTip.TabIndex = 21;
|
||||
this.txtInfoTip.Text = "Select an item to view its description.";
|
||||
this.txtInfoTip.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.txtInfoTip.Size = new System.Drawing.Size(199, 26);
|
||||
this.txtInfoTip.TabIndex = 23;
|
||||
this.txtInfoTip.Text = "Please choose an item to view it\'s description.";
|
||||
//
|
||||
// pnlFolders
|
||||
//
|
||||
|
@ -245,7 +248,7 @@ private void InitializeComponent()
|
|||
this.pnlFolders.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.pnlFolders.Location = new System.Drawing.Point(0, 24);
|
||||
this.pnlFolders.Name = "pnlFolders";
|
||||
this.pnlFolders.Size = new System.Drawing.Size(196, 458);
|
||||
this.pnlFolders.Size = new System.Drawing.Size(196, 439);
|
||||
this.pnlFolders.TabIndex = 0;
|
||||
//
|
||||
// diskView
|
||||
|
@ -253,30 +256,21 @@ private void InitializeComponent()
|
|||
this.diskView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.diskView.Location = new System.Drawing.Point(0, 22);
|
||||
this.diskView.Name = "diskView";
|
||||
this.diskView.Size = new System.Drawing.Size(196, 436);
|
||||
this.diskView.Size = new System.Drawing.Size(196, 417);
|
||||
this.diskView.TabIndex = 13;
|
||||
this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect);
|
||||
//
|
||||
// pnlFoldersTop
|
||||
//
|
||||
this.pnlFoldersTop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200)))));
|
||||
this.pnlFoldersTop.Controls.Add(this.label2);
|
||||
this.pnlFoldersTop.Controls.Add(this.btnFolderClose);
|
||||
this.pnlFoldersTop.Controls.Add(this.classicLabel4);
|
||||
this.pnlFoldersTop.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pnlFoldersTop.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlFoldersTop.Name = "pnlFoldersTop";
|
||||
this.pnlFoldersTop.Size = new System.Drawing.Size(196, 22);
|
||||
this.pnlFoldersTop.TabIndex = 20;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(3, 3);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(41, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Folders";
|
||||
//
|
||||
// btnFolderClose
|
||||
//
|
||||
this.btnFolderClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200)))));
|
||||
|
@ -291,6 +285,15 @@ private void InitializeComponent()
|
|||
this.btnFolderClose.MouseEnter += new System.EventHandler(this.pictureBox1_MouseEnter);
|
||||
this.btnFolderClose.MouseLeave += new System.EventHandler(this.btnFolderClose_MouseLeave);
|
||||
//
|
||||
// classicLabel4
|
||||
//
|
||||
this.classicLabel4.DropShadow = false;
|
||||
this.classicLabel4.Location = new System.Drawing.Point(3, 5);
|
||||
this.classicLabel4.Name = "classicLabel4";
|
||||
this.classicLabel4.Size = new System.Drawing.Size(179, 13);
|
||||
this.classicLabel4.TabIndex = 1;
|
||||
this.classicLabel4.Text = "Folders";
|
||||
//
|
||||
// toprightcorner
|
||||
//
|
||||
this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
|
@ -325,45 +328,96 @@ private void InitializeComponent()
|
|||
//
|
||||
// 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
|
||||
// btnCanc
|
||||
//
|
||||
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);
|
||||
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);
|
||||
//
|
||||
// Label1
|
||||
// cmbType
|
||||
//
|
||||
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:";
|
||||
this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmbType.BackColor = System.Drawing.Color.White;
|
||||
this.cmbType.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.cmbType.Items = ((System.Collections.Generic.List<string>)(resources.GetObject("cmbType.Items")));
|
||||
this.cmbType.Location = new System.Drawing.Point(64, 32);
|
||||
this.cmbType.Name = "cmbType";
|
||||
this.cmbType.Size = new System.Drawing.Size(549, 20);
|
||||
this.cmbType.TabIndex = 29;
|
||||
this.cmbType.UseSystemPasswordChar = false;
|
||||
//
|
||||
// txtSave
|
||||
//
|
||||
this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSave.Location = new System.Drawing.Point(60, 3);
|
||||
this.txtSave.BackColor = System.Drawing.Color.White;
|
||||
this.txtSave.Location = new System.Drawing.Point(64, 7);
|
||||
this.txtSave.Name = "txtSave";
|
||||
this.txtSave.Size = new System.Drawing.Size(560, 20);
|
||||
this.txtSave.TabIndex = 15;
|
||||
this.txtSave.Size = new System.Drawing.Size(549, 20);
|
||||
this.txtSave.TabIndex = 28;
|
||||
this.txtSave.UseSystemPasswordChar = false;
|
||||
//
|
||||
// classicLabel2
|
||||
//
|
||||
this.classicLabel2.DropShadow = false;
|
||||
this.classicLabel2.Location = new System.Drawing.Point(11, 33);
|
||||
this.classicLabel2.Name = "classicLabel2";
|
||||
this.classicLabel2.Size = new System.Drawing.Size(64, 13);
|
||||
this.classicLabel2.TabIndex = 26;
|
||||
this.classicLabel2.Text = "File type:";
|
||||
//
|
||||
// classicLabel1
|
||||
//
|
||||
this.classicLabel1.DropShadow = false;
|
||||
this.classicLabel1.Location = new System.Drawing.Point(11, 7);
|
||||
this.classicLabel1.Name = "classicLabel1";
|
||||
this.classicLabel1.Size = new System.Drawing.Size(64, 13);
|
||||
this.classicLabel1.TabIndex = 27;
|
||||
this.classicLabel1.Text = "File name:";
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.AdaptBackColorWithTheme = true;
|
||||
this.btnSave.AdaptFontWithTheme = true;
|
||||
this.btnSave.AdaptForeColorWithTheme = true;
|
||||
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSave.BackColor = System.Drawing.Color.Silver;
|
||||
this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None;
|
||||
this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.btnSave.ForeColor = System.Drawing.Color.Black;
|
||||
this.btnSave.Location = new System.Drawing.Point(619, 2);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(75, 25);
|
||||
this.btnSave.TabIndex = 25;
|
||||
this.btnSave.Text = "Save";
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// MenuStrip1
|
||||
//
|
||||
|
@ -543,17 +597,13 @@ private void InitializeComponent()
|
|||
this.program.ResumeLayout(false);
|
||||
this.program.PerformLayout();
|
||||
this.pnlInfo.ResumeLayout(false);
|
||||
this.pnlInfo.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.pnlInfoContent.ResumeLayout(false);
|
||||
this.InfoDesc.ResumeLayout(false);
|
||||
this.InfoDesc.PerformLayout();
|
||||
this.pnlFolders.ResumeLayout(false);
|
||||
this.pnlFoldersTop.ResumeLayout(false);
|
||||
this.pnlFoldersTop.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.btnFolderClose)).EndInit();
|
||||
this.pnlSave.ResumeLayout(false);
|
||||
this.pnlSave.PerformLayout();
|
||||
this.MenuStrip1.ResumeLayout(false);
|
||||
this.MenuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
@ -590,24 +640,27 @@ private void InitializeComponent()
|
|||
internal System.Windows.Forms.Panel topleftcorner;
|
||||
internal System.Windows.Forms.ListView mainView;
|
||||
internal System.Windows.Forms.Panel pnlSave;
|
||||
internal System.Windows.Forms.Button Button1;
|
||||
internal System.Windows.Forms.Label Label1;
|
||||
internal System.Windows.Forms.TextBox txtSave;
|
||||
private System.Windows.Forms.Panel pnlInfo;
|
||||
private System.Windows.Forms.Panel pnlFolders;
|
||||
private System.Windows.Forms.Panel pnlFoldersTop;
|
||||
private System.Windows.Forms.PictureBox btnFolderClose;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label txtInfoTitle;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label txtInfoTip;
|
||||
private System.Windows.Forms.Panel pnlInfoContent;
|
||||
private System.Windows.Forms.Panel InfoDesc;
|
||||
private System.Windows.Forms.Label txtInfoDescModified;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label txtInfoDescType;
|
||||
private System.Windows.Forms.Label txtInfoDescName;
|
||||
private System.Windows.Forms.Label txtInfoDescSize;
|
||||
private System.Windows.Forms.Timer refresh;
|
||||
private Engine.UI.ClassicButton btnCanc;
|
||||
private Engine.UI.ClassicDropDown cmbType;
|
||||
private Engine.UI.ClassicTextBox txtSave;
|
||||
private Engine.UI.ClassicLabel classicLabel2;
|
||||
private Engine.UI.ClassicLabel classicLabel1;
|
||||
private Engine.UI.ClassicButton btnSave;
|
||||
private Engine.UI.ClassicLabel txtInfoTitle;
|
||||
private Engine.UI.ClassicLabel txtInfoTip;
|
||||
private Engine.UI.ClassicLabel txtInfoDescName;
|
||||
private Engine.UI.ClassicLabel txtInfoDescType;
|
||||
private Engine.UI.ClassicLabel classicLabel3;
|
||||
private Engine.UI.ClassicLabel txtInfoDescModified;
|
||||
private Engine.UI.ClassicLabel txtInfoDescSize;
|
||||
private Engine.UI.ClassicLabel classicLabel4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,13 +22,12 @@ public partial class WinClassicWindowsExplorer : UserControl
|
|||
{
|
||||
public bool IsFileOpenDialog = false;
|
||||
public bool IsFileSaveDialog = false;
|
||||
public string onlyViewExtension = "";
|
||||
public List<string> onlyViewExtension = new List<string>();
|
||||
|
||||
string ToReplaceWith = ProfileDirectory;
|
||||
public string CurrentDirectory = ProfileMyComputerDirectory;
|
||||
string OldLabelText;
|
||||
string CurrentCopyFile;
|
||||
int fileType = 6;
|
||||
//string attemptedDirectory = "";
|
||||
WindowManager wm = new WindowManager();
|
||||
|
||||
|
@ -39,11 +38,6 @@ public WinClassicWindowsExplorer()
|
|||
|
||||
void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (SaveSystem.CurrentSave.CurrentOS == "2000")
|
||||
{
|
||||
pnlInfo.Width = 200;
|
||||
txtInfoTitle.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
|
||||
}
|
||||
|
||||
diskView.ImageList = new ImageList();
|
||||
|
||||
|
@ -82,7 +76,8 @@ void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
|
|||
Properties.Resources.TimeDistorter1,
|
||||
Properties.Resources.WinClassicGTN,
|
||||
Properties.Resources.WinClassicFTP,
|
||||
Properties.Resources.WinClassicRtfFile}); //20
|
||||
Properties.Resources.WinClassicRtfFile, // 20
|
||||
Properties.Resources.WinClassicAddressBookBig});
|
||||
|
||||
program.BringToFront();
|
||||
|
||||
|
@ -102,21 +97,29 @@ void WinClassicWindowsExplorer_Load(object sender, EventArgs e)
|
|||
IsFileSaveDialog = true;
|
||||
}
|
||||
|
||||
if (IsFileOpenDialog == true)
|
||||
if (IsFileOpenDialog)
|
||||
{
|
||||
pnlSave.Show();
|
||||
Button1.Text = "Open";
|
||||
btnSave.Text = "Open";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsFileSaveDialog == true)
|
||||
if (IsFileSaveDialog)
|
||||
{
|
||||
pnlSave.Show();
|
||||
Button1.Text = "Save";
|
||||
btnSave.Text = "Save";
|
||||
}
|
||||
}
|
||||
|
||||
onlyViewExtension = FileDialogBoxManager.OnlyViewExtension;
|
||||
|
||||
foreach (string str in onlyViewExtension)
|
||||
cmbType.Items.Add(str);
|
||||
|
||||
cmbType.Text = onlyViewExtension.FirstOrDefault();
|
||||
|
||||
txtSave.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
||||
cmbType.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
||||
}
|
||||
|
||||
//'Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs)
|
||||
|
@ -139,9 +142,9 @@ string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) {
|
|||
FileSystemFolderInfo toRead = new FileSystemFolderInfo();
|
||||
toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo);
|
||||
|
||||
if (returnYesIfProtected == true)
|
||||
if (returnYesIfProtected)
|
||||
{
|
||||
if (toRead.IsProtected == true)
|
||||
if (toRead.IsProtected)
|
||||
{
|
||||
return "yes";
|
||||
}
|
||||
|
@ -157,6 +160,19 @@ void RefreshAll() {
|
|||
//try {
|
||||
this.mainView.Items.Clear();
|
||||
|
||||
if (CurrentDirectory == ProfileFileSystemDirectory)
|
||||
{
|
||||
txtInfoTitle.Text = "My Computer";
|
||||
pictureBox1.Image = Properties.Resources.Win95ComputerIcon;
|
||||
} else if (CurrentDirectory == ProfileMyComputerDirectory) {
|
||||
txtInfoTitle.Text = "C:";
|
||||
pictureBox1.Image = Properties.Resources.WinClassicDrive;
|
||||
} else {
|
||||
txtInfoTitle.Text = Path.GetFileName(CurrentDirectory);
|
||||
pictureBox1.Image = Properties.Resources.WinClassicFolder;
|
||||
}
|
||||
|
||||
|
||||
foreach (string str in Directory.GetDirectories(CurrentDirectory))
|
||||
{
|
||||
string label = ReadDataFile(str, false);
|
||||
|
@ -172,14 +188,14 @@ void RefreshAll() {
|
|||
{
|
||||
if (!(Path.GetFileName(str) == "_data.info"))
|
||||
{
|
||||
if (new FileInfo(str).Extension == onlyViewExtension)
|
||||
if (onlyViewExtension.Contains(new FileInfo(str).Extension))
|
||||
{
|
||||
itm = this.mainView.Items.Add(Path.GetFileName(str));
|
||||
itm.Tag = str;
|
||||
}
|
||||
else break;
|
||||
else continue;
|
||||
}
|
||||
else break;
|
||||
else continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -188,7 +204,7 @@ void RefreshAll() {
|
|||
itm = this.mainView.Items.Add(Path.GetFileName(str));
|
||||
itm.Tag = str;
|
||||
}
|
||||
else break;
|
||||
else continue;
|
||||
}
|
||||
FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(CurrentDirectory, "_data.info")));
|
||||
foreach (var item in fsfi.Files)
|
||||
|
@ -244,8 +260,7 @@ public void OpenFile(string fileDir)
|
|||
{
|
||||
try
|
||||
{
|
||||
ReturnType(new FileInfo(fileDir).Extension);
|
||||
switch (fileType)
|
||||
switch (ReturnType(new FileInfo(fileDir).Extension))
|
||||
{
|
||||
case 1:
|
||||
WinClassicNotepad np = new WinClassicNotepad();
|
||||
|
@ -266,6 +281,19 @@ public void OpenFile(string fileDir)
|
|||
case 12:
|
||||
OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir), fileDir);
|
||||
break;
|
||||
case 13:
|
||||
WinClassicAddressBook wcab = new WinClassicAddressBook();
|
||||
wcab.AddressBookObjects = JsonConvert.DeserializeObject<List<AddressBookContactList>>(File.ReadAllText(fileDir));
|
||||
|
||||
wcab.treeView1.Nodes.Clear();
|
||||
wcab.treeView1.Nodes.Add("Shared Contacts");
|
||||
foreach (AddressBookContactList lst in wcab.AddressBookObjects)
|
||||
wcab.UpdateTreeView(lst);
|
||||
|
||||
WinClassic app3 = wm.Init(wcab, "Address Book", Properties.Resources.WinClassicAddressBook, true, true);
|
||||
|
||||
Program.AddTaskbarItem(app3, app3.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook);
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
@ -346,296 +374,92 @@ void OpenApplication(string appname, string path)
|
|||
}
|
||||
}
|
||||
|
||||
string ReturnType(string extension) {
|
||||
string returnVal = "";
|
||||
fileType = 1;
|
||||
switch (extension) {
|
||||
int ReturnType(string extension)
|
||||
{
|
||||
switch (extension)
|
||||
{
|
||||
case ".txt":
|
||||
fileType = 1;
|
||||
returnVal = "Text Document \n createtext";
|
||||
break;
|
||||
case ".dat":
|
||||
fileType = 1;
|
||||
returnVal = "Text Document \n createtext";
|
||||
break;
|
||||
case ".rtf":
|
||||
fileType = 2;
|
||||
returnVal = "Rich Text Document \n createtext";
|
||||
break;
|
||||
case ".cfg":
|
||||
fileType = 1;
|
||||
returnVal = "Config file \n createtext";
|
||||
break;
|
||||
case ".log":
|
||||
fileType = 1;
|
||||
returnVal = "log text file \n createtext";
|
||||
break;
|
||||
case ".ini":
|
||||
case ".properties":
|
||||
fileType = 1;
|
||||
returnVal = "Config file \n createtext";
|
||||
break;
|
||||
case ".json":
|
||||
fileType = 1;
|
||||
returnVal = "Config file \n createtext";
|
||||
break;
|
||||
case ".dat":
|
||||
return 1;
|
||||
|
||||
case ".rtf":
|
||||
return 2;
|
||||
|
||||
case ".doc":
|
||||
fileType = 3;
|
||||
returnVal = "Word Document (Old) \n word";
|
||||
break;
|
||||
case ".docx":
|
||||
fileType = 3;
|
||||
returnVal = "Word Document \n word";
|
||||
break;
|
||||
return 3;
|
||||
case ".docm":
|
||||
fileType = 3;
|
||||
returnVal = "Macro-Enabled Word Document \n word";
|
||||
break;
|
||||
return 3;
|
||||
case ".xls":
|
||||
fileType = 4;
|
||||
returnVal = "Excel Spreadsheets (Old) \n excel";
|
||||
break;
|
||||
case ".xlsx":
|
||||
fileType = 4;
|
||||
returnVal = "Excel Spreadsheets \n excel";
|
||||
break;
|
||||
return 4;
|
||||
case ".ppt":
|
||||
fileType = 5;
|
||||
returnVal = "Powerpoint Presentation (Old) \n powerpoint";
|
||||
break;
|
||||
case ".pptx":
|
||||
fileType = 5;
|
||||
returnVal = "Powerpoint Presentation \n powerpoint";
|
||||
break;
|
||||
return 5;
|
||||
case ".pub":
|
||||
fileType = 7;
|
||||
returnVal = "Publisher Document \n powerpoint";
|
||||
break;
|
||||
return 7;
|
||||
case ".xps":
|
||||
fileType = 8;
|
||||
returnVal = "XPS Document \n xpsview";
|
||||
break;
|
||||
return 8;
|
||||
case ".htm":
|
||||
fileType = 9;
|
||||
returnVal = "HTML web page \n html";
|
||||
break;
|
||||
return 9;
|
||||
case ".html":
|
||||
fileType = 9;
|
||||
returnVal = "HTML web page \n html";
|
||||
break;
|
||||
return 9;
|
||||
case ".wps":
|
||||
fileType = 10;
|
||||
returnVal = "Works document \n works";
|
||||
break;
|
||||
return 10;
|
||||
case ".wmf":
|
||||
fileType = 11;
|
||||
returnVal = "Windows Metafile (A picture) \n createart";
|
||||
break;
|
||||
case ".emf":
|
||||
fileType = 11;
|
||||
returnVal = "Enhanced Metafile (A picture) \n createart";
|
||||
break;
|
||||
case ".png":
|
||||
fileType = 11;
|
||||
returnVal = "Picture file (Portable Network Graphics) \n createart";
|
||||
break;
|
||||
case ".jpg":
|
||||
fileType = 11;
|
||||
returnVal = "Picture file \n createart";
|
||||
break;
|
||||
case ".jpeg":
|
||||
fileType = 11;
|
||||
returnVal = "Picture file \n createart";
|
||||
break;
|
||||
case ".gif":
|
||||
fileType = 12;
|
||||
returnVal = "Picture file \n gifman";
|
||||
break;
|
||||
case ".tif":
|
||||
fileType = 11;
|
||||
returnVal = "Picture file \n createart";
|
||||
break;
|
||||
case ".bmp":
|
||||
fileType = 11;
|
||||
returnVal = "Picture file \n createart";
|
||||
break;
|
||||
case ".zip":
|
||||
fileType = 11;
|
||||
returnVal = "Compressed ZIP file \n winrar";
|
||||
break;
|
||||
case ".rar":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR Compressed file \n winrar";
|
||||
break;
|
||||
case ".gz":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".7z":
|
||||
fileType = 11;
|
||||
returnVal = "7ZIP file \n 7z";
|
||||
break;
|
||||
case ".ace":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".arj":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".bz2":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".gzip":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".lzh":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".tar":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".uue":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".xz":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".z":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
case ".001":
|
||||
fileType = 11;
|
||||
returnVal = "WINRAR file \n winrar";
|
||||
break;
|
||||
return 11;
|
||||
case ".exe":
|
||||
fileType = 12;
|
||||
returnVal = "Program \n exe";
|
||||
break;
|
||||
case ".jar":
|
||||
fileType = 13;
|
||||
returnVal = "Java file \n java";
|
||||
break;
|
||||
case ".iso":
|
||||
fileType = 14;
|
||||
returnVal = "CD Image file \n iso";
|
||||
break;
|
||||
return 12;
|
||||
case ".wab":
|
||||
return 13;
|
||||
case ".avi":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".m4v":
|
||||
fileType = 15;
|
||||
returnVal = "Video (MPEG-4) \n video";
|
||||
break;
|
||||
case ".mp4":
|
||||
fileType = 15;
|
||||
returnVal = "Video (MPEG-4) \n video";
|
||||
break;
|
||||
case ".wmv":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".m2v":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".m3u":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".mts":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".dv":
|
||||
fileType = 15;
|
||||
returnVal = "Video (Digital Video) \n video";
|
||||
break;
|
||||
case ".flv":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".m1v":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".m2ts":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".mkv":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".mov":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".mpeg4":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".mpeg":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".mpg":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".3gp":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
case ".m4p":
|
||||
fileType = 15;
|
||||
returnVal = "Video \n video";
|
||||
break;
|
||||
return 15;
|
||||
|
||||
case ".mp2":
|
||||
fileType = 21;
|
||||
returnVal = "Audio \n video";
|
||||
break;
|
||||
case ".mp3":
|
||||
fileType = 21;
|
||||
returnVal = "Audio \n video";
|
||||
break;
|
||||
case ".wav":
|
||||
fileType = 21;
|
||||
returnVal = "Audio \n video";
|
||||
break;
|
||||
return 21;
|
||||
case ".nls":
|
||||
fileType = 16;
|
||||
returnVal = "Font file \n font";
|
||||
break;
|
||||
return 16;
|
||||
case ".dll":
|
||||
fileType = 17;
|
||||
returnVal = "System File \n sys";
|
||||
break;
|
||||
return 17;
|
||||
case ".bat":
|
||||
fileType = 18;
|
||||
returnVal = "MS-DOS Batch file \n winterm";
|
||||
break;
|
||||
return 18;
|
||||
case ".url":
|
||||
fileType = 19;
|
||||
returnVal = "Shortcut \n short";
|
||||
break;
|
||||
return 19;
|
||||
case ".sh":
|
||||
fileType = 20;
|
||||
returnVal = "BASH file \n winterm";
|
||||
break;
|
||||
return 20;
|
||||
case ".win":
|
||||
fileType = 17;
|
||||
returnVal = "System file \n sys";
|
||||
break;
|
||||
return 17;
|
||||
}
|
||||
return returnVal;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Private Sub windows_explorer_Closed(sender As Object, e As EventArgs) Handles Me.Closed
|
||||
|
@ -655,9 +479,9 @@ void mainView_DoubleClick(object sender, EventArgs e)
|
|||
}
|
||||
else
|
||||
{ // If it is a file
|
||||
if (IsFileOpenDialog == true || IsFileSaveDialog == true)
|
||||
if (IsFileOpenDialog || IsFileSaveDialog)
|
||||
{
|
||||
if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension)
|
||||
if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension))
|
||||
{
|
||||
Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
|
||||
}
|
||||
|
@ -669,10 +493,8 @@ void mainView_DoubleClick(object sender, EventArgs e)
|
|||
((Form)this.TopLevelControl).Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenFile(mainView.FocusedItem.Tag.ToString());
|
||||
}
|
||||
}
|
||||
} catch { /* TODO: Illegal operation */ }
|
||||
}
|
||||
|
||||
|
@ -682,7 +504,7 @@ void diskView_AfterSelect(object sender, EventArgs e)
|
|||
{
|
||||
if (diskView.SelectedNode != null)
|
||||
{
|
||||
if (diskView.SelectedNode.Text == "My Computer")
|
||||
if (diskView.SelectedNode.Text == "My Computer" || diskView.SelectedNode.Text == "Desktop")
|
||||
{
|
||||
GoToDir(ProfileFileSystemDirectory);
|
||||
}
|
||||
|
@ -696,12 +518,8 @@ void diskView_AfterSelect(object sender, EventArgs e)
|
|||
{
|
||||
// It is a directory:
|
||||
|
||||
try
|
||||
{
|
||||
GoToDir(diskView.SelectedNode.Tag.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
|
@ -734,31 +552,18 @@ private void Button1_Click(object sender, EventArgs e)
|
|||
{
|
||||
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 OpenFile = true;
|
||||
if (OpenFile == true)
|
||||
{
|
||||
if (txtSave.Text == "")
|
||||
{
|
||||
wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension)) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
|
||||
|
||||
FileDialogBoxManager.IsInOpenDialog = false;
|
||||
FileDialogBoxManager.IsInSaveDialog = false;
|
||||
|
@ -766,9 +571,7 @@ private void Button1_Click(object sender, EventArgs e)
|
|||
((Form)this.TopLevelControl).Close();
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -929,7 +732,7 @@ private void btnFolderClose_Click(object sender, EventArgs e)
|
|||
|
||||
private void FoldersToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (FoldersToolStripMenuItem.Checked == true)
|
||||
if (FoldersToolStripMenuItem.Checked)
|
||||
{
|
||||
FoldersToolStripMenuItem.Checked = false;
|
||||
pnlFolders.Hide();
|
||||
|
@ -973,7 +776,7 @@ private void mainView_SelectedIndexChanged(object sender, EventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
if (recognized == true)
|
||||
if (recognized)
|
||||
{
|
||||
// TODO:
|
||||
} else {
|
||||
|
@ -981,7 +784,7 @@ private void mainView_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
||||
FileInfo fi = new FileInfo(Path.Combine(CurrentDirectory, mainView.FocusedItem.Text));
|
||||
txtInfoDescName.Text = mainView.FocusedItem.Text;
|
||||
txtInfoDescType.Text = ReturnType(fi.Extension).Split('\n')[0];
|
||||
txtInfoDescType.Text = GetDescription(ReturnType(fi.Extension));
|
||||
txtInfoDescModified.Text = fi.CreationTime.ToString();
|
||||
|
||||
txtInfoDescSize.Show();
|
||||
|
@ -1003,6 +806,50 @@ private void mainView_SelectedIndexChanged(object sender, EventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
public string GetDescription(int type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 1:
|
||||
return "Text Document";
|
||||
case 2:
|
||||
return "Rich Text Document";
|
||||
case 3:
|
||||
return "Word Document";
|
||||
case 4:
|
||||
return "Excel Document";
|
||||
case 5:
|
||||
return "Powerpoint Document";
|
||||
case 7:
|
||||
return "Publisher Document";
|
||||
case 8:
|
||||
return "XPS File";
|
||||
case 9:
|
||||
return "HTML Document";
|
||||
case 10:
|
||||
return "Microsoft Works Document";
|
||||
case 11:
|
||||
return "Image File";
|
||||
case 12:
|
||||
return "Executable File";
|
||||
case 13:
|
||||
return "Address Book File";
|
||||
case 21:
|
||||
return "Video File";
|
||||
case 16:
|
||||
case 17:
|
||||
return "System File";
|
||||
case 18:
|
||||
return "Batch File";
|
||||
case 19:
|
||||
return "Online Shortcut";
|
||||
case 20:
|
||||
return "Bash Script";
|
||||
|
||||
}
|
||||
return "File";
|
||||
}
|
||||
|
||||
private void CutCtrlXToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
|
@ -1137,5 +984,36 @@ private void SellectAllCtrlAToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
item.Selected = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCanc_Click(object sender, EventArgs e)
|
||||
{
|
||||
((Form)this.TopLevelControl).Close();
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (mainView.FocusedItem != null)
|
||||
{
|
||||
if (mainView.FocusedItem.Tag.ToString() == "")
|
||||
{ // If it isn't a file
|
||||
GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Tag.ToString()));
|
||||
}
|
||||
else txtSave.Text = mainView.FocusedItem.Tag.ToString();
|
||||
}
|
||||
if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK);
|
||||
else
|
||||
{
|
||||
if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension)) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text);
|
||||
|
||||
FileDialogBoxManager.IsInOpenDialog = false;
|
||||
FileDialogBoxManager.IsInSaveDialog = false;
|
||||
|
||||
((Form)this.TopLevelControl).Close();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,6 +120,15 @@
|
|||
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="cmbType.Items" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
|
||||
ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
|
||||
PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
|
||||
AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
|
||||
ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="refresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
|
|
|
@ -96,8 +96,8 @@ public static void ShutdownApplication(System.IO.Stream audio)
|
|||
|
||||
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)
|
||||
|
|
|
@ -2123,4 +2123,10 @@
|
|||
<data name="distort_fail" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\distort fail.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="WinClassicAddressBookBig" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WinClassicAddressBookBig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WinClassicDrive" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WinClassicDrive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
26
Histacom2/Properties/Resources1.Designer.cs
generated
26
Histacom2/Properties/Resources1.Designer.cs
generated
|
@ -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 @@ public static System.IO.UnmanagedMemoryStream std_gobeep {
|
|||
/// "btn4txt": "",
|
||||
/// "btn4tag": "",
|
||||
/// "btn5txt": "",
|
||||
/// "btn5tag": " [rest of string was truncated]";.
|
||||
/// "btn5tag": ""
|
||||
/// },
|
||||
/// "inthe [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string std_story {
|
||||
get {
|
||||
|
@ -1613,6 +1615,16 @@ public static System.Drawing.Bitmap WinClassicAddressBook {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap WinClassicAddressBookBig {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("WinClassicAddressBookBig", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -1703,6 +1715,16 @@ public static System.Drawing.Bitmap WinClassicDocuments {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap WinClassicDrive {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("WinClassicDrive", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
BIN
Histacom2/Resources/WinClassicAddressBookBig.png
Normal file
BIN
Histacom2/Resources/WinClassicAddressBookBig.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 288 B |
BIN
Histacom2/Resources/WinClassicDrive.png
Normal file
BIN
Histacom2/Resources/WinClassicDrive.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 238 B |
BIN
Histacom2/Resources/addrbook.ico_32x32[1].png
Normal file
BIN
Histacom2/Resources/addrbook.ico_32x32[1].png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
|
@ -37,7 +37,7 @@ public bool PreFilterMessage(ref Message m)
|
|||
if (!ClientRectangle.Contains(PointToClient(Control.MousePosition)))
|
||||
{
|
||||
sidebar.Hide();
|
||||
if (OnceRemoveHeight == false)
|
||||
if (!OnceRemoveHeight)
|
||||
{
|
||||
this.Height -= 28;
|
||||
OnceRemoveHeight = true;
|
||||
|
@ -49,7 +49,7 @@ public bool PreFilterMessage(ref Message m)
|
|||
} else
|
||||
{
|
||||
sidebar.Show();
|
||||
if (OnceAddHeight == false)
|
||||
if (!OnceAddHeight)
|
||||
{
|
||||
this.Height += 28;
|
||||
OnceAddHeight = true;
|
||||
|
@ -95,7 +95,7 @@ private void button2_Click(object sender, EventArgs e)
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!RequestingNewName == false)
|
||||
if (!RequestingNewName)
|
||||
{
|
||||
if (textBox1.Text == "")
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ private void btnOk_Click(object sender, EventArgs e)
|
|||
if (!(txtProfName.Text.Length > 20))
|
||||
{
|
||||
ProfileName = txtProfName.Text;
|
||||
if (DevMode == true)
|
||||
if (DevMode)
|
||||
{
|
||||
if (Directory.Exists(ProfileDirectory))
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ private void btnOk_Click(object sender, EventArgs e)
|
|||
|
||||
private void NewGameDialog_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (DevMode == true)
|
||||
if (DevMode)
|
||||
{
|
||||
btnDevMode.Show();
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ private void InitializeComponent()
|
|||
this.pnlResolved.Controls.Add(this.label2);
|
||||
this.pnlResolved.Location = new System.Drawing.Point(12, 38);
|
||||
this.pnlResolved.Name = "pnlResolved";
|
||||
this.pnlResolved.Size = new System.Drawing.Size(589, 275);
|
||||
this.pnlResolved.Size = new System.Drawing.Size(518, 243);
|
||||
this.pnlResolved.TabIndex = 1;
|
||||
this.pnlResolved.Visible = false;
|
||||
//
|
||||
|
@ -73,7 +73,7 @@ private void InitializeComponent()
|
|||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.textBox1.Size = new System.Drawing.Size(567, 208);
|
||||
this.textBox1.Size = new System.Drawing.Size(496, 176);
|
||||
this.textBox1.TabIndex = 3;
|
||||
//
|
||||
// label3
|
||||
|
@ -100,15 +100,15 @@ private void InitializeComponent()
|
|||
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
this.panel2.Controls.Add(this.btnClose);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 315);
|
||||
this.panel2.Location = new System.Drawing.Point(0, 283);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(612, 30);
|
||||
this.panel2.Size = new System.Drawing.Size(541, 30);
|
||||
this.panel2.TabIndex = 2;
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnClose.Location = new System.Drawing.Point(526, 4);
|
||||
this.btnClose.Location = new System.Drawing.Point(455, 4);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnClose.TabIndex = 0;
|
||||
|
@ -120,12 +120,11 @@ private void InitializeComponent()
|
|||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(612, 345);
|
||||
this.ClientSize = new System.Drawing.Size(541, 313);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.pnlResolved);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "SaveFileTroubleShooter";
|
||||
this.Text = "Save File Troubleshooter";
|
||||
this.Load += new System.EventHandler(this.SaveFileTroubleShooter_Load);
|
||||
this.pnlResolved.ResumeLayout(false);
|
||||
this.pnlResolved.PerformLayout();
|
||||
|
|
|
@ -193,7 +193,7 @@ void EndScan(bool successful)
|
|||
{
|
||||
pnlResolved.Visible = true;
|
||||
label1.Hide();
|
||||
if (successful == true)
|
||||
if (successful)
|
||||
{
|
||||
label2.Text = "The issue has been resolved.";
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public void StartGame()
|
|||
frm95.TopMost = true;
|
||||
frm95.FormBorderStyle = FormBorderStyle.None;
|
||||
frm95.WindowState = FormWindowState.Maximized;
|
||||
//if (vm_mode.Checked == true)
|
||||
//if (vm_mode.Checked)
|
||||
//{
|
||||
// frm95.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
|
||||
// frm95.FormBorderStyle = FormBorderStyle.Fixed3D;
|
||||
|
@ -80,7 +80,7 @@ public void StartGame()
|
|||
frm98.TopMost = true;
|
||||
frm98.FormBorderStyle = FormBorderStyle.None;
|
||||
frm98.WindowState = FormWindowState.Maximized;
|
||||
//if (vm_mode.Checked == true)
|
||||
//if (vm_mode.Checked)
|
||||
//{
|
||||
// frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
|
||||
// frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
|
||||
|
@ -94,7 +94,7 @@ public void StartGame()
|
|||
frmBadXP.TopMost = true;
|
||||
frmBadXP.FormBorderStyle = FormBorderStyle.None;
|
||||
frmBadXP.WindowState = FormWindowState.Maximized;
|
||||
//if (vm_mode.Checked == true)
|
||||
//if (vm_mode.Checked)
|
||||
//{
|
||||
// frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text));
|
||||
// frm98.FormBorderStyle = FormBorderStyle.Fixed3D;
|
||||
|
@ -149,7 +149,6 @@ private void TitleScreen_Load(object sender, EventArgs e)
|
|||
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)));
|
||||
}
|
||||
|
||||
#region Menu Buttons
|
||||
|
||||
#region NewGame
|
||||
|
@ -160,7 +159,7 @@ private void NewGame_Click(object sender, EventArgs e)
|
|||
newGameBox = new NewGameDialog();
|
||||
newGameBox.ShowDialog();
|
||||
|
||||
if (newGameBox.Successful == true)
|
||||
if (newGameBox.Successful)
|
||||
{
|
||||
NewGame();
|
||||
StartGame();
|
||||
|
@ -199,7 +198,7 @@ private void LoadGame_Click(object sender, EventArgs e)
|
|||
loadGameBox = new LoadGameDialog();
|
||||
loadGameBox.ShowDialog();
|
||||
|
||||
if (loadGameBox.successful == true)
|
||||
if (loadGameBox.successful)
|
||||
{
|
||||
LoadSave();
|
||||
SetTheme();
|
||||
|
@ -229,7 +228,7 @@ private void gameversion_MouseLeave(object sender, EventArgs e)
|
|||
|
||||
private void startbutton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DevMode == true)
|
||||
if (DevMode)
|
||||
{
|
||||
DevMode = false;
|
||||
gameversion.Text = "Developer Mode Deactivated";
|
||||
|
|
|
@ -117,9 +117,6 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="vmModeTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="panel2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
|
Loading…
Reference in a new issue