new file: .gitignore

new file:   1/1.cs
new file:   1/1.csproj
new file:   1/Properties/AssemblyInfo.cs
new file:   Base/Base.csproj
new file:   Base/Input.cs
new file:   Base/Level.cs
new file:   Base/Properties/AssemblyInfo.cs
new file:   LaptopSimulator2015.sln
new file:   LaptopSimulator2015/App.config
new file:   LaptopSimulator2015/CaptchaGenerator.cs
new file:   LaptopSimulator2015/FakeDesktop.Designer.cs
new file:   LaptopSimulator2015/FakeDesktop.cs
new file:   LaptopSimulator2015/FakeDesktop.resx
new file:   LaptopSimulator2015/LaptopSimulator2015.csproj
new file:   LaptopSimulator2015/Program.cs
new file:   LaptopSimulator2015/Properties/AssemblyInfo.cs
new file:   LaptopSimulator2015/Properties/Resources.Designer.cs
new file:   LaptopSimulator2015/Properties/Resources.resx
new file:   LaptopSimulator2015/Properties/Settings.Designer.cs
new file:   LaptopSimulator2015/Properties/Settings.settings
new file:   LaptopSimulator2015/Resources/fans.wav
new file:   LaptopSimulator2015/Resources/pcoptimizerpro.jpeg
new file:   LaptopSimulator2015/Settings.cs
new file:   LaptopSimulator2015/strings.Designer.cs
new file:   LaptopSimulator2015/strings.de.Designer.cs
new file:   LaptopSimulator2015/strings.de.resx
new file:   LaptopSimulator2015/strings.resx
new file:   README.md
new file:   SIT/App.config
new file:   SIT/MainForm.Designer.cs
new file:   SIT/MainForm.cs
new file:   SIT/MainForm.resx
new file:   SIT/Program.cs
new file:   SIT/Properties/AssemblyInfo.cs
new file:   SIT/Properties/Resources.Designer.cs
new file:   SIT/Properties/Resources.resx
new file:   SIT/Properties/Settings.Designer.cs
new file:   SIT/Properties/Settings.settings
new file:   SIT/SIT.csproj
new file:   ToDo.txt
new file:   make.bat
This commit is contained in:
CreepyCrafter24 2019-07-23 14:54:05 +02:00
commit 633f91cac6
42 changed files with 4495 additions and 0 deletions

513
.gitignore vendored Normal file
View File

@ -0,0 +1,513 @@
# Created by https://www.gitignore.io/api/csharp,visualstudio
# Edit at https://www.gitignore.io/?templates=csharp,visualstudio
### Csharp ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
### VisualStudio ###
# User-specific files
# User-specific files (MonoDevelop/Xamarin Studio)
# Mono auto generated files
# Build results
# Visual Studio 2015/2017 cache/options directory
# Uncomment if you have tasks that create the project's static files in wwwroot
# Visual Studio 2017 auto generated files
# MSTest test Results
# NUnit
# Build Results of an ATL Project
# Benchmark Results
# .NET Core
# StyleCop
# Files built by Visual Studio
# Chutzpah Test files
# Visual C++ cache files
# Visual Studio profiler
# Visual Studio Trace Files
# TFS 2012 Local Workspace
# Guidance Automation Toolkit
# ReSharper is a .NET coding add-in
# JustCode is a .NET coding add-in
# TeamCity is a build add-in
# DotCover is a Code Coverage Tool
# AxoCover is a Code Coverage Tool
# Visual Studio code coverage results
# NCrunch
# MightyMoose
# Web workbench (sass)
# Installshield output folder
# DocProject is a documentation generator add-in
# Click-Once directory
# Publish Web Output
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
# NuGet Packages
# NuGet Symbol Packages
# The packages folder can be ignored because of Package Restore
# except build/, which is used as an MSBuild target.
# Uncomment if necessary however generally it will be regenerated when needed
# NuGet v3's project.json files produces more ignorable files
# Microsoft Azure Build Output
# Microsoft Azure Emulator
# Windows Store app package directories and files
# Visual Studio cache files
# files ending in .cache can be ignored
# but keep track of directories ending in .cache
# Others
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
# RIA/Silverlight projects
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
# SQL Server files
# Business Intelligence projects
# Microsoft Fakes
# GhostDoc plugin setting file
# Node.js Tools for Visual Studio
# Visual Studio 6 build log
# Visual Studio 6 workspace options file
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
# Visual Studio LightSwitch build output
# Paket dependency manager
# FAKE - F# Make
# CodeRush personal settings
# Python Tools for Visual Studio (PTVS)
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
# Telerik's JustMock configuration file
# BizTalk build output
# OpenCover UI analysis results
# Azure Stream Analytics local run output
# MSBuild Binary and Structured Log
# NVidia Nsight GPU debugger configuration file
# MFractors (Xamarin productivity tool) working folder
# Local History for Visual Studio
# BeatPulse healthcheck temp database
# Backup folder for Package Reference Convert tool in Visual Studio 2017
# End of https://www.gitignore.io/api/csharp,visualstudio

182
1/1.cs Normal file

File diff suppressed because one or more lines are too long

64
1/1.csproj Normal file
View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DFA2FB97-D676-4B0D-B281-2685F85781EE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>_1</RootNamespace>
<AssemblyName>1</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.csproj">
<Project>{9a9561a7-dd5f-43a5-a3f5-a95f35da204d}</Project>
<Name>Base</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(SolutionDir)tmp" mkdir "$(SolutionDir)tmp"
copy "$(TargetPath)" "$(SolutionDir)tmp"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("1")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("dfa2fb97-d676-4b0d-b281-2685f85781ee")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

55
Base/Base.csproj Normal file
View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9A9561A7-DD5F-43A5-A3F5-A95F35DA204D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Base</RootNamespace>
<AssemblyName>Base</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Input.cs" />
<Compile Include="Level.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

35
Base/Input.cs Normal file
View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Base
{
public class Input
{
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
private static extern short GetKeyState(int keyCode);
public static bool IsKeyDown(Keys key)
{
try
{
int state = 0;
short retVal = GetKeyState((int)key);
if ((retVal & 0x8000) == 0x8000)
state |= 1;
if ((retVal & 1) == 1)
state |= 2;
return 1 == (state & 1);
}
catch (Exception e1)
{
Console.WriteLine("Invader: IsKeyDown failed:\r\n" + e1.ToString());
return false;
}
}
}
}

