diff options
| author | FloppyDiskDrive <[email protected]> | 2017-09-05 20:15:30 -0500 |
|---|---|---|
| committer | FloppyDiskDrive <[email protected]> | 2017-09-05 20:15:30 -0500 |
| commit | 572117a8d2fe2e88ce72ecfbcf55598b02bddd62 (patch) | |
| tree | f83ea448f424208adce01937e141774909fdeb0f | |
| parent | c51f7230320b9d59c7f49aeab1263242855496cc (diff) | |
| parent | 69d4465542fb00108576219d9c1da026f2e864b1 (diff) | |
| download | histacom2-572117a8d2fe2e88ce72ecfbcf55598b02bddd62.tar.gz histacom2-572117a8d2fe2e88ce72ecfbcf55598b02bddd62.tar.bz2 histacom2-572117a8d2fe2e88ce72ecfbcf55598b02bddd62.zip | |
Merge remote-tracking branch 'refs/remotes/Histacom2-Devs/master'
44 files changed, 1414 insertions, 307 deletions
diff --git a/Histacom2.Engine/Histacom2.Engine.csproj b/Histacom2.Engine/Histacom2.Engine.csproj index 37c4489..fb64648 100644 --- a/Histacom2.Engine/Histacom2.Engine.csproj +++ b/Histacom2.Engine/Histacom2.Engine.csproj @@ -54,6 +54,12 @@ <Compile Include="Paintbrush.cs" /> <Compile Include="SaveSystem.cs" /> <Compile Include="TaskBarController.cs" /> + <Compile Include="Template\ResizeOverlay.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Template\ResizeOverlay.Designer.cs"> + <DependentUpon>ResizeOverlay.cs</DependentUpon> + </Compile> <Compile Include="Template\Win9XBSOD.cs"> <SubType>Form</SubType> </Compile> @@ -78,6 +84,12 @@ <Compile Include="Template\WinClassic.Designer.cs"> <DependentUpon>WinClassic.cs</DependentUpon> </Compile> + <Compile Include="Template\WinXP.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Template\WinXP.Designer.cs"> + <DependentUpon>WinXP.cs</DependentUpon> + </Compile> <Compile Include="Theme.cs" /> <Compile Include="UI\ClassicButton.cs"> <SubType>UserControl</SubType> @@ -102,6 +114,9 @@ <Generator>PublicResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> + <EmbeddedResource Include="Template\ResizeOverlay.resx"> + <DependentUpon>ResizeOverlay.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Template\Win9XBSOD.resx"> <DependentUpon>Win9XBSOD.cs</DependentUpon> </EmbeddedResource> @@ -114,6 +129,9 @@ <EmbeddedResource Include="Template\WinClassic.resx"> <DependentUpon>WinClassic.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="Template\WinXP.resx"> + <DependentUpon>WinXP.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="UI\ClassicButton.resx"> <DependentUpon>ClassicButton.cs</DependentUpon> </EmbeddedResource> @@ -121,6 +139,18 @@ <ItemGroup> <Content Include="Resources\chord.wav" /> <Content Include="Resources\Icon128x.ico" /> + <Content Include="Resources\WinXP\Window\WinXP_Bottom.png" /> + <Content Include="Resources\WinXP\Window\WinXP_Close.png" /> + <Content Include="Resources\WinXP\Window\WinXP_LBCorner.png" /> + <Content Include="Resources\WinXP\Window\WinXP_LeftSide.png" /> + <Content Include="Resources\WinXP\Window\WinXP_Max.png" /> + <Content Include="Resources\WinXP\Window\WinXP_Min.png" /> + <Content Include="Resources\WinXP\Window\WinXP_RBCorner.png" /> + <Content Include="Resources\WinXP\Window\WinXP_Restore.png" /> + <Content Include="Resources\WinXP\Window\WinXP_RightSide.png" /> + <Content Include="Resources\WinXP\Window\WinXP_TLCorner.png" /> + <Content Include="Resources\WinXP\Window\WinXP_TopBar.png" /> + <Content Include="Resources\WinXP\Window\WinXP_TRCorner.png" /> <None Include="Resources\WinAboutSeparator95.png" /> <None Include="Resources\Win95PlusDangerousCreaturesStart.WAV" /> <None Include="Resources\Win95Start.wav" /> diff --git a/Histacom2.Engine/Properties/Resources.Designer.cs b/Histacom2.Engine/Properties/Resources.Designer.cs index 7a4cdf6..949a91c 100644 --- a/Histacom2.Engine/Properties/Resources.Designer.cs +++ b/Histacom2.Engine/Properties/Resources.Designer.cs @@ -61,36 +61,6 @@ namespace Histacom2.Engine.Properties { } /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> - public static System.Drawing.Bitmap BottomLeft { - get { - object obj = ResourceManager.GetObject("BottomLeft", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> - public static System.Drawing.Bitmap BottomRight { - get { - object obj = ResourceManager.GetObject("BottomRight", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> - public static System.Drawing.Bitmap BottomSide { - get { - object obj = ResourceManager.GetObject("BottomSide", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// </summary> public static System.IO.UnmanagedMemoryStream CHORD { @@ -100,16 +70,6 @@ namespace Histacom2.Engine.Properties { } /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> - public static System.Drawing.Bitmap LeftSide { - get { - object obj = ResourceManager.GetObject("LeftSide", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> /// Looks up a localized resource of type System.Byte[]. /// </summary> public static byte[] LeviWindows { @@ -142,46 +102,6 @@ namespace Histacom2.Engine.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> - public static System.Drawing.Bitmap RightSide { - get { - object obj = ResourceManager.GetObject("RightSide", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> - public static System.Drawing.Bitmap TopLeft { - get { - object obj = ResourceManager.GetObject("TopLeft", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> - public static System.Drawing.Bitmap TopRight { - get { - object obj = ResourceManager.GetObject("TopRight", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> - public static System.Drawing.Bitmap TopSide { - get { - object obj = ResourceManager.GetObject("TopSide", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> public static System.Drawing.Bitmap Win95Error { get { object obj = ResourceManager.GetObject("Win95Error", resourceCulture); @@ -369,6 +289,36 @@ namespace Histacom2.Engine.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + public static System.Drawing.Bitmap WinClassicBottomLeft { + get { + object obj = ResourceManager.GetObject("WinClassicBottomLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinClassicBottomRight { + get { + object obj = ResourceManager.GetObject("WinClassicBottomRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinClassicBottomSide { + get { + object obj = ResourceManager.GetObject("WinClassicBottomSide", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> public static System.Drawing.Bitmap WinClassicClose { get { object obj = ResourceManager.GetObject("WinClassicClose", resourceCulture); @@ -379,6 +329,16 @@ namespace Histacom2.Engine.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + public static System.Drawing.Bitmap WinClassicLeftSide { + get { + object obj = ResourceManager.GetObject("WinClassicLeftSide", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> public static System.Drawing.Bitmap WinClassicMax { get { object obj = ResourceManager.GetObject("WinClassicMax", resourceCulture); @@ -407,6 +367,46 @@ namespace Histacom2.Engine.Properties { } /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinClassicRightSide { + get { + object obj = ResourceManager.GetObject("WinClassicRightSide", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinClassicTopLeft { + get { + object obj = ResourceManager.GetObject("WinClassicTopLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinClassicTopRight { + get { + object obj = ResourceManager.GetObject("WinClassicTopRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinClassicTopSide { + get { + object obj = ResourceManager.GetObject("WinClassicTopSide", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> /// Looks up a localized resource of type System.Byte[]. /// </summary> public static byte[] windows_command_prompt { @@ -415,5 +415,125 @@ namespace Histacom2.Engine.Properties { return ((byte[])(obj)); } } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_Bottom { + get { + object obj = ResourceManager.GetObject("WinXP_Bottom", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_BottomLeft { + get { + object obj = ResourceManager.GetObject("WinXP_BottomLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_BottomRight { + get { + object obj = ResourceManager.GetObject("WinXP_BottomRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_Close { + get { + object obj = ResourceManager.GetObject("WinXP_Close", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_LeftSide { + get { + object obj = ResourceManager.GetObject("WinXP_LeftSide", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_Max { + get { + object obj = ResourceManager.GetObject("WinXP_Max", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_Min { + get { + object obj = ResourceManager.GetObject("WinXP_Min", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_Restore { + get { + object obj = ResourceManager.GetObject("WinXP_Restore", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_RightSide { + get { + object obj = ResourceManager.GetObject("WinXP_RightSide", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_TopBar { + get { + object obj = ResourceManager.GetObject("WinXP_TopBar", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_TopLeft { + get { + object obj = ResourceManager.GetObject("WinXP_TopLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap WinXP_TopRight { + get { + object obj = ResourceManager.GetObject("WinXP_TopRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/Histacom2.Engine/Properties/Resources.resx b/Histacom2.Engine/Properties/Resources.resx index 94b3988..a6faf66 100644 --- a/Histacom2.Engine/Properties/Resources.resx +++ b/Histacom2.Engine/Properties/Resources.resx @@ -118,16 +118,16 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <data name="BottomLeft" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <data name="WinClassicBottomLeft" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\bottomleft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="BottomRight" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <data name="WinClassicBottomRight" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\bottomright.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="BottomSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <data name="WinClassicBottomSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\bottomside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="LeftSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <data name="WinClassicLeftSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\leftside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="LeviWindows" type="System.Resources.ResXFileRef, System.Windows.Forms"> @@ -139,16 +139,16 @@ <data name="nullIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\nullicon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="RightSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <data name="WinClassicRightSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\rightside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="TopLeft" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <data name="WinClassicTopLeft" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\topleft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="TopRight" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <data name="WinClassicTopRight" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\topright.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="TopSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <data name="WinClassicTopSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\resources\winclassic\window\topside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="WinClassicClose" type="System.Resources.ResXFileRef, System.Windows.Forms"> @@ -229,4 +229,40 @@ <data name="Win95PlusInsideComputerAsterisk" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Win95PlusInsideComputerAsterisk.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> + <data name="WinXP_Bottom" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_bottom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_BottomLeft" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_lbcorner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_BottomRight" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_rbcorner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_Close" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_LeftSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_leftside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_Max" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_max.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_Min" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_min.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_Restore" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_restore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_RightSide" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_rightside.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_TopBar" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_topbar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinXP_TopLeft" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\resources\winxp\window\winxp_tlcorner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <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> </root>
\ No newline at end of file diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_Bottom.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Bottom.png Binary files differnew file mode 100644 index 0000000..2025b77 --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Bottom.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_Close.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Close.png Binary files differnew file mode 100644 index 0000000..173ac3e --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Close.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_LBCorner.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_LBCorner.png Binary files differnew file mode 100644 index 0000000..136a49b --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_LBCorner.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_LeftSide.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_LeftSide.png Binary files differnew file mode 100644 index 0000000..85aca4d --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_LeftSide.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_Max.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Max.png Binary files differnew file mode 100644 index 0000000..c470eff --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Max.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_Min.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Min.png Binary files differnew file mode 100644 index 0000000..a7ec34f --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Min.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_RBCorner.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_RBCorner.png Binary files differnew file mode 100644 index 0000000..e546966 --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_RBCorner.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_Restore.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Restore.png Binary files differnew file mode 100644 index 0000000..304401f --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_Restore.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_RightSide.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_RightSide.png Binary files differnew file mode 100644 index 0000000..a7a6d4a --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_RightSide.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_TLCorner.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_TLCorner.png Binary files differnew file mode 100644 index 0000000..79730ff --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_TLCorner.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_TRCorner.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_TRCorner.png Binary files differnew file mode 100644 index 0000000..603c164 --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_TRCorner.png diff --git a/Histacom2.Engine/Resources/WinXP/Window/WinXP_TopBar.png b/Histacom2.Engine/Resources/WinXP/Window/WinXP_TopBar.png Binary files differnew file mode 100644 index 0000000..b251673 --- /dev/null +++ b/Histacom2.Engine/Resources/WinXP/Window/WinXP_TopBar.png diff --git a/Histacom2.Engine/SaveSystem.cs b/Histacom2.Engine/SaveSystem.cs index 7da916b..b8c619e 100644 --- a/Histacom2.Engine/SaveSystem.cs +++ b/Histacom2.Engine/SaveSystem.cs @@ -28,6 +28,13 @@ namespace Histacom2.Engine public static Theme currentTheme { get; set; } + public static bool IsBinarySave = +#if BINARY_SAVE + true; +#else + false; +#endif + #if BINARY_SAVE private static readonly byte[] magic = Encoding.UTF8.GetBytes("THSv"); private static readonly IOrderedEnumerable<System.Reflection.PropertyInfo> properties = typeof(Save).GetProperties().OrderBy(p => (p.GetCustomAttributes(typeof(OrderAttribute), false).SingleOrDefault() as OrderAttribute).Order); diff --git a/Histacom2.Engine/Template/ResizeOverlay.Designer.cs b/Histacom2.Engine/Template/ResizeOverlay.Designer.cs new file mode 100644 index 0000000..8d76c26 --- /dev/null +++ b/Histacom2.Engine/Template/ResizeOverlay.Designer.cs @@ -0,0 +1,78 @@ +namespace Histacom2.Engine.Template +{ + partial class ResizeOverlay + { + /// <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.components = new System.ComponentModel.Container(); + this.outline = new System.Windows.Forms.PictureBox(); + this.tmrMove = new System.Windows.Forms.Timer(this.components); + ((System.ComponentModel.ISupportInitialize)(this.outline)).BeginInit(); + this.SuspendLayout(); + // + // outline + // + this.outline.BackColor = System.Drawing.Color.Transparent; + this.outline.Location = new System.Drawing.Point(194, 158); + this.outline.Name = "outline"; + this.outline.Size = new System.Drawing.Size(300, 158); + this.outline.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.outline.TabIndex = 0; + this.outline.TabStop = false; + this.outline.Paint += new System.Windows.Forms.PaintEventHandler(this.outline_Paint); + // + // tmrMove + // + this.tmrMove.Interval = 20; + this.tmrMove.Tick += new System.EventHandler(this.tmrMove_Tick); + // + // ResizeOverlay + // + 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(800, 600); + this.Controls.Add(this.outline); + this.DoubleBuffered = true; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "ResizeOverlay"; + this.Tag = "ignoreFormOnTaskbar"; + this.Text = "ResizeOverlay"; + 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; + ((System.ComponentModel.ISupportInitialize)(this.outline)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox outline; + public System.Windows.Forms.Timer tmrMove; + } +}
\ No newline at end of file diff --git a/Histacom2.Engine/Template/ResizeOverlay.cs b/Histacom2.Engine/Template/ResizeOverlay.cs new file mode 100644 index 0000000..ca8a5e4 --- /dev/null +++ b/Histacom2.Engine/Template/ResizeOverlay.cs @@ -0,0 +1,35 @@ +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 ResizeOverlay : Form + { + public Rectangle ToDraw = new Rectangle(); + + public ResizeOverlay() + { + InitializeComponent(); + } + + private void tmrMove_Tick(object sender, EventArgs e) + { + outline.Bounds = ToDraw; // Pens.Gray, ToDraw); + } + + private void outline_Paint(object sender, PaintEventArgs e) + { + e.Graphics.FillRectangle(Brushes.Gray, 0, 0, outline.Width, 4); // Top border + e.Graphics.FillRectangle(Brushes.Gray, 0, outline.Height - 4, outline.Width, 4); // Bottom border + e.Graphics.FillRectangle(Brushes.Gray, 0, 0, 4, outline.Height); // Left border + e.Graphics.FillRectangle(Brushes.Gray, outline.Width - 4, 0, 4, outline.Height); // Right border + } + } +} diff --git a/Histacom2.Engine/Template/ResizeOverlay.resx b/Histacom2.Engine/Template/ResizeOverlay.resx new file mode 100644 index 0000000..10340d0 --- /dev/null +++ b/Histacom2.Engine/Template/ResizeOverlay.resx @@ -0,0 +1,123 @@ +<?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> + <metadata name="tmrMove.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/Histacom2.Engine/Template/WinClassic.Designer.cs b/Histacom2.Engine/Template/WinClassic.Designer.cs index be76be6..593cfd6 100644 --- a/Histacom2.Engine/Template/WinClassic.Designer.cs +++ b/Histacom2.Engine/Template/WinClassic.Designer.cs @@ -162,6 +162,7 @@ this.toprightcorner.TabIndex = 6; this.toprightcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown); this.toprightcorner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.toprightcorner_MouseMove); + this.toprightcorner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.border_MouseUp); // // bottomrightcorner // @@ -174,6 +175,7 @@ this.bottomrightcorner.TabIndex = 4; this.bottomrightcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown); this.bottomrightcorner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bottomrightcorner_MouseMove); + this.bottomrightcorner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.border_MouseUp); // // bottomleftcorner // @@ -186,6 +188,7 @@ this.bottomleftcorner.TabIndex = 2; this.bottomleftcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown); this.bottomleftcorner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bottomleftcorner_MouseMove); + this.bottomleftcorner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.border_MouseUp); // // topleftcorner // @@ -197,6 +200,7 @@ this.topleftcorner.TabIndex = 1; this.topleftcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown); this.topleftcorner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.topleftcorner_MouseMove); + this.topleftcorner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.border_MouseUp); // // left // @@ -209,6 +213,7 @@ this.left.TabIndex = 3; this.left.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown); this.left.MouseMove += new System.Windows.Forms.MouseEventHandler(this.left_MouseMove); + this.left.MouseUp += new System.Windows.Forms.MouseEventHandler(this.border_MouseUp); // // bottom // @@ -222,6 +227,7 @@ this.bottom.TabIndex = 5; this.bottom.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown); this.bottom.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bottom_MouseMove); + this.bottom.MouseUp += new System.Windows.Forms.MouseEventHandler(this.border_MouseUp); // // right // @@ -234,6 +240,7 @@ this.right.TabIndex = 7; this.right.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown); this.right.MouseMove += new System.Windows.Forms.MouseEventHandler(this.right_MouseMove); + this.right.MouseUp += new System.Windows.Forms.MouseEventHandler(this.border_MouseUp); // // top // @@ -247,6 +254,7 @@ this.top.TabIndex = 8; this.top.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown); this.top.MouseMove += new System.Windows.Forms.MouseEventHandler(this.top_MouseMove); + this.top.MouseUp += new System.Windows.Forms.MouseEventHandler(this.border_MouseUp); // // WinClassic // @@ -254,11 +262,13 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(300, 300); this.Controls.Add(this.program); + this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "WinClassic"; 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(); diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs index 4c495bc..20e66f0 100644 --- a/Histacom2.Engine/Template/WinClassic.cs +++ b/Histacom2.Engine/Template/WinClassic.cs @@ -14,11 +14,13 @@ namespace Histacom2.Engine.Template } public Font fnt; + public ResizeOverlay resizer = new ResizeOverlay(); public bool resizable = true; public bool closeDisabled = false; public bool isActive = true; - + public bool Resizing = false; + public Bitmap ResizingBmp = null; public const int WM_NCLBUTTONDOWN = 0xA1; public const int WM_SYSCOMMAND = 0x0112; public const int HT_CAPTION = 0x2; @@ -72,7 +74,9 @@ namespace Histacom2.Engine.Template { if (e.Button == MouseButtons.Left) { - if (resizable) this.Size = new Size(MousePosition.X - this.Location.X, this.Size.Height); + var toDraw = resizer.ToDraw; + if (resizable) toDraw.Width = MousePosition.X - this.Location.X; + resizer.ToDraw = toDraw; } } @@ -80,8 +84,10 @@ namespace Histacom2.Engine.Template { if (e.Button == MouseButtons.Left) { - if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X); - if (resizable)this.Location = new Point(Cursor.Position.X, this.Location.Y); + var toDraw = resizer.ToDraw; + if (resizable) toDraw.Width = ((this.Width + this.Location.X) - Cursor.Position.X); + if (resizable) toDraw.X = Cursor.Position.X; + resizer.ToDraw = toDraw; } } @@ -89,7 +95,10 @@ namespace Histacom2.Engine.Template { if (e.Button == MouseButtons.Left) { - if (resizable) this.Size = new Size(this.Size.Width, MousePosition.Y - this.Location.Y); + var toDraw = resizer.ToDraw; + if (resizable) toDraw.Y = this.Location.Y; + if (resizable) toDraw.Height = MousePosition.Y - this.Location.Y; + resizer.ToDraw = toDraw; } } @@ -97,7 +106,10 @@ namespace Histacom2.Engine.Template { if (e.Button == MouseButtons.Left) { - if (resizable) this.Size = new Size(MousePosition.X - this.Location.X, MousePosition.Y - this.Location.Y); + var toDraw = resizer.ToDraw; + if (resizable) toDraw.Width = MousePosition.X - this.Location.X; + if (resizable) toDraw.Height = MousePosition.Y - this.Location.Y; + resizer.ToDraw = toDraw; } } @@ -105,9 +117,11 @@ namespace Histacom2.Engine.Template { if (e.Button == MouseButtons.Left) { - if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X); - if (resizable) this.Height = (Cursor.Position.Y - this.Location.Y); - if (resizable) this.Location = new Point(Cursor.Position.X, this.Location.Y); + var toDraw = resizer.ToDraw; + if (resizable) toDraw.Width = ((toDraw.Width + toDraw.Location.X) - Cursor.Position.X); + if (resizable) toDraw.Height = Cursor.Position.Y - this.Location.Y; + if (resizable) toDraw.X = Cursor.Position.X; + resizer.ToDraw = toDraw; } } @@ -115,10 +129,12 @@ namespace Histacom2.Engine.Template { if (e.Button == MouseButtons.Left) { - if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X); - if (resizable) this.Location = new Point(Cursor.Position.X, this.Location.Y); - if (resizable) this.Height = ((this.Height + this.Location.Y) - Cursor.Position.Y); - if (resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y); + var toDraw = resizer.ToDraw; + if (resizable) toDraw.Width = ((this.Width + this.Location.X) - Cursor.Position.X); + if (resizable) toDraw.X = Cursor.Position.X; + if (resizable) toDraw.Height = ((this.Height + this.Location.Y) - Cursor.Position.Y); + if (resizable) toDraw.Y = Cursor.Position.Y; + resizer.ToDraw = toDraw; } } @@ -126,8 +142,10 @@ namespace Histacom2.Engine.Template { if(e.Button == MouseButtons.Left) { - if(resizable) this.Height = ((this.Height + this.Location.Y) - Cursor.Position.Y); - if(resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y); + var toDraw = resizer.ToDraw; + if (resizable) toDraw.Height = ((toDraw.Height + toDraw.Top) - Cursor.Position.Y); + if (resizable) toDraw.Y = Cursor.Position.Y; + resizer.ToDraw = toDraw; } } @@ -135,16 +153,65 @@ namespace Histacom2.Engine.Template { if (e.Button == MouseButtons.Left) { - if (resizable) this.Width = (Cursor.Position.X - this.Location.X); - if (resizable) this.Height = ((this.Location.Y - Cursor.Position.Y) + this.Height); - if (resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y); + var toDraw = resizer.ToDraw; + if (resizable) toDraw.Width = MousePosition.X - this.Location.X; + if (resizable) toDraw.Height = ((toDraw.Height + toDraw.Top) - Cursor.Position.Y); + if (resizable) toDraw.Y = Cursor.Position.Y; + resizer.ToDraw = toDraw; } } - public bool max = false; + 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; + resizer.tmrMove.Stop(); + resizer.Close(); + + resizer = new ResizeOverlay(); + } + + private void border_MouseDown(object sender, MouseEventArgs e) + { + var cursor = this.PointToClient(Cursor.Position); + + if (topleftcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF004, 0); + else if (toprightcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF005, 0); + else if (bottomleftcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF007, 0); + else if (bottomrightcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF008, 0); + + else if (top.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF003, 0); + else if (left.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF001, 0); + else if (right.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF002, 0); + else if (bottom.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF006, 0); + + // Now we need to fix this weird artificating! + resizer.tmrMove.Start(); + resizer.Show(); + + resizer.ToDraw = this.Bounds; + + // However this defocuses the window which we don't want + + WinClassic_Activated(null, null); + } + + + public bool max = false; + public Size prevSize; + public Point prevPoint; private void maximizebutton_Click(object sender, EventArgs e) { + if (max == false) { this.right.Hide(); @@ -156,7 +223,10 @@ namespace Histacom2.Engine.Template this.topleftcorner.Hide(); this.toprightcorner.Hide(); this.Dock = DockStyle.Fill; - this.WindowState = FormWindowState.Maximized; + prevSize = this.Size; + prevPoint = this.Location; + this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height - 28); + this.Location = new Point(0, 0); max = true; maximizebutton.Image = Engine.Properties.Resources.WinClassicRestore; } @@ -171,11 +241,12 @@ namespace Histacom2.Engine.Template this.topleftcorner.Show(); this.toprightcorner.Show(); this.Dock = DockStyle.None; - this.WindowState = FormWindowState.Normal; + this.Size = prevSize; + this.Location = prevPoint; max = false; maximizebutton.Image = Engine.Properties.Resources.WinClassicMax; } - + } // The rest of this code will automatically style the buttons on the form! @@ -216,20 +287,5 @@ namespace Histacom2.Engine.Template var c = (Button)sender; c.UseVisualStyleBackColor = true; } - - private void border_MouseDown(object sender, EventArgs e) - { - var cursor = this.PointToClient(Cursor.Position); - - if (topleftcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF004, 0); - else if (toprightcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF005, 0); - else if (bottomleftcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF007, 0); - else if (bottomrightcorner.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF008, 0); - - else if (top.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF003, 0); - else if (left.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF001, 0); - else if (right.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF002, 0); - else if (bottom.ClientRectangle.Contains(cursor)) SendMessage(Handle, WM_SYSCOMMAND, 0xF006, 0); - } } } diff --git a/Histacom2.Engine/Template/WinClassic.resx b/Histacom2.Engine/Template/WinClassic.resx index 394031d..6876b17 100644 --- a/Histacom2.Engine/Template/WinClassic.resx +++ b/Histacom2.Engine/Template/WinClassic.resx @@ -118,30 +118,6 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="maximizebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAA+SURBVChTY/hP - CmAAAiB1nzjQ0NCA0HDgwAEQBwcAygIBNTRAJNDAqAY0DbgAdg0EAUIDkEUkAGkgDTAwAACYPGiagsMD - PwAAAABJRU5ErkJggg== -</value> - </data> - <data name="minimizebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAA5SURBVChTY/hP - CmAAAiB1nzjQ0NCA0HCACDCqASqGF2DRAOKjAog4BFBDA36A0ABkEQlAGkgDDAwAKPmlWmNluNoAAAAA - SUVORK5CYII= -</value> - </data> - <data name="closebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAABcSURBVChTrY/R - DcAgCERvdEbrJh2lPU+SYkINRt+PSN6J4FkBhMddw8y+wFUgCbQ70OtO7OQTJLgRa/L7JWmOt8RsB8mD - TQ5NkFbeQcLwauzMdkjZCLAq0gJrAC8niIXaIK89FAAAAABJRU5ErkJggg== -</value> - </data> <data name="toprightcorner.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -198,4 +174,28 @@ /DTD////wfTh46cBUSgJ/bC/izUAAAAASUVORK5CYII= </value> </data> + <data name="maximizebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAA+SURBVChTY/hP + CmAAAiB1nzjQ0NCA0HDgwAEQBwcAygIBNTRAJNDAqAY0DbgAdg0EAUIDkEUkAGkgDTAwAACYPGiagsMD + PwAAAABJRU5ErkJggg== +</value> + </data> + <data name="minimizebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAA5SURBVChTY/hP + CmAAAiB1nzjQ0NCA0HCACDCqASqGF2DRAOKjAog4BFBDA36A0ABkEQlAGkgDDAwAKPmlWmNluNoAAAAA + SUVORK5CYII= +</value> + </data> + <data name="closebutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAABcSURBVChTrY/R + DcAgCERvdEbrJh2lPU+SYkINRt+PSN6J4FkBhMddw8y+wFUgCbQ70OtO7OQTJLgRa/L7JWmOt8RsB8mD + TQ5NkFbeQcLwauzMdkjZCLAq0gJrAC8niIXaIK89FAAAAABJRU5ErkJggg== +</value> + </data> </root>
\ No newline at end of file diff --git a/Histacom2.Engine/Template/WinXP.Designer.cs b/Histacom2.Engine/Template/WinXP.Designer.cs new file mode 100644 index 0000000..66cb521 --- /dev/null +++ b/Histacom2.Engine/Template/WinXP.Designer.cs @@ -0,0 +1,256 @@ +namespace Histacom2.Engine.Template +{ + partial class WinXP + { + /// <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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinXP)); + this.program = new System.Windows.Forms.Panel(); + this.bottomleftcorner = new System.Windows.Forms.Panel(); + this.toprightcorner = new System.Windows.Forms.Panel(); + this.bottomrightcorner = new System.Windows.Forms.Panel(); + this.topleftcorner = new System.Windows.Forms.Panel(); + this.bottom = new System.Windows.Forms.Panel(); + this.top = new System.Windows.Forms.Panel(); + this.maximizebutton = new System.Windows.Forms.PictureBox(); + this.minimizebutton = new System.Windows.Forms.PictureBox(); + this.programname = new System.Windows.Forms.Label(); + this.closebutton = new System.Windows.Forms.PictureBox(); + this.right = new System.Windows.Forms.Panel(); + this.left = new System.Windows.Forms.Panel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.programIcon = new System.Windows.Forms.PictureBox(); + this.program.SuspendLayout(); + this.top.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.maximizebutton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.minimizebutton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.closebutton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.programIcon)).BeginInit(); + this.SuspendLayout(); + // + // program + // + this.program.BackColor = System.Drawing.Color.OldLace; + this.program.Controls.Add(this.flowLayoutPanel1); + this.program.Controls.Add(this.bottomleftcorner); + this.program.Controls.Add(this.toprightcorner); + this.program.Controls.Add(this.bottomrightcorner); + this.program.Controls.Add(this.topleftcorner); + this.program.Controls.Add(this.bottom); + this.program.Controls.Add(this.top); + this.program.Controls.Add(this.right); + this.program.Controls.Add(this.left); + this.program.Dock = System.Windows.Forms.DockStyle.Fill; + this.program.Location = new System.Drawing.Point(0, 0); + this.program.Name = "program"; + this.program.Size = new System.Drawing.Size(300, 300); + this.program.TabIndex = 10; + // + // bottomleftcorner + // + this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.bottomleftcorner.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_BottomLeft; + this.bottomleftcorner.Location = new System.Drawing.Point(0, 296); + this.bottomleftcorner.Name = "bottomleftcorner"; + this.bottomleftcorner.Size = new System.Drawing.Size(5, 4); + this.bottomleftcorner.TabIndex = 10; + // + // toprightcorner + // + this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.toprightcorner.BackColor = System.Drawing.Color.Magenta; + this.toprightcorner.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("toprightcorner.BackgroundImage"))); + this.toprightcorner.Location = new System.Drawing.Point(294, 0); + this.toprightcorner.Name = "toprightcorner"; + this.toprightcorner.Size = new System.Drawing.Size(6, 30); + this.toprightcorner.TabIndex = 9; + // + // bottomrightcorner + // + this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.bottomrightcorner.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_BottomRight; + this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE; + this.bottomrightcorner.Location = new System.Drawing.Point(296, 296); + this.bottomrightcorner.Name = "bottomrightcorner"; + this.bottomrightcorner.Size = new System.Drawing.Size(4, 4); + this.bottomrightcorner.TabIndex = 4; + // + // topleftcorner + // + this.topleftcorner.BackColor = System.Drawing.Color.Magenta; + this.topleftcorner.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("topleftcorner.BackgroundImage"))); + this.topleftcorner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.topleftcorner.Location = new System.Drawing.Point(0, 0); + this.topleftcorner.Name = "topleftcorner"; + this.topleftcorner.Size = new System.Drawing.Size(7, 30); + this.topleftcorner.TabIndex = 8; + // + // bottom + // + this.bottom.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_Bottom; + this.bottom.Cursor = System.Windows.Forms.Cursors.SizeNS; + this.bottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.bottom.Location = new System.Drawing.Point(4, 296); + this.bottom.Name = "bottom"; + this.bottom.Size = new System.Drawing.Size(292, 4); + this.bottom.TabIndex = 3; + // + // top + // + this.top.BackColor = System.Drawing.Color.Transparent; + this.top.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_TopBar; + this.top.Controls.Add(this.programIcon); + this.top.Controls.Add(this.maximizebutton); + this.top.Controls.Add(this.minimizebutton); + this.top.Controls.Add(this.programname); + this.top.Controls.Add(this.closebutton); + this.top.Dock = System.Windows.Forms.DockStyle.Top; + this.top.Location = new System.Drawing.Point(4, 0); + this.top.Name = "top"; + this.top.Size = new System.Drawing.Size(292, 30); + this.top.TabIndex = 0; + // + // maximizebutton + // + this.maximizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.maximizebutton.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_Max; + this.maximizebutton.Location = new System.Drawing.Point(244, 5); + this.maximizebutton.Name = "maximizebutton"; + this.maximizebutton.Size = new System.Drawing.Size(21, 21); + this.maximizebutton.TabIndex = 6; + this.maximizebutton.TabStop = false; + // + // minimizebutton + // + this.minimizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.minimizebutton.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_Min; + this.minimizebutton.Location = new System.Drawing.Point(221, 5); + this.minimizebutton.Name = "minimizebutton"; + this.minimizebutton.Size = new System.Drawing.Size(21, 21); + this.minimizebutton.TabIndex = 5; + this.minimizebutton.TabStop = false; + // + // programname + // + this.programname.AutoSize = true; + this.programname.BackColor = System.Drawing.Color.Transparent; + this.programname.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.programname.ForeColor = System.Drawing.Color.White; + this.programname.Location = new System.Drawing.Point(25, 8); + this.programname.Name = "programname"; + this.programname.Size = new System.Drawing.Size(99, 13); + this.programname.TabIndex = 3; + this.programname.Text = "Application Title"; + // + // closebutton + // + this.closebutton.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.closebutton.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_Close; + this.closebutton.Location = new System.Drawing.Point(267, 5); + this.closebutton.Name = "closebutton"; + this.closebutton.Size = new System.Drawing.Size(21, 21); + this.closebutton.TabIndex = 4; + this.closebutton.TabStop = false; + // + // right + // + this.right.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_RightSide; + this.right.Cursor = System.Windows.Forms.Cursors.SizeWE; + this.right.Dock = System.Windows.Forms.DockStyle.Right; + this.right.Location = new System.Drawing.Point(296, 0); + this.right.Name = "right"; + this.right.Size = new System.Drawing.Size(4, 300); + this.right.TabIndex = 2; + // + // left + // + this.left.BackgroundImage = global::Histacom2.Engine.Properties.Resources.WinXP_LeftSide; + this.left.Dock = System.Windows.Forms.DockStyle.Left; + this.left.Location = new System.Drawing.Point(0, 0); + this.left.Name = "left"; + this.left.Size = new System.Drawing.Size(4, 300); + this.left.TabIndex = 1; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(4, 30); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(292, 266); + this.flowLayoutPanel1.TabIndex = 11; + // + // programIcon + // + this.programIcon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.programIcon.ErrorImage = null; + this.programIcon.InitialImage = null; + this.programIcon.Location = new System.Drawing.Point(6, 7); + this.programIcon.Name = "programIcon"; + this.programIcon.Size = new System.Drawing.Size(16, 16); + this.programIcon.TabIndex = 7; + this.programIcon.TabStop = false; + // + // WinXP + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(300, 300); + this.Controls.Add(this.program); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "WinXP"; + this.Text = "WinXP"; + this.Load += new System.EventHandler(this.WinXP_Load); + this.program.ResumeLayout(false); + this.top.ResumeLayout(false); + this.top.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.maximizebutton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.minimizebutton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.closebutton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.programIcon)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + internal System.Windows.Forms.Panel program; + internal System.Windows.Forms.Panel bottomleftcorner; + internal System.Windows.Forms.Panel toprightcorner; + internal System.Windows.Forms.Panel bottomrightcorner; + internal System.Windows.Forms.Panel topleftcorner; + internal System.Windows.Forms.Panel bottom; + internal System.Windows.Forms.Panel top; + internal System.Windows.Forms.PictureBox maximizebutton; + internal System.Windows.Forms.PictureBox minimizebutton; + internal System.Windows.Forms.Label programname; + internal System.Windows.Forms.PictureBox closebutton; + internal System.Windows.Forms.Panel right; + internal System.Windows.Forms.Panel left; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + public System.Windows.Forms.PictureBox programIcon; + } +}
\ No newline at end of file diff --git a/Histacom2.Engine/Template/WinXP.cs b/Histacom2.Engine/Template/WinXP.cs new file mode 100644 index 0000000..86b222e --- /dev/null +++ b/Histacom2.Engine/Template/WinXP.cs @@ -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 WinXP : Form + { + public WinXP() + { + InitializeComponent(); + } + + private void WinXP_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/Histacom2.Engine/Template/WinXP.resx b/Histacom2.Engine/Template/WinXP.resx new file mode 100644 index 0000000..94a7a5f --- /dev/null +++ b/Histacom2.Engine/Template/WinXP.resx @@ -0,0 +1,233 @@ +<?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> + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="toprightcorner.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + 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 + rkJggg== +</value> + </data> + <data name="topleftcorner.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + 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 +</value> + </data> +</root>
\ No newline at end of file diff --git a/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs index 2306d5d..cffb74a 100644 --- a/Histacom2.Engine/WindowManager.cs +++ b/Histacom2.Engine/WindowManager.cs @@ -10,10 +10,43 @@ namespace Histacom2.Engine { public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); - public WinClassic StartWin95(UserControl content, string title, Image icon, bool MaxButton, bool MinButton, bool ShowApplicationAsDialog = false, bool resize = true) + public WinClassic Init(UserControl content, string title, Image icon, bool MaxButton, bool MinButton, bool ShowApplicationAsDialog = false, bool resize = true) { + WinClassic app = null; // Setup Window - WinClassic app = new WinClassic(); + switch (SaveSystem.CurrentSave.CurrentOS) + { + case "95": + { + app = new WinClassic(); + break; + } + case "98": + { + app = new WinClassic(); + break; + } + case "ME": + { + app = new WinClassic(); + break; + } + case "2000": + { + app = new WinClassic(); + break; + } + case "XP": + { + // app = new WinXP(); + break; + } + default: + { + app = new WinClassic(); + break; + } + } app.Text = title; app.Title.Text = title; app.Width = content.Width + 8; @@ -76,6 +109,10 @@ namespace Histacom2.Engine if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); } return app; } + + // A THING TM + + // A THING TM public WinClassic StartInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns) { @@ -84,7 +121,7 @@ namespace Histacom2.Engine app.infoText.Text = text; app.infoText.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); - return StartWin95(app, title, null, false, false, resize: false); + return Init(app, title, null, false, false, resize: false); } public WinClassic StartAboutBox95(string shortname, string longname, Image appicon) @@ -94,7 +131,7 @@ namespace Histacom2.Engine uc.textBox1.Text = longname + "\r\nWindows 95\r\nCopyright © 1981-1995 Microsoft Corp."; uc.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); - return StartWin95(uc, "About " + shortname, null, false, false, resize: false); + return Init(uc, "About " + shortname, null, false, false, resize: false); } } } diff --git a/Histacom2/Histacom2.csproj b/Histacom2/Histacom2.csproj index 46750d2..34f8cd0 100644 --- a/Histacom2/Histacom2.csproj +++ b/Histacom2/Histacom2.csproj @@ -724,6 +724,9 @@ <Name>Histacom2.Engine</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <Folder Include="OS\WinXP\" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/Histacom2/OS/Win95/Win95.cs b/Histacom2/OS/Win95/Win95.cs index 8d2e466..25bc348 100644 --- a/Histacom2/OS/Win95/Win95.cs +++ b/Histacom2/OS/Win95/Win95.cs @@ -117,7 +117,7 @@ namespace Histacom2.OS.Win95 { CurrentSave.FTime95 = true; SaveGame(); - welcome = wm.StartWin95(new WinClassicWelcome(), "Welcome", null, false, false, resize: false); + welcome = wm.Init(new WinClassicWelcome(), "Welcome", null, false, false, resize: false); AddTaskBarItem(welcome, welcome.Tag.ToString(), "Welcome", null); nonimportantapps.Add(welcome); @@ -224,7 +224,7 @@ namespace Histacom2.OS.Win95 private void NotePadToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicNotepad wp = new WinClassicNotepad(); - WinClassic app = wm.StartWin95(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + WinClassic app = wm.Init(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); nonimportantapps.Add(app); @@ -237,7 +237,7 @@ namespace Histacom2.OS.Win95 private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicDownloader opendownload = new WinClassicDownloader(); - WinClassic app = wm.StartWin95(opendownload, "Downloader", null, false, true, resize: false); + WinClassic app = wm.Init(opendownload, "Downloader", null, false, true, resize: false); opendownload.appName.Text = "Downloading: Survive The Day"; AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null); @@ -249,7 +249,7 @@ namespace Histacom2.OS.Win95 private void installerTestToolStripMenuItem_Click(object sender, EventArgs e) { Win95Installer openinstaller = new Win95Installer("Testing"); - WinClassic app = wm.StartWin95(openinstaller, "Installer", null, false, true, resize: false); + WinClassic app = wm.Init(openinstaller, "Installer", null, false, true, resize: false); AddTaskBarItem(app, app.Tag.ToString(), "Installer", null); @@ -260,7 +260,7 @@ namespace Histacom2.OS.Win95 private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e) { if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + ie = wm.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing); @@ -280,7 +280,7 @@ namespace Histacom2.OS.Win95 if (objListViewItem.Text == "Internet Explorer") { if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + ie = wm.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing); @@ -288,7 +288,7 @@ namespace Histacom2.OS.Win95 } else if (objListViewItem.Text == "My Computer") // TODO: Implement slightly limited explorer (with no treeview and a new window each time ya go into a dir) { - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); app.BringToFront(); startmenu.Hide(); @@ -324,7 +324,7 @@ namespace Histacom2.OS.Win95 { we.CurrentDirectory = objListViewItem.Tag.ToString(); - WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); app.BringToFront(); startmenu.Hide(); @@ -350,7 +350,7 @@ namespace Histacom2.OS.Win95 } private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) { - webchat = wm.StartWin95(new WebChat1998(), "Web Chat 1998", null, true, true); + webchat = wm.Init(new WebChat1998(), "Web Chat 1998", null, true, true); AddTaskBarItem(webchat, webchat.Tag.ToString(), "Web Chat 1998", null); @@ -369,7 +369,7 @@ namespace Histacom2.OS.Win95 private void WordPadToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicWordPad wp = new WinClassicWordPad(); - WinClassic app = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); + WinClassic app = wm.Init(wp, "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95WordpadIcon2); nonimportantapps.Add(app); @@ -410,7 +410,7 @@ namespace Histacom2.OS.Win95 FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInSaveDialog = false; Win95WindowsExplorer we = new Win95WindowsExplorer(); - WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); nonimportantapps.Add(app); @@ -429,7 +429,7 @@ namespace Histacom2.OS.Win95 private void temp_for_std(object sender, EventArgs e) { Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay(); - WinClassic app = wm.StartWin95(std, "Survive The Day", null, false, false); + WinClassic app = wm.Init(std, "Survive The Day", null, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null); nonimportantapps.Add(app); @@ -443,7 +443,7 @@ namespace Histacom2.OS.Win95 private void MSDOSPromptToolStripMenuItem1_Click (object sender, EventArgs e) { WinClassicTerminal msdos = new WinClassicTerminal(false); - WinClassic app = wm.StartWin95(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false); + WinClassic app = wm.Init(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false); AddTaskBarItem(app, app.Tag.ToString(), "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image); app.BringToFront(); @@ -453,7 +453,7 @@ namespace Histacom2.OS.Win95 private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e) { WinClassicThemePanel theme = new WinClassicThemePanel(); - WinClassic app = wm.StartWin95(theme, "Themes", null, false, true, false, resize: false); + WinClassic app = wm.Init(theme, "Themes", null, false, true, false, resize: false); AddTaskBarItem(app, app.Tag.ToString(), "Themes", null); app.BringToFront(); @@ -463,14 +463,14 @@ namespace Histacom2.OS.Win95 private void TimeDistorterToolStripMenuItem_Click(object sender, EventArgs e) { distort = new WinClassicTimeDistorter("1998", "1999", 150, Hack2.StartObjective); - WinClassic app = wm.StartWin95(distort, "Time Distorter", null, false, true); + WinClassic app = wm.Init(distort, "Time Distorter", null, false, true); AddTaskBarItem(app, app.Tag.ToString(), "Time Distorter", null); app.BringToFront(); startmenu.Hide(); } private void FTPClientToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicFTPClient(), "FTP Client", null, true, true); + WinClassic app = wm.Init(new WinClassicFTPClient(), "FTP Client", null, true, true); AddTaskBarItem(app, app.Tag.ToString(), "FTP Client", null); app.BringToFront(); @@ -479,7 +479,7 @@ namespace Histacom2.OS.Win95 private void CalculatorToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false, resize: false); + WinClassic app = wm.Init(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false, resize: false); AddTaskBarItem(app, app.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); nonimportantapps.Add(app); @@ -569,7 +569,7 @@ namespace Histacom2.OS.Win95 private void MinsweeperToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicMinesweeper(), "Minesweeper", Properties.Resources.WinClassicMinesweeper, false, false, false, false); + WinClassic app = wm.Init(new WinClassicMinesweeper(), "Minesweeper", Properties.Resources.WinClassicMinesweeper, false, false, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Minesweeper", Properties.Resources.WinClassicMinesweeper); nonimportantapps.Add(app); @@ -596,7 +596,7 @@ namespace Histacom2.OS.Win95 private void GuessTheNumberToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, false, false, false); + WinClassic app = wm.Init(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, false, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Guess The Number", Properties.Resources.WinClassicGTNIcon); nonimportantapps.Add(app); diff --git a/Histacom2/OS/Win95/Win95Apps/IE4Sites/12padams1998.cs b/Histacom2/OS/Win95/Win95Apps/IE4Sites/12padams1998.cs index be6ab95..bedfe56 100644 --- a/Histacom2/OS/Win95/Win95Apps/IE4Sites/12padams1998.cs +++ b/Histacom2/OS/Win95/Win95Apps/IE4Sites/12padams1998.cs @@ -30,7 +30,7 @@ namespace Histacom2.OS.Win95.Win95Apps.IE4Sites { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: FTP Client"; opendownload.amountToDL = 56; } @@ -39,7 +39,7 @@ namespace Histacom2.OS.Win95.Win95Apps.IE4Sites { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Web Chat 1998"; opendownload.amountToDL = 35; } @@ -141,7 +141,7 @@ namespace Histacom2.OS.Win95.Win95Apps.IE4Sites { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Guess The Number V1"; opendownload.amountToDL = 16; } diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs index 9b6595c..2a03c7e 100644 --- a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs @@ -123,7 +123,7 @@ namespace Histacom2.OS.Win95.Win95Apps private void bestTimesToolStripMenuItem_Click(object sender, EventArgs e) { WindowManager wm = new WindowManager(); - wm.StartWin95(new MineBestTimes(), "Best Times", null, false, false, true, false); + wm.Init(new MineBestTimes(), "Best Times", null, false, false, true, false); } @@ -165,7 +165,7 @@ namespace Histacom2.OS.Win95.Win95Apps private void customToolStripMenuItem_Click(object sender, EventArgs e) { level = "custom"; - new WindowManager().StartWin95(new CustomMinefield(this), "Custom Field", null, false, false, true, false); + new WindowManager().Init(new CustomMinefield(this), "Custom Field", null, false, false, true, false); } } } diff --git a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs index b988092..41f7c35 100644 --- a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs +++ b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs @@ -39,7 +39,7 @@ namespace Histacom2.OS.Win95.Win95Apps.Story public static async void ContinueObjective() { WinClassicTerminal Console = new WinClassicTerminal(true); - WinClassic app = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true); + WinClassic app = wm.Init(Console, "MS-DOS Prompt", null, true, true); Console.WriteLine("telnet> 104.27.135.159 Connecting..."); await Task.Delay(2500); diff --git a/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs b/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs index b72c576..5f71ce4 100644 --- a/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs +++ b/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs @@ -17,7 +17,7 @@ namespace Histacom2.OS.Win95.Win95Apps.Story { WinClassicTerminal Console = new WinClassicTerminal(true); Random r = new Random(); - WinClassic app = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true); + WinClassic app = wm.Init(Console, "MS-DOS Prompt", null, true, true); Console.WriteLine("telnet> 185.152.46.51 Connecting..."); await Task.Delay(2500); diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs index e16d79b..8939b84 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs @@ -67,7 +67,6 @@ // program // this.program.BackColor = System.Drawing.Color.Silver; - this.program.Controls.Add(this.pnlSave); this.program.Controls.Add(this.mainView); this.program.Controls.Add(this.diskView); this.program.Controls.Add(this.MenuStrip1); @@ -75,6 +74,7 @@ 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; this.program.Location = new System.Drawing.Point(0, 0); this.program.Name = "program"; @@ -86,9 +86,10 @@ this.pnlSave.Controls.Add(this.Button1); this.pnlSave.Controls.Add(this.Label1); this.pnlSave.Controls.Add(this.txtSave); - this.pnlSave.Location = new System.Drawing.Point(3, 474); + 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(850, 35); + this.pnlSave.Size = new System.Drawing.Size(704, 35); this.pnlSave.TabIndex = 18; this.pnlSave.Visible = false; // @@ -96,7 +97,7 @@ // 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(608, 1); + 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; @@ -119,17 +120,15 @@ | 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(542, 20); + this.txtSave.Size = new System.Drawing.Size(563, 20); this.txtSave.TabIndex = 15; // // mainView // - this.mainView.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.mainView.Location = new System.Drawing.Point(215, 27); + 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(486, 444); + this.mainView.Size = new System.Drawing.Size(491, 458); this.mainView.TabIndex = 10; this.mainView.UseCompatibleStateImageBehavior = false; this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit); @@ -137,12 +136,10 @@ // // diskView // - this.diskView.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.diskView.Location = new System.Drawing.Point(3, 27); + 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, 444); + this.diskView.Size = new System.Drawing.Size(213, 458); this.diskView.TabIndex = 13; this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect); // diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index d7a10a8..9c7e2a3 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -225,7 +225,7 @@ namespace Histacom2.OS.Win95.Win95Apps WinClassicNotepad np = new WinClassicNotepad(); np.mainText.Text = FileDialogBoxManager.ReadTextFile(fileDir); np.CurrentFilePath = fileDir; - WinClassic app = wm.StartWin95(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + WinClassic app = wm.Init(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); break; @@ -233,7 +233,7 @@ namespace Histacom2.OS.Win95.Win95Apps WinClassicWordPad wp = new WinClassicWordPad(); wp.mainText.LoadFile(fileDir); wp.CurrentFilePath = fileDir; - WinClassic app2 = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); + WinClassic app2 = wm.Init(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); Program.AddTaskbarItem(app2, app2.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad); break; @@ -250,11 +250,11 @@ namespace Histacom2.OS.Win95.Win95Apps switch (appname.ToLower()) { case "explorer": - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); break; case "calc": - WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); + WinClassic appCalc = wm.Init(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); Program.nonimportantapps.Add(appCalc); @@ -263,7 +263,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "notepad": - WinClassic appNP = wm.StartWin95(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); + WinClassic appNP = wm.Init(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); Program.AddTaskbarItem(appNP, appNP.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad_2); Program.nonimportantapps.Add(appNP); @@ -272,7 +272,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "wordpad": - WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); + WinClassic appWP = wm.Init(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.Win95WordpadIcon2); Program.nonimportantapps.Add(appWP); @@ -282,7 +282,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "ie": if (TitleScreen.frm95.ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - TitleScreen.frm95.ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + TitleScreen.frm95.ie = wm.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); Program.AddTaskbarItem(TitleScreen.frm95.ie, TitleScreen.frm95.ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); TitleScreen.frm95.ie.BringToFront(); TitleScreen.frm95.ie.FormClosing += new FormClosingEventHandler(TitleScreen.frm95.InternetExplorer4_Closing); @@ -291,7 +291,7 @@ namespace Histacom2.OS.Win95.Win95Apps case "web chat setup": Win95Installer inst = new Win95Installer("Web Chat 1998"); inst.InstallCompleted += (sendr, args) => TitleScreen.frm95.WebChatToolStripMenuItem.Visible = true; - WinClassic appInstaller = wm.StartWin95(inst, "Web Chat Setup", null, true, true); + WinClassic appInstaller = wm.Init(inst, "Web Chat Setup", null, true, true); Program.AddTaskbarItem(appInstaller, appInstaller.Tag.ToString(), "Web Chat Setup", null); appInstaller.BringToFront(); @@ -305,7 +305,7 @@ namespace Histacom2.OS.Win95.Win95Apps CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "FTP Client"), "ftpclint.exe", "ftp client", 19, 58395); TitleScreen.frm95.FTPClientToolStripMenuItem.Visible = true; }; - WinClassic appFtp = wm.StartWin95(instFtp, "FTP Client Setup", null, true, true); + WinClassic appFtp = wm.Init(instFtp, "FTP Client Setup", null, true, true); Program.AddTaskbarItem(appFtp, appFtp.Tag.ToString(), "FTP Client Setup", null); appFtp.BringToFront(); @@ -319,7 +319,7 @@ namespace Histacom2.OS.Win95.Win95Apps CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "Time Distorter 0.1"), "tdistort.exe", "time distorter", 17, 23895); TitleScreen.frm95.TimeDistorterToolStripMenuItem.Visible = true; }; - WinClassic appTd = wm.StartWin95(instTd, "Time Distorter Setup", null, true, true); + WinClassic appTd = wm.Init(instTd, "Time Distorter Setup", null, true, true); Program.AddTaskbarItem(appTd, appTd.Tag.ToString(), "Time Distorter Setup", null); appTd.BringToFront(); @@ -337,13 +337,13 @@ namespace Histacom2.OS.Win95.Win95Apps CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "Guess The Number V1"), "guessnum.exe", "guess number", 18, 17483); TitleScreen.frm95.GuessTheNumberToolStripMenuItem.Visible = true; }; - WinClassic appGtn = wm.StartWin95(instGtn, "Guess The Number Setup", null, true, true); + WinClassic appGtn = wm.Init(instGtn, "Guess The Number Setup", null, true, true); Program.AddTaskbarItem(appGtn, appGtn.Tag.ToString(), "Guess The Number Setup", null); appGtn.BringToFront(); break; case "guess number": - WinClassic appGTN = wm.StartWin95(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, true, false, false); + WinClassic appGTN = wm.Init(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, true, false, false); Program.AddTaskbarItem(appGTN, appGTN.Tag.ToString(), "Guess The Number", Properties.Resources.WinClassicGTNIcon); Program.nonimportantapps.Add(appGTN); diff --git a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs index 1488808..b6195ae 100644 --- a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs +++ b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs @@ -88,14 +88,14 @@ namespace Histacom2.OS.Win95.Win95Apps { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: FTP Client"; } else if (objListViewItem.Text == "Web Chat Setup.exe") { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Web Chat 1998"; opendownload.amountToDL = 35; } @@ -103,14 +103,14 @@ namespace Histacom2.OS.Win95.Win95Apps { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Time Distorter 0.1"; } else if (objListViewItem.Text == "Guess The Number V1 Setup.exe") { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Guess The Number V1"; opendownload.amountToDL = 16; } diff --git a/Histacom2/OS/Win98/Win98.cs b/Histacom2/OS/Win98/Win98.cs index 146aa3c..a21b144 100644 --- a/Histacom2/OS/Win98/Win98.cs +++ b/Histacom2/OS/Win98/Win98.cs @@ -206,7 +206,7 @@ namespace Histacom2.OS.Win98 private void NotePadToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicNotepad wp = new WinClassicNotepad(); - WinClassic app = wm.StartWin95(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + WinClassic app = wm.Init(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); nonimportantapps.Add(app); @@ -219,7 +219,7 @@ namespace Histacom2.OS.Win98 private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicDownloader opendownload = new WinClassicDownloader(); - WinClassic app = wm.StartWin95(opendownload, "Downloader", null, false, true); + WinClassic app = wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Survive The Day"; AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null); @@ -231,7 +231,7 @@ namespace Histacom2.OS.Win98 private void installerTestToolStripMenuItem_Click(object sender, EventArgs e) { Win95Installer openinstaller = new Win95Installer("Testing"); - WinClassic app = wm.StartWin95(openinstaller, "Installer", null, false, true); + WinClassic app = wm.Init(openinstaller, "Installer", null, false, true); AddTaskBarItem(app, app.Tag.ToString(), "Installer", null); @@ -242,7 +242,7 @@ namespace Histacom2.OS.Win98 private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e) { if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + ie = wm.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing); @@ -262,7 +262,7 @@ namespace Histacom2.OS.Win98 if (objListViewItem.Text == "Internet Explorer") { if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + ie = wm.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing); @@ -270,7 +270,7 @@ namespace Histacom2.OS.Win98 } else if (objListViewItem.Text == "My Computer") { - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); app.BringToFront(); startmenu.Hide(); @@ -309,7 +309,7 @@ namespace Histacom2.OS.Win98 { we.CurrentDirectory = objListViewItem.Tag.ToString(); - WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); app.BringToFront(); startmenu.Hide(); @@ -336,7 +336,7 @@ namespace Histacom2.OS.Win98 private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) { WebChat1998 wc = new WebChat1998(); - WinClassic app = wm.StartWin95(wc, "Web Chat 1998", null, true, true); + WinClassic app = wm.Init(wc, "Web Chat 1998", null, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null); @@ -355,7 +355,7 @@ namespace Histacom2.OS.Win98 private void WordPadToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicWordPad wp = new WinClassicWordPad(); - WinClassic app = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); + WinClassic app = wm.Init(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad); nonimportantapps.Add(app); @@ -394,7 +394,7 @@ namespace Histacom2.OS.Win98 private void AddressBookToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); + WinClassic app = wm.Init(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); Program.nonimportantapps.Add(app); @@ -408,7 +408,7 @@ namespace Histacom2.OS.Win98 { FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInSaveDialog = false; - WinClassic app = wm.StartWin95(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); nonimportantapps.Add(app); @@ -427,7 +427,7 @@ namespace Histacom2.OS.Win98 private void temp_for_std(object sender, EventArgs e) { Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay(); - WinClassic app = wm.StartWin95(std, "Survive The Day", null, false, false); + WinClassic app = wm.Init(std, "Survive The Day", null, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null); nonimportantapps.Add(app); @@ -441,7 +441,7 @@ namespace Histacom2.OS.Win98 private void MSDOSPromptToolStripMenuItem1_Click(object sender, EventArgs e) { WinClassicTerminal msdos = new WinClassicTerminal(false); - WinClassic app = wm.StartWin95(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false); + WinClassic app = wm.Init(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false); AddTaskBarItem(app, app.Tag.ToString(), "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image); app.BringToFront(); @@ -451,7 +451,7 @@ namespace Histacom2.OS.Win98 private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e) { WinClassicThemePanel theme = new WinClassicThemePanel(); - WinClassic app = wm.StartWin95(theme, "Themes", null, false, true, false); + WinClassic app = wm.Init(theme, "Themes", null, false, true, false); AddTaskBarItem(app, app.Tag.ToString(), "Themes", null); app.BringToFront(); @@ -469,7 +469,7 @@ namespace Histacom2.OS.Win98 private void FTPClientToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicFTPClient(), "FTP Client", null, true, true); + WinClassic app = wm.Init(new WinClassicFTPClient(), "FTP Client", null, true, true); AddTaskBarItem(app, app.Tag.ToString(), "FTP Client", null); app.BringToFront(); @@ -478,7 +478,7 @@ namespace Histacom2.OS.Win98 private void CalculatorToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false); + WinClassic app = wm.Init(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); nonimportantapps.Add(app); diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index e6f1176..ccd22f0 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -123,7 +123,7 @@ namespace Histacom2.OS.Win95.Win95Apps void NewFolder() { FRMWinClassicAddressBookNewFolder abnf = new FRMWinClassicAddressBookNewFolder(); - WinClassic app = wm.StartWin95(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true); + WinClassic app = wm.Init(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true); if (treeView1.SelectedNode != null) { @@ -146,7 +146,7 @@ namespace Histacom2.OS.Win95.Win95Apps void NewContact() { FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact(); - WinClassic app = wm.StartWin95(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true); + WinClassic app = wm.Init(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true); if (treeView1.SelectedNode != null) { @@ -189,7 +189,7 @@ namespace Histacom2.OS.Win95.Win95Apps } } } - WinClassic app = wm.StartWin95(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true); + WinClassic app = wm.Init(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true); if (treeView1.SelectedNode != null) { diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs index 25d29fd..af2570c 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs @@ -337,7 +337,7 @@ // // Button1 // - this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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"; diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index 8fbe14c..936d89e 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -244,7 +244,7 @@ namespace Histacom2.OS.Win95.Win95Apps WinClassicNotepad np = new WinClassicNotepad(); np.mainText.Text = FileDialogBoxManager.ReadTextFile(fileDir); np.CurrentFilePath = fileDir; - WinClassic app = wm.StartWin95(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + WinClassic app = wm.Init(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); break; @@ -252,7 +252,7 @@ namespace Histacom2.OS.Win95.Win95Apps WinClassicWordPad wp = new WinClassicWordPad(); wp.mainText.LoadFile(fileDir); wp.CurrentFilePath = fileDir; - WinClassic app2 = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); + WinClassic app2 = wm.Init(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); Program.AddTaskbarItem(app2, app2.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad); break; @@ -272,11 +272,11 @@ namespace Histacom2.OS.Win95.Win95Apps switch (appname.ToLower()) { case "explorer": - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); break; case "calc": - WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); + WinClassic appCalc = wm.Init(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); Program.nonimportantapps.Add(appCalc); @@ -285,7 +285,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "notepad": - WinClassic appNP = wm.StartWin95(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); + WinClassic appNP = wm.Init(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); Program.AddTaskbarItem(appNP, appNP.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad_2); Program.nonimportantapps.Add(appNP); @@ -294,7 +294,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "wordpad": - WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); + WinClassic appWP = wm.Init(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.Win95WordpadIcon2); Program.nonimportantapps.Add(appWP); @@ -304,7 +304,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "ie": if (TitleScreen.frm95.ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - TitleScreen.frm95.ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + TitleScreen.frm95.ie = wm.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); Program.AddTaskbarItem(TitleScreen.frm95.ie, TitleScreen.frm95.ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); TitleScreen.frm95.ie.BringToFront(); TitleScreen.frm95.ie.FormClosing += new FormClosingEventHandler(TitleScreen.frm95.InternetExplorer4_Closing); @@ -313,7 +313,7 @@ namespace Histacom2.OS.Win95.Win95Apps case "web chat setup": Win95Installer inst = new Win95Installer("Web Chat 1998"); inst.InstallCompleted += (sendr, args) => TitleScreen.frm95.WebChatToolStripMenuItem.Visible = true; - WinClassic appInstaller = wm.StartWin95(inst, "Web Chat Setup", null, true, true); + WinClassic appInstaller = wm.Init(inst, "Web Chat Setup", null, true, true); Program.AddTaskbarItem(appInstaller, appInstaller.Tag.ToString(), "Web Chat Setup", null); appInstaller.BringToFront(); @@ -321,7 +321,7 @@ namespace Histacom2.OS.Win95.Win95Apps case "ftp client setup": Win95Installer instFtp = new Win95Installer("FTP Client"); instFtp.InstallCompleted += (sendr, args) => TitleScreen.frm95.FTPClientToolStripMenuItem.Visible = true; - WinClassic appFtp = wm.StartWin95(instFtp, "FTP Client Setup", null, true, true); + WinClassic appFtp = wm.Init(instFtp, "FTP Client Setup", null, true, true); Program.AddTaskbarItem(appFtp, appFtp.Tag.ToString(), "FTP Client Setup", null); appFtp.BringToFront(); @@ -332,7 +332,7 @@ namespace Histacom2.OS.Win95.Win95Apps { TitleScreen.frm95.TimeDistorterToolStripMenuItem.Visible = true; }; - WinClassic appTd = wm.StartWin95(instTd, "Time Distorter Setup", null, true, true); + WinClassic appTd = wm.Init(instTd, "Time Distorter Setup", null, true, true); Program.AddTaskbarItem(appTd, appTd.Tag.ToString(), "Time Distorter Setup", null); appTd.BringToFront(); diff --git a/Histacom2/Program.cs b/Histacom2/Program.cs index f978b90..97fee5f 100644 --- a/Histacom2/Program.cs +++ b/Histacom2/Program.cs @@ -69,9 +69,9 @@ namespace Histacom2 { if (SaveSystem.CurrentSave.CurrentOS == "95") { - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); } else { - WinClassic app = wm.StartWin95(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); + WinClassic app = wm.Init(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); } try diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs index 4c11576..85c04fb 100644 --- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs +++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs @@ -30,9 +30,9 @@ { this.label1 = new System.Windows.Forms.Label(); this.pnlResolved = new System.Windows.Forms.Panel(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.pnlResolved.SuspendLayout(); @@ -59,19 +59,22 @@ 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, 146); + this.pnlResolved.Size = new System.Drawing.Size(589, 275); this.pnlResolved.TabIndex = 1; this.pnlResolved.Visible = false; // - // label2 + // textBox1 // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(8, 11); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(210, 20); - this.label2.TabIndex = 0; - this.label2.Text = "The issue has been resolved"; + this.textBox1.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.textBox1.Location = new System.Drawing.Point(10, 55); + this.textBox1.Multiline = true; + 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.TabIndex = 3; // // label3 // @@ -82,24 +85,22 @@ this.label3.TabIndex = 2; this.label3.Text = "log:"; // - // textBox1 + // label2 // - this.textBox1.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.textBox1.Location = new System.Drawing.Point(10, 55); - this.textBox1.Multiline = true; - this.textBox1.Name = "textBox1"; - this.textBox1.ReadOnly = true; - this.textBox1.Size = new System.Drawing.Size(567, 79); - this.textBox1.TabIndex = 3; + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(8, 11); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(210, 20); + this.label2.TabIndex = 0; + this.label2.Text = "The issue has been resolved"; // // panel2 // - this.panel2.BackColor = System.Drawing.SystemColors.ControlDark; + 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, 217); + this.panel2.Location = new System.Drawing.Point(0, 315); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(612, 30); this.panel2.TabIndex = 2; @@ -119,7 +120,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(612, 247); + this.ClientSize = new System.Drawing.Size(612, 345); this.Controls.Add(this.panel2); this.Controls.Add(this.pnlResolved); this.Controls.Add(this.label1); diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs index 9d26762..af105f0 100644 --- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs +++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs @@ -43,6 +43,7 @@ namespace Histacom2.SaveDialogs // Check if the main.save file exists string savefile = Path.Combine(SaveSystem.ProfileDirectory, "main.save"); + string oldsavefile = Path.Combine(SaveSystem.ProfileDirectory, "oldmain.save"); if (!File.Exists(savefile)) { @@ -58,54 +59,111 @@ namespace Histacom2.SaveDialogs return; } else { WriteToLog("File main.save does exist - checking contents"); + bool readable = false; try { savedata = SaveSystem.ReadSave(savefile); - + readable = true; } catch { - WriteToLog("ISSUE FOUND! File main.save is unreadable"); + WriteToLog("Save file cannot be read - scanning each line and examining them..."); + // Take a little look at the file? - WriteToLog("Sorry, there is no repairing it easily, your data will be lost"); + // But first let's just create a measure of how the JSON SHOULD look + if (!SaveSystem.IsBinarySave) + { + if (File.Exists(oldsavefile)) File.Delete(oldsavefile); + File.Copy(savefile, oldsavefile); - string backupfile = Path.Combine(SaveSystem.ProfileDirectory, "main.backup"); + SaveSystem.NewGame(); + string[] fileLines = File.ReadAllText(oldsavefile).Split('\n'); + string[] shouldBeLines = File.ReadAllText(savefile).Split('\n'); + int i = 0; - if (Directory.Exists(backupfile)) Directory.Delete(backupfile); + string newJson = ""; - File.Copy(savefile, backupfile); - SaveSystem.NewGame(); + foreach (string element in fileLines) + { + element.Replace("\n", "").Replace("\r", ""); + } - // Make sure the username is set + foreach (string line in fileLines) + { + if (!line.StartsWith("{")) + { + if (!line.StartsWith("}")) + { + try { + // We will attempt to deserialize this line - SaveSystem.CurrentSave.Username = SaveSystem.ProfileName; + Newtonsoft.Json.JsonConvert.DeserializeObject("{" + $"{Environment.NewLine}{line}{Environment.NewLine}" + "}"); - WriteToLog($"The corrupt file has been stored in {backupfile}"); + // It worked! This line is not the problem! - EndScan(true); - } - + newJson += $"{Environment.NewLine}{fileLines[i]}"; - // Check the values + WriteToLog($"The line {fileLines[i]} is fine!"); + } catch { + // If it failed to read this line the this is the line that's causing problems! - if (savedata.CurrentOS == null || savedata.CurrentOS == "") - { - WriteToLog("ISSUE FOUND! Data for CurrentOS is null! Giving default value..."); - savedata.CurrentOS = "95"; - EndScan(true); - } + try { newJson += $"{Environment.NewLine}{shouldBeLines[i]}"; + WriteToLog($"ISSUE FOUND! The line {fileLines[i]} was corrupt - it has been reset to default settings!"); + } catch { WriteToLog($"ISSUE FOUND! A line was unneeded - it has been removed as it should!"); } // The reason I'm catching that is in case someone adds a line at the end of the file or something + } + } + } + i++; + } - if (savedata.ExperiencedStories == null) - { - WriteToLog("ISSUE FOUND! Data for ExperiencedStories is null! Giving default value..."); - savedata.ExperiencedStories = new List<string>(); - } + // After all that let's see if we fixed the file - but first, add the "{" and "}" in! - if (savedata.ThemeName == null || savedata.ThemeName == "") - { - WriteToLog("ISSUE FOUND! Data for ThemeName is null! Giving default value..."); - savedata.ThemeName = "95normal"; + newJson = "{" + $"{Environment.NewLine}{newJson}{Environment.NewLine}" + "}"; + + // Now let's test it + + try + { + savedata = Newtonsoft.Json.JsonConvert.DeserializeObject<Save>(newJson); + + WriteToLog("Save file successfully recovered!"); + + File.WriteAllText(savefile, newJson); + readable = true; + + if (File.Exists(oldsavefile)) File.Delete(oldsavefile); + EndScan(true); + } catch { + // It's unusable... + + WriteToLog("ISSUE FOUND! File main.save is unreadable"); + + WriteToLog("Sorry, there is no repairing it easily, your data will be lost"); + + string backupfile = Path.Combine(SaveSystem.ProfileDirectory, "main.backup"); + + if (Directory.Exists(backupfile)) Directory.Delete(backupfile); + + File.Copy(savefile, backupfile); + SaveSystem.NewGame(); + + // Make sure the username is set + + SaveSystem.CurrentSave.Username = SaveSystem.ProfileName; + SaveSystem.SaveGame(); + + WriteToLog($"The corrupt file has been stored in {backupfile}"); + + EndScan(true); + } + } } + + + // Check the values if it was readable + + if (readable) CheckValues(); + } string folderspath = Path.Combine(SaveSystem.ProfileDirectory, "folders"); @@ -117,26 +175,29 @@ namespace Histacom2.SaveDialogs SaveSystem.CheckFiles(); } + } + private void CheckValues() + { + foreach (var field in typeof(Save).GetFields()) + { + if (field.GetValue(savedata) is string) if (field.GetValue(savedata).ToString() == null) { field.SetValue(savedata, ""); continue; } + if (field.GetValue(savedata) is Theme) if (field.GetValue(savedata) == null) { field.SetValue(savedata, new Default95Theme()); continue; } + if (field.GetValue(savedata) is List<string>) if (field.GetValue(savedata) == null) { field.SetValue(savedata, new List<string>()); } + } } void EndScan(bool successful) { pnlResolved.Visible = true; + label1.Hide(); if (successful == true) { label2.Text = "The issue has been resolved."; - // Set CurrentSave to the resolved one - - SaveSystem.CurrentSave = savedata; - - // Set the main.save file to the resolved one - - SaveSystem.WriteSave(Path.Combine(SaveSystem.ProfileDirectory, "main.save"), savedata); textBox1.Text = log; } else { - label2.Text = "The issue has not been resolved, sorry"; + label2.Text = "The issue has not been resolved, sorry."; textBox1.Text = log; } } diff --git a/Histacom2/TitleScreen.Designer.cs b/Histacom2/TitleScreen.Designer.cs index 07bbc54..e29c283 100644 --- a/Histacom2/TitleScreen.Designer.cs +++ b/Histacom2/TitleScreen.Designer.cs @@ -244,7 +244,7 @@ this.startmenuitems.Name = "startmenuitems"; this.startmenuitems.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); this.startmenuitems.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; - this.startmenuitems.Size = new System.Drawing.Size(140, 220); + this.startmenuitems.Size = new System.Drawing.Size(140, 239); this.startmenuitems.TabIndex = 0; this.startmenuitems.Text = "StartMenu"; // diff --git a/Histacom2/TitleScreen.cs b/Histacom2/TitleScreen.cs index 851bd19..e810d5d 100644 --- a/Histacom2/TitleScreen.cs +++ b/Histacom2/TitleScreen.cs @@ -156,7 +156,7 @@ namespace Histacom2 label1.Parent = leet; label1.AutoSize = true; label1.Text = "Thank you for making Histacom2 possible."; - wm.StartWin95(leet, "Thank You", null, true, true); + wm.Init(leet, "Thank You", null, true, true); } // The VM Mode timer / checker. Updates every 100ms @@ -207,8 +207,6 @@ namespace Histacom2 } catch { } - - // If VM Mode is not enabled if (vm_mode.Checked != true) |
