Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5851365b19 |
No files matched your search
-350
@@ -1,350 +0,0 @@
|
|||||||
## 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/
|
|
||||||
[Ll]ogs/
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# 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/
|
|
||||||
|
|
||||||
# Ionide (cross platform F# VS Code tools) working folder
|
|
||||||
.ionide/
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
<?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>{04AB5523-E679-4628-8B8B-B928A5DA5107}</ProjectGuid>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<RootNamespace>FrappeMocha</RootNamespace>
|
|
||||||
<AssemblyName>FrappeMocha</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<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>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ApplicationIcon>Resources\logo.ico</ApplicationIcon>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<StartupObject>
|
|
||||||
</StartupObject>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Deployment" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Keygen\KeygenBase.cs" />
|
|
||||||
<Compile Include="Keygen\KeygenProduct.cs" />
|
|
||||||
<Compile Include="Keygen\LicenseTypes.cs" />
|
|
||||||
<Compile Include="Keygen\Platforms\PlatformAndroid.cs" />
|
|
||||||
<Compile Include="Keygen\Platforms\PlatformJava.cs" />
|
|
||||||
<Compile Include="Keygen\Platforms\PlatformJavaScript.cs" />
|
|
||||||
<Compile Include="Keygen\Platforms\PlatformMac.cs" />
|
|
||||||
<Compile Include="Keygen\Platforms\PlatformWindows.cs" />
|
|
||||||
<Compile Include="FrmMain.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="FrmMain.Designer.cs">
|
|
||||||
<DependentUpon>FrmMain.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Program.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<EmbeddedResource Include="FrmMain.resx">
|
|
||||||
<DependentUpon>FrmMain.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>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
</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>
|
|
||||||
<Content Include="Resources\logo.ico" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 15
|
|
||||||
VisualStudioVersion = 15.0.28307.1022
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FrappeMocha", "FrappeMocha.csproj", "{04AB5523-E679-4628-8B8B-B928A5DA5107}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlatformUnitTests", "PlatformUnitTests\PlatformUnitTests.csproj", "{CEF3A8CA-7FAA-416F-A1FD-2AB221A84AF8}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{04AB5523-E679-4628-8B8B-B928A5DA5107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{04AB5523-E679-4628-8B8B-B928A5DA5107}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{04AB5523-E679-4628-8B8B-B928A5DA5107}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{04AB5523-E679-4628-8B8B-B928A5DA5107}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{CEF3A8CA-7FAA-416F-A1FD-2AB221A84AF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{CEF3A8CA-7FAA-416F-A1FD-2AB221A84AF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{CEF3A8CA-7FAA-416F-A1FD-2AB221A84AF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{CEF3A8CA-7FAA-416F-A1FD-2AB221A84AF8}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {0125FC47-F477-4F21-BE83-56EF1850412D}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
Generated
-199
@@ -1,199 +0,0 @@
|
|||||||
namespace FrappeMocha
|
|
||||||
{
|
|
||||||
partial class FrmMain
|
|
||||||
{
|
|
||||||
/// <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 PlatformWindows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
|
|
||||||
this.cbxLicenseType = new System.Windows.Forms.ComboBox();
|
|
||||||
this.tbxCompanyUserName = new System.Windows.Forms.TextBox();
|
|
||||||
this.lblLicenseType = new System.Windows.Forms.Label();
|
|
||||||
this.lblCompanyUserName = new System.Windows.Forms.Label();
|
|
||||||
this.lblLicenseKey = new System.Windows.Forms.Label();
|
|
||||||
this.tbxLicenseKey = new System.Windows.Forms.TextBox();
|
|
||||||
this.btnSubmit = new System.Windows.Forms.Button();
|
|
||||||
this.lblProduct = new System.Windows.Forms.Label();
|
|
||||||
this.cbxProduct = new System.Windows.Forms.ComboBox();
|
|
||||||
this.lblPlatform = new System.Windows.Forms.Label();
|
|
||||||
this.cbxPlatform = new System.Windows.Forms.ComboBox();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// cbxLicenseType
|
|
||||||
//
|
|
||||||
this.cbxLicenseType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
||||||
this.cbxLicenseType.FormattingEnabled = true;
|
|
||||||
this.cbxLicenseType.Items.AddRange(new object[] {
|
|
||||||
"Company License",
|
|
||||||
"Single User License"});
|
|
||||||
this.cbxLicenseType.Location = new System.Drawing.Point(12, 112);
|
|
||||||
this.cbxLicenseType.Name = "cbxLicenseType";
|
|
||||||
this.cbxLicenseType.Size = new System.Drawing.Size(146, 21);
|
|
||||||
this.cbxLicenseType.TabIndex = 0;
|
|
||||||
this.cbxLicenseType.SelectedIndexChanged += new System.EventHandler(this.cbxLicenseType_SelectedIndexChanged);
|
|
||||||
//
|
|
||||||
// tbxCompanyUserName
|
|
||||||
//
|
|
||||||
this.tbxCompanyUserName.Location = new System.Drawing.Point(12, 152);
|
|
||||||
this.tbxCompanyUserName.MaxLength = 80;
|
|
||||||
this.tbxCompanyUserName.Name = "tbxCompanyUserName";
|
|
||||||
this.tbxCompanyUserName.Size = new System.Drawing.Size(146, 20);
|
|
||||||
this.tbxCompanyUserName.TabIndex = 1;
|
|
||||||
this.tbxCompanyUserName.Text = "FrappeMocha";
|
|
||||||
//
|
|
||||||
// lblLicenseType
|
|
||||||
//
|
|
||||||
this.lblLicenseType.AutoSize = true;
|
|
||||||
this.lblLicenseType.Location = new System.Drawing.Point(9, 96);
|
|
||||||
this.lblLicenseType.Name = "lblLicenseType";
|
|
||||||
this.lblLicenseType.Size = new System.Drawing.Size(71, 13);
|
|
||||||
this.lblLicenseType.TabIndex = 2;
|
|
||||||
this.lblLicenseType.Text = "License Type";
|
|
||||||
//
|
|
||||||
// lblCompanyUserName
|
|
||||||
//
|
|
||||||
this.lblCompanyUserName.AutoSize = true;
|
|
||||||
this.lblCompanyUserName.Location = new System.Drawing.Point(9, 136);
|
|
||||||
this.lblCompanyUserName.Name = "lblCompanyUserName";
|
|
||||||
this.lblCompanyUserName.Size = new System.Drawing.Size(115, 13);
|
|
||||||
this.lblCompanyUserName.TabIndex = 3;
|
|
||||||
this.lblCompanyUserName.Text = "Company / User Name";
|
|
||||||
//
|
|
||||||
// lblLicenseKey
|
|
||||||
//
|
|
||||||
this.lblLicenseKey.AutoSize = true;
|
|
||||||
this.lblLicenseKey.Location = new System.Drawing.Point(9, 175);
|
|
||||||
this.lblLicenseKey.Name = "lblLicenseKey";
|
|
||||||
this.lblLicenseKey.Size = new System.Drawing.Size(65, 13);
|
|
||||||
this.lblLicenseKey.TabIndex = 4;
|
|
||||||
this.lblLicenseKey.Text = "License Key";
|
|
||||||
//
|
|
||||||
// tbxLicenseKey
|
|
||||||
//
|
|
||||||
this.tbxLicenseKey.Location = new System.Drawing.Point(12, 191);
|
|
||||||
this.tbxLicenseKey.Name = "tbxLicenseKey";
|
|
||||||
this.tbxLicenseKey.ReadOnly = true;
|
|
||||||
this.tbxLicenseKey.Size = new System.Drawing.Size(146, 20);
|
|
||||||
this.tbxLicenseKey.TabIndex = 5;
|
|
||||||
this.tbxLicenseKey.Click += new System.EventHandler(this.tbxLicenseKey_Click);
|
|
||||||
//
|
|
||||||
// btnSubmit
|
|
||||||
//
|
|
||||||
this.btnSubmit.Location = new System.Drawing.Point(12, 222);
|
|
||||||
this.btnSubmit.Name = "btnSubmit";
|
|
||||||
this.btnSubmit.Size = new System.Drawing.Size(146, 23);
|
|
||||||
this.btnSubmit.TabIndex = 6;
|
|
||||||
this.btnSubmit.Text = "Frappe Mocha";
|
|
||||||
this.btnSubmit.UseVisualStyleBackColor = true;
|
|
||||||
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
|
|
||||||
//
|
|
||||||
// lblProduct
|
|
||||||
//
|
|
||||||
this.lblProduct.AutoSize = true;
|
|
||||||
this.lblProduct.Location = new System.Drawing.Point(9, 56);
|
|
||||||
this.lblProduct.Name = "lblProduct";
|
|
||||||
this.lblProduct.Size = new System.Drawing.Size(44, 13);
|
|
||||||
this.lblProduct.TabIndex = 7;
|
|
||||||
this.lblProduct.Text = "Product";
|
|
||||||
//
|
|
||||||
// cbxProduct
|
|
||||||
//
|
|
||||||
this.cbxProduct.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
||||||
this.cbxProduct.FormattingEnabled = true;
|
|
||||||
this.cbxProduct.Location = new System.Drawing.Point(12, 72);
|
|
||||||
this.cbxProduct.Name = "cbxProduct";
|
|
||||||
this.cbxProduct.Size = new System.Drawing.Size(146, 21);
|
|
||||||
this.cbxProduct.TabIndex = 8;
|
|
||||||
this.cbxProduct.SelectedIndexChanged += new System.EventHandler(this.cbxProduct_SelectedIndexChanged);
|
|
||||||
//
|
|
||||||
// lblPlatform
|
|
||||||
//
|
|
||||||
this.lblPlatform.AutoSize = true;
|
|
||||||
this.lblPlatform.Location = new System.Drawing.Point(9, 13);
|
|
||||||
this.lblPlatform.Name = "lblPlatform";
|
|
||||||
this.lblPlatform.Size = new System.Drawing.Size(45, 13);
|
|
||||||
this.lblPlatform.TabIndex = 9;
|
|
||||||
this.lblPlatform.Text = "Platform";
|
|
||||||
//
|
|
||||||
// cbxPlatform
|
|
||||||
//
|
|
||||||
this.cbxPlatform.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
||||||
this.cbxPlatform.FormattingEnabled = true;
|
|
||||||
this.cbxPlatform.Location = new System.Drawing.Point(12, 29);
|
|
||||||
this.cbxPlatform.Name = "cbxPlatform";
|
|
||||||
this.cbxPlatform.Size = new System.Drawing.Size(146, 21);
|
|
||||||
this.cbxPlatform.TabIndex = 10;
|
|
||||||
this.cbxPlatform.SelectedIndexChanged += new System.EventHandler(this.cbxPlatform_SelectedIndexChanged);
|
|
||||||
//
|
|
||||||
// FrmMain
|
|
||||||
//
|
|
||||||
this.AcceptButton = this.btnSubmit;
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.BackColor = System.Drawing.SystemColors.Window;
|
|
||||||
this.ClientSize = new System.Drawing.Size(173, 258);
|
|
||||||
this.Controls.Add(this.cbxPlatform);
|
|
||||||
this.Controls.Add(this.lblPlatform);
|
|
||||||
this.Controls.Add(this.cbxProduct);
|
|
||||||
this.Controls.Add(this.lblProduct);
|
|
||||||
this.Controls.Add(this.btnSubmit);
|
|
||||||
this.Controls.Add(this.tbxLicenseKey);
|
|
||||||
this.Controls.Add(this.lblLicenseKey);
|
|
||||||
this.Controls.Add(this.lblCompanyUserName);
|
|
||||||
this.Controls.Add(this.lblLicenseType);
|
|
||||||
this.Controls.Add(this.tbxCompanyUserName);
|
|
||||||
this.Controls.Add(this.cbxLicenseType);
|
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
|
||||||
this.KeyPreview = true;
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
this.MinimizeBox = false;
|
|
||||||
this.Name = "FrmMain";
|
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
|
||||||
this.Text = "FrappeMocha";
|
|
||||||
this.Shown += new System.EventHandler(this.frmMain_Shown);
|
|
||||||
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.frmMain_KeyPress);
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.ComboBox cbxLicenseType;
|
|
||||||
private System.Windows.Forms.TextBox tbxCompanyUserName;
|
|
||||||
private System.Windows.Forms.Label lblLicenseType;
|
|
||||||
private System.Windows.Forms.Label lblCompanyUserName;
|
|
||||||
private System.Windows.Forms.Label lblLicenseKey;
|
|
||||||
private System.Windows.Forms.TextBox tbxLicenseKey;
|
|
||||||
private System.Windows.Forms.Button btnSubmit;
|
|
||||||
private System.Windows.Forms.Label lblProduct;
|
|
||||||
private System.Windows.Forms.ComboBox cbxProduct;
|
|
||||||
private System.Windows.Forms.Label lblPlatform;
|
|
||||||
private System.Windows.Forms.ComboBox cbxPlatform;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-7529
File diff suppressed because it is too large.
Load diff
@@ -1,72 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace FrappeMocha.Keygen
|
|
||||||
{
|
|
||||||
public abstract class KeygenBase
|
|
||||||
{
|
|
||||||
public const string CompanyLicense = "Company License";
|
|
||||||
public const string SingleUserLicense = "Single User License";
|
|
||||||
|
|
||||||
protected string Platform;
|
|
||||||
protected int ByteEncoding = 0;
|
|
||||||
public List<KeygenProduct> Products = new List<KeygenProduct>();
|
|
||||||
|
|
||||||
public abstract string Generate(int type, string paramCompany, LicenseTypes license);
|
|
||||||
public abstract bool Check(string paramLicenseKey, string paramCompany, LicenseTypes license);
|
|
||||||
|
|
||||||
|
|
||||||
public virtual List<string> GenerateLicencetypes(KeygenProduct p)
|
|
||||||
{
|
|
||||||
List<string> licenses = new List<string>();
|
|
||||||
licenses.Add(CompanyLicense);
|
|
||||||
licenses.Add(SingleUserLicense);
|
|
||||||
return licenses;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return Platform;
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] StrToByteArray(string str)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Encoding.GetEncoding(this.ByteEncoding).GetBytes(str);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Encoding.GetEncoding(0).GetBytes(str);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
return new byte[1] { (byte)63 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ByteArrayToStr(byte[] barr, int index, int length)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Encoding.GetEncoding(this.ByteEncoding).GetString(barr, index, length);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Encoding.GetEncoding(0).GetString(barr, index, length);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
return "?";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace FrappeMocha.Keygen
|
|
||||||
{
|
|
||||||
public class KeygenProduct
|
|
||||||
{
|
|
||||||
public LicenseTypes Licence;
|
|
||||||
public string Description;
|
|
||||||
|
|
||||||
public KeygenProduct(LicenseTypes licence, string description, string platform)
|
|
||||||
{
|
|
||||||
Licence = licence;
|
|
||||||
Description = description + " for " + platform;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return Description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool Equals(object obj)
|
|
||||||
{
|
|
||||||
return obj is KeygenProduct product && Description == product.Description ||
|
|
||||||
obj is string description && description == Description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetHashCode()
|
|
||||||
{
|
|
||||||
var hashCode = -1651123971;
|
|
||||||
hashCode = hashCode * -1521134295 + Licence.GetHashCode();
|
|
||||||
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Description);
|
|
||||||
return hashCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
namespace FrappeMocha.Keygen
|
|
||||||
{
|
|
||||||
public enum LicenseTypes
|
|
||||||
{
|
|
||||||
Windows3270 = 0x8c,
|
|
||||||
Windows5250 = 0x80,
|
|
||||||
Windows3812 = 0xa0,
|
|
||||||
WindowsTelnet = 0x9b,
|
|
||||||
|
|
||||||
Java3270 = 0x1b + 2,
|
|
||||||
Java5250 = 0x1b + 2,
|
|
||||||
JavaTelnet = 0x1b,
|
|
||||||
|
|
||||||
Mac3270 = 0x5d,
|
|
||||||
Mac5250 = 0x16,
|
|
||||||
Mac3812 = 0x22,
|
|
||||||
MacTelnet = 0x5e,
|
|
||||||
MacKeyboard = 0xa5,
|
|
||||||
|
|
||||||
JavaScript3270 = 0xb3,
|
|
||||||
JavaScript5250 = 0xb2,
|
|
||||||
JavaScriptTelnet = 0xb4,
|
|
||||||
|
|
||||||
Android3270 = 0x94,
|
|
||||||
Android5250 = 0x91,
|
|
||||||
AndroidTelnet = 0x96,
|
|
||||||
AndroidVnc = 0x92,
|
|
||||||
AndroidBarcode = 0x9c,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace FrappeMocha.Keygen.Platforms
|
|
||||||
{
|
|
||||||
public class PlatformAndroid : KeygenBase
|
|
||||||
{
|
|
||||||
public PlatformAndroid()
|
|
||||||
{
|
|
||||||
Platform = "Android";
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Android3270, "TN3270", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Android5250, "TN5250", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.AndroidTelnet, "TN3812", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.AndroidVnc, "VNC", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.AndroidBarcode, "Barcode", Platform));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This was also a piece of cake since PlatformJava is the underlying tech on PlatformAndroid
|
|
||||||
* The Dex object engine keept pretty good tabs on the types and var names as well!
|
|
||||||
*/
|
|
||||||
public override string Generate(int itype, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
char type = (char)(itype + '0');
|
|
||||||
string paramLicencekey = type.ToString();
|
|
||||||
long sum = 0;
|
|
||||||
byte[] byteArray = StrToByteArray(paramCompany);
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if ((long)byteArray[index] >= 'A' && (long)byteArray[index] <= 'Z')
|
|
||||||
byteArray[index] += 32; // this is basically str.toLower()
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if ((ulong)byteArray[index] >= 'A' && (ulong)byteArray[index] <= 'z')
|
|
||||||
{
|
|
||||||
sum += byteArray[index] + (uint)license;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sum = sum * paramLicencekey[0];
|
|
||||||
sum = sum * (sum & byte.MaxValue) & ushort.MaxValue;
|
|
||||||
if (sum < 100U)
|
|
||||||
sum = 2728U;
|
|
||||||
|
|
||||||
paramLicencekey = (paramLicencekey[0].ToString() + sum) + '-' +
|
|
||||||
(Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
|
||||||
|
|
||||||
return paramLicencekey;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Straight outta da Dex
|
|
||||||
*/
|
|
||||||
public override bool Check(string paramLicenseKey, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
byte[] bArr = new byte[255];
|
|
||||||
byte[] bArr2 = new byte[255];
|
|
||||||
if (paramCompany.Length < 2 || paramLicenseKey.Length < 2)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < paramLicenseKey.Length; i++)
|
|
||||||
{
|
|
||||||
bArr2[i] = (byte)paramLicenseKey[i];
|
|
||||||
}
|
|
||||||
for (int i2 = 0; i2 < paramCompany.Length; i2++)
|
|
||||||
{
|
|
||||||
bArr[i2] = (byte)paramCompany[i2];
|
|
||||||
if (paramCompany[i2] >= 'A' && paramCompany[i2] <= 'Z')
|
|
||||||
{
|
|
||||||
bArr[i2] = (byte)(bArr[i2] + 32);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
long j = 0;
|
|
||||||
for (int i3 = 0; i3 < paramCompany.Length; i3++)
|
|
||||||
{
|
|
||||||
if (bArr[i3] >= 65 && bArr[i3] <= 122)
|
|
||||||
{
|
|
||||||
j += (bArr[i3] + (long)license);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
long j2 = j * bArr2[0];
|
|
||||||
long j3 = (j2 * (j2 & 255)) & 65535;
|
|
||||||
if (j3 < 100)
|
|
||||||
{
|
|
||||||
j3 = 2728;
|
|
||||||
}
|
|
||||||
string sb = "";
|
|
||||||
sb += paramLicenseKey[0];
|
|
||||||
sb += (object)j3;
|
|
||||||
if (paramLicenseKey.StartsWith(sb))
|
|
||||||
{
|
|
||||||
// lictype = bArr2[0] - 48;
|
|
||||||
// is_lite2 = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// lictype = -1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace FrappeMocha.Keygen.Platforms
|
|
||||||
{
|
|
||||||
public class PlatformJava : KeygenBase
|
|
||||||
{
|
|
||||||
public PlatformJava()
|
|
||||||
{
|
|
||||||
Platform = "Java";
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Java3270, "TN3270", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Java5250, "TN5250", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.JavaTelnet, "Telnet", Platform));
|
|
||||||
}
|
|
||||||
|
|
||||||
public override List<string> GenerateLicencetypes(KeygenProduct p)
|
|
||||||
{
|
|
||||||
List<string> types = new List<string>();
|
|
||||||
for (int i = 0; i < 5; i++)
|
|
||||||
{
|
|
||||||
types.Add(((char)(i + 'A')).ToString());
|
|
||||||
}
|
|
||||||
return types;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pretty stright forward implementation as well
|
|
||||||
* .NET is just a copy of PlatformJava afterall
|
|
||||||
*/
|
|
||||||
public override string Generate(int itype, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
char type = (char)(itype + 'A');
|
|
||||||
string paramLicencekey = type.ToString() + '@';
|
|
||||||
int sum = 0;
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
while (i < paramCompany.Length)
|
|
||||||
{
|
|
||||||
if (paramCompany[i] > ' ')
|
|
||||||
{
|
|
||||||
// 3270 and 5250 have a hardcoded 0x1b+2 here, we've just added it to the enum
|
|
||||||
sum += paramCompany[i] + (int)license;
|
|
||||||
}
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
sum = sum * paramLicencekey[0];
|
|
||||||
sum = sum * (sum & byte.MaxValue) & ushort.MaxValue;
|
|
||||||
paramLicencekey += sum.ToString();
|
|
||||||
return paramLicencekey;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Straight outta da JAR
|
|
||||||
*/
|
|
||||||
public override bool Check(string paramLicenseKey, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
int n = 0;
|
|
||||||
while (i < paramCompany.Length)
|
|
||||||
{
|
|
||||||
if (paramCompany[i] > ' ')
|
|
||||||
{
|
|
||||||
// 3270 and 5250 have a hardcoded 0x1b+2 here, we've just added it to the enum
|
|
||||||
n += paramCompany[i] + (int)license;
|
|
||||||
}
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
if (paramLicenseKey.Length > 0)
|
|
||||||
{
|
|
||||||
switch (paramLicenseKey[0])
|
|
||||||
{
|
|
||||||
case 'A':
|
|
||||||
case 'B':
|
|
||||||
case 'C':
|
|
||||||
case 'D':
|
|
||||||
case 'E':
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
int n2 = n * paramLicenseKey[0];
|
|
||||||
n2 = n2 * (n2 & 0xFF) & 0xFFFF;
|
|
||||||
|
|
||||||
string check = paramLicenseKey[0].ToString() + paramLicenseKey[1].ToString() + n2.ToString();
|
|
||||||
if (paramLicenseKey[1] == '@' && check == paramLicenseKey)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace FrappeMocha.Keygen.Platforms
|
|
||||||
{
|
|
||||||
public class PlatformJavaScript : KeygenBase
|
|
||||||
{
|
|
||||||
public PlatformJavaScript()
|
|
||||||
{
|
|
||||||
Platform = "Google Chrome";
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.JavaScript3270, "TN3270", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.JavaScript5250, "TN5250", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.JavaScriptTelnet, "Telnet", Platform));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This one was fun as well
|
|
||||||
* Found out that the license must end with "45" in order to validate
|
|
||||||
*/
|
|
||||||
public override string Generate(int itype, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
char type = (char)(itype + '0');
|
|
||||||
string param_lickey = type.ToString();
|
|
||||||
ulong sum = 0;
|
|
||||||
byte[] byteArray = StrToByteArray(paramCompany);
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if (byteArray[index] >= 'A' && byteArray[index] <= 'Z')
|
|
||||||
byteArray[index] += 32; // ASCII 'Space'
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if ((ulong)byteArray[index] >= 'A' && (ulong)byteArray[index] <= 'z')
|
|
||||||
{
|
|
||||||
sum += byteArray[index] + (uint)license;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sum = sum * param_lickey[0];
|
|
||||||
sum = sum * (sum & byte.MaxValue) & ushort.MaxValue;
|
|
||||||
if (sum < 100U)
|
|
||||||
sum = 2728U;
|
|
||||||
|
|
||||||
param_lickey = (param_lickey[0].ToString() + sum) + '-' +
|
|
||||||
(Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds
|
|
||||||
+ "45"; // a little salt, as a treat
|
|
||||||
|
|
||||||
return param_lickey;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Straight outta da JS
|
|
||||||
*/
|
|
||||||
public override bool Check(string paramLicenseKey, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
ulong sum = 0;
|
|
||||||
byte[] byteArray = this.StrToByteArray(paramCompany);
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if ((ulong)byteArray[index] >= 65 && (ulong)byteArray[index] <= 90)
|
|
||||||
byteArray[index] += 32;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if ((ulong)byteArray[index] >= 65 && (ulong)byteArray[index] <= 122)
|
|
||||||
{
|
|
||||||
sum += byteArray[index] + (uint)license;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sum = sum * paramLicenseKey[0];
|
|
||||||
sum = sum * (sum & byte.MaxValue) & ushort.MaxValue;
|
|
||||||
if (sum < 100U)
|
|
||||||
sum = 2728U;
|
|
||||||
|
|
||||||
if (!paramLicenseKey.StartsWith(paramLicenseKey[0].ToString() + sum) || !paramLicenseKey.EndsWith("45"))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace FrappeMocha.Keygen.Platforms
|
|
||||||
{
|
|
||||||
public class PlatformMac : KeygenBase
|
|
||||||
{
|
|
||||||
public PlatformMac()
|
|
||||||
{
|
|
||||||
Platform = "MacOSX";
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Mac3270, "TN3270", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Mac5250, "TN5250", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Mac3812, "TN3812", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.MacTelnet, "Telnet", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.MacKeyboard, "Keyboard", Platform));
|
|
||||||
}
|
|
||||||
|
|
||||||
public override List<string> GenerateLicencetypes(KeygenProduct p)
|
|
||||||
{
|
|
||||||
if (p.Licence != LicenseTypes.Mac3812 &&
|
|
||||||
p.Licence != LicenseTypes.MacTelnet &&
|
|
||||||
p.Licence != LicenseTypes.MacKeyboard)
|
|
||||||
{
|
|
||||||
return base.GenerateLicencetypes(p);
|
|
||||||
}
|
|
||||||
List<string> types = new List<string>();
|
|
||||||
types.Add("0");
|
|
||||||
return types;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Generate(int type, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
switch (license)
|
|
||||||
{
|
|
||||||
// Prefix Num
|
|
||||||
case LicenseTypes.Mac3270:
|
|
||||||
case LicenseTypes.Mac5250:
|
|
||||||
return GeneratePrefixNumber(type, paramCompany, license);
|
|
||||||
|
|
||||||
// Prefix Alpha
|
|
||||||
case LicenseTypes.Mac3812:
|
|
||||||
case LicenseTypes.MacTelnet:
|
|
||||||
case LicenseTypes.MacKeyboard:
|
|
||||||
return GeneratePrefixAlpha(type, paramCompany, license);
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo: write some sanity checks
|
|
||||||
* I doubt I'll be able to get something straight outta da Ghidra here...
|
|
||||||
*/
|
|
||||||
public override bool Check(string paramLicenseKey, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
switch (license)
|
|
||||||
{
|
|
||||||
// Prefix Num
|
|
||||||
case LicenseTypes.Mac3270:
|
|
||||||
case LicenseTypes.Mac5250:
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// Prefix Alpha
|
|
||||||
case LicenseTypes.Mac3812:
|
|
||||||
case LicenseTypes.MacTelnet:
|
|
||||||
case LicenseTypes.MacKeyboard:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Now the fun stuff..
|
|
||||||
*
|
|
||||||
* Beware! the PlatformMac versions rely on datatype truncation
|
|
||||||
* It's a real pain in the ass to make sure the datatypes are all accurate
|
|
||||||
*/
|
|
||||||
public string GeneratePrefixAlpha(int itype, string param_company, LicenseTypes license)
|
|
||||||
{
|
|
||||||
// must start with an 'a' or 'b;
|
|
||||||
char type = (char)(itype + (int)'a');
|
|
||||||
string param_lickey = type.ToString();
|
|
||||||
ushort sum = 0;
|
|
||||||
|
|
||||||
for (int b = 0; b < param_company.Length; b++)
|
|
||||||
{
|
|
||||||
if (param_company[b] >= 0x21)
|
|
||||||
sum += (ushort)(param_company[b] + license);
|
|
||||||
}
|
|
||||||
|
|
||||||
sum = (ushort)(sum * (short)param_lickey[0]);
|
|
||||||
param_lickey += (ushort)((sum & byte.MaxValue) * sum);
|
|
||||||
return param_lickey;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Beware! the PlatformMac versions rely on datatype truncation
|
|
||||||
* It's a real pain in the ass to make sure the datatypes are all accurate
|
|
||||||
*
|
|
||||||
* There's a special case for the MacKeyboard as it deviates from the rest of the algoritm
|
|
||||||
* The (byte) cast is extmely important
|
|
||||||
*/
|
|
||||||
public string GeneratePrefixNumber(int itype, string param_company, LicenseTypes license)
|
|
||||||
{
|
|
||||||
char type = (char)(itype + (int)'0');
|
|
||||||
string param_lickey = type.ToString();
|
|
||||||
uint num1 = 0;
|
|
||||||
byte[] byteArray = StrToByteArray(param_company);
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if (license == LicenseTypes.MacKeyboard && (byte)(byteArray[index] + 0xbf) < 0x1a)
|
|
||||||
{
|
|
||||||
byteArray[index] += 32;
|
|
||||||
}
|
|
||||||
else if (license != LicenseTypes.MacKeyboard && byteArray[index] + 0xbf < 0x1a)
|
|
||||||
{
|
|
||||||
byteArray[index] += 32;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if (byteArray[index] >= 0x41) // 'A'
|
|
||||||
num1 += byteArray[index] + (uint)license;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint num2 = (uint)(num1 * (int)param_lickey[0]);
|
|
||||||
num2 = (num2 * (num2 & byte.MaxValue) & ushort.MaxValue);
|
|
||||||
ulong num3 = 0xaa8;
|
|
||||||
if (99 < num2)
|
|
||||||
{
|
|
||||||
num3 = num2;
|
|
||||||
}
|
|
||||||
|
|
||||||
param_lickey = param_lickey[0].ToString() + num3;
|
|
||||||
|
|
||||||
|
|
||||||
return param_lickey;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace FrappeMocha.Keygen.Platforms
|
|
||||||
{
|
|
||||||
public class PlatformWindows : KeygenBase
|
|
||||||
{
|
|
||||||
public PlatformWindows()
|
|
||||||
{
|
|
||||||
Platform = "Windows";
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Windows3270, "TN3270", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Windows5250, "TN5250", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.Windows3812, "TN3812", Platform));
|
|
||||||
Products.Add(new KeygenProduct(LicenseTypes.WindowsTelnet, "Telnet", Platform));
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Generate(int type, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
string licenseKey = type.ToString();
|
|
||||||
uint sum = 0;
|
|
||||||
byte[] byteArray = StrToByteArray(paramCompany);
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if (byteArray[index] >= 'A' && byteArray[index] <= 'Z')
|
|
||||||
byteArray[index] += 32; // ASCII 'Space'
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if (byteArray[index] >= 'A')
|
|
||||||
sum += byteArray[index] + (uint)license;
|
|
||||||
}
|
|
||||||
sum = sum * licenseKey[0];
|
|
||||||
sum = (uint)((int)sum * ((int)sum & byte.MaxValue) & ushort.MaxValue);
|
|
||||||
if (sum < 100U)
|
|
||||||
sum = 2728U;
|
|
||||||
|
|
||||||
licenseKey = (licenseKey[0].ToString() + sum) + '-' +
|
|
||||||
(Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
|
||||||
|
|
||||||
|
|
||||||
return licenseKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Straight outta da Assembley
|
|
||||||
*/
|
|
||||||
public override bool Check(string paramLicenseKey, string paramCompany, LicenseTypes license)
|
|
||||||
{
|
|
||||||
uint num1 = 0;
|
|
||||||
if (paramCompany == null || paramCompany.Length < 2)
|
|
||||||
return false;
|
|
||||||
byte[] byteArray = this.StrToByteArray(paramCompany);
|
|
||||||
if (paramLicenseKey == null || paramLicenseKey.Length < 6)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
// >= 'A' && <= 'Z'
|
|
||||||
if ((int)byteArray[index] >= 65 && (int)byteArray[index] <= 90)
|
|
||||||
byteArray[index] += (byte)32;
|
|
||||||
}
|
|
||||||
for (int index = 0; index < byteArray.Length; ++index)
|
|
||||||
{
|
|
||||||
if ((int)byteArray[index] >= 65) // 'A'
|
|
||||||
num1 += (uint)byteArray[index] + (uint)license;
|
|
||||||
}
|
|
||||||
uint num2 = num1 * (uint)paramLicenseKey[0];
|
|
||||||
uint num3 = (uint)((int)num2 * ((int)num2 & (int)byte.MaxValue) & (int)ushort.MaxValue);
|
|
||||||
if (num3 < 100U)
|
|
||||||
num3 = 2728U;
|
|
||||||
|
|
||||||
if (paramLicenseKey.StartsWith((paramLicenseKey[0].ToString() ?? "") + (object)num3))
|
|
||||||
{
|
|
||||||
//this.aa = param_lickey.Substring(0, 1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
//this.aa = "";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2020 Amrit Panesar
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using FrappeMocha.Keygen;
|
|
||||||
using FrappeMocha.Keygen.Platforms;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
|
|
||||||
namespace PlatformUnitTests
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public class PlatformUnitTest
|
|
||||||
{
|
|
||||||
private KeygenBase platform;
|
|
||||||
private readonly string[] _testCompanyUserStrings = {"Test", "FrappeMocha", "abcd", "1234"};
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void TestWindowsPlatform()
|
|
||||||
{
|
|
||||||
platform = new PlatformWindows();
|
|
||||||
foreach (var product in platform.Products)
|
|
||||||
{
|
|
||||||
var types = platform.GenerateLicencetypes(product);
|
|
||||||
for (int i = 0; i < types.Count; i++)
|
|
||||||
{
|
|
||||||
foreach (string company in _testCompanyUserStrings)
|
|
||||||
{
|
|
||||||
var key = platform.Generate(i, company, product.Licence);
|
|
||||||
Assert.IsTrue(platform.Check(key, company, product.Licence));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void TestMacOsxPlatform()
|
|
||||||
{
|
|
||||||
platform = new PlatformMac();
|
|
||||||
foreach (var product in platform.Products)
|
|
||||||
{
|
|
||||||
var types = platform.GenerateLicencetypes(product);
|
|
||||||
for (int i = 0; i < types.Count; i++)
|
|
||||||
{
|
|
||||||
foreach (string company in _testCompanyUserStrings)
|
|
||||||
{
|
|
||||||
var key = platform.Generate(i, company, product.Licence);
|
|
||||||
Assert.IsTrue(platform.Check(key, company, product.Licence));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void TestAndroidPlatform()
|
|
||||||
{
|
|
||||||
platform = new PlatformAndroid();
|
|
||||||
foreach (var product in platform.Products)
|
|
||||||
{
|
|
||||||
var types = platform.GenerateLicencetypes(product);
|
|
||||||
for (int i = 0; i < types.Count; i++)
|
|
||||||
{
|
|
||||||
foreach (string company in _testCompanyUserStrings)
|
|
||||||
{
|
|
||||||
var key = platform.Generate(i, company, product.Licence);
|
|
||||||
Assert.IsTrue(platform.Check(key, company, product.Licence));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void TestJavaPlatform()
|
|
||||||
{
|
|
||||||
platform = new PlatformJava();
|
|
||||||
foreach (var product in platform.Products)
|
|
||||||
{
|
|
||||||
var types = platform.GenerateLicencetypes(product);
|
|
||||||
for (int i = 0; i < types.Count; i++)
|
|
||||||
{
|
|
||||||
foreach (string company in _testCompanyUserStrings)
|
|
||||||
{
|
|
||||||
var key = platform.Generate(i, company, product.Licence);
|
|
||||||
Assert.IsTrue(platform.Check(key, company, product.Licence));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void TestJavaScriptPlatform()
|
|
||||||
{
|
|
||||||
platform = new PlatformJavaScript();
|
|
||||||
foreach (var product in platform.Products)
|
|
||||||
{
|
|
||||||
var types = platform.GenerateLicencetypes(product);
|
|
||||||
for (int i = 0; i < types.Count; i++)
|
|
||||||
{
|
|
||||||
foreach (string company in _testCompanyUserStrings)
|
|
||||||
{
|
|
||||||
var key = platform.Generate(i, company, product.Licence);
|
|
||||||
Assert.IsTrue(platform.Check(key, company, product.Licence));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
|
|
||||||
<ApplicationIcon />
|
|
||||||
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
|
|
||||||
<StartupObject />
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
|
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\FrappeMocha.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace FrappeMocha
|
|
||||||
{
|
|
||||||
static class Program
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The main entry point for the application.
|
|
||||||
/// </summary>
|
|
||||||
[STAThread]
|
|
||||||
static void Main()
|
|
||||||
{
|
|
||||||
Application.EnableVisualStyles();
|
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
|
||||||
Application.Run(new FrmMain());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
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("FrappeMocha")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("HP Inc.")]
|
|
||||||
[assembly: AssemblyProduct("FrappeMocha")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © HP Inc. 2020")]
|
|
||||||
[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("04ab5523-e679-4628-8b8b-b928a5da5107")]
|
|
||||||
|
|
||||||
// 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")]
|
|
||||||
Generated
-73
@@ -1,73 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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 FrappeMocha.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", "15.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("FrappeMocha.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.Drawing.Icon similar to (Icon).
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Icon logo {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("logo", resourceCulture);
|
|
||||||
return ((System.Drawing.Icon)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
<?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=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>
|
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\logo.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
Generated
-30
@@ -1,30 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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 FrappeMocha.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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# FrappeMocha
|
|
||||||
|
|
||||||
<img src="https://neo-desktop.github.io/FrappeMocha/images/logo.png" height=100 />
|
|
||||||
|
|
||||||
Generates keys for an aptly named 3270 terminal emulator
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Supported Platforms and Products
|
|
||||||
Product | Windows | MacOSX | Java | Chrome | Android
|
|
||||||
-------- |:-------:|:------:|:----:|:------:|:-------:
|
|
||||||
**TN3270** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:
|
|
||||||
**TN5250** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:
|
|
||||||
**Telnet** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:
|
|
||||||
**TN3812** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | ------ | :heavy_check_mark:
|
|
||||||
**Keyboard** | ------ | :heavy_check_mark: | ------ | ------ | ------
|
|
||||||
**VNC** | ------ | ------ | ------ | ------ | :heavy_check_mark:
|
|
||||||
**Barcode** | ------ | ------ | ------ | ------ | :heavy_check_mark:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Note
|
|
||||||
This is mostly for educational purposes only
|
|
||||||
Documentation is non-existant
|
|
||||||
|
|
||||||
I just /really/ enjoy taking things apart and trying to put them back together
|
|
||||||
|
|
||||||
If this helps someone, sweet!
|
|
||||||
|
|
||||||
Keep on hacking
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 434 KiB |
-153
@@ -1,153 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using FrappeMocha.Keygen;
|
|
||||||
using FrappeMocha.Keygen.Platforms;
|
|
||||||
|
|
||||||
namespace FrappeMocha
|
|
||||||
{
|
|
||||||
public partial class FrmMain : Form
|
|
||||||
{
|
|
||||||
private char[] ficus = new char[6];
|
|
||||||
private Dictionary<string, KeygenBase> keygens = new Dictionary<string, KeygenBase>();
|
|
||||||
private string[] platforms = {"Windows", "MacOSX", "Java", "Google Chrome", "Android"};
|
|
||||||
private string[] companyUserName = {"Company Name", "User Name"};
|
|
||||||
|
|
||||||
public FrmMain()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
keygens.Add(platforms[0], new PlatformWindows());
|
|
||||||
keygens.Add(platforms[1], new PlatformMac());
|
|
||||||
keygens.Add(platforms[2], new PlatformJava());
|
|
||||||
keygens.Add(platforms[3], new PlatformJavaScript());
|
|
||||||
keygens.Add(platforms[4], new PlatformAndroid());
|
|
||||||
|
|
||||||
foreach (var item in keygens)
|
|
||||||
{
|
|
||||||
cbxPlatform.Items.Add(item.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
cbxPlatform.SelectedIndex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string keygen(KeygenBase platform, KeygenProduct product, int type, string name)
|
|
||||||
{
|
|
||||||
if (name.Length <= 1)
|
|
||||||
{
|
|
||||||
MessageBox.Show( companyUserName[type] + " must be longer than one character", "Error",
|
|
||||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name.Length > 80)
|
|
||||||
{
|
|
||||||
MessageBox.Show( companyUserName[type] + " must not be greater than eighty characters", "Error",
|
|
||||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
string genlicense = platform.Generate(type, name, product.Licence);
|
|
||||||
if (!platform.Check(genlicense, name, product.Licence))
|
|
||||||
{
|
|
||||||
MessageBox.Show("Generated license did not pass self check, please try again", "Warning",
|
|
||||||
MessageBoxButtons.OK,
|
|
||||||
MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
|
|
||||||
return genlicense;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void frmMain_Shown(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
AcceptButton.PerformClick();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void frmMain_KeyPress(object sender, KeyPressEventArgs e)
|
|
||||||
{
|
|
||||||
Array.Copy(ficus, 1, ficus, 0, ficus.Length - 1);
|
|
||||||
this.ficus[ficus.Length - 1] = e.KeyChar;
|
|
||||||
if (new string(ficus) == "spicey")
|
|
||||||
{
|
|
||||||
switch (MessageBox.Show("Would you like a little salt, as a treat?", "Orly?",
|
|
||||||
MessageBoxButtons.YesNoCancel,
|
|
||||||
MessageBoxIcon.Question))
|
|
||||||
{
|
|
||||||
case DialogResult.Yes:
|
|
||||||
Process.Start("https://i.imgur.com/EJ31bmk.jpg");
|
|
||||||
break;
|
|
||||||
case DialogResult.No:
|
|
||||||
Process.Start(
|
|
||||||
"https://pics.me.me/white-people-cant-handle-spicy-food-um-try-again-sweetie-6626438.png");
|
|
||||||
break;
|
|
||||||
case DialogResult.Cancel:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnSubmit_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
KeygenBase platform = (KeygenBase)cbxPlatform.SelectedItem;
|
|
||||||
KeygenProduct product = (KeygenProduct)cbxProduct.SelectedItem;
|
|
||||||
int type = cbxLicenseType.SelectedIndex;
|
|
||||||
string name = tbxCompanyUserName.Text;
|
|
||||||
|
|
||||||
tbxLicenseKey.Text = keygen(platform, product, type, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void tbxLicenseKey_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
tbxLicenseKey.SelectAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void cbxPlatform_SelectedIndexChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
KeygenBase platform = (KeygenBase) cbxPlatform.SelectedItem;
|
|
||||||
|
|
||||||
cbxProduct.Enabled = false;
|
|
||||||
cbxProduct.Items.Clear();
|
|
||||||
foreach (var p in platform.Products)
|
|
||||||
{
|
|
||||||
cbxProduct.Items.Add(p);
|
|
||||||
}
|
|
||||||
cbxProduct.SelectedIndex = 0;
|
|
||||||
cbxProduct.Enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void cbxProduct_SelectedIndexChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
KeygenBase platform = (KeygenBase)cbxPlatform.SelectedItem;
|
|
||||||
KeygenProduct product = (KeygenProduct) cbxProduct.SelectedItem;
|
|
||||||
|
|
||||||
cbxLicenseType.Enabled = false;
|
|
||||||
cbxLicenseType.Items.Clear();
|
|
||||||
var LicenceTypes = platform.GenerateLicencetypes(product);
|
|
||||||
foreach (string type in LicenceTypes)
|
|
||||||
{
|
|
||||||
cbxLicenseType.Items.Add(type);
|
|
||||||
}
|
|
||||||
cbxLicenseType.Enabled = true;
|
|
||||||
cbxLicenseType.SelectedIndex = 0;
|
|
||||||
AcceptButton.PerformClick();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void cbxLicenseType_SelectedIndexChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (cbxLicenseType.Items.Count != 2)
|
|
||||||
{
|
|
||||||
lblCompanyUserName.Text = "Name";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lblCompanyUserName.Text = companyUserName[cbxLicenseType.SelectedIndex];
|
|
||||||
}
|
|
||||||
AcceptButton.PerformClick();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
Reference in new issue
Block a user