23
Base/Level.cs Normal file
View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LaptopSimulator2015
{
public interface Level
{
string installerHeader { get; }
string installerText { get; }
Image installerIcon { get; }
int LevelNumber { get; }
int gameClock { get; }
Panel desktopIcon { get; set; }
int installerProgressSteps { get; }
void initGame(Graphics g, Panel invadersPanel, Timer invadersTimer);
void gameTick(Graphics g, Panel invadersPanel, Timer invadersTimer, uint invadersTime);
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Base")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Base")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9a9561a7-dd5f-43a5-a3f5-a95f35da204d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

55
LaptopSimulator2015.sln Normal file
View File

@ -0,0 +1,55 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29102.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaptopSimulator2015", "LaptopSimulator2015\LaptopSimulator2015.csproj", "{ADBFC08F-A516-4790-9F9E-FB3000619E2A}"
ProjectSection(ProjectDependencies) = postProject
{DFA2FB97-D676-4B0D-B281-2685F85781EE} = {DFA2FB97-D676-4B0D-B281-2685F85781EE}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SIT", "SIT\SIT.csproj", "{D80DBBF2-307F-40A0-86F1-871C8DAA394B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Minigame Tests", "Minigame Tests", "{69DC5824-3F89-4B47-BF1A-F25942094195}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Levels", "Levels", "{83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Base", "Base\Base.csproj", "{9A9561A7-DD5F-43A5-A3F5-A95F35DA204D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1", "1\1.csproj", "{DFA2FB97-D676-4B0D-B281-2685F85781EE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{ADBFC08F-A516-4790-9F9E-FB3000619E2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADBFC08F-A516-4790-9F9E-FB3000619E2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADBFC08F-A516-4790-9F9E-FB3000619E2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADBFC08F-A516-4790-9F9E-FB3000619E2A}.Release|Any CPU.Build.0 = Release|Any CPU
{D80DBBF2-307F-40A0-86F1-871C8DAA394B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D80DBBF2-307F-40A0-86F1-871C8DAA394B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D80DBBF2-307F-40A0-86F1-871C8DAA394B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D80DBBF2-307F-40A0-86F1-871C8DAA394B}.Release|Any CPU.Build.0 = Release|Any CPU
{9A9561A7-DD5F-43A5-A3F5-A95F35DA204D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A9561A7-DD5F-43A5-A3F5-A95F35DA204D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A9561A7-DD5F-43A5-A3F5-A95F35DA204D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A9561A7-DD5F-43A5-A3F5-A95F35DA204D}.Release|Any CPU.Build.0 = Release|Any CPU
{DFA2FB97-D676-4B0D-B281-2685F85781EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFA2FB97-D676-4B0D-B281-2685F85781EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFA2FB97-D676-4B0D-B281-2685F85781EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFA2FB97-D676-4B0D-B281-2685F85781EE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D80DBBF2-307F-40A0-86F1-871C8DAA394B} = {69DC5824-3F89-4B47-BF1A-F25942094195}
{9A9561A7-DD5F-43A5-A3F5-A95F35DA204D} = {83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218}
{DFA2FB97-D676-4B0D-B281-2685F85781EE} = {83BF22F9-3A2D-42A3-9DB0-C1E2AA1DD218}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9631F8FF-AFC1-4583-9D27-6C2D97D3A2E9}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="LaptopSimulator2015.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<userSettings>
<LaptopSimulator2015.Properties.Settings>
<setting name="wam" serializeAs="String">
<value>0</value>
</setting>
<setting name="mlg" serializeAs="String">
<value>False</value>
</setting>
<setting name="subs" serializeAs="String">
<value>False</value>
</setting>
<setting name="level" serializeAs="String">
<value>0</value>
</setting>
<setting name="lang" serializeAs="String">
<value>(Default)</value>
</setting>
</LaptopSimulator2015.Properties.Settings>
</userSettings>
</configuration>

View File

@ -0,0 +1,213 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LaptopSimulator2015
{
/// <summary>
/// Stellt Methoden und Eigenschaften zum erzeugen eines Captchas bereit.
/// </summary>
class CaptchaGenerator : IDisposable
{
protected Random rnd;
private Bitmap _Captcha = null;
protected const int spacePerChar = 25;//Abstand zwischen den Zeichen
protected void DrawChar(int c, Graphics g)
{
int y = rnd.Next(8, 13);
int fontSize = this.rnd.Next(12, 18);
//move rotation point to center of image
g.TranslateTransform(spacePerChar * (c) + 10, (30 - fontSize) / 2);
g.RotateTransform(rnd.Next(this.RotateRange.Min, this.RotateRange.Max));
g.DrawString(GetRandomChar(), GetRandomFont(fontSize), GetRandomFontBrush(), new PointF(5, y));
g.ResetTransform();
}
protected Font GetRandomFont(int fontSize)
{
return new Font(new string[] { "Arial", "Consolas", "Verdena" }[this.rnd.Next(3)], fontSize);
}
protected string GetRandomChar()
{
string s = this.Chars[this.rnd.Next(this.Chars.Length)].ToString();
this.Text += s;
return s;
}
protected Brush GetRandomFontBrush()
{
int r = rnd.Next(0, 200);
int g = rnd.Next(0, (200 - r) / 2);
int b = 200 - r - g;
if (b < 0)
b = 0;
return new SolidBrush(Color.FromArgb(r, g, b));
}
protected Brush GetRandomBackgroundHatchBrush()
{
return new HatchBrush((HatchStyle)this.rnd.Next(53), this.GetRandomBackgroundColor(), Color.Transparent);
}
protected Color GetRandomBackgroundColor()
{
int r = rnd.Next(180, 255);
int g = rnd.Next(180, 255);
int b = rnd.Next(180, 255);
return Color.FromArgb(r, g, b);
}
protected Brush GetRandomForegroundHatchBrush()
{
return new HatchBrush((HatchStyle)this.rnd.Next(53), this.GetRandomForegroundColor(), this.GetRandomForegroundColor());
}
protected Color GetRandomForegroundColor()
{
int r = rnd.Next(180, 255);
int g = rnd.Next(180, 255);
int b = rnd.Next(180, 255);
return Color.FromArgb(this.rnd.Next(10, 50), r, g, b);
}
#region .ctor
private CaptchaGenerator()
{
this.RotateRange = new CaptchaCharRotateRange(-20, 20);
this.IntegrateHatch = true;
}
/// <summary>
/// Initialisiert eine neue Instanz der CaptchaGenerator-Klasse.
/// </summary>
/// <param name="length">Die Länge der Zeichenkette im Captcha.</param>
/// <param name="chars">Die zu verwendenden Zeichen im Captcha.</param>
public CaptchaGenerator(int length, string chars)
: this()
{
this.rnd = new Random();
this.Length = length;
this.Chars = chars;
this.Generate();
}
#endregion
#region Methoden
/// <summary>
/// Erzeugt ein neues, zufälliges Captcha.
/// </summary>
public void Generate()
{
this.Text = string.Empty;
//Größe des Bildes festlegen und dieses erzeugen
int width = (this.Length + 1) * spacePerChar;
int height = 60;
_Captcha = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
using (Graphics g = Graphics.FromImage(_Captcha))
{
Rectangle rect = new Rectangle(0, 0, width, height);
//Hintergundmalen
g.FillRectangle(new LinearGradientBrush(new Point(0, 0), new Point(width, height), GetRandomBackgroundColor(), GetRandomBackgroundColor()), rect);
if (this.IntegrateHatch)
g.FillRectangle(GetRandomBackgroundHatchBrush(), rect);
//Zeichen malen
for (int i = 0; i < this.Length; i++)
{
DrawChar(i, g);
}
//Muster über den Text malen
if (this.IntegrateHatch)
g.FillRectangle(GetRandomForegroundHatchBrush(), rect);
}
}
#endregion
#region Eigenschaften
/// <summary>
/// Ruft den angezeigten Text im Cpatcha ab.
/// </summary>
public string Text { get; private set; }
/// <summary>
/// Ruft das Captcha ab.
/// </summary>
public Bitmap Captcha
{
get {
return _Captcha;
}
}
/// <summary>
/// Ruft die Anzahl der Zeichen im Captcha ab bzw. legt diese fest.
/// </summary>
public int Length { get; set; }
/// <summary>
/// Ruft die Verwendbaren Zeichen im Cpatcha ab oder legt diese fest.
/// </summary>
public string Chars { get; set; }
/// <summary>
/// Ruft den Drehbereich der einzelnen Zeichen ab oder legt diese fest. Der Idealwert liegt zwischen einschließlich -20 und 20.
/// </summary>
public CaptchaCharRotateRange RotateRange { get; set; }
/// <summary>
/// Ruft einen Wert ab, der angibt ob ein zufälliger Hatchbruch integriert werden soll oder legt diesen fest.
/// </summary>
public bool IntegrateHatch { get; set; }
#endregion
#region IDisposable Member
/// <summary>
/// Gibt alle von diesem Objekt verwendeten Resourcen wieder frei.
/// </summary>
public void Dispose()
{
if (this._Captcha != null)
this._Captcha.Dispose();
}
#endregion
}
/// <summary>
/// Stellt den Bereich dar, in dem ein Zeichen im Captcha gedrht werden kann.
/// </summary>
struct CaptchaCharRotateRange
{
/// <summary>
/// Initialisiert eine neue Instanz der CaptchaCharRotateRange-Klasse.
/// </summary>
/// <param name="min">Die höchste Drehung in Grad nach links.</param>
/// <param name="max">Die höchste Drehung in Grad nach rechts.</param>
public CaptchaCharRotateRange(int min, int max)
: this()
{
if (min > max)
throw new ArgumentOutOfRangeException("min <= max!");
this.Min = min;
this.Max = max;
}
/// <summary>
/// Ruft die maximale Drehung in Grad nach links ab.
/// </summary>
public int Min { get; private set; }
/// <summary>
/// Ruft die maximale Drehung in Grad nach rechts ab.
/// </summary>
public int Max { get; private set; }
}
}

View File

@ -0,0 +1,660 @@
using System;
namespace LaptopSimulator2015
{
partial class FakeDesktop
{
/// <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();
}
if (ptrHook != IntPtr.Zero)
{
UnhookWindowsHookEx(ptrHook);
ptrHook = IntPtr.Zero;
}
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.winKey = new System.Windows.Forms.Button();
this.winMenuPanel = new System.Windows.Forms.Panel();
this.winMenuStart = new System.Windows.Forms.Button();
this.winMenuTitle = new System.Windows.Forms.Label();
this.winMenuText = new System.Windows.Forms.Label();
this.winMenuExit = new System.Windows.Forms.Button();
this.winTaskbar = new System.Windows.Forms.Panel();
this.subsLabel = new System.Windows.Forms.Label();
this.winDesktop = new System.Windows.Forms.FlowLayoutPanel();
this.options_1 = new System.Windows.Forms.Panel();
this.options_2 = new System.Windows.Forms.Panel();
this.levelWindow = new System.Windows.Forms.Panel();
this.levelWindowC1 = new System.Windows.Forms.Button();
this.levelWindowContents = new LaptopSimulator2015.FakeDesktop.TabControlH();
this.levelWindow1 = new System.Windows.Forms.TabPage();
this.levelWindowText1 = new System.Windows.Forms.Label();
this.levelWindow2 = new System.Windows.Forms.TabPage();
this.captchaBox = new System.Windows.Forms.TextBox();
this.captchaPanel = new System.Windows.Forms.Panel();
this.levelWindowText2 = new System.Windows.Forms.Label();
this.levelWindow3 = new System.Windows.Forms.TabPage();
this.levelWindowProgress = new System.Windows.Forms.ProgressBar();
this.levelWindowText3 = new System.Windows.Forms.Label();
this.levelWindowHeader = new System.Windows.Forms.Panel();
this.levelWindowHeaderExit = new System.Windows.Forms.Label();
this.levelWindowIcon = new System.Windows.Forms.Panel();
this.levelWindowTitle = new System.Windows.Forms.Label();
this.levelWindowProgressT = new System.Windows.Forms.Timer(this.components);
this.winTimeLabel = new System.Windows.Forms.Label();
this.winTimeTimer = new System.Windows.Forms.Timer(this.components);
this.minigamePanel = new System.Windows.Forms.Panel();
this.minigameClockT = new System.Windows.Forms.Timer(this.components);
this.optionsWindow = new System.Windows.Forms.Panel();
this.optionsWindowLang = new System.Windows.Forms.ComboBox();
this.optionsWindowSubs = new System.Windows.Forms.CheckBox();
this.optionsWindowExit = new System.Windows.Forms.Button();
this.optionsWindowMLG = new System.Windows.Forms.CheckBox();
this.optionsWindowWamLabel = new System.Windows.Forms.Label();
this.optionsWindowWam = new System.Windows.Forms.TrackBar();
this.optionsWindowHeader = new System.Windows.Forms.Panel();
this.optionsWindowHeaderExit = new System.Windows.Forms.Label();
this.optionsWindowIcon = new System.Windows.Forms.Panel();
this.optionsWindowTitle = new System.Windows.Forms.Label();
this.mlgEffectT = new System.Windows.Forms.Timer(this.components);
this.winMenuPanel.SuspendLayout();
this.winTaskbar.SuspendLayout();
this.winDesktop.SuspendLayout();
this.options_1.SuspendLayout();
this.levelWindow.SuspendLayout();
this.levelWindowContents.SuspendLayout();
this.levelWindow1.SuspendLayout();
this.levelWindow2.SuspendLayout();
this.levelWindow3.SuspendLayout();
this.levelWindowHeader.SuspendLayout();
this.optionsWindow.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.optionsWindowWam)).BeginInit();
this.optionsWindowHeader.SuspendLayout();
this.SuspendLayout();
//
// winKey
//
this.winKey.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.winKey.BackColor = System.Drawing.Color.Blue;
this.winKey.Font = new System.Drawing.Font("Impact", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.winKey.ForeColor = System.Drawing.Color.White;
this.winKey.Location = new System.Drawing.Point(0, 889);
this.winKey.Name = "winKey";
this.winKey.Size = new System.Drawing.Size(30, 30);
this.winKey.TabIndex = 0;
this.winKey.Text = "*";
this.winKey.UseVisualStyleBackColor = false;
this.winKey.Click += new System.EventHandler(this.WinKey_Click);
//
// winMenuPanel
//
this.winMenuPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.winMenuPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
this.winMenuPanel.Controls.Add(this.winMenuStart);
this.winMenuPanel.Controls.Add(this.winMenuTitle);
this.winMenuPanel.Controls.Add(this.winMenuText);
this.winMenuPanel.Controls.Add(this.winMenuExit);
this.winMenuPanel.Location = new System.Drawing.Point(1, 671);
this.winMenuPanel.Name = "winMenuPanel";
this.winMenuPanel.Size = new System.Drawing.Size(200, 220);
this.winMenuPanel.TabIndex = 1;
//
// winMenuStart
//
this.winMenuStart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
this.winMenuStart.Location = new System.Drawing.Point(0, 171);
this.winMenuStart.Name = "winMenuStart";
this.winMenuStart.Size = new System.Drawing.Size(200, 25);
this.winMenuStart.TabIndex = 3;
this.winMenuStart.Text = "Start";
this.winMenuStart.UseVisualStyleBackColor = false;
this.winMenuStart.Click += new System.EventHandler(this.WinMenuStart_Click);
//
// winMenuTitle
//
this.winMenuTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.winMenuTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.winMenuTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.winMenuTitle.Location = new System.Drawing.Point(3, 0);
this.winMenuTitle.Name = "winMenuTitle";
this.winMenuTitle.Size = new System.Drawing.Size(194, 32);
this.winMenuTitle.TabIndex = 2;
this.winMenuTitle.Text = "Laptop Simulator 2015";
this.winMenuTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// winMenuText
//
this.winMenuText.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.winMenuText.Location = new System.Drawing.Point(3, 32);
this.winMenuText.Name = "winMenuText";
this.winMenuText.Size = new System.Drawing.Size(194, 136);
this.winMenuText.TabIndex = 1;
this.winMenuText.Text = "Hello and welcome to my game, I hope you\'ll like it. My name is CreepyCrafter24, " +
"btw. (FunFact: This game was originally created as the result of a conversation " +
"with a classmate)";
//
// winMenuExit
//
this.winMenuExit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
this.winMenuExit.Dock = System.Windows.Forms.DockStyle.Bottom;
this.winMenuExit.Location = new System.Drawing.Point(0, 195);
this.winMenuExit.Name = "winMenuExit";
this.winMenuExit.Size = new System.Drawing.Size(200, 25);
this.winMenuExit.TabIndex = 0;
this.winMenuExit.Text = "Exit";
this.winMenuExit.UseVisualStyleBackColor = false;
this.winMenuExit.Click += new System.EventHandler(this.WinMenuExit_Click);
//
// winTaskbar
//
this.winTaskbar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.winTaskbar.BackColor = System.Drawing.Color.Navy;
this.winTaskbar.Controls.Add(this.subsLabel);
this.winTaskbar.Location = new System.Drawing.Point(30, 889);
this.winTaskbar.Name = "winTaskbar";
this.winTaskbar.Size = new System.Drawing.Size(1357, 30);
this.winTaskbar.TabIndex = 3;
//
// subsLabel
//
this.subsLabel.AutoSize = true;
this.subsLabel.BackColor = System.Drawing.Color.Navy;
this.subsLabel.Location = new System.Drawing.Point(6, 9);
this.subsLabel.Name = "subsLabel";
this.subsLabel.Size = new System.Drawing.Size(0, 13);
this.subsLabel.TabIndex = 0;
//
// winDesktop
//
this.winDesktop.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.winDesktop.Controls.Add(this.options_1);
this.winDesktop.Enabled = false;
this.winDesktop.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.winDesktop.Location = new System.Drawing.Point(12, 12);
this.winDesktop.Name = "winDesktop";
this.winDesktop.Size = new System.Drawing.Size(1363, 871);
this.winDesktop.TabIndex = 5;
//
// options_1
//
this.options_1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
this.options_1.Controls.Add(this.options_2);
this.options_1.Location = new System.Drawing.Point(3, 3);
this.options_1.Name = "options_1";
this.options_1.Size = new System.Drawing.Size(50, 50);
this.options_1.TabIndex = 5;
//
// options_2
//
this.options_2.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.options_2.BackColor = System.Drawing.Color.Blue;
this.options_2.BackgroundImage = global::LaptopSimulator2015.Properties.Resources.pcoptimizerpro;
this.options_2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.options_2.Location = new System.Drawing.Point(2, 2);
this.options_2.Name = "options_2";
this.options_2.Size = new System.Drawing.Size(46, 46);
this.options_2.TabIndex = 0;
this.options_2.DoubleClick += new System.EventHandler(this.Options_2_DoubleClick);
//
// levelWindow
//
this.levelWindow.BackColor = System.Drawing.SystemColors.Window;
this.levelWindow.Controls.Add(this.levelWindowC1);
this.levelWindow.Controls.Add(this.levelWindowContents);
this.levelWindow.Controls.Add(this.levelWindowHeader);
this.levelWindow.Location = new System.Drawing.Point(10, 100);
this.levelWindow.Name = "levelWindow";
this.levelWindow.Size = new System.Drawing.Size(502, 268);
this.levelWindow.TabIndex = 5;
this.levelWindow.Visible = false;
//
// levelWindowC1
//
this.levelWindowC1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.levelWindowC1.Location = new System.Drawing.Point(415, 234);
this.levelWindowC1.Name = "levelWindowC1";
this.levelWindowC1.Size = new System.Drawing.Size(75, 23);
this.levelWindowC1.TabIndex = 2;
this.levelWindowC1.Text = "Continue";
this.levelWindowC1.UseVisualStyleBackColor = true;
this.levelWindowC1.Click += new System.EventHandler(this.LevelWindowC1_Click);
//
// levelWindowContents
//
this.levelWindowContents.Controls.Add(this.levelWindow1);
this.levelWindowContents.Controls.Add(this.levelWindow2);
this.levelWindowContents.Controls.Add(this.levelWindow3);
this.levelWindowContents.Dock = System.Windows.Forms.DockStyle.Fill;
this.levelWindowContents.Location = new System.Drawing.Point(0, 20);
this.levelWindowContents.Name = "levelWindowContents";
this.levelWindowContents.SelectedIndex = 0;
this.levelWindowContents.Size = new System.Drawing.Size(502, 248);
this.levelWindowContents.TabIndex = 2;
this.levelWindowContents.TabStop = false;
//
// levelWindow1
//
this.levelWindow1.Controls.Add(this.levelWindowText1);
this.levelWindow1.Location = new System.Drawing.Point(4, 22);
this.levelWindow1.Name = "levelWindow1";
this.levelWindow1.Padding = new System.Windows.Forms.Padding(3);
this.levelWindow1.Size = new System.Drawing.Size(494, 222);
this.levelWindow1.TabIndex = 0;
this.levelWindow1.UseVisualStyleBackColor = true;
//
// levelWindowText1
//
this.levelWindowText1.Location = new System.Drawing.Point(3, 3);
this.levelWindowText1.Name = "levelWindowText1";
this.levelWindowText1.Size = new System.Drawing.Size(488, 216);
this.levelWindowText1.TabIndex = 1;
this.levelWindowText1.Text = "Thank you for deciding to download RAM Installer 2.0 from our secure download ser" +
"vers. Please wait a second while we install your RAM.\r\n\r\nYour Computer is about " +
"to run a whole lot smoother!";
//
// levelWindow2
//
this.levelWindow2.Controls.Add(this.captchaBox);
this.levelWindow2.Controls.Add(this.captchaPanel);
this.levelWindow2.Controls.Add(this.levelWindowText2);
this.levelWindow2.Location = new System.Drawing.Point(4, 22);
this.levelWindow2.Name = "levelWindow2";
this.levelWindow2.Padding = new System.Windows.Forms.Padding(3);
this.levelWindow2.Size = new System.Drawing.Size(494, 222);
this.levelWindow2.TabIndex = 1;
this.levelWindow2.UseVisualStyleBackColor = true;
//
// captchaBox
//
this.captchaBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.captchaBox.Location = new System.Drawing.Point(212, 71);
this.captchaBox.Name = "captchaBox";
this.captchaBox.ReadOnly = true;
this.captchaBox.Size = new System.Drawing.Size(276, 80);
this.captchaBox.TabIndex = 2;
this.captchaBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.CaptchaBox_KeyPress);
//
// captchaPanel
//
this.captchaPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.captchaPanel.Location = new System.Drawing.Point(6, 19);
this.captchaPanel.Name = "captchaPanel";
this.captchaPanel.Size = new System.Drawing.Size(200, 197);
this.captchaPanel.TabIndex = 1;
this.captchaPanel.Click += new System.EventHandler(this.CaptchaPanel_Click);
//
// levelWindowText2
//
this.levelWindowText2.AutoSize = true;
this.levelWindowText2.Location = new System.Drawing.Point(6, 3);
this.levelWindowText2.Name = "levelWindowText2";
this.levelWindowText2.Size = new System.Drawing.Size(435, 13);
this.levelWindowText2.TabIndex = 0;
this.levelWindowText2.Text = "To verify that you are human we ask you to fill in this Captcha. This will only t" +
"ake a second.";
//
// levelWindow3
//
this.levelWindow3.Controls.Add(this.levelWindowProgress);
this.levelWindow3.Controls.Add(this.levelWindowText3);
this.levelWindow3.Location = new System.Drawing.Point(4, 22);
this.levelWindow3.Name = "levelWindow3";
this.levelWindow3.Size = new System.Drawing.Size(494, 222);
this.levelWindow3.TabIndex = 2;
this.levelWindow3.UseVisualStyleBackColor = true;
//
// levelWindowProgress
//
this.levelWindowProgress.Location = new System.Drawing.Point(6, 19);
this.levelWindowProgress.Maximum = 200;
this.levelWindowProgress.Name = "levelWindowProgress";
this.levelWindowProgress.Size = new System.Drawing.Size(480, 167);
this.levelWindowProgress.TabIndex = 1;
//
// levelWindowText3
//
this.levelWindowText3.AutoSize = true;
this.levelWindowText3.Location = new System.Drawing.Point(3, 3);
this.levelWindowText3.Name = "levelWindowText3";
this.levelWindowText3.Size = new System.Drawing.Size(194, 13);
this.levelWindowText3.TabIndex = 0;
this.levelWindowText3.Text = "Please wait for the installation to finish...";
//
// levelWindowHeader
//
this.levelWindowHeader.BackColor = System.Drawing.SystemColors.WindowFrame;
this.levelWindowHeader.Controls.Add(this.levelWindowHeaderExit);
this.levelWindowHeader.Controls.Add(this.levelWindowIcon);
this.levelWindowHeader.Controls.Add(this.levelWindowTitle);
this.levelWindowHeader.Dock = System.Windows.Forms.DockStyle.Top;
this.levelWindowHeader.Location = new System.Drawing.Point(0, 0);
this.levelWindowHeader.Name = "levelWindowHeader";
this.levelWindowHeader.Size = new System.Drawing.Size(502, 20);
this.levelWindowHeader.TabIndex = 0;
this.levelWindowHeader.MouseDown += new System.Windows.Forms.MouseEventHandler(this.LevelWindowHeader_MouseDown);
this.levelWindowHeader.MouseMove += new System.Windows.Forms.MouseEventHandler(this.LevelWindowHeader_MouseMove);
this.levelWindowHeader.MouseUp += new System.Windows.Forms.MouseEventHandler(this.LevelWindowHeader_MouseUp);
//
// levelWindowHeaderExit
//
this.levelWindowHeaderExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.levelWindowHeaderExit.BackColor = System.Drawing.Color.Red;
this.levelWindowHeaderExit.Font = new System.Drawing.Font("Marlett", 12F);
this.levelWindowHeaderExit.Location = new System.Drawing.Point(462, 0);
this.levelWindowHeaderExit.Name = "levelWindowHeaderExit";
this.levelWindowHeaderExit.Size = new System.Drawing.Size(40, 20);
this.levelWindowHeaderExit.TabIndex = 2;
this.levelWindowHeaderExit.Text = "r";
this.levelWindowHeaderExit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.levelWindowHeaderExit.Click += new System.EventHandler(this.LevelWindowHeaderExit_Click);
//
// levelWindowIcon
//
this.levelWindowIcon.BackgroundImage = global::LaptopSimulator2015.Properties.Resources.pcoptimizerpro;
this.levelWindowIcon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.levelWindowIcon.Location = new System.Drawing.Point(0, 0);
this.levelWindowIcon.Name = "levelWindowIcon";
this.levelWindowIcon.Size = new System.Drawing.Size(20, 20);
this.levelWindowIcon.TabIndex = 1;
//
// levelWindowTitle
//
this.levelWindowTitle.AutoSize = true;
this.levelWindowTitle.Location = new System.Drawing.Point(19, 4);
this.levelWindowTitle.Name = "levelWindowTitle";
this.levelWindowTitle.Size = new System.Drawing.Size(88, 13);
this.levelWindowTitle.TabIndex = 0;
this.levelWindowTitle.Text = "RAM Installer 2.0";
this.levelWindowTitle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.LevelWindowHeader_MouseDown);
this.levelWindowTitle.MouseMove += new System.Windows.Forms.MouseEventHandler(this.LevelWindowHeader_MouseMove);
this.levelWindowTitle.MouseUp += new System.Windows.Forms.MouseEventHandler(this.LevelWindowHeader_MouseUp);
//
// levelWindowProgressT
//
this.levelWindowProgressT.Tick += new System.EventHandler(this.LevelWindowProgressT_Tick);
//
// winTimeLabel
//
this.winTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.winTimeLabel.AutoSize = true;
this.winTimeLabel.BackColor = System.Drawing.Color.Navy;
this.winTimeLabel.ForeColor = System.Drawing.Color.White;
this.winTimeLabel.Location = new System.Drawing.Point(1344, 898);
this.winTimeLabel.Name = "winTimeLabel";
this.winTimeLabel.Size = new System.Drawing.Size(34, 13);
this.winTimeLabel.TabIndex = 0;
this.winTimeLabel.Text = "00:00";
//
// winTimeTimer
//
this.winTimeTimer.Enabled = true;
this.winTimeTimer.Interval = 1000;
this.winTimeTimer.Tick += new System.EventHandler(this.WinTimeTimer_Tick);
//
// minigamePanel
//
this.minigamePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.minigamePanel.BackColor = System.Drawing.Color.Black;
this.minigamePanel.Location = new System.Drawing.Point(564, 421);
this.minigamePanel.Name = "minigamePanel";
this.minigamePanel.Size = new System.Drawing.Size(800, 450);
this.minigamePanel.TabIndex = 6;
this.minigamePanel.Visible = false;
this.minigamePanel.Paint += new System.Windows.Forms.PaintEventHandler(this.InvadersPanel_Paint);
//
// minigameClockT
//
this.minigameClockT.Interval = 17;
this.minigameClockT.Tick += new System.EventHandler(this.InvadersTimer_Tick);
//
// optionsWindow
//
this.optionsWindow.BackColor = System.Drawing.SystemColors.Window;
this.optionsWindow.Controls.Add(this.optionsWindowLang);
this.optionsWindow.Controls.Add(this.optionsWindowSubs);
this.optionsWindow.Controls.Add(this.optionsWindowExit);
this.optionsWindow.Controls.Add(this.optionsWindowMLG);
this.optionsWindow.Controls.Add(this.optionsWindowWamLabel);
this.optionsWindow.Controls.Add(this.optionsWindowWam);
this.optionsWindow.Controls.Add(this.optionsWindowHeader);
this.optionsWindow.Location = new System.Drawing.Point(527, 26);
this.optionsWindow.Name = "optionsWindow";
this.optionsWindow.Size = new System.Drawing.Size(502, 94);
this.optionsWindow.TabIndex = 6;
this.optionsWindow.Visible = false;
//
// optionsWindowLang
//
this.optionsWindowLang.FormattingEnabled = true;
this.optionsWindowLang.Items.AddRange(new object[] {
"de",
"en"});
this.optionsWindowLang.Location = new System.Drawing.Point(180, 62);
this.optionsWindowLang.Name = "optionsWindowLang";
this.optionsWindowLang.Size = new System.Drawing.Size(121, 21);
this.optionsWindowLang.TabIndex = 6;
//
// optionsWindowSubs
//
this.optionsWindowSubs.AutoSize = true;
this.optionsWindowSubs.Location = new System.Drawing.Point(108, 64);
this.optionsWindowSubs.Name = "optionsWindowSubs";
this.optionsWindowSubs.Size = new System.Drawing.Size(66, 17);
this.optionsWindowSubs.TabIndex = 5;
this.optionsWindowSubs.Text = "Subtitles";
this.optionsWindowSubs.UseVisualStyleBackColor = true;
//
// optionsWindowExit
//
this.optionsWindowExit.Location = new System.Drawing.Point(413, 64);
this.optionsWindowExit.Name = "optionsWindowExit";
this.optionsWindowExit.Size = new System.Drawing.Size(75, 23);
this.optionsWindowExit.TabIndex = 4;
this.optionsWindowExit.Text = "OK";
this.optionsWindowExit.UseVisualStyleBackColor = true;
this.optionsWindowExit.Click += new System.EventHandler(this.OptionsWindowExit_Click);
//
// optionsWindowMLG
//
this.optionsWindowMLG.AutoSize = true;
this.optionsWindowMLG.Font = new System.Drawing.Font("Comic Sans MS", 7F);
this.optionsWindowMLG.ForeColor = System.Drawing.Color.Red;
this.optionsWindowMLG.Location = new System.Drawing.Point(17, 64);
this.optionsWindowMLG.Name = "optionsWindowMLG";
this.optionsWindowMLG.Size = new System.Drawing.Size(75, 18);
this.optionsWindowMLG.TabIndex = 3;
this.optionsWindowMLG.Text = "MLG Mode";
this.optionsWindowMLG.UseVisualStyleBackColor = true;
this.optionsWindowMLG.CheckedChanged += new System.EventHandler(this.OptionsWindowMLG_CheckedChanged);
//
// optionsWindowWamLabel
//
this.optionsWindowWamLabel.AutoSize = true;
this.optionsWindowWamLabel.Location = new System.Drawing.Point(14, 33);
this.optionsWindowWamLabel.Name = "optionsWindowWamLabel";
this.optionsWindowWamLabel.Size = new System.Drawing.Size(88, 13);
this.optionsWindowWamLabel.TabIndex = 2;
this.optionsWindowWamLabel.Text = "Dedodated Wam";
//
// optionsWindowWam
//
this.optionsWindowWam.Location = new System.Drawing.Point(108, 26);
this.optionsWindowWam.Name = "optionsWindowWam";
this.optionsWindowWam.Size = new System.Drawing.Size(380, 45);
this.optionsWindowWam.TabIndex = 1;
//
// optionsWindowHeader
//
this.optionsWindowHeader.BackColor = System.Drawing.SystemColors.WindowFrame;
this.optionsWindowHeader.Controls.Add(this.optionsWindowHeaderExit);
this.optionsWindowHeader.Controls.Add(this.optionsWindowIcon);
this.optionsWindowHeader.Controls.Add(this.optionsWindowTitle);
this.optionsWindowHeader.Dock = System.Windows.Forms.DockStyle.Top;
this.optionsWindowHeader.Location = new System.Drawing.Point(0, 0);
this.optionsWindowHeader.Name = "optionsWindowHeader";
this.optionsWindowHeader.Size = new System.Drawing.Size(502, 20);
this.optionsWindowHeader.TabIndex = 0;
this.optionsWindowHeader.MouseDown += new System.Windows.Forms.MouseEventHandler(this.OptionsWindowHeader_MouseDown);
this.optionsWindowHeader.MouseMove += new System.Windows.Forms.MouseEventHandler(this.OptionsWindowHeader_MouseMove);
this.optionsWindowHeader.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OptionsWindowHeader_MouseUp);
//
// optionsWindowHeaderExit
//
this.optionsWindowHeaderExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.optionsWindowHeaderExit.BackColor = System.Drawing.Color.Red;
this.optionsWindowHeaderExit.Font = new System.Drawing.Font("Marlett", 12F);
this.optionsWindowHeaderExit.Location = new System.Drawing.Point(462, 0);
this.optionsWindowHeaderExit.Name = "optionsWindowHeaderExit";
this.optionsWindowHeaderExit.Size = new System.Drawing.Size(40, 20);
this.optionsWindowHeaderExit.TabIndex = 3;
this.optionsWindowHeaderExit.Text = "r";
this.optionsWindowHeaderExit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.optionsWindowHeaderExit.Click += new System.EventHandler(this.OptionsWindowExit_Click);
//
// optionsWindowIcon
//
this.optionsWindowIcon.BackgroundImage = global::LaptopSimulator2015.Properties.Resources.pcoptimizerpro;
this.optionsWindowIcon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.optionsWindowIcon.Location = new System.Drawing.Point(0, 0);
this.optionsWindowIcon.Name = "optionsWindowIcon";
this.optionsWindowIcon.Size = new System.Drawing.Size(20, 20);
this.optionsWindowIcon.TabIndex = 1;
//
// optionsWindowTitle
//
this.optionsWindowTitle.AutoSize = true;
this.optionsWindowTitle.Location = new System.Drawing.Point(19, 4);
this.optionsWindowTitle.Name = "optionsWindowTitle";
this.optionsWindowTitle.Size = new System.Drawing.Size(80, 13);
this.optionsWindowTitle.TabIndex = 0;
this.optionsWindowTitle.Text = "PCOptimizerPro";
//
// mlgEffectT
//
this.mlgEffectT.Enabled = true;
this.mlgEffectT.Tick += new System.EventHandler(this.MlgTimer_Tick);
//
// FakeDesktop
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Blue;
this.ClientSize = new System.Drawing.Size(1387, 919);
this.ControlBox = false;
this.Controls.Add(this.optionsWindow);
this.Controls.Add(this.minigamePanel);
this.Controls.Add(this.levelWindow);
this.Controls.Add(this.winTimeLabel);
this.Controls.Add(this.winMenuPanel);
this.Controls.Add(this.winTaskbar);
this.Controls.Add(this.winKey);
this.Controls.Add(this.winDesktop);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "FakeDesktop";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FakeDesktop";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FakeDesktop_FormClosing);
this.winMenuPanel.ResumeLayout(false);
this.winTaskbar.ResumeLayout(false);
this.winTaskbar.PerformLayout();
this.winDesktop.ResumeLayout(false);
this.options_1.ResumeLayout(false);
this.levelWindow.ResumeLayout(false);
this.levelWindowContents.ResumeLayout(false);
this.levelWindow1.ResumeLayout(false);
this.levelWindow2.ResumeLayout(false);
this.levelWindow2.PerformLayout();
this.levelWindow3.ResumeLayout(false);
this.levelWindow3.PerformLayout();
this.levelWindowHeader.ResumeLayout(false);
this.levelWindowHeader.PerformLayout();
this.optionsWindow.ResumeLayout(false);
this.optionsWindow.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.optionsWindowWam)).EndInit();
this.optionsWindowHeader.ResumeLayout(false);
this.optionsWindowHeader.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button winKey;
private System.Windows.Forms.Panel winMenuPanel;
private System.Windows.Forms.Button winMenuExit;
private System.Windows.Forms.Label winMenuText;
private System.Windows.Forms.Label winMenuTitle;
private System.Windows.Forms.Button winMenuStart;
private System.Windows.Forms.Panel winTaskbar;
private System.Windows.Forms.FlowLayoutPanel winDesktop;
private System.Windows.Forms.Panel levelWindow;
private System.Windows.Forms.Panel levelWindowHeader;
private System.Windows.Forms.Label levelWindowTitle;
private System.Windows.Forms.Panel levelWindowIcon;
private System.Windows.Forms.Label levelWindowText1;
private TabControlH levelWindowContents;
private System.Windows.Forms.TabPage levelWindow1;
private System.Windows.Forms.TabPage levelWindow2;
private System.Windows.Forms.Button levelWindowC1;
private System.Windows.Forms.Label levelWindowText2;
private System.Windows.Forms.TextBox captchaBox;
private System.Windows.Forms.Panel captchaPanel;
private System.Windows.Forms.TabPage levelWindow3;
private System.Windows.Forms.Label levelWindowText3;
private System.Windows.Forms.ProgressBar levelWindowProgress;
private System.Windows.Forms.Timer levelWindowProgressT;
private System.Windows.Forms.Label winTimeLabel;
private System.Windows.Forms.Timer winTimeTimer;
private System.Windows.Forms.Panel minigamePanel;
private System.Windows.Forms.Timer minigameClockT;
private System.Windows.Forms.Panel options_1;
private System.Windows.Forms.Panel options_2;
private System.Windows.Forms.Panel optionsWindow;
private System.Windows.Forms.Panel optionsWindowHeader;
private System.Windows.Forms.Panel optionsWindowIcon;
private System.Windows.Forms.Label optionsWindowTitle;
private System.Windows.Forms.CheckBox optionsWindowMLG;
private System.Windows.Forms.Label optionsWindowWamLabel;
private System.Windows.Forms.TrackBar optionsWindowWam;
private System.Windows.Forms.Button optionsWindowExit;
private System.Windows.Forms.Timer mlgEffectT;
private System.Windows.Forms.CheckBox optionsWindowSubs;
private System.Windows.Forms.Label subsLabel;
private System.Windows.Forms.ComboBox optionsWindowLang;
private System.Windows.Forms.Label levelWindowHeaderExit;
private System.Windows.Forms.Label optionsWindowHeaderExit;
}
}

View File

@ -0,0 +1,530 @@
using LaptopSimulator2015.Properties;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
using System.Media;
using System.Runtime.ExceptionServices;
using System.Reflection;
using System.Diagnostics;
using System.IO;
namespace LaptopSimulator2015
{
public partial class FakeDesktop : Form
{
#region Base
List<Level> levels = new List<Level>();
bool winShouldClose = false;
class TabControlH : TabControl
{
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x1328 & !DesignMode)
m.Result = (IntPtr)1;
else
base.WndProc(ref m);
}
}
enum Mode
{
mainMenu,
game
}
Mode _mode;
Mode mode
{
get { return _mode; }
set {
_mode = value;
winMenuStart.Enabled = _mode == Mode.mainMenu;
winMenuStart.Visible = _mode == Mode.mainMenu;
winMenuExit.Text = strings.winMenuExit1;
winMenuPanel.Visible = false | _mode == Mode.mainMenu;
winDesktop.Enabled = _mode == Mode.game;
levelWindowText1.Text = "";
levelWindowText2.Text = strings.ramInstallerWindowText2;
levelWindowText3.Text = strings.ramInstallerWindowText3;
levelWindowC1.Text = strings._continue;
optionsWindowMLG.Text = strings.optionsWindowMLG;
optionsWindowTitle.Text = strings.optionsWindowTitle;
optionsWindowWamLabel.Text = strings.optionsWindowWam;
levelWindow.Visible = false;
minigamePanel.Visible = false;
optionsWindow.Visible = false;
minigamePanel.Enabled = false;
minigameClockT.Enabled = false;
levelWindowC1.Enabled = true;
levelWindowProgressT.Enabled = false;
levelWindowProgress.Value = 0;
levelWindowContents.SelectedIndex = 0;
subsLabel.Visible = optionsWindowSubs.Checked;
if (_mode == Mode.mainMenu)
winMenuStart.Select();
}
}
// Structure contain information about low-level keyboard input event
[StructLayout(LayoutKind.Sequential)]
private struct KBDLLHOOKSTRUCT
{
public Keys key;
public int scanCode;
public int flags;
public int time;
public IntPtr extra;
}
//System level functions to be used for hook and unhook keyboard input
private delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr SetWindowsHookEx(int id, LowLevelKeyboardProc callback, IntPtr hMod, uint dwThreadId);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern bool UnhookWindowsHookEx(IntPtr hook);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr CallNextHookEx(IntPtr hook, int nCode, IntPtr wp, IntPtr lp);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr GetModuleHandle(string name);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern short GetAsyncKeyState(Keys key);
//Declaring Global objects
private IntPtr ptrHook;
private LowLevelKeyboardProc objKeyboardProcess;
private IntPtr captureKey(int nCode, IntPtr wp, IntPtr lp)
{
if (nCode >= 0)
{
KBDLLHOOKSTRUCT objKeyInfo = (KBDLLHOOKSTRUCT)Marshal.PtrToStructure(lp, typeof(KBDLLHOOKSTRUCT));
if (objKeyInfo.key == Keys.RWin | objKeyInfo.key == Keys.LWin)
{
if (wp == (IntPtr)0x0101)
WinKey_Click(null, null);
return (IntPtr)1;
}
}
return CallNextHookEx(ptrHook, nCode, wp, lp);
}
public FakeDesktop()
{
Directory.SetCurrentDirectory(Path.GetDirectoryName(Application.ExecutablePath));
if (!Directory.Exists("Levels"))
Directory.CreateDirectory("Levels");
objKeyboardProcess = new LowLevelKeyboardProc(captureKey);
ptrHook = SetWindowsHookEx(13, objKeyboardProcess, GetModuleHandle(Process.GetCurrentProcess().MainModule.ModuleName), 0);
InitializeComponent();
optionsWindowLang.Text = Settings.Default.lang.Name;
Thread.CurrentThread.CurrentUICulture = Settings.Default.lang;
optionsWindowWam.Value = Settings.Default.wam;
tmpoptionsmlgcanchange = Settings.Default.mlg;
optionsWindowMLG.Checked = Settings.Default.mlg;
optionsWindowSubs.Checked = Settings.Default.subs;
Text = strings.fakeDesktopTitle;
winMenuExit.Text = strings.winMenuExit1;
winMenuStart.Text = strings.winMenuStart;
winMenuText.Text = strings.winMenuText;
levelWindowTitle.Text = "";
winTimeLabel.Text = DateTime.Now.Hour.ToString("00") + ":" + DateTime.Now.Minute.ToString("00");
new SoundPlayer(Resources.fans).PlayLooping();
Control[] controls = getControls(ignore: new List<Control> { minigamePanel }).ToArray();
for (int i = 0; i < controls.Length; i++)
{
controls[i].Paint += Control_Paint;
}
levels = new List<Level>();
AppDomain ad = AppDomain.CurrentDomain;
ad.AssemblyResolve += AssemblyResolveHandler;
foreach (string s in Directory.GetFiles("Levels"))
if (Path.GetExtension(s) == ".dll")
ad.Load(s);
List<Type> tmp = ad.GetAssemblies().SelectMany(s => s.GetTypes()).Where(p => typeof(Level).IsAssignableFrom(p)).ToList();
tmp.Remove(typeof(Level));
for (int i = 0; i < tmp.Count; i++)
{
levels.Add((Level)Activator.CreateInstance(tmp[i]));
Panel tmp1 = new Panel();
Panel tmp2 = new Panel();
tmp1.Size = new Size(50, 50);
tmp1.BackColor = Color.FromArgb(128, 128, 255);
tmp1.Name = "lvl" + i.ToString() + "_1";
tmp1.Visible = i >= Settings.Default.level;
tmp2.BackColor = Color.Blue;
tmp2.BackgroundImageLayout = ImageLayout.Stretch;
tmp2.BackgroundImage = levels[i].installerIcon;
tmp2.Anchor = (AnchorStyles)15;
tmp2.Name = "lvl" + i.ToString() + "_2";
tmp2.Location = new Point(2, 2);
tmp2.Size = new Size(46, 46);
tmp2.Tag = i;
tmp2.DoubleClick += (sender, e) => { level_Start((int)((Panel)sender).Tag); };
tmp1.Controls.Add(tmp2);
winDesktop.Controls.Add(tmp1);
levels[i].desktopIcon = tmp1;
}
levels = levels.OrderBy(lv => lv.LevelNumber).ToList();
mode = Mode.mainMenu;
}
static Assembly AssemblyResolveHandler(object source, ResolveEventArgs e) => Assembly.LoadFrom(e.Name);
public List<Control> getControls(Control parent = null, List<Control> ignore = null)
{
if (parent == null) parent = this;
if (ignore == null) ignore = new List<Control>();
List<Control> controls = new List<Control> { parent };
int i = 0;
while (i < controls.Count)
{
if (controls[i].Controls.Count > 0)
{
Control[] tmp = new Control[controls[i].Controls.Count];
controls[i].Controls.CopyTo(tmp, 0);
controls.AddRange(tmp);
}
i++;
controls = controls.Except(ignore).ToList();
}
return controls;
}
private void FakeDesktop_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = !winShouldClose;
if (winDesktop.Enabled | mode == Mode.mainMenu)
{
if (winMenuPanel.Visible)
WinMenuExit_Click(sender, new EventArgs());
else
WinKey_Click(sender, new EventArgs());
}
else
{
if (optionsWindow.Visible)
OptionsWindowExit_Click(sender, new EventArgs());
else
{
if (levelWindow.Visible)
LevelWindowHeaderExit_Click(sender, new EventArgs());
}
}
}
#endregion
#region FakeDesktopFunctionality
private void WinKey_Click(object sender, EventArgs e)
{
winMenuPanel.Visible = mode == Mode.mainMenu | !winMenuPanel.Visible;
winMenuExit.Text = strings.winMenuExit1;
}
private void WinMenuExit_Click(object sender, EventArgs e)
{
if (winMenuExit.Text == strings.winMenuExit2)
{
if (mode == Mode.mainMenu)
{
winShouldClose = true;
Application.Exit();
}
else
mode = Mode.mainMenu;
}
else
winMenuExit.Text = strings.winMenuExit2;
}
private void WinMenuStart_Click(object sender, EventArgs e) => mode = Mode.game;
private void WinTimeTimer_Tick(object sender, EventArgs e) => winTimeLabel.Text = DateTime.Now.Hour.ToString("00") + ":" + DateTime.Now.Minute.ToString("00");
#endregion
#region Level
int levelInd = 0;
private void level_Start(int level)
{
levelInd = level;
levelWindowIcon.BackgroundImage = levels[level].installerIcon;
levelWindowTitle.Text = levels[level].installerHeader;
levelWindowText1.Text = levels[level].installerText;
minigameClockT.Interval = levels[level].gameClock;
levelWindowProgress.Maximum = levels[level].installerProgressSteps;
winDesktop.Enabled = false;
levelWindow.Visible = true;
}
bool levelWindowMoving = false;
Point levelWindowDiff = Point.Empty;
private void LevelWindowHeader_MouseMove(object sender, MouseEventArgs e)
{
if (levelWindowMoving)
levelWindow.Location = new Point(Cursor.Position.X + levelWindowDiff.X, Cursor.Position.Y + levelWindowDiff.Y);
}
private void LevelWindowHeader_MouseDown(object sender, MouseEventArgs e)
{
levelWindowMoving = true;
levelWindowDiff = new Point(levelWindow.Location.X - Cursor.Position.X, levelWindow.Location.Y - Cursor.Position.Y);
}
private void LevelWindowHeader_MouseUp(object sender, MouseEventArgs e) => levelWindowMoving = false;
private void LevelWindowC1_Click(object sender, EventArgs e)
{
switch (levelWindowContents.SelectedIndex)
{
case 0:
CaptchaPanel_Click(sender, e);
levelWindowContents.SelectedIndex = 1;
break;
case 1:
if (captchaBox.Text == (string)captchaBox.Tag)
{
levelWindowContents.SelectedIndex = 2;
levelWindowProgressT.Enabled = true;
minigameTime = 0;
Graphics g = minigamePanel.CreateGraphics();
levels[levelInd].initGame(g, minigamePanel, minigameClockT);
minigamePanel.Visible = true;
minigamePanel.Enabled = true;
minigameClockT.Enabled = true;
levelWindowC1.Enabled = false;
g.Clear(Color.Red);
g.DrawString("DANGER!", new Font("Microsoft Sans Serif", 100f), new SolidBrush(Color.White), 100, 150);
g.DrawString("VIRUS DETECTED", new Font("Microsoft Sans Serif", 20f), new SolidBrush(Color.White), 0, 300);
Thread.Sleep(1000);
g.Flush();
}
else
{
captchaBox.Text = "";
captchaBox.Select();
}
break;
case 2:
LevelWindowHeaderExit_Click(sender, e);
if (levelInd == Settings.Default.level)
{
Settings.Default.level = Math.Min(levels.Count - 1, levelInd);
Settings.Default.Save();
for (int i = 0; i < levels.Count; i++)
{
levels[i].desktopIcon.Visible = i >= Settings.Default.level;
}
}
break;
}
}
private void CaptchaBox_KeyPress(object sender, KeyPressEventArgs e)
{
switch (e.KeyChar)
{
case (char)8:
if (captchaBox.Text.Length > 0)
captchaBox.Text = captchaBox.Text.Remove(captchaBox.Text.Length - 1);
break;
case (char)13:
levelWindowC1.Select();
LevelWindowC1_Click(sender, new EventArgs());
break;
default:
if (strings.captchaLetters.ToCharArray().Contains(char.Parse(e.KeyChar.ToString().ToUpper())))
captchaBox.Text += e.KeyChar.ToString().ToUpper();
break;
}
}
private void CaptchaPanel_Click(object sender, EventArgs e)
{
CaptchaGenerator cap = new CaptchaGenerator(6, strings.captchaLetters);
cap.Generate();
captchaPanel.BackgroundImage = cap.Captcha;
captchaBox.Tag = cap.Text;
captchaBox.Text = "";
}
private void LevelWindowProgressT_Tick(object sender, EventArgs e)
{
levelWindowProgress.Value = Math.Min(levelWindowProgress.Maximum, levelWindowProgress.Value + 1);
if (levelWindowProgress.Value == levelWindowProgress.Maximum)
{
levelWindowProgressT.Enabled = false;
levelWindowC1.Enabled = true;
}
}
private void LevelWindowHeaderExit_Click(object sender, EventArgs e)
{
levelWindow.Visible = false;
minigamePanel.Visible = false;
minigamePanel.Enabled = false;
minigameClockT.Enabled = false;
winDesktop.Enabled = true;
levelWindowContents.SelectedIndex = 0;
levelWindowProgress.Value = 0;
levelWindowProgressT.Enabled = false;
levelWindowC1.Enabled = true;
}
#region Minigame
uint minigameTime = 0;
private void InvadersPanel_Paint(object sender, PaintEventArgs e) => levels[levelInd].gameTick(e.Graphics, minigamePanel, minigameClockT, minigameTime);
private void InvadersTimer_Tick(object sender, EventArgs e)
{
minigameTime++;
minigamePanel.Invalidate();
}
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
private static extern short GetKeyState(int keyCode);
public static bool IsKeyDown(Keys key)
{
try
{
int state = 0;
short retVal = GetKeyState((int)key);
if ((retVal & 0x8000) == 0x8000)
state |= 1;
if ((retVal & 1) == 1)
state |= 2;
return 1 == (state & 1);
}
catch (Exception e1)
{
Console.WriteLine("Invader: IsKeyDown failed:\r\n" + e1.ToString());
return false;
}
}
#endregion
#endregion
#region Options
private void Options_2_DoubleClick(object sender, EventArgs e)
{
winDesktop.Enabled = false;
optionsWindow.Visible = true;
}
bool optionsWindowMoving = false;
Point optionsWindowDiff = Point.Empty;
private void OptionsWindowHeader_MouseDown(object sender, MouseEventArgs e)
{
optionsWindowMoving = true;
optionsWindowDiff = new Point(optionsWindow.Location.X - Cursor.Position.X, optionsWindow.Location.Y - Cursor.Position.Y);
}
private void OptionsWindowHeader_MouseMove(object sender, MouseEventArgs e)
{
if (optionsWindowMoving)
optionsWindow.Location = new Point(Cursor.Position.X + optionsWindowDiff.X, Cursor.Position.Y + optionsWindowDiff.Y);
}
private void OptionsWindowHeader_MouseUp(object sender, MouseEventArgs e) => optionsWindowMoving = false;
private void OptionsWindowExit_Click(object sender, EventArgs e)
{
Settings.Default.wam = optionsWindowWam.Value;
Settings.Default.mlg = optionsWindowMLG.Checked;
Settings.Default.subs = optionsWindowSubs.Checked;
bool tmp = false;
if (Settings.Default.lang.Name != optionsWindowLang.Text)
{
Settings.Default.lang = System.Globalization.CultureInfo.GetCultureInfo(optionsWindowLang.Text);
tmp = true;
}
winDesktop.Enabled = true;
optionsWindow.Visible = false;
subsLabel.Visible = optionsWindowSubs.Checked;
Settings.Default.Save();
if (tmp && MessageBox.Show(strings.langWarning, "LaptopSimulator2015", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
winShouldClose = true;
Process.Start(new ProcessStartInfo
{
Arguments = "/C timeout /t 2 /nobreak >nul && start \"" + Application.ExecutablePath + "\"",
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true,
FileName = "cmd.exe"
});
Application.Exit();
}
}
bool tmpoptionsmlgcanchange = false;
private void OptionsWindowMLG_CheckedChanged(object sender, EventArgs e)
{
if (optionsWindowMLG.Checked)
{
if (tmpoptionsmlgcanchange)
{
optionsWindowMLG.Checked = true;
tmpoptionsmlgcanchange = false;
}
else
{
optionsWindowMLG.Checked = false;
try
{
if (MessageBox.Show("Are you SURE?\r\n(This will break EVERYTHING!)", "WARNING", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
tmpoptionsmlgcanchange = true;
optionsWindowMLG.Checked = true;
}
}
catch (Exception e1)
{
Console.WriteLine("MLGThreadException:\r\n" + e1.ToString());
}
}
}
}
private void MlgTimer_Tick(object sender, EventArgs e)
{
try
{
Random rndg = new Random();
rndCol = Color.FromArgb(rndg.Next(255), rndg.Next(255), rndg.Next(255));
optionsWindowMLG.ForeColor = rndCol;
if (Settings.Default.mlg)
{
ForeColor = rndCol;
Font = new Font("Comic Sans MS", 7f);
}
else
{
ForeColor = Color.FromKnownColor(KnownColor.ControlText);
Font = new Font("Microsoft Sans Serif", 8.25f);
}
}
catch (Exception e1)
{
Console.WriteLine("MLGTimer Failed: \r\n" + e1.ToString());
}
}
Color rndCol = Color.White;
private void Control_Paint(object sender, PaintEventArgs e)
{
if (Settings.Default.mlg)
{
rndCol = Color.FromArgb(128, rndCol.R, rndCol.G, rndCol.B);
e.Graphics.FillRectangle(new SolidBrush(rndCol), new RectangleF(Point.Empty, ((Control)sender).Size));
}
}
#endregion
}
}

View File

@ -0,0 +1,132 @@
<?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="levelWindowProgressT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="winTimeTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>192, 17</value>
</metadata>
<metadata name="minigameClockT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>320, 17</value>
</metadata>
<metadata name="mlgEffectT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>462, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{ADBFC08F-A516-4790-9F9E-FB3000619E2A}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>LaptopSimulator2015</RootNamespace>
<AssemblyName>LaptopSimulator2015</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CaptchaGenerator.cs" />
<Compile Include="FakeDesktop.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FakeDesktop.Designer.cs">
<DependentUpon>FakeDesktop.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Settings.cs" />
<Compile Include="strings.de.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>strings.de.resx</DependentUpon>
</Compile>
<Compile Include="strings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>strings.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="FakeDesktop.resx">
<DependentUpon>FakeDesktop.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="strings.de.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>strings.de.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="Resources\fans.wav" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\pcoptimizerpro.jpeg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.csproj">
<Project>{9a9561a7-dd5f-43a5-a3f5-a95f35da204d}</Project>
<Name>Base</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(TargetDir)Levels" mkdir "$(TargetDir)Levels"
if exist "$(SolutionDir)tmp" copy $(SolutionDir)tmp\* "$(TargetDir)Levels"
rmdir /s /q "$(SolutionDir)tmp"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,61 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
namespace LaptopSimulator2015
{
class Program
{
static void Main(string[] args)
{
#if !DEBUG
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionTrapper;
#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Console.Title = "LaptopSimulator2015";
#if DEBUG
FileStream filestream = new FileStream(".log", FileMode.Create);
var streamwriter = new StreamWriter(filestream);
streamwriter.AutoFlush = true;
Console.SetOut(streamwriter);
Console.SetError(streamwriter);
#endif
Console.BackgroundColor = ConsoleColor.Black;
Console.ForegroundColor = ConsoleColor.Green;
Console.Clear();
Console.WriteLine(strings.consoleStarting);
Application.Run(new FakeDesktop());
Console.WriteLine(strings.consoleQuit);
Thread.Sleep(1000);
Console.Clear();
}
#if !DEBUG
static void UnhandledExceptionTrapper(object sender, UnhandledExceptionEventArgs e)
{
for (int i = 0; i < Application.OpenForms.Count; i++)
try { Application.OpenForms[i].Close(); } catch { }
SetForegroundWindow(GetConsoleWindow());
Console.Clear();
Console.BackgroundColor = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine(strings.consoleError + "\r\n");
Console.WriteLine(e.ExceptionObject.ToString());
Console.WriteLine("\r\n" + strings.consolePress);
Thread.Sleep(1000);
Console.ReadKey();
Console.Clear();
Environment.Exit(1);
}
[DllImport("kernel32.dll", ExactSpelling = true)]
public static extern IntPtr GetConsoleWindow();
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetForegroundWindow(IntPtr hWnd);
#endif
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("LaptopSimulator2015")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LaptopSimulator2015")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("adbfc08f-a516-4790-9f9e-fb3000619e2a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,82 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LaptopSimulator2015.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LaptopSimulator2015.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream fans {
get {
return ResourceManager.GetStream("fans", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap pcoptimizerpro {
get {
object obj = ResourceManager.GetObject("pcoptimizerpro", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -0,0 +1,127 @@
<?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.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="fans" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\fans.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="pcoptimizerpro" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pcoptimizerpro.jpeg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -0,0 +1,86 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LaptopSimulator2015.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int wam {
get {
return ((int)(this["wam"]));
}
set {
this["wam"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool mlg {
get {
return ((bool)(this["mlg"]));
}
set {
this["mlg"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool subs {
get {
return ((bool)(this["subs"]));
}
set {
this["subs"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int level {
get {
return ((int)(this["level"]));
}
set {
this["level"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("(Default)")]
public global::System.Globalization.CultureInfo lang {
get {
return ((global::System.Globalization.CultureInfo)(this["lang"]));
}
set {
this["lang"] = value;
}
}
}
}

View File

@ -0,0 +1,21 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="LaptopSimulator2015.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="wam" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="mlg" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="subs" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="level" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="lang" Type="System.Globalization.CultureInfo" Scope="User">
<Value Profile="(Default)">(Default)</Value>
</Setting>
</Settings>
</SettingsFile>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,28 @@
namespace LaptopSimulator2015.Properties {
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
internal sealed partial class Settings {
public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}

216
LaptopSimulator2015/strings.Designer.cs generated Normal file
View File

@ -0,0 +1,216 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LaptopSimulator2015 {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class strings {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal strings() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LaptopSimulator2015.strings", typeof(strings).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Continue.
/// </summary>
internal static string _continue {
get {
return ResourceManager.GetString("continue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.
/// </summary>
internal static string captchaLetters {
get {
return ResourceManager.GetString("captchaLetters", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An unhandled Exception occured and the Application was terminated. Please contact the developer..
/// </summary>
internal static string consoleError {
get {
return ResourceManager.GetString("consoleError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Press any Key to quit..
/// </summary>
internal static string consolePress {
get {
return ResourceManager.GetString("consolePress", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to E X I T E D ..
/// </summary>
internal static string consoleQuit {
get {
return ResourceManager.GetString("consoleQuit", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to S T A R T I N G . . ..
/// </summary>
internal static string consoleStarting {
get {
return ResourceManager.GetString("consoleStarting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Fake Desktop.
/// </summary>
internal static string fakeDesktopTitle {
get {
return ResourceManager.GetString("fakeDesktopTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to WARNING: We recommend you restart your game to apply these changes. Restart?.
/// </summary>
internal static string langWarning {
get {
return ResourceManager.GetString("langWarning", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to MLG Mode.
/// </summary>
internal static string optionsWindowMLG {
get {
return ResourceManager.GetString("optionsWindowMLG", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PCOptimizerPro.
/// </summary>
internal static string optionsWindowTitle {
get {
return ResourceManager.GetString("optionsWindowTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Dedodated Wam.
/// </summary>
internal static string optionsWindowWam {
get {
return ResourceManager.GetString("optionsWindowWam", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to To verify that you are human we ask you to fill in this Captcha. This will only take a second..
/// </summary>
internal static string ramInstallerWindowText2 {
get {
return ResourceManager.GetString("ramInstallerWindowText2", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Please wait for the installation to finish....
/// </summary>
internal static string ramInstallerWindowText3 {
get {
return ResourceManager.GetString("ramInstallerWindowText3", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Exit.
/// </summary>
internal static string winMenuExit1 {
get {
return ResourceManager.GetString("winMenuExit1", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure?.
/// </summary>
internal static string winMenuExit2 {
get {
return ResourceManager.GetString("winMenuExit2", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Start.
/// </summary>
internal static string winMenuStart {
get {
return ResourceManager.GetString("winMenuStart", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hello and welcome to my game, I hope you&apos;ll like it. My name is CreepyCrafter24, btw. (FunFact: This game was originally created as the result of a conversation with a classmate).
/// </summary>
internal static string winMenuText {
get {
return ResourceManager.GetString("winMenuText", resourceCulture);
}
}
}
}

View File

View File

@ -0,0 +1,171 @@
<?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>
<data name="captchaLetters" xml:space="preserve">
<value>ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</value>
</data>
<data name="consoleError" xml:space="preserve">
<value>Ein Fehler trat auf und die Anwendung wurde beendet. Melden sie dies bitte an den Entwickler.</value>
</data>
<data name="consolePress" xml:space="preserve">
<value>Drücken Sie eine beliebige Taste.</value>
</data>
<data name="consoleQuit" xml:space="preserve">
<value>B E E N D E T . . .</value>
</data>
<data name="consoleStarting" xml:space="preserve">
<value>S T A R T E T . . .</value>
</data>
<data name="continue" xml:space="preserve">
<value>Fortfahren</value>
</data>
<data name="fakeDesktopTitle1" xml:space="preserve">
<value>Falscher Desktop</value>
</data>
<data name="langWarning" xml:space="preserve">
<value>WARNUNG: Wir empfehlen, das Spiel nach der Änderung neu zu starten. Neu starten?</value>
</data>
<data name="optionsWindowMLG" xml:space="preserve">
<value>MLG-Modus</value>
</data>
<data name="optionsWindowTitle" xml:space="preserve">
<value>Optionen</value>
</data>
<data name="optionsWindowWam" xml:space="preserve">
<value>RAM</value>
</data>
<data name="ramInstallerWindowText2" xml:space="preserve">
<value>Um zu überprüfen ob sie ein Mensch sind, bitten wir sie, diese Captcha auszufüllen.</value>
</data>
<data name="ramInstallerWindowText3" xml:space="preserve">
<value>Bitte warten sie...</value>
</data>
<data name="winMenuExit1" xml:space="preserve">
<value>Beenden</value>
</data>
<data name="winMenuExit2" xml:space="preserve">
<value>Bist du sicher?</value>
</data>
<data name="winMenuStart" xml:space="preserve">
<value>Start</value>
</data>
<data name="winMenuText" xml:space="preserve">
<value>Hallo und Willkommen in diesem Spiel. Mein Name ist CreepyCrafter24. (Im Übrigen: Dieses Spiel entstand ursprünglich aus einer Unterhaltung mit einem Klassenkameraden. Lustig, oder?)</value>
</data>
</root>

View File

@ -0,0 +1,171 @@
<?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>
<data name="captchaLetters" xml:space="preserve">
<value>ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</value>
</data>
<data name="consoleError" xml:space="preserve">
<value>An unhandled Exception occured and the Application was terminated. Please contact the developer.</value>
</data>
<data name="consolePress" xml:space="preserve">
<value>Press any Key to quit.</value>
</data>
<data name="consoleQuit" xml:space="preserve">
<value>E X I T E D .</value>
</data>
<data name="consoleStarting" xml:space="preserve">
<value>S T A R T I N G . . .</value>
</data>
<data name="continue" xml:space="preserve">
<value>Continue</value>
</data>
<data name="fakeDesktopTitle" xml:space="preserve">
<value>Fake Desktop</value>
</data>
<data name="langWarning" xml:space="preserve">
<value>WARNING: We recommend you restart your game to apply these changes. Restart?</value>
</data>
<data name="optionsWindowMLG" xml:space="preserve">
<value>MLG Mode</value>
</data>
<data name="optionsWindowTitle" xml:space="preserve">
<value>PCOptimizerPro</value>
</data>
<data name="optionsWindowWam" xml:space="preserve">
<value>Dedodated Wam</value>
</data>
<data name="ramInstallerWindowText2" xml:space="preserve">
<value>To verify that you are human we ask you to fill in this Captcha. This will only take a second.</value>
</data>
<data name="ramInstallerWindowText3" xml:space="preserve">
<value>Please wait for the installation to finish...</value>
</data>
<data name="winMenuExit1" xml:space="preserve">
<value>Exit</value>
</data>
<data name="winMenuExit2" xml:space="preserve">
<value>Are you sure?</value>
</data>
<data name="winMenuStart" xml:space="preserve">
<value>Start</value>
</data>
<data name="winMenuText" xml:space="preserve">
<value>Hello and welcome to my game, I hope you'll like it. My name is CreepyCrafter24, btw. (FunFact: This game was originally created as the result of a conversation with a classmate)</value>
</data>
</root>

1
README.md Normal file
View File

@ -0,0 +1 @@
# LaptopSimulator2015

6
SIT/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

94
SIT/MainForm.Designer.cs generated Normal file
View File

@ -0,0 +1,94 @@
namespace SIT
{
partial class MainForm
{
/// <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.invadersPanel = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.invadersTimer = new System.Windows.Forms.Timer(this.components);
this.invadersPanel.SuspendLayout();
this.SuspendLayout();
//
// invadersPanel
//
this.invadersPanel.BackColor = System.Drawing.Color.Black;
this.invadersPanel.Controls.Add(this.button1);
this.invadersPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.invadersPanel.Location = new System.Drawing.Point(0, 0);
this.invadersPanel.Name = "invadersPanel";
this.invadersPanel.Size = new System.Drawing.Size(800, 450);
this.invadersPanel.TabIndex = 0;
this.invadersPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.Panel1_Paint);
//
// button1
//
this.button1.Location = new System.Drawing.Point(777, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(23, 23);
this.button1.TabIndex = 0;
this.button1.TabStop = false;
this.button1.Text = "X";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// invadersTimer
//
this.invadersTimer.Enabled = true;
this.invadersTimer.Interval = 17;
this.invadersTimer.Tick += new System.EventHandler(this.Timer1_Tick);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(800, 450);
this.ControlBox = false;
this.Controls.Add(this.invadersPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MainForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
this.invadersPanel.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel invadersPanel;
private System.Windows.Forms.Timer invadersTimer;
private System.Windows.Forms.Button button1;
}
}

150
SIT/MainForm.cs Normal file
View File

@ -0,0 +1,150 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace SIT
{
public partial class MainForm : Form
{
List<Point> invadersAliens = new List<Point>();
List<Point> invadersBullets = new List<Point>();
Point invadersPlayer;
uint invadersTime = 0;
uint invadersPrevTime = 0;
bool invadersCanShoot = true;
public MainForm()
{
InitializeComponent();
invadersPlayer = new Point(invadersPanel.Width / 4, invadersPanel.Height / 2);
}
private void Panel1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
try
{
g.Clear(Color.Black);
for (int i = 0; i < invadersAliens.Count; i++)
{
g.FillRectangle(new SolidBrush(Color.Red), new Rectangle(invadersAliens[i], new Size(10, 10)));
}
for (int i = 0; i < invadersBullets.Count; i++)
{
g.FillRectangle(new SolidBrush(Color.White), new Rectangle(invadersBullets[i], new Size(5, 5)));
}
g.FillRectangle(new SolidBrush(Color.Green), new Rectangle(invadersPlayer, new Size(10, 10)));
Random random = new Random();
if (invadersTime != invadersPrevTime)
{
if (random.Next(0, 100000) < invadersTime + 1300)
invadersAliens.Add(new Point(invadersPanel.Width, random.Next(invadersPanel.Height - 10)));
invadersPrevTime = invadersTime;
for (int i = 0; i < invadersAliens.Count; i++)
{
invadersAliens[i] = new Point(invadersAliens[i].X - 1, invadersAliens[i].Y);
if (Math.Pow(invadersPlayer.X - invadersAliens[i].X, 2) + Math.Pow(invadersPlayer.Y - invadersAliens[i].Y, 2) < 100 | invadersAliens[i].X < 0)
{
invadersTimer.Enabled = false;
g.Clear(Color.Red);
g.SmoothingMode = SmoothingMode.AntiAlias;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
RectangleF rectf = new RectangleF(invadersPanel.Width / 2, invadersPanel.Height / 2, 90, 50);
g.DrawString("Lost.", new Font("Tahoma", 20), Brushes.Black, rectf);
}
}
invadersCanShoot = invadersCanShoot | !IsKeyDown(Keys.Space);
List<int> aliensToRemove = new List<int>();
List<int> bulletsToRemove = new List<int>();
for (int i = 0; i < invadersBullets.Count; i++)
{
invadersBullets[i] = new Point(invadersBullets[i].X + 4, invadersBullets[i].Y);
for (int j = 0; j < invadersAliens.Count; j++)
{
if (Math.Pow(invadersBullets[i].X - invadersAliens[j].X - 2.5f, 2) + Math.Pow(invadersBullets[i].Y - invadersAliens[j].Y - 2.5f, 2) < 56.25f)
{
if (!aliensToRemove.Contains(j))
aliensToRemove.Add(j);
if (!bulletsToRemove.Contains(i))
bulletsToRemove.Add(i);
}
}
if (invadersBullets[i].X > invadersPanel.Width)
bulletsToRemove.Add(i);
}
aliensToRemove = aliensToRemove.Distinct().ToList();
aliensToRemove.Sort();
aliensToRemove.Reverse();
bulletsToRemove = bulletsToRemove.Distinct().ToList();
bulletsToRemove.Sort();
bulletsToRemove.Reverse();
for (int i = 0; i < aliensToRemove.Count; i++)
{
try
{
invadersAliens.RemoveAt(aliensToRemove[i]);
}
catch { }
}
for (int i = 0; i < bulletsToRemove.Count; i++)
{
try
{
invadersBullets.RemoveAt(bulletsToRemove[i]);
}
catch { }
}
if (IsKeyDown(Keys.W))
invadersPlayer.Y -= 2;
if (IsKeyDown(Keys.A))
invadersPlayer.X -= 2;
if (IsKeyDown(Keys.S))
invadersPlayer.Y += 2;
if (IsKeyDown(Keys.D))
invadersPlayer.X += 2;
if (IsKeyDown(Keys.Space) & invadersCanShoot)
{
invadersBullets.Add(invadersPlayer);
invadersCanShoot = false;
}
if (invadersPlayer.X < 0)
invadersPlayer.X = invadersPanel.Width;
if (invadersPlayer.X > invadersPanel.Width)
invadersPlayer.X = 0;
if (invadersPlayer.Y < 0)
invadersPlayer.Y = invadersPanel.Height;
if (invadersPlayer.Y > invadersPanel.Height)
invadersPlayer.Y = 0;
}
}
catch (Exception ex) { Console.WriteLine(ex.ToString()); }
}
private void Timer1_Tick(object sender, EventArgs e)
{
invadersTime++;
invadersPanel.Invalidate();
}
private void Button1_Click(object sender, EventArgs e) => Application.Exit();
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
private static extern short GetKeyState(int keyCode);
public static bool IsKeyDown(Keys key)
{
int state = 0;
short retVal = GetKeyState((int)key);
if ((retVal & 0x8000) == 0x8000)
state |= 1;
if ((retVal & 1) == 1)
state |= 2;
return 1 == (state & 1);
}
}
}

123
SIT/MainForm.resx Normal file
View File

@ -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="invadersTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

28
SIT/Program.cs Normal file
View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SIT
{
static class Program
{
public static bool debug;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
#if DEBUG
debug = true;
#else
debug = args.Contains("debug");
#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SIT")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SIT")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d80dbbf2-307f-40a0-86f1-871c8daa394b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

68
SIT/Properties/Resources.Designer.cs generated Normal file
View File

@ -0,0 +1,68 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SIT.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get {
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SIT.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

29
SIT/Properties/Settings.Designer.cs generated Normal file
View File

@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SIT.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get {
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

88
SIT/SIT.csproj Normal file
View File

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D80DBBF2-307F-40A0-86F1-871C8DAA394B}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>SIT</RootNamespace>
<AssemblyName>SIT</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

1
ToDo.txt Normal file
View File

@ -0,0 +1 @@
1: internal globalisation (switch case with languages)

56
make.bat Normal file
View File

@ -0,0 +1,56 @@
@echo off
setlocal enabledelayedexpansion
set devenv="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe"
set arg=%1
set full=0
:select
if [%arg%]==[] goto noinput
if %arg%==full goto full
if %arg%==clean goto clean
if %arg%==debug goto debug
if %arg%==release goto release
echo Invalid.
:noinput
set /p arg="arg: "
goto select
:full
set full=1
echo Please wait a bit.
:clean
echo Cleaning...
set tmp=%cd%
if exist ".NETFramework,Version=v4.7.2.AssemblyAttributes.cs" del ".NETFramework,Version=v4.7.2.AssemblyAttributes.cs"
if exist "vs.mcj719337969" rmdir /s /q "vs.mcj719337969"
if exist "tmp" rmdir /s /q "tmp"
if not %full%==4 if exist "BUILD" rmdir /s /q "BUILD"
for /d %%i in ("%cd%\*") do (
cd %%i
if exist "bin" rmdir /s /q "bin"
if exist "obj" rmdir /s /q "obj"
cd %tmp%
)
if %full%==1 (
set full=2
goto debug
)
goto exit
:debug
echo Building Debug
%devenv% LaptopSimulator2015.sln /build Debug
if %full%==2 (
set full=3
goto release
)
goto :exit
:release
echo Building Release
%devenv% LaptopSimulator2015.sln /build Release
if %full%==3 (
set full=4
xcopy /s /i "%cd%\LaptopSimulator2015\bin" "%cd%\BUILD"
goto clean
)
goto exit
:exit
echo Done
timeout /t 2 /nobreak >nul