Compare commits
68 Commits
Author | SHA1 | Date |
---|---|---|
J. Fronny | 0104269e56 | |
J. Fronny | 4656302c07 | |
J. Fronny | febe7ff9cb | |
J. Fronny | 91a621132c | |
J. Fronny | 98b2a7938a | |
J. Fronny | fd4d54542d | |
Renovate Bot | dc91d38fa8 | |
J. Fronny | 94f0bb2f49 | |
J. Fronny | 6047843eea | |
J. Fronny | 8096bbc794 | |
J. Fronny | 546b9a1566 | |
J. Fronny | 15d1731367 | |
J. Fronny | dc4aa44284 | |
J. Fronny | f75badb5a0 | |
J. Fronny | 1a4baabbaf | |
J. Fronny | 05b53dacc5 | |
J. Fronny | 7b24e90260 | |
J. Fronny | 66532a0eb8 | |
J. Fronny | 4b102cba5a | |
J. Fronny | 992a8e5860 | |
J. Fronny | 3fdcdab463 | |
dependabot-preview[bot] | 739033ba1f | |
JFronny | c8748c27d7 | |
dependabot-preview[bot] | 3606c0d536 | |
dependabot-preview[bot] | a8f4bd49b8 | |
dependabot-preview[bot] | 96d5c3ab74 | |
J. Fronny | 3fd91ec0f0 | |
CreepyCrafter24 | f6975f68b1 | |
J. Fronny | 92de5aa2d3 | |
J. Fronny | 2caf0c5162 | |
J. Fronny | 3117693fa9 | |
J. Fronny | e362452b20 | |
J. Fronny | 9773f653ff | |
J. Fronny | 830c193a56 | |
J. Fronny | ec84ca2750 | |
J. Fronny | c0be5b5b18 | |
J. Fronny | f1e47912fe | |
J. Fronny | 12cce831cd | |
J. Fronny | fa82fb910e | |
J. Fronny | 6aa861bfb8 | |
CreepyCrafter24 | 2e87113422 | |
CreepyCrafter24 | 32959736a0 | |
dependabot-preview[bot] | fefe139107 | |
dependabot-preview[bot] | d243fe53d4 | |
dependabot-preview[bot] | 9269773ede | |
dependabot-preview[bot] | caaede750c | |
dependabot-preview[bot] | d814e53738 | |
dependabot-preview[bot] | 756f71443d | |
dependabot-preview[bot] | 7b798cb86e | |
dependabot-preview[bot] | f8926c1f51 | |
dependabot-preview[bot] | 3a63b81dc0 | |
J. Fronny | 709edd4659 | |
CreepyCrafter24 | 8a4824a5d3 | |
CreepyCrafter24 | 97c4f62677 | |
CreepyCrafter24 | 4177294250 | |
CreepyCrafter24 | 204313624e | |
CreepyCrafter24 | 6672c164db | |
CreepyCrafter24 | 3349935938 | |
CreepyCrafter24 | 8a778ae5e4 | |
CreepyCrafter24 | 2d25fb098f | |
CreepyCrafter24 | 94b152ec45 | |
CreepyCrafter24 | 28a7898071 | |
CreepyCrafter24 | 6a19967c46 | |
CreepyCrafter24 | 194af87a8e | |
CreepyCrafter24 | 857e51f36e | |
CreepyCrafter24 | 996467f2a7 | |
CreepyCrafter24 | 1ad5d0bbc6 | |
CreepyCrafter24 | 9969c7769e |
|
@ -1,7 +1,15 @@
|
|||
|
||||
# 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
|
||||
|
@ -10,6 +18,9 @@
|
|||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
|
@ -17,42 +28,57 @@
|
|||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
# 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
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
# 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
|
||||
*_i.h
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
|
@ -62,6 +88,7 @@ artifacts/
|
|||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
|
@ -90,6 +117,9 @@ ipch/
|
|||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
|
@ -110,6 +140,14 @@ _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
|
||||
|
@ -141,9 +179,9 @@ publish/
|
|||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# 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
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
|
@ -153,13 +191,15 @@ PublishScripts/
|
|||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignoreable files
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
|
@ -176,12 +216,15 @@ 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/
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
|
@ -192,9 +235,12 @@ ClientBin/
|
|||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
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/
|
||||
|
@ -209,15 +255,22 @@ _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/
|
||||
|
@ -227,6 +280,7 @@ FakesAssemblies/
|
|||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
@ -234,6 +288,9 @@ FakesAssemblies/
|
|||
# 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
|
||||
|
@ -249,13 +306,207 @@ paket-files/
|
|||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.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
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
.shared_windows_runners:
|
||||
tags:
|
||||
- windows
|
||||
|
||||
uptool:
|
||||
extends:
|
||||
- .shared_windows_runners
|
||||
stage: deploy
|
||||
script: |
|
||||
mkdir i
|
||||
cd i
|
||||
$(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Installer-generic.zip?job=uptool", "$($(pwd).Path)\Install.zip")
|
||||
& "C:\Program Files\7-Zip\7z.exe" x .\Install.zip
|
||||
.\Installer.exe --basic i -p
|
||||
cd ..
|
||||
rm -R i
|
||||
$Env:Path="$Env:Path;$Env:APPDATA\UpTool2\Install"
|
||||
uptool --basic add-repo DevTools https://gitlab.com/JFronny/UpTool2/-/snippets/2010392/raw
|
||||
uptool --basic update
|
||||
uptool --basic install "UpTool2 package tools"
|
||||
$Env:Path="$Env:Path;$Env:APPDATA\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app"
|
||||
|
||||
dotnet restore
|
||||
mkdir .\build
|
||||
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe" -noLogo -verbosity:m -p:Configuration=Release
|
||||
cp .\cashew\bin\Release\net461\* .\build\
|
||||
cp .\build\package.zip .\
|
||||
$file = Get-Item $(Resolve-Path .\build\*.exe).Path
|
||||
[timespan]$span = [System.DateTime]::Now - [datetime]'01/01/2000'
|
||||
[System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument
|
||||
[System.XML.XMLElement]$app=$xml.CreateElement("app")
|
||||
$xml.appendChild($app)
|
||||
$app.appendChild($xml.CreateElement("Name")).InnerText = "Cashew"
|
||||
$app.appendChild($xml.CreateElement("Description")).InnerText = "A basic GUI for multiple common programming languages including c# and HTML"
|
||||
$app.appendChild($xml.CreateElement("Version")).InnerText = "1.0." + $span.Days.ToString() + "." + [math]::Round(($span.Seconds + ($span.Minutes + $span.Hours * 60) * 60) / 2).ToString()
|
||||
$app.appendChild($xml.CreateElement("ID")).InnerText = "63d64672-3ca3-4760-96a3-443b262d326f"
|
||||
$app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/package.zip"
|
||||
$app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\package.zip).Hash
|
||||
$app.appendChild($xml.CreateElement("MainFile")).InnerText = "cashew.exe"
|
||||
$app.appendChild($xml.CreateElement("Icon")).InnerText = "https://gitlab.com/JFronny/cashew/-/raw/master/cashew/Cashew-64.ico"
|
||||
echo NULL > app.xml
|
||||
$xml.save($(gi .\app.xml).Fullname)
|
||||
artifacts:
|
||||
paths:
|
||||
- package.zip
|
||||
- app.xml
|
||||
only:
|
||||
- master
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers>
|
||||
<Costura CreateTemporaryAssemblies='true' />
|
||||
</Weavers>
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 J. Fronny
|
||||
|
||||
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.
|
12
README.md
12
README.md
|
@ -1,12 +1,2 @@
|
|||
# cashew
|
||||
A basic GUI for multiple common programming languages including c# and HTML
|
||||
|
||||
# How to use
|
||||
Build:
|
||||
- Open the solution in visual studio
|
||||
- Set the CCFunctions reference to a built version of Net_TOFU from T.O.F.U
|
||||
- Build a release
|
||||
- Run it
|
||||
OR:
|
||||
- Download a release
|
||||
- Run it
|
||||
A basic GUI for multiple common programming languages including c# and HTML [![UpTool2](https://img.shields.io/badge/Get%20it-on%20UpTool2-blue)](https://jfronny.gitlab.io/home/uptool)
|
||||
|
|
13
cashew.sln
13
cashew.sln
|
@ -1,11 +1,14 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.0
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29230.47
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cashew", "cashew\cashew.csproj", "{1AC90E29-B37E-401C-9960-66BC66D4EFBF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CCFunctions", "..\T.O.F.U\Net_TOFU\CCFunctions.csproj", "{4E768A51-1B01-4DE0-A1C0-303F2E6F2AB9}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B438CEFA-611B-4DD2-B1CE-EE62976A6BDE}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -17,10 +20,6 @@ Global
|
|||
{1AC90E29-B37E-401C-9960-66BC66D4EFBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1AC90E29-B37E-401C-9960-66BC66D4EFBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1AC90E29-B37E-401C-9960-66BC66D4EFBF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4E768A51-1B01-4DE0-A1C0-303F2E6F2AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4E768A51-1B01-4DE0-A1C0-303F2E6F2AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4E768A51-1B01-4DE0-A1C0-303F2E6F2AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4E768A51-1B01-4DE0-A1C0-303F2E6F2AB9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/>
|
||||
</startup>
|
||||
</configuration>
|
320
cashew/Form1.cs
320
cashew/Form1.cs
|
@ -1,320 +0,0 @@
|
|||
#region MakeApp()
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework;
|
||||
using MetroFramework.Forms;
|
||||
using System.IO;
|
||||
using CCFunctions;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Diagnostics;
|
||||
#pragma warning disable IDE1006
|
||||
namespace cashew {
|
||||
public partial class MAIN : MetroForm {
|
||||
#region General
|
||||
MetroFramework.Interfaces.IMetroControl[] metroControls;
|
||||
Control[] normalControls;
|
||||
ToolStripMenuItem[] menuItems;
|
||||
string[] cseditcodel;
|
||||
string[] cseditrefl;
|
||||
public MAIN() {
|
||||
InitializeComponent();
|
||||
metroControls = new MetroFramework.Interfaces.IMetroControl[] { nmtext, languageTabControl, cstab, infotab, nightmodeToggle, cseditopen, cseditrun, cseditsave, cseditcode, csedit, cslive, csediterrorpanel, csediterrors, cseditref, infoPanel, htmltab, csinftc, csedittp, cslivetp, htmltext, htmltitle, htmlOptionsTile, htmlOptionsMenu, htmlRefreshTile, htmlLoad, htmlSave,
|
||||
htmlLoadIndicator, htmlUpdateToggle, htmlLiveLabel, livehider, nightmodehide, cslivenotyetimplemented, pythontab, pythonSave, pythonRun, pythonOpen, pythonCode, pythonExtract};
|
||||
normalControls = new Control[] { htmlSep, htmldisplay };
|
||||
menuItems = new ToolStripMenuItem[] { hTMLToolStripMenuItem, javaScriptToolStripMenuItem, cSSToolStripMenuItem, pHPToolStripMenuItem, hTMLStructureSetupToolStripMenuItem, javaStructureSetupToolStripMenuItem, cSSStructureSetupToolStripMenuItem, pHPStructureSetupToolStripMenuItem, linkToolStripMenuItem, imageToolStripMenuItem, textToolStripMenuItem, tableToolStripMenuItem,
|
||||
listsToolStripMenuItem, functionToolStripMenuItem, textToolStripMenuItem1, alertBoxToolStripMenuItem, timeoutToolStripMenuItem, randomNumberToolStripMenuItem, cSSCustomizeTagToolStripMenuItem, cSSCustomTagPropertiesToolStripMenuItem, textToolStripMenuItem3, headingsToolStripMenuItem, boldbToolStripMenuItem, underlineuToolStripMenuItem, italiciToolStripMenuItem,
|
||||
deleteddelToolStripMenuItem, subscriptedSubToolStripMenuItem, superscriptedsupToolStripMenuItem, tableFormatSetupToolStripMenuItem, tableHeadingthToolStripMenuItem, newHorizontalItemtdToolStripMenuItem, newRowtrToolStripMenuItem, orderedListSetupolToolStripMenuItem, unorderedListSetupulToolStripMenuItem, listItemliToolStripMenuItem, heading1h1ToolStripMenuItem,
|
||||
heading2h2ToolStripMenuItem, heading3h3ToolStripMenuItem, heading4h4ToolStripMenuItem, heading5h5ToolStripMenuItem, heading6h6ToolStripMenuItem, textToolStripMenuItem2, backgroundToolStripMenuItem, backgroundRepeatToolStripMenuItem, backgroundPositionToolStripMenuItem, backgroundImageToolStripMenuItem, backgroundColorToolStripMenuItem, backgroundAttachmentToolStripMenuItem,
|
||||
fontToolStripMenuItem, sizeToolStripMenuItem, weightToolStripMenuItem, colorToolStripMenuItem, directionToolStripMenuItem, lineHeightToolStripMenuItem, alignToolStripMenuItem, letterSpacingToolStripMenuItem, decorationToolStripMenuItem, indentToolStripMenuItem, shadowToolStripMenuItem, transformToolStripMenuItem, wordspacingToolStripMenuItem, centercenterToolStripMenuItem,
|
||||
paragraphpToolStripMenuItem};
|
||||
cseditrefl = new string[1] { "System.Windows.Forms.dll" };
|
||||
csinftc.Appearance = TabAppearance.Buttons;
|
||||
csinftc.ItemSize = new Size(0, 1);
|
||||
csinftc.Multiline = true;
|
||||
csinftc.SizeMode = TabSizeMode.Fixed;
|
||||
htmldisplay.DocumentText = htmltext.Text;
|
||||
metroToggle1_CheckedChanged(this, new EventArgs());
|
||||
languageTabControl.SelectedTab = infotab;
|
||||
csinftc.SelectedTab = csedittp;
|
||||
}
|
||||
|
||||
private void metroToggle1_CheckedChanged(object sender, EventArgs e) {
|
||||
if (nightmodeToggle.Checked) {
|
||||
Theme = MetroThemeStyle.Dark;
|
||||
Style = MetroColorStyle.Magenta;
|
||||
} else {
|
||||
Theme = MetroThemeStyle.Light;
|
||||
Style = MetroColorStyle.Blue;
|
||||
}
|
||||
foreach (MetroFramework.Interfaces.IMetroControl c in metroControls) {
|
||||
c.Style = Style;
|
||||
c.Theme = Theme;
|
||||
}
|
||||
foreach (Control c in normalControls) {
|
||||
if (Theme == MetroThemeStyle.Dark) {
|
||||
c.BackColor = Color.Black;
|
||||
c.ForeColor = Color.Black;
|
||||
} else {
|
||||
c.BackColor = Color.White;
|
||||
c.ForeColor = Color.White;
|
||||
}
|
||||
}
|
||||
foreach (ToolStripMenuItem t in menuItems) {
|
||||
if (Theme == MetroThemeStyle.Dark) {
|
||||
t.BackColor = Color.Black;
|
||||
t.ForeColor = Color.FromArgb(255, 0, 151);
|
||||
}
|
||||
else {
|
||||
t.BackColor = Color.White;
|
||||
t.ForeColor = Color.FromArgb(45, 137, 239);
|
||||
}
|
||||
}
|
||||
Refresh();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CS
|
||||
System.Reflection.MethodInfo script;
|
||||
private void metroLabel2_Click(object sender, EventArgs e) => MessageBox.Show(csediterrors.Text, "Errors");
|
||||
private void metroPanel1_Click(object sender, EventArgs e) => MessageBox.Show(csediterrors.Text, "Errors");
|
||||
private void csedit_Click(object sender, EventArgs e) => csinftc.SelectedTab = csedittp;
|
||||
private void cslive_Click(object sender, EventArgs e) => csinftc.SelectedTab = cslivetp;
|
||||
private void cseditsave_Click(object sender, EventArgs e) {
|
||||
if (csSaveFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
if (cseditref.Text == "Code") {
|
||||
cseditrefl = cseditcode.Lines;
|
||||
}
|
||||
else {
|
||||
cseditcodel = cseditcode.Lines;
|
||||
}
|
||||
BinaryFormatter bf = new BinaryFormatter();
|
||||
FileStream file = File.Create(csSaveFileDialog.FileName);
|
||||
bf.Serialize(file, new string[][] { cseditcodel, cseditrefl });
|
||||
file.Close();
|
||||
} catch (Exception e1) {
|
||||
MessageBox.Show(e1.Message, "Failed to Save");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditrun_Click(object sender, EventArgs e) {
|
||||
if (cseditrun.Text == "Run") {
|
||||
try {
|
||||
csediterrors.Text = "";
|
||||
if (cseditref.Text == "Code") {
|
||||
cseditrefl = cseditcode.Lines;
|
||||
} else {
|
||||
cseditcodel = cseditcode.Lines;
|
||||
}
|
||||
script = Compiling.CScriptToMethod(Misc.ArrayToString(cseditcodel, true), "Project", "Program", "Main", cseditrefl, new Microsoft.CSharp.CSharpCodeProvider(), new System.CodeDom.Compiler.CompilerParameters(), true, true);
|
||||
cseditrun.Text = "Stop";
|
||||
cseditexecutor.RunWorkerAsync();
|
||||
csediterrors.Text = "Ready";
|
||||
} catch (Exception e1) {
|
||||
csediterrors.Text = e1.Message;
|
||||
}
|
||||
} else {
|
||||
cseditexecutor.CancelAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditopen_Click(object sender, EventArgs e) {
|
||||
if (csOpenFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
BinaryFormatter bf = new BinaryFormatter();
|
||||
FileStream file = File.Open(csOpenFileDialog.FileName, FileMode.Open);
|
||||
string[][] tmp = (string[][])bf.Deserialize(file);
|
||||
cseditcodel = tmp[0];
|
||||
cseditrefl = tmp[1];
|
||||
file.Close();
|
||||
if (cseditref.Text == "References") {
|
||||
cseditcode.Lines = cseditcodel;
|
||||
} else {
|
||||
cseditcode.Lines = cseditrefl;
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
MessageBox.Show(e1.Message, "Failed to Load");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditref_Click(object sender, EventArgs e) {
|
||||
if (cseditref.Text == "References") {
|
||||
cseditcodel = cseditcode.Lines;
|
||||
cseditcode.Lines = cseditrefl;
|
||||
cseditref.Text = "Code";
|
||||
} else {
|
||||
cseditrefl = cseditcode.Lines;
|
||||
cseditcode.Lines = cseditcodel;
|
||||
cseditref.Text = "References";
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditexecutor_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) {
|
||||
while (cseditexecutor.CancellationPending == false) {
|
||||
System.Reflection.MethodInfo q = script;
|
||||
object o = q.Invoke(null, null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditexecutor_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) => cseditrun.Text = "Run";
|
||||
#endregion
|
||||
|
||||
#region HTML
|
||||
int sels = 0;
|
||||
int sele = 0;
|
||||
bool UpdateHTML = true;
|
||||
private void htmldisplay_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) {
|
||||
htmlLoadIndicator.Visible = false;
|
||||
htmltitle.Text = htmldisplay.DocumentTitle;
|
||||
}
|
||||
|
||||
private void metroToggle2_CheckedChanged(object sender, EventArgs e) => UpdateHTML = htmlUpdateToggle.Checked;
|
||||
private void htmldisplay_Navigating(object sender, WebBrowserNavigatingEventArgs e) => htmlLoadIndicator.Visible = true;
|
||||
private void htmltext_TextChanged(object sender, EventArgs e) {
|
||||
if (UpdateHTML) {
|
||||
htmldisplay.DocumentText = htmltext.Text;
|
||||
htmltitle.Text = htmldisplay.DocumentTitle;
|
||||
}
|
||||
}
|
||||
|
||||
private void htmlRefreshTile_Click(object sender, EventArgs e) {
|
||||
htmldisplay.DocumentText = htmltext.Text;
|
||||
htmltitle.Text = htmldisplay.DocumentTitle;
|
||||
}
|
||||
|
||||
private void htmlOptionsTile_Click(object sender, EventArgs e) => htmlOptionsMenu.Show(htmlOptionsTile.Location);
|
||||
private void htmlOptionsTile_MouseEnter(object sender, EventArgs e) {
|
||||
sels = htmltext.SelectionStart;
|
||||
sele = htmltext.SelectionLength;
|
||||
}
|
||||
|
||||
private void addToHTMLBox(string inFront, string atEnd) {
|
||||
htmltext.Text = htmltext.Text.Insert(sels + sele, atEnd);
|
||||
htmltext.Text = htmltext.Text.Insert(sels, inFront);
|
||||
}
|
||||
|
||||
private void htmlSave_Click(object sender, EventArgs e) {
|
||||
if (htmlSaveFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
File.WriteAllLines(htmlSaveFileDialog.FileName, htmltext.Lines);
|
||||
} catch (Exception e1) {
|
||||
MessageBox.Show(e1.Message, "Saving Failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void htmlLoad_Click(object sender, EventArgs e) {
|
||||
if (htmlOpenFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
htmltext.Lines = File.ReadAllLines(htmlOpenFileDialog.FileName);
|
||||
} catch (Exception e1) {
|
||||
MessageBox.Show(e1.Message, "Loading Failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
#region Menu-HTML
|
||||
private void hTMLStructureSetupToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<html>\r\n<head>\r\n<title>Title</title>\r\n</head>\r\n<body>\r\n", "\r\n</body>\r\n</html>");
|
||||
private void linkToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<a href='http://www.example.com'>", "</a>");
|
||||
private void imageToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<img scr='", "' alt='Alternative Text'");
|
||||
private void centercenterToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<center>", "</center>");
|
||||
private void heading1h1ToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<h1>", "</h1>");
|
||||
private void heading2h2ToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<h2>", "</h2>");
|
||||
private void heading3h3ToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<h3>", "</h3>");
|
||||
private void heading4h4ToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<h4>", "</h4>");
|
||||
private void heading5h5ToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<h5>", "</h5>");
|
||||
private void heading6h6ToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<h6>", "</h6>");
|
||||
private void paragraphpToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<p>", "</p>");
|
||||
private void boldbToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<b>", "</b>");
|
||||
private void underlineuToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<u>", "</u>");
|
||||
private void italiciToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<i>", "</i>");
|
||||
private void deleteddelToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<del>", "</del>");
|
||||
private void subscriptedSubToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<sub>", "</sub>");
|
||||
private void superscriptedsupToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<sup>", "</sup>");
|
||||
private void tableFormatSetupToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<table border='1'>\r\n", "\r\n</table>");
|
||||
private void tableHeadingthToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<th>", "</th>");
|
||||
private void newRowtrToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<tr>", "");
|
||||
private void newHorizontalItemtdToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<td>", "</td>");
|
||||
private void orderedListSetupolToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<ol>\r\n", "\r\n</ol>");
|
||||
private void unorderedListSetupulToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<ul>\r\n", "</ul>\r\n");
|
||||
private void listItemliToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<li>", "</li>");
|
||||
#endregion
|
||||
#region Menu-Java
|
||||
private void javaStructureSetupToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<script type = 'text/javascript'>\r\n", "\r\n</script>");
|
||||
private void functionToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("function ", "()\r\n{\r\n\r\n}");
|
||||
private void textToolStripMenuItem1_Click(object sender, EventArgs e) => addToHTMLBox("document.write('", "')");
|
||||
private void alertBoxToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("alert('", "')");
|
||||
private void timeoutToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("setTimeout('", "',TIME HERE)");
|
||||
private void randomNumberToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("Math.floor(Math.random()*MAXIMUM HERE)+MINIMUM HERE", "");
|
||||
#endregion
|
||||
#region Menu-CSS
|
||||
private void cSSStructureSetupToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<style type='text/css'>\r\n", "\r\n</style>");
|
||||
private void cSSCustomizeTagToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("", "\r\n{\r\n\r\n}");
|
||||
private void backgroundAttachmentToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("background-attachment:", ";");
|
||||
private void backgroundColorToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("background-color:", ";");
|
||||
private void backgroundImageToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("background-image:url('", "');");
|
||||
private void backgroundPositionToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("background-position:", ";");
|
||||
private void backgroundRepeatToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("background-repeat:", ";");
|
||||
private void fontToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("font-family:'", "';");
|
||||
private void sizeToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("font-size:", ";");
|
||||
private void weightToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("font-weight:", ";");
|
||||
private void colorToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("color:", ";");
|
||||
private void directionToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("direction:", ";");
|
||||
private void lineHeightToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("line-height:", ";");
|
||||
private void letterSpacingToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("letter-spacing:", ";");
|
||||
private void alignToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("text-align:", ";");
|
||||
private void decorationToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("text-decoration:", ";");
|
||||
private void indentToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("text-indent:", ";");
|
||||
private void shadowToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("text-shadow: COLOR_HERE X_IN_PX Y_IN_PX RADIUS_IN_PX;", "");
|
||||
private void transformToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("text-transform:", ";");
|
||||
private void wordspacingToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("word-spacing:", ";");
|
||||
#endregion
|
||||
#region Menu-PHP
|
||||
private void pHPStructureSetupToolStripMenuItem_Click(object sender, EventArgs e) => addToHTMLBox("<?php\r\n", "\r\n?>");
|
||||
private void textToolStripMenuItem3_Click(object sender, EventArgs e) => addToHTMLBox("echo '", "';");
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Python
|
||||
private void pythonOpen_Click(object sender, EventArgs e) {
|
||||
if (pythonOpenFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
pythonCode.Lines = File.ReadAllLines(pythonOpenFileDialog.FileName);
|
||||
} catch (Exception e1) {
|
||||
MessageBox.Show(e1.Message, "Loading Failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void pythonSave_Click(object sender, EventArgs e) {
|
||||
if (pythonSaveFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
File.WriteAllLines(pythonSaveFileDialog.FileName, pythonCode.Lines);
|
||||
}
|
||||
catch (Exception e1) {
|
||||
MessageBox.Show(e1.Message, "Saving Failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void pythonRun_Click(object sender, EventArgs e) {
|
||||
File.WriteAllLines(Path.GetTempPath() + @"Python\tmp.py",pythonCode.Lines);
|
||||
Process process = Process.Start(new ProcessStartInfo { FileName = Path.GetTempPath() + @"Python\python.exe", Arguments = Path.GetTempPath() + @"Python\tmp.py", UseShellExecute = true });
|
||||
}
|
||||
|
||||
private void metroTile1_Click(object sender, EventArgs e) {
|
||||
if (Directory.Exists(Path.GetTempPath() + "Python")) {
|
||||
Directory.Delete(Path.GetTempPath() + "Python");
|
||||
}
|
||||
try { Directory.CreateDirectory(Path.GetTempPath() + "Python"); } catch { }
|
||||
File.WriteAllBytes(Path.GetTempPath() + "Python.zip", Resources.Python);
|
||||
System.IO.Compression.ZipFile.ExtractToDirectory(Path.GetTempPath() + "Python.zip", Path.GetTempPath() + "Python");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endregion
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,636 @@
|
|||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Linq;
|
||||
using CC_Functions.Misc;
|
||||
using ICSharpCode.Decompiler;
|
||||
using ICSharpCode.Decompiler.CSharp;
|
||||
using ICSharpCode.TextEditor.Document;
|
||||
using IronPython.Hosting;
|
||||
using MetroFramework;
|
||||
using MetroFramework.Forms;
|
||||
using MetroFramework.Interfaces;
|
||||
using Microsoft.CSharp;
|
||||
using Microsoft.Scripting.Hosting;
|
||||
using MetroMessageBox = cashew.MessageBox.MetroMessageBox;
|
||||
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
namespace cashew
|
||||
{
|
||||
public partial class MainForm : MetroForm
|
||||
{
|
||||
private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
if (Directory.Exists(Path.Combine(Path.GetTempPath(), "Cashew")))
|
||||
Directory.Delete(Path.Combine(Path.GetTempPath(), "Cashew"), true);
|
||||
}
|
||||
|
||||
#region General
|
||||
|
||||
private readonly ThreadState[] _runningStates =
|
||||
{ThreadState.Background, ThreadState.Running, ThreadState.StopRequested, ThreadState.WaitSleepJoin};
|
||||
|
||||
private readonly IMetroControl[] _metroControls;
|
||||
private readonly Control[] _normalControls;
|
||||
private readonly ToolStripMenuItem[] _menuItems;
|
||||
private string[] _cseditcodel = new string[0];
|
||||
|
||||
private string[] _cseditrefl =
|
||||
{
|
||||
"Microsoft.CSharp.dll", "System.dll", "System.Core.dll", "System.Data.dll",
|
||||
"System.Data.DataSetExtensions.dll", "System.Net.Http.dll", "System.Xml.dll", "System.Xml.Linq.dll"
|
||||
};
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
using (Splash splash = new Splash())
|
||||
{
|
||||
splash.Show();
|
||||
InitializeComponent();
|
||||
_metroControls = new IMetroControl[]
|
||||
{
|
||||
nmtext, languageTabControl, cstab, infotab, nightmodeToggle, cseditopen, cseditrun, cseditsave,
|
||||
csediterrorpanel, csediterrors, cseditref, infoPanel, htmltab, htmltitle,
|
||||
htmlOptionsTile, /*htmlOptionsMenu, */htmlRefreshTile, htmlLoad, htmlSave, htmlLoadIndicator,
|
||||
htmlUpdateToggle, htmlLiveLabel, livehider, nightmodehide, pythontab,
|
||||
pythonSave, pythonRun, pythonOpen
|
||||
};
|
||||
_normalControls = new Control[] {htmlSep, htmldisplay, cseditCode, pythonCode, htmlText};
|
||||
_menuItems = new[]
|
||||
{
|
||||
hTMLToolStripMenuItem, javaScriptToolStripMenuItem, cSSToolStripMenuItem, pHPToolStripMenuItem,
|
||||
hTMLStructureSetupToolStripMenuItem, javaStructureSetupToolStripMenuItem,
|
||||
cSSStructureSetupToolStripMenuItem, pHPStructureSetupToolStripMenuItem, linkToolStripMenuItem,
|
||||
imageToolStripMenuItem, textToolStripMenuItem, tableToolStripMenuItem,
|
||||
listsToolStripMenuItem, functionToolStripMenuItem, textToolStripMenuItem1,
|
||||
alertBoxToolStripMenuItem, timeoutToolStripMenuItem, randomNumberToolStripMenuItem,
|
||||
cSSCustomizeTagToolStripMenuItem, cSSCustomTagPropertiesToolStripMenuItem, textToolStripMenuItem3,
|
||||
headingsToolStripMenuItem, boldbToolStripMenuItem, underlineuToolStripMenuItem,
|
||||
italiciToolStripMenuItem,
|
||||
deleteddelToolStripMenuItem, subscriptedSubToolStripMenuItem, superscriptedsupToolStripMenuItem,
|
||||
tableFormatSetupToolStripMenuItem, tableHeadingthToolStripMenuItem,
|
||||
newHorizontalItemtdToolStripMenuItem, newRowtrToolStripMenuItem,
|
||||
orderedListSetupolToolStripMenuItem, unorderedListSetupulToolStripMenuItem,
|
||||
listItemliToolStripMenuItem, heading1h1ToolStripMenuItem,
|
||||
heading2h2ToolStripMenuItem, heading3h3ToolStripMenuItem, heading4h4ToolStripMenuItem,
|
||||
heading5h5ToolStripMenuItem, heading6h6ToolStripMenuItem, textToolStripMenuItem2,
|
||||
backgroundToolStripMenuItem, backgroundRepeatToolStripMenuItem, backgroundPositionToolStripMenuItem,
|
||||
backgroundImageToolStripMenuItem, backgroundColorToolStripMenuItem,
|
||||
backgroundAttachmentToolStripMenuItem,
|
||||
fontToolStripMenuItem, sizeToolStripMenuItem, weightToolStripMenuItem, colorToolStripMenuItem,
|
||||
directionToolStripMenuItem, lineHeightToolStripMenuItem, alignToolStripMenuItem,
|
||||
letterSpacingToolStripMenuItem, decorationToolStripMenuItem, indentToolStripMenuItem,
|
||||
shadowToolStripMenuItem, transformToolStripMenuItem, wordspacingToolStripMenuItem,
|
||||
centercenterToolStripMenuItem,
|
||||
paragraphpToolStripMenuItem
|
||||
};
|
||||
htmldisplay.DocumentText = htmlText.Text;
|
||||
metroToggle1_CheckedChanged(this, new EventArgs());
|
||||
languageTabControl.SelectedTab = infotab;
|
||||
splash.Hide();
|
||||
}
|
||||
|
||||
cseditCode.SetHighlighting("C#");
|
||||
pythonCode.SetHighlighting("Python");
|
||||
htmlText.SetHighlighting("HTML");
|
||||
if (Directory.Exists(Path.Combine(Path.GetTempPath(), "Cashew")))
|
||||
Directory.Delete(Path.Combine(Path.GetTempPath(), "Cashew"), true);
|
||||
using (MemoryStream ms = new MemoryStream(Resources.IronPythonBCL))
|
||||
using (ZipArchive ar = new ZipArchive(ms))
|
||||
ar.ExtractToDirectory(Path.Combine(Path.GetTempPath(), "Cashew\\Python"));
|
||||
|
||||
infoPanel.Text = infoPanel.Text.Replace("[PACKAGELIST]", string.Join("\r\n",
|
||||
XDocument.Parse(Resources.packages).Element("Project").Elements("ItemGroup")
|
||||
.SelectMany(s => s.Elements("PackageReference"))
|
||||
.Select(s => $"- {s.Attribute("Include").Value} {s.Attribute("Version").Value}").OrderBy(s => s)));
|
||||
}
|
||||
|
||||
private void MAIN_Load(object sender, EventArgs e) => BringToFront();
|
||||
|
||||
private void metroToggle1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (nightmodeToggle.Checked)
|
||||
{
|
||||
Theme = MetroThemeStyle.Dark;
|
||||
Style = MetroColorStyle.Magenta;
|
||||
}
|
||||
else
|
||||
{
|
||||
Theme = MetroThemeStyle.Light;
|
||||
Style = MetroColorStyle.Blue;
|
||||
}
|
||||
|
||||
foreach (IMetroControl c in _metroControls)
|
||||
{
|
||||
c.Style = Style;
|
||||
c.Theme = Theme;
|
||||
}
|
||||
|
||||
foreach (Control c in _normalControls)
|
||||
{
|
||||
if (Theme == MetroThemeStyle.Dark)
|
||||
{
|
||||
c.BackColor = Color.Black;
|
||||
c.ForeColor = Color.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
c.BackColor = Color.White;
|
||||
c.ForeColor = Color.White;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ToolStripMenuItem t in _menuItems)
|
||||
{
|
||||
if (Theme == MetroThemeStyle.Dark)
|
||||
{
|
||||
t.BackColor = Color.Black;
|
||||
t.ForeColor = Color.FromArgb(255, 0, 151);
|
||||
}
|
||||
else
|
||||
{
|
||||
t.BackColor = Color.White;
|
||||
t.ForeColor = Color.FromArgb(45, 137, 239);
|
||||
}
|
||||
}
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
private void buttonFix_Tick(object sender, EventArgs e)
|
||||
{
|
||||
pythonRun.Text = _pythonScript != null && _runningStates.Contains(_pythonScript.ThreadState)
|
||||
? "Stop"
|
||||
: "Run";
|
||||
cseditrun.Text = _csScript != null && _runningStates.Contains(_csScript.ThreadState) ? "Stop" : "Run";
|
||||
htmlOptionsTile.Enabled = htmlText.ActiveTextAreaControl.TextArea.SelectionManager.HasSomethingSelected;
|
||||
}
|
||||
|
||||
#endregion General
|
||||
|
||||
#region CS
|
||||
|
||||
private Thread _csScript;
|
||||
|
||||
private void metroLabel2_Click(object sender, EventArgs e) => MetroMessageBox.Show(this, csediterrors.Text,
|
||||
"Errors", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
private void metroPanel1_Click(object sender, EventArgs e) => MetroMessageBox.Show(this, csediterrors.Text,
|
||||
"Errors", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
private void cseditsave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (csSaveFileDialog.ShowDialog() != DialogResult.OK) return;
|
||||
try
|
||||
{
|
||||
if (csSaveFileDialog.FilterIndex == 1)
|
||||
{
|
||||
if (cseditref.Text == "Code")
|
||||
_cseditrefl = cseditCode.Text.Split(new[] {"\r\n"}, StringSplitOptions.None);
|
||||
else
|
||||
_cseditcodel = cseditCode.Text.Split(new[] {"\r\n"}, StringSplitOptions.None);
|
||||
Stream s = File.OpenWrite(csSaveFileDialog.FileName);
|
||||
new BinaryFormatter().Serialize(s, new[] {_cseditcodel, _cseditrefl});
|
||||
s.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
CompileCs(false, csSaveFileDialog.FilterIndex == 2, csSaveFileDialog.FileName);
|
||||
//File.Copy(compileCS(false, csSaveFileDialog.FilterIndex == 2).PathToAssembly, csSaveFileDialog.FileName, true);
|
||||
}
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
MetroMessageBox.Show(this, e1.Message, "Failed to Save", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditrun_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_csScript != null && _runningStates.Contains(_csScript.ThreadState))
|
||||
_csScript.Abort();
|
||||
else
|
||||
try
|
||||
{
|
||||
CompilerResults results = CompileCs();
|
||||
cseditrun.Text = "Stop";
|
||||
_csScript = new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
_ = results.CompiledAssembly.EntryPoint.Invoke(null, null);
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
_ = results.CompiledAssembly.EntryPoint.Invoke(null, new object[] {new string[0]});
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
if (!e1.TryCast(out ThreadAbortException ex))
|
||||
Invoke((MethodInvoker) delegate
|
||||
{
|
||||
MetroMessageBox.Show(this, e1.Message, "Execution Failed",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
_csScript.Start();
|
||||
csediterrors.Text = "Ready";
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
csediterrors.Text = e1.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private CompilerResults CompileCs(bool memory = true, bool library = false, string of = "")
|
||||
{
|
||||
csediterrors.Text = "";
|
||||
if (cseditref.Text == "Code")
|
||||
_cseditrefl = cseditCode.Text.Split(new[] {"\r\n"}, StringSplitOptions.None);
|
||||
else
|
||||
_cseditcodel = cseditCode.Text.Split(new[] {"\r\n"}, StringSplitOptions.None);
|
||||
|
||||
CompilerParameters parameters = new CompilerParameters
|
||||
{
|
||||
GenerateInMemory = memory,
|
||||
GenerateExecutable = !library
|
||||
};
|
||||
parameters.OutputAssembly = memory ? parameters.OutputAssembly : of;
|
||||
parameters.ReferencedAssemblies.AddRange(_cseditrefl);
|
||||
CompilerResults results;
|
||||
using (CSharpCodeProvider provider = new CSharpCodeProvider())
|
||||
{
|
||||
results = provider.CompileAssemblyFromSource(parameters, string.Join("\r\n", _cseditcodel));
|
||||
if (!results.Errors.HasErrors) return results;
|
||||
IEnumerable<CompilerError> err = results.Errors.OfType<CompilerError>();
|
||||
/*err.ToList().ForEach(s =>
|
||||
{
|
||||
TextMarker marker = new TextMarker(0, 5, TextMarkerType.WaveLine, Color.Red);
|
||||
cseditCode.Document.MarkerStrategy.AddMarker(marker);
|
||||
});
|
||||
cseditCode.Update();*/
|
||||
throw new InvalidOperationException(string.Join("\r\n\r\n",
|
||||
err.Select(s => "Error in line " + s.Line + ": " + s.ErrorNumber + " - " + s.ErrorText).ToArray()));
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
private void cseditopen_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (csOpenFileDialog.ShowDialog() != DialogResult.OK) return;
|
||||
try
|
||||
{
|
||||
if (csOpenFileDialog.FilterIndex == 1)
|
||||
{
|
||||
Stream s = File.OpenRead(csOpenFileDialog.FileName);
|
||||
string[][] tmp = (string[][]) new BinaryFormatter().Deserialize(s);
|
||||
s.Dispose();
|
||||
_cseditcodel = tmp[0];
|
||||
_cseditrefl = tmp[1];
|
||||
cseditCode.Text = string.Join("\r\n", cseditref.Text == "References" ? _cseditcodel : _cseditrefl);
|
||||
}
|
||||
else
|
||||
{
|
||||
CSharpDecompiler decompiler =
|
||||
new CSharpDecompiler(csOpenFileDialog.FileName, new DecompilerSettings());
|
||||
_cseditcodel = decompiler.DecompileWholeModuleAsString()
|
||||
.Split(new[] {"\r\n"}, StringSplitOptions.None);
|
||||
_cseditrefl = Assembly.LoadFrom(csOpenFileDialog.FileName).GetReferencedAssemblies()
|
||||
.Where(s => !new[] {"mscorlib"}.Contains(s.Name))
|
||||
.Select(s => string.IsNullOrWhiteSpace(s.CodeBase) ? s.Name + ".dll" : s.CodeBase).ToArray();
|
||||
cseditCode.Text = string.Join("\r\n", cseditref.Text == "References" ? _cseditcodel : _cseditrefl);
|
||||
}
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
Console.WriteLine(e1.ToString());
|
||||
MetroMessageBox.Show(this, e1.ToString(), "Failed to Load", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditref_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (cseditref.Text == "References")
|
||||
{
|
||||
_cseditcodel = cseditCode.Text.Split(new[] {"\r\n"}, StringSplitOptions.None);
|
||||
cseditCode.Text = string.Join("\r\n", _cseditrefl);
|
||||
cseditCode.Refresh();
|
||||
cseditref.Text = "Code";
|
||||
}
|
||||
else
|
||||
{
|
||||
_cseditrefl = cseditCode.Text.Split(new[] {"\r\n"}, StringSplitOptions.None);
|
||||
cseditCode.Text = string.Join("\r\n", _cseditcodel);
|
||||
cseditCode.Refresh();
|
||||
cseditref.Text = "References";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion CS
|
||||
|
||||
#region HTML
|
||||
|
||||
private Point _sels = Point.Empty;
|
||||
private Point _sele = Point.Empty;
|
||||
private bool _htmlHasSelection;
|
||||
private bool _updateHtml = true;
|
||||
|
||||
private void htmldisplay_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
|
||||
{
|
||||
htmlLoadIndicator.Visible = false;
|
||||
htmltitle.Text = htmldisplay.DocumentTitle;
|
||||
}
|
||||
|
||||
private void metroToggle2_CheckedChanged(object sender, EventArgs e) => _updateHtml = htmlUpdateToggle.Checked;
|
||||
|
||||
private void htmldisplay_Navigating(object sender, WebBrowserNavigatingEventArgs e) =>
|
||||
htmlLoadIndicator.Visible = true;
|
||||
|
||||
private void HtmlText_TextChanged_1(object sender, EventArgs e)
|
||||
{
|
||||
if (!_updateHtml) return;
|
||||
htmldisplay.DocumentText = htmlText.Text;
|
||||
htmltitle.Text = htmldisplay.DocumentTitle;
|
||||
}
|
||||
|
||||
private void htmlRefreshTile_Click(object sender, EventArgs e)
|
||||
{
|
||||
htmldisplay.DocumentText = htmlText.Text;
|
||||
htmltitle.Text = htmldisplay.DocumentTitle;
|
||||
}
|
||||
|
||||
private void htmlOptionsTile_Click(object sender, EventArgs e) =>
|
||||
htmlOptionsMenu.Show(htmlOptionsTile.Location);
|
||||
|
||||
private void htmlOptionsTile_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
_htmlHasSelection = htmlText.ActiveTextAreaControl.TextArea.SelectionManager.HasSomethingSelected;
|
||||
if (!_htmlHasSelection) return;
|
||||
ISelection sel = htmlText.ActiveTextAreaControl.SelectionManager.SelectionCollection[0];
|
||||
_sels.Y = sel.StartPosition.Line;
|
||||
_sels.X = sel.StartPosition.Column;
|
||||
_sele.Y = sel.EndPosition.Line;
|
||||
_sele.X = sel.EndPosition.Column;
|
||||
}
|
||||
|
||||
private void AddToHtmlBox(string inFront, string atEnd)
|
||||
{
|
||||
if (!_htmlHasSelection) return;
|
||||
List<string> temp = htmlText.Text.Split(new[] {"\r\n"}, StringSplitOptions.None).ToList();
|
||||
temp[_sele.Y] = temp[_sele.Y].Insert(_sele.X, atEnd);
|
||||
temp[_sels.Y] = temp[_sels.Y].Insert(_sels.X, inFront);
|
||||
htmlText.Text = string.Join("\r\n", temp.ToArray());
|
||||
}
|
||||
|
||||
private void htmlSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (htmlSaveFileDialog.ShowDialog() != DialogResult.OK) return;
|
||||
try
|
||||
{
|
||||
File.WriteAllText(htmlSaveFileDialog.FileName, htmlText.Text);
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
MetroMessageBox.Show(this, e1.Message, "Saving Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void htmlLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (htmlOpenFileDialog.ShowDialog() != DialogResult.OK) return;
|
||||
try
|
||||
{
|
||||
htmlText.Text = File.ReadAllText(htmlOpenFileDialog.FileName);
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
MetroMessageBox.Show(this, e1.Message, "Loading Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
#region Menu-HTML
|
||||
|
||||
private void hTMLStructureSetupToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<html>\r\n<head>\r\n<title>Title</title>\r\n</head>\r\n<body>\r\n", "\r\n</body>\r\n</html>");
|
||||
|
||||
private void linkToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<a href='http://www.example.com'>", "</a>");
|
||||
|
||||
private void imageToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<img scr='", "' alt='Alternative Text'");
|
||||
|
||||
private void centercenterToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<center>", "</center>");
|
||||
|
||||
private void heading1h1ToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<h1>", "</h1>");
|
||||
|
||||
private void heading2h2ToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<h2>", "</h2>");
|
||||
|
||||
private void heading3h3ToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<h3>", "</h3>");
|
||||
|
||||
private void heading4h4ToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<h4>", "</h4>");
|
||||
|
||||
private void heading5h5ToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<h5>", "</h5>");
|
||||
|
||||
private void heading6h6ToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<h6>", "</h6>");
|
||||
|
||||
private void paragraphpToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<p>", "</p>");
|
||||
|
||||
private void boldbToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<b>", "</b>");
|
||||
|
||||
private void underlineuToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<u>", "</u>");
|
||||
|
||||
private void italiciToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<i>", "</i>");
|
||||
|
||||
private void deleteddelToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<del>", "</del>");
|
||||
|
||||
private void subscriptedSubToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<sub>", "</sub>");
|
||||
|
||||
private void superscriptedsupToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<sup>", "</sup>");
|
||||
|
||||
private void tableFormatSetupToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<table border='1'>\r\n", "\r\n</table>");
|
||||
|
||||
private void tableHeadingthToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<th>", "</th>");
|
||||
|
||||
private void newRowtrToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<tr>", "");
|
||||
|
||||
private void newHorizontalItemtdToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<td>", "</td>");
|
||||
|
||||
private void orderedListSetupolToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<ol>\r\n", "\r\n</ol>");
|
||||
|
||||
private void unorderedListSetupulToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<ul>\r\n", "</ul>\r\n");
|
||||
|
||||
private void listItemliToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("<li>", "</li>");
|
||||
|
||||
#endregion Menu-HTML
|
||||
|
||||
#region Menu-Java
|
||||
|
||||
private void javaStructureSetupToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<script type = 'text/javascript'>\r\n", "\r\n</script>");
|
||||
|
||||
private void functionToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("function ", "()\r\n{\r\n\r\n}");
|
||||
|
||||
private void textToolStripMenuItem1_Click(object sender, EventArgs e) => AddToHtmlBox("document.write('", "')");
|
||||
|
||||
private void alertBoxToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("alert('", "')");
|
||||
|
||||
private void timeoutToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("setTimeout('", "',TIME HERE)");
|
||||
|
||||
private void randomNumberToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("Math.floor(Math.random()*MAXIMUM HERE)+MINIMUM HERE", "");
|
||||
|
||||
#endregion Menu-Java
|
||||
|
||||
#region Menu-CSS
|
||||
|
||||
private void cSSStructureSetupToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<style type='text/css'>\r\n", "\r\n</style>");
|
||||
|
||||
private void cSSCustomizeTagToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("", "\r\n{\r\n\r\n}");
|
||||
|
||||
private void backgroundAttachmentToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("background-attachment:", ";");
|
||||
|
||||
private void backgroundColorToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("background-color:", ";");
|
||||
|
||||
private void backgroundImageToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("background-image:url('", "');");
|
||||
|
||||
private void backgroundPositionToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("background-position:", ";");
|
||||
|
||||
private void backgroundRepeatToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("background-repeat:", ";");
|
||||
|
||||
private void fontToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("font-family:'", "';");
|
||||
|
||||
private void sizeToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("font-size:", ";");
|
||||
|
||||
private void weightToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("font-weight:", ";");
|
||||
|
||||
private void colorToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("color:", ";");
|
||||
|
||||
private void directionToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("direction:", ";");
|
||||
|
||||
private void lineHeightToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("line-height:", ";");
|
||||
|
||||
private void letterSpacingToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("letter-spacing:", ";");
|
||||
|
||||
private void alignToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("text-align:", ";");
|
||||
|
||||
private void decorationToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("text-decoration:", ";");
|
||||
|
||||
private void indentToolStripMenuItem_Click(object sender, EventArgs e) => AddToHtmlBox("text-indent:", ";");
|
||||
|
||||
private void shadowToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("text-shadow: COLOR_HERE X_IN_PX Y_IN_PX RADIUS_IN_PX;", "");
|
||||
|
||||
private void transformToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("text-transform:", ";");
|
||||
|
||||
private void wordspacingToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("word-spacing:", ";");
|
||||
|
||||
#endregion Menu-CSS
|
||||
|
||||
#region Menu-PHP
|
||||
|
||||
private void pHPStructureSetupToolStripMenuItem_Click(object sender, EventArgs e) =>
|
||||
AddToHtmlBox("<?php\r\n", "\r\n?>");
|
||||
|
||||
private void textToolStripMenuItem3_Click(object sender, EventArgs e) => AddToHtmlBox("echo '", "';");
|
||||
|
||||
#endregion Menu-PHP
|
||||
|
||||
#endregion HTML
|
||||
|
||||
#region Python
|
||||
|
||||
private Thread _pythonScript;
|
||||
|
||||
private void pythonOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (pythonOpenFileDialog.ShowDialog() != DialogResult.OK) return;
|
||||
try
|
||||
{
|
||||
pythonCode.Text = File.ReadAllText(pythonOpenFileDialog.FileName);
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
MetroMessageBox.Show(this, e1.Message, "Loading Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void pythonSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (pythonSaveFileDialog.ShowDialog() != DialogResult.OK) return;
|
||||
try
|
||||
{
|
||||
File.WriteAllText(pythonSaveFileDialog.FileName, pythonCode.Text);
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
MetroMessageBox.Show(this, e1.Message, "Saving Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void pythonRun_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_pythonScript != null && _runningStates.Contains(_pythonScript.ThreadState))
|
||||
{
|
||||
_pythonScript.Abort();
|
||||
}
|
||||
else
|
||||
{
|
||||
_pythonScript = new Thread(() =>
|
||||
{
|
||||
ScriptEngine engine = Python.CreateEngine();
|
||||
engine.SetSearchPaths(new[] {Path.Combine(Path.GetTempPath(), "Cashew\\Python")});
|
||||
try
|
||||
{
|
||||
engine.Execute(pythonCode.Text);
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
if (!e1.TryCast(out ThreadAbortException _))
|
||||
Invoke((MethodInvoker) delegate
|
||||
{
|
||||
MetroMessageBox.Show(this, e1.Message, "Execution Failed", MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
});
|
||||
}
|
||||
});
|
||||
_pythonScript.Start();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Python
|
||||
}
|
||||
}
|
|
@ -117,27 +117,29 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="cseditcode.Text" xml:space="preserve">
|
||||
<data name="cseditCode.Text" xml:space="preserve">
|
||||
<value>using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Project
|
||||
namespace Program
|
||||
{
|
||||
public class Program
|
||||
class Program
|
||||
{
|
||||
public static void Main()
|
||||
static void Main(string[] args)
|
||||
{
|
||||
MessageBox.Show("Hello, world!");
|
||||
Console.WriteLine("Hello, world");
|
||||
}
|
||||
}
|
||||
}</value>
|
||||
</data>
|
||||
<data name="infoPanel.Text" xml:space="preserve">
|
||||
<value>This Program uses MetroModernUI by Dennis Magno and Costura.Fody by Simon Cropp.
|
||||
Functionality:
|
||||
- Select a category (Top bar) and use the provided functions to write programs.
|
||||
|
||||
IF YOU WANT A PROFESSIONAL PROGRAM, DON'T USE THIS!</value>
|
||||
<value>NOTE: DO NOT CLOSE THE CONSOLE! DOING SO WILL CRASH CASHEW
|
||||
NOTE: The output of programs written in Cashew will be printed to the native console, no new window will open up.
|
||||
This Program uses:
|
||||
[PACKAGELIST]</value>
|
||||
</data>
|
||||
<metadata name="csSaveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
|
@ -145,23 +147,23 @@ IF YOU WANT A PROFESSIONAL PROGRAM, DON'T USE THIS!</value>
|
|||
<metadata name="csOpenFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>153, 17</value>
|
||||
</metadata>
|
||||
<metadata name="cseditexecutor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>293, 17</value>
|
||||
</metadata>
|
||||
<metadata name="htmlOptionsMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>423, 17</value>
|
||||
<value>299, 17</value>
|
||||
</metadata>
|
||||
<metadata name="htmlSaveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>574, 17</value>
|
||||
<value>450, 17</value>
|
||||
</metadata>
|
||||
<metadata name="htmlOpenFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>730, 17</value>
|
||||
<value>606, 17</value>
|
||||
</metadata>
|
||||
<metadata name="pythonOpenFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>890, 17</value>
|
||||
<value>766, 17</value>
|
||||
</metadata>
|
||||
<metadata name="pythonSaveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1064, 17</value>
|
||||
<value>940, 17</value>
|
||||
</metadata>
|
||||
<metadata name="buttonFix.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1109, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
@ -0,0 +1,134 @@
|
|||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework.Components;
|
||||
using MetroFramework.Drawing;
|
||||
using MetroFramework.Interfaces;
|
||||
|
||||
namespace MetroFramework.Controls
|
||||
{
|
||||
public class MetroContextMenu : ContextMenuStrip, IMetroControl
|
||||
{
|
||||
private MetroColorStyle metroStyle;
|
||||
private MetroStyleManager metroStyleManager;
|
||||
private MetroThemeStyle metroTheme;
|
||||
|
||||
public MetroContextMenu(IContainer Container)
|
||||
{
|
||||
Container?.Add(this);
|
||||
}
|
||||
|
||||
[DefaultValue(false)]
|
||||
[Category("Metro Appearance")]
|
||||
public bool UseCustomBackColor { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
[Category("Metro Appearance")]
|
||||
public bool UseCustomForeColor { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
[Category("Metro Appearance")]
|
||||
public bool UseStyleColors { get; set; }
|
||||
|
||||
[Category("Metro Behaviour")]
|
||||
[Browsable(false)]
|
||||
[DefaultValue(false)]
|
||||
public bool UseSelectable
|
||||
{
|
||||
get => GetStyle(ControlStyles.Selectable);
|
||||
set => SetStyle(ControlStyles.Selectable, value);
|
||||
}
|
||||
|
||||
[Category("Metro Appearance")]
|
||||
[DefaultValue(MetroColorStyle.Blue)]
|
||||
public MetroColorStyle Style
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DesignMode || metroStyle != MetroColorStyle.Blue)
|
||||
return metroStyle;
|
||||
if (StyleManager != null && metroStyle == MetroColorStyle.Blue)
|
||||
return StyleManager.Style;
|
||||
return StyleManager == null && metroStyle == MetroColorStyle.Blue ? MetroColorStyle.Blue : metroStyle;
|
||||
}
|
||||
set => metroStyle = value;
|
||||
}
|
||||
|
||||
[Category("Metro Appearance")]
|
||||
[DefaultValue(MetroThemeStyle.Light)]
|
||||
public MetroThemeStyle Theme
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DesignMode || metroTheme != MetroThemeStyle.Light)
|
||||
return metroTheme;
|
||||
if (StyleManager != null && metroTheme == MetroThemeStyle.Light)
|
||||
return StyleManager.Theme;
|
||||
return StyleManager == null && metroTheme == MetroThemeStyle.Light ? MetroThemeStyle.Light : metroTheme;
|
||||
}
|
||||
set => metroTheme = value;
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
[Browsable(false)]
|
||||
public MetroStyleManager StyleManager
|
||||
{
|
||||
get => metroStyleManager;
|
||||
set
|
||||
{
|
||||
metroStyleManager = value;
|
||||
settheme();
|
||||
}
|
||||
}
|
||||
|
||||
private void settheme()
|
||||
{
|
||||
BackColor = MetroPaint.BackColor.Form(Theme);
|
||||
ForeColor = MetroPaint.ForeColor.Button.Normal(Theme);
|
||||
Renderer = new MetroCTXRenderer(Theme, Style);
|
||||
}
|
||||
|
||||
private class MetroCTXRenderer : ToolStripProfessionalRenderer
|
||||
{
|
||||
private readonly MetroThemeStyle _theme;
|
||||
|
||||
public MetroCTXRenderer(MetroThemeStyle Theme, MetroColorStyle Style)
|
||||
: base(new contextcolors(Theme, Style)) =>
|
||||
_theme = Theme;
|
||||
|
||||
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
|
||||
{
|
||||
e.TextColor = MetroPaint.ForeColor.Button.Normal(_theme);
|
||||
base.OnRenderItemText(e);
|
||||
}
|
||||
}
|
||||
|
||||
private class contextcolors : ProfessionalColorTable
|
||||
{
|
||||
private readonly MetroColorStyle _style = MetroColorStyle.Blue;
|
||||
private readonly MetroThemeStyle _theme = MetroThemeStyle.Light;
|
||||
|
||||
public contextcolors(MetroThemeStyle Theme, MetroColorStyle Style)
|
||||
{
|
||||
_theme = Theme;
|
||||
_style = Style;
|
||||
}
|
||||
|
||||
public override Color MenuItemSelected => MetroPaint.GetStyleColor(_style);
|
||||
|
||||
public override Color MenuBorder => MetroPaint.BackColor.Form(_theme);
|
||||
|
||||
public override Color ToolStripBorder => MetroPaint.GetStyleColor(_style);
|
||||
|
||||
public override Color MenuItemBorder => MetroPaint.GetStyleColor(_style);
|
||||
|
||||
public override Color ToolStripDropDownBackground => MetroPaint.BackColor.Form(_theme);
|
||||
|
||||
public override Color ImageMarginGradientBegin => MetroPaint.BackColor.Form(_theme);
|
||||
|
||||
public override Color ImageMarginGradientMiddle => MetroPaint.BackColor.Form(_theme);
|
||||
|
||||
public override Color ImageMarginGradientEnd => MetroPaint.BackColor.Form(_theme);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Media;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace cashew.MessageBox
|
||||
{
|
||||
public static class MetroMessageBox
|
||||
{
|
||||
public static DialogResult Show(IWin32Window owner, string message) =>
|
||||
Show(owner, message, "Notification", 211);
|
||||
|
||||
public static DialogResult Show(IWin32Window owner, string message, int height) =>
|
||||
Show(owner, message, "Notification", height);
|
||||
|
||||
public static DialogResult Show(IWin32Window owner, string message, string title) =>
|
||||
Show(owner, message, title, MessageBoxButtons.OK, 211);
|
||||
|
||||
public static DialogResult Show(
|
||||
IWin32Window owner,
|
||||
string message,
|
||||
string title,
|
||||
int height) =>
|
||||
Show(owner, message, title, MessageBoxButtons.OK, height);
|
||||
|
||||
public static DialogResult Show(
|
||||
IWin32Window owner,
|
||||
string message,
|
||||
string title,
|
||||
MessageBoxButtons buttons) =>
|
||||
Show(owner, message, title, buttons, MessageBoxIcon.None, 211);
|
||||
|
||||
public static DialogResult Show(
|
||||
IWin32Window owner,
|
||||
string message,
|
||||
string title,
|
||||
MessageBoxButtons buttons,
|
||||
int height) =>
|
||||
Show(owner, message, title, buttons, MessageBoxIcon.None, height);
|
||||
|
||||
public static DialogResult Show(
|
||||
IWin32Window owner,
|
||||
string message,
|
||||
string title,
|
||||
MessageBoxButtons buttons,
|
||||
MessageBoxIcon icon) =>
|
||||
Show(owner, message, title, buttons, icon, MessageBoxDefaultButton.Button1, 211);
|
||||
|
||||
public static DialogResult Show(
|
||||
IWin32Window owner,
|
||||
string message,
|
||||
string title,
|
||||
MessageBoxButtons buttons,
|
||||
MessageBoxIcon icon,
|
||||
int height) =>
|
||||
Show(owner, message, title, buttons, icon, MessageBoxDefaultButton.Button1, height);
|
||||
|
||||
public static DialogResult Show(
|
||||
IWin32Window owner,
|
||||
string message,
|
||||
string title,
|
||||
MessageBoxButtons buttons,
|
||||
MessageBoxIcon icon,
|
||||
MessageBoxDefaultButton defaultbutton) =>
|
||||
Show(owner, message, title, buttons, icon, defaultbutton, 211);
|
||||
|
||||
public static DialogResult Show(
|
||||
IWin32Window owner,
|
||||
string message,
|
||||
string title,
|
||||
MessageBoxButtons buttons,
|
||||
MessageBoxIcon icon,
|
||||
MessageBoxDefaultButton defaultbutton,
|
||||
int height)
|
||||
{
|
||||
DialogResult dialogResult = DialogResult.None;
|
||||
if (owner != null)
|
||||
{
|
||||
Form form = !(owner is Form) ? ((ContainerControl) owner).ParentForm : (Form) owner;
|
||||
switch (icon)
|
||||
{
|
||||
case MessageBoxIcon.Hand:
|
||||
SystemSounds.Hand.Play();
|
||||
break;
|
||||
case MessageBoxIcon.Question:
|
||||
SystemSounds.Beep.Play();
|
||||
break;
|
||||
case MessageBoxIcon.Exclamation:
|
||||
SystemSounds.Exclamation.Play();
|
||||
break;
|
||||
default:
|
||||
SystemSounds.Asterisk.Play();
|
||||
break;
|
||||
}
|
||||
|
||||
MetroMessageBoxControl messageBoxControl = new MetroMessageBoxControl();
|
||||
messageBoxControl.BackColor = form.BackColor;
|
||||
messageBoxControl.Properties.Buttons = buttons;
|
||||
messageBoxControl.Properties.DefaultButton = defaultbutton;
|
||||
messageBoxControl.Properties.Icon = icon;
|
||||
messageBoxControl.Properties.Message = message;
|
||||
messageBoxControl.Properties.Title = title;
|
||||
messageBoxControl.Padding = new Padding(0, 0, 0, 0);
|
||||
messageBoxControl.ControlBox = false;
|
||||
messageBoxControl.ShowInTaskbar = false;
|
||||
messageBoxControl.TopMost = true;
|
||||
messageBoxControl.Size = new Size(form.Size.Width, height);
|
||||
messageBoxControl.Location = new Point(form.Location.X,
|
||||
form.Location.Y + (form.Height - messageBoxControl.Height) / 2);
|
||||
messageBoxControl.ArrangeApperance();
|
||||
Convert.ToInt32(Math.Floor(messageBoxControl.Size.Height * 0.28));
|
||||
int num = (int) messageBoxControl.ShowDialog();
|
||||
messageBoxControl.BringToFront();
|
||||
messageBoxControl.SetDefaultButton();
|
||||
Action<MetroMessageBoxControl> action = ModalState;
|
||||
IAsyncResult asyncResult = action.BeginInvoke(messageBoxControl, null, action);
|
||||
bool flag = false;
|
||||
try
|
||||
{
|
||||
while (!asyncResult.IsCompleted)
|
||||
{
|
||||
Thread.Sleep(1);
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
flag = true;
|
||||
if (!asyncResult.IsCompleted)
|
||||
try
|
||||
{
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
dialogResult = messageBoxControl.Result;
|
||||
messageBoxControl.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
return dialogResult;
|
||||
}
|
||||
|
||||
private static void ModalState(MetroMessageBoxControl control)
|
||||
{
|
||||
do
|
||||
;
|
||||
while (control.Visible);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,340 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework.Controls;
|
||||
|
||||
namespace cashew.MessageBox
|
||||
{
|
||||
public class MetroMessageBoxControl : Form
|
||||
{
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private readonly Color _defaultColor = Color.FromArgb(57, 179, 215);
|
||||
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private readonly Color _errorColor = Color.FromArgb(210, 50, 45);
|
||||
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private readonly Color _question = Color.FromArgb(71, 164, 71);
|
||||
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private readonly Color _warningColor = Color.FromArgb(237, 156, 40);
|
||||
|
||||
private Label _messageLabel;
|
||||
private MetroButton _metroButton1;
|
||||
private MetroButton _metroButton2;
|
||||
private MetroButton _metroButton3;
|
||||
private Panel _pnlBottom;
|
||||
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private Color _success = Color.FromArgb(71, 164, 71);
|
||||
|
||||
private Label _titleLabel;
|
||||
private TableLayoutPanel _tlpBody;
|
||||
|
||||
private IContainer components;
|
||||
|
||||
public MetroMessageBoxControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
Properties = new MetroMessageBoxProperties(this);
|
||||
StylizeButton(_metroButton1);
|
||||
StylizeButton(_metroButton2);
|
||||
StylizeButton(_metroButton3);
|
||||
_metroButton1.Click += button_Click;
|
||||
_metroButton2.Click += button_Click;
|
||||
_metroButton3.Click += button_Click;
|
||||
}
|
||||
|
||||
public Panel Body { get; private set; }
|
||||
|
||||
public MetroMessageBoxProperties Properties { get; }
|
||||
|
||||
public DialogResult Result { get; private set; }
|
||||
|
||||
public void ArrangeApperance()
|
||||
{
|
||||
_titleLabel.Text = Properties.Title;
|
||||
_messageLabel.Text = Properties.Message;
|
||||
switch (Properties.Icon)
|
||||
{
|
||||
case MessageBoxIcon.Hand:
|
||||
Body.BackColor = _errorColor;
|
||||
break;
|
||||
case MessageBoxIcon.Exclamation:
|
||||
Body.BackColor = _warningColor;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Properties.Buttons)
|
||||
{
|
||||
case MessageBoxButtons.OK:
|
||||
EnableButton(_metroButton1);
|
||||
_metroButton1.Text = "Ok";
|
||||
_metroButton1.Location = _metroButton3.Location;
|
||||
_metroButton1.Tag = DialogResult.OK;
|
||||
EnableButton(_metroButton2, false);
|
||||
EnableButton(_metroButton3, false);
|
||||
break;
|
||||
case MessageBoxButtons.OKCancel:
|
||||
EnableButton(_metroButton1);
|
||||
_metroButton1.Text = "Ok";
|
||||
_metroButton1.Location = _metroButton2.Location;
|
||||
_metroButton1.Tag = DialogResult.OK;
|
||||
EnableButton(_metroButton2);
|
||||
_metroButton2.Text = "Cancel";
|
||||
_metroButton2.Location = _metroButton3.Location;
|
||||
_metroButton2.Tag = DialogResult.Cancel;
|
||||
EnableButton(_metroButton3, false);
|
||||
break;
|
||||
case MessageBoxButtons.AbortRetryIgnore:
|
||||
EnableButton(_metroButton1);
|
||||
_metroButton1.Text = "Abort";
|
||||
_metroButton1.Tag = DialogResult.Abort;
|
||||
EnableButton(_metroButton2);
|
||||
_metroButton2.Text = "Retry";
|
||||
_metroButton2.Tag = DialogResult.Retry;
|
||||
EnableButton(_metroButton3);
|
||||
_metroButton3.Text = "Ignore";
|
||||
_metroButton3.Tag = DialogResult.Ignore;
|
||||
break;
|
||||
case MessageBoxButtons.YesNoCancel:
|
||||
EnableButton(_metroButton1);
|
||||
_metroButton1.Text = "Yes";
|
||||
_metroButton1.Tag = DialogResult.Yes;
|
||||
EnableButton(_metroButton2);
|
||||
_metroButton2.Text = "No";
|
||||
_metroButton2.Tag = DialogResult.No;
|
||||
EnableButton(_metroButton3);
|
||||
_metroButton3.Text = "Cancel";
|
||||
_metroButton3.Tag = DialogResult.Cancel;
|
||||
break;
|
||||
case MessageBoxButtons.YesNo:
|
||||
EnableButton(_metroButton1);
|
||||
_metroButton1.Text = "Yes";
|
||||
_metroButton1.Location = _metroButton2.Location;
|
||||
_metroButton1.Tag = DialogResult.Yes;
|
||||
EnableButton(_metroButton2);
|
||||
_metroButton2.Text = "No";
|
||||
_metroButton2.Location = _metroButton3.Location;
|
||||
_metroButton2.Tag = DialogResult.No;
|
||||
EnableButton(_metroButton3, false);
|
||||
break;
|
||||
case MessageBoxButtons.RetryCancel:
|
||||
EnableButton(_metroButton1);
|
||||
_metroButton1.Text = "Retry";
|
||||
_metroButton1.Location = _metroButton2.Location;
|
||||
_metroButton1.Tag = DialogResult.Retry;
|
||||
EnableButton(_metroButton2);
|
||||
_metroButton2.Text = "Cancel";
|
||||
_metroButton2.Location = _metroButton3.Location;
|
||||
_metroButton2.Tag = DialogResult.Cancel;
|
||||
EnableButton(_metroButton3, false);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Properties.Icon)
|
||||
{
|
||||
case MessageBoxIcon.Hand:
|
||||
Body.BackColor = _errorColor;
|
||||
break;
|
||||
case MessageBoxIcon.Question:
|
||||
Body.BackColor = _question;
|
||||
break;
|
||||
case MessageBoxIcon.Exclamation:
|
||||
Body.BackColor = _warningColor;
|
||||
break;
|
||||
case MessageBoxIcon.Asterisk:
|
||||
Body.BackColor = _defaultColor;
|
||||
break;
|
||||
default:
|
||||
Body.BackColor = Color.DarkGray;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void EnableButton(MetroButton button)
|
||||
{
|
||||
EnableButton(button, true);
|
||||
}
|
||||
|
||||
private void EnableButton(MetroButton button, bool enabled)
|
||||
{
|
||||
button.Enabled = enabled;
|
||||
button.Visible = enabled;
|
||||
}
|
||||
|
||||
public void SetDefaultButton()
|
||||
{
|
||||
switch (Properties.DefaultButton)
|
||||
{
|
||||
case MessageBoxDefaultButton.Button1:
|
||||
if (_metroButton1 == null || !_metroButton1.Enabled)
|
||||
break;
|
||||
_metroButton1.Focus();
|
||||
break;
|
||||
case MessageBoxDefaultButton.Button2:
|
||||
if (_metroButton2 == null || !_metroButton2.Enabled)
|
||||
break;
|
||||
_metroButton2.Focus();
|
||||
break;
|
||||
case MessageBoxDefaultButton.Button3:
|
||||
if (_metroButton3 == null || !_metroButton3.Enabled)
|
||||
break;
|
||||
_metroButton3.Focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void button_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void button_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
StylizeButton((MetroButton) sender, true);
|
||||
}
|
||||
|
||||
private void button_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
StylizeButton((MetroButton) sender);
|
||||
}
|
||||
|
||||
private void StylizeButton(MetroButton button)
|
||||
{
|
||||
StylizeButton(button, false);
|
||||
}
|
||||
|
||||
private void StylizeButton(MetroButton button, bool hovered)
|
||||
{
|
||||
button.Cursor = Cursors.Hand;
|
||||
button.MouseClick -= button_MouseClick;
|
||||
button.MouseClick += button_MouseClick;
|
||||
button.MouseEnter -= button_MouseEnter;
|
||||
button.MouseEnter += button_MouseEnter;
|
||||
button.MouseLeave -= button_MouseLeave;
|
||||
button.MouseLeave += button_MouseLeave;
|
||||
}
|
||||
|
||||
private void button_Click(object sender, EventArgs e)
|
||||
{
|
||||
MetroButton metroButton = (MetroButton) sender;
|
||||
if (!metroButton.Enabled)
|
||||
return;
|
||||
Result = (DialogResult) metroButton.Tag;
|
||||
Hide();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && components != null)
|
||||
components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
Body = new Panel();
|
||||
_tlpBody = new TableLayoutPanel();
|
||||
_messageLabel = new Label();
|
||||
_titleLabel = new Label();
|
||||
_metroButton1 = new MetroButton();
|
||||
_metroButton3 = new MetroButton();
|
||||
_metroButton2 = new MetroButton();
|
||||
_pnlBottom = new Panel();
|
||||
Body.SuspendLayout();
|
||||
_tlpBody.SuspendLayout();
|
||||
_pnlBottom.SuspendLayout();
|
||||
SuspendLayout();
|
||||
Body.BackColor = Color.DarkGray;
|
||||
Body.Controls.Add(_tlpBody);
|
||||
Body.Dock = DockStyle.Fill;
|
||||
Body.Location = new Point(0, 0);
|
||||
Body.Margin = new Padding(0);
|
||||
Body.Name = "Body";
|
||||
Body.Size = new Size(804, 211);
|
||||
Body.TabIndex = 2;
|
||||
_tlpBody.ColumnCount = 3;
|
||||
_tlpBody.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 10f));
|
||||
_tlpBody.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 80f));
|
||||
_tlpBody.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 10f));
|
||||
_tlpBody.Controls.Add(_messageLabel, 1, 2);
|
||||
_tlpBody.Controls.Add(_titleLabel, 1, 1);
|
||||
_tlpBody.Controls.Add(_pnlBottom, 1, 3);
|
||||
_tlpBody.Dock = DockStyle.Fill;
|
||||
_tlpBody.Location = new Point(0, 0);
|
||||
_tlpBody.Name = "_tlpBody";
|
||||
_tlpBody.RowCount = 4;
|
||||
_tlpBody.RowStyles.Add(new RowStyle(SizeType.Absolute, 5f));
|
||||
_tlpBody.RowStyles.Add(new RowStyle(SizeType.Absolute, 25f));
|
||||
_tlpBody.RowStyles.Add(new RowStyle(SizeType.Percent, 100f));
|
||||
_tlpBody.RowStyles.Add(new RowStyle(SizeType.Absolute, 40f));
|
||||
_tlpBody.Size = new Size(804, 211);
|
||||
_tlpBody.TabIndex = 6;
|
||||
_messageLabel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
_messageLabel.BackColor = Color.Transparent;
|
||||
_messageLabel.ForeColor = Color.White;
|
||||
_messageLabel.Location = new Point(83, 30);
|
||||
_messageLabel.Margin = new Padding(3, 0, 0, 0);
|
||||
_messageLabel.Name = "_messageLabel";
|
||||
_messageLabel.Size = new Size(640, 141);
|
||||
_messageLabel.TabIndex = 0;
|
||||
_messageLabel.Text = "message here";
|
||||
_titleLabel.AutoSize = true;
|
||||
_titleLabel.BackColor = Color.Transparent;
|
||||
_titleLabel.Font = new Font("Segoe UI Semibold", 14.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
|
||||
_titleLabel.ForeColor = Color.WhiteSmoke;
|
||||
_titleLabel.Location = new Point(80, 5);
|
||||
_titleLabel.Margin = new Padding(0);
|
||||
_titleLabel.Name = "_titleLabel";
|
||||
_titleLabel.Size = new Size(125, 25);
|
||||
_titleLabel.TabIndex = 1;
|
||||
_titleLabel.Text = "message title";
|
||||
_metroButton1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
_metroButton1.BackColor = Color.ForestGreen;
|
||||
_metroButton1.Location = new Point(357, 1);
|
||||
_metroButton1.Name = "_metroButton1";
|
||||
_metroButton1.Size = new Size(90, 26);
|
||||
_metroButton1.TabIndex = 3;
|
||||
_metroButton1.Text = "button 1";
|
||||
_metroButton3.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
_metroButton3.Location = new Point(553, 1);
|
||||
_metroButton3.Name = "_metroButton3";
|
||||
_metroButton3.Size = new Size(90, 26);
|
||||
_metroButton3.TabIndex = 5;
|
||||
_metroButton3.Text = "button 3";
|
||||
_metroButton2.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
_metroButton2.Location = new Point(455, 1);
|
||||
_metroButton2.Name = "_metroButton2";
|
||||
_metroButton2.Size = new Size(90, 26);
|
||||
_metroButton2.TabIndex = 4;
|
||||
_metroButton2.Text = "button 2";
|
||||
_pnlBottom.BackColor = Color.Transparent;
|
||||
_pnlBottom.Controls.Add(_metroButton2);
|
||||
_pnlBottom.Controls.Add(_metroButton1);
|
||||
_pnlBottom.Controls.Add(_metroButton3);
|
||||
_pnlBottom.Dock = DockStyle.Fill;
|
||||
_pnlBottom.Location = new Point(80, 171);
|
||||
_pnlBottom.Margin = new Padding(0);
|
||||
_pnlBottom.Name = "_pnlBottom";
|
||||
_pnlBottom.Size = new Size(643, 40);
|
||||
_pnlBottom.TabIndex = 2;
|
||||
AutoScaleDimensions = new SizeF(8f, 21f);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(804, 211);
|
||||
ControlBox = false;
|
||||
Controls.Add(Body);
|
||||
Font = new Font("Segoe UI Light", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
Margin = new Padding(4, 5, 4, 5);
|
||||
Name = nameof(MetroMessageBoxControl);
|
||||
StartPosition = FormStartPosition.Manual;
|
||||
Body.ResumeLayout(false);
|
||||
_tlpBody.ResumeLayout(false);
|
||||
_tlpBody.PerformLayout();
|
||||
_pnlBottom.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System.Windows.Forms;
|
||||
|
||||
namespace cashew.MessageBox
|
||||
{
|
||||
public class MetroMessageBoxProperties
|
||||
{
|
||||
public MetroMessageBoxProperties(MetroMessageBoxControl owner) => Owner = owner;
|
||||
|
||||
public MessageBoxButtons Buttons { get; set; }
|
||||
|
||||
public MessageBoxDefaultButton DefaultButton { get; set; }
|
||||
|
||||
public MessageBoxIcon Icon { get; set; }
|
||||
|
||||
public string Message { get; set; }
|
||||
|
||||
public MetroMessageBoxControl Owner { get; }
|
||||
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,22 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace cashew
|
||||
{
|
||||
static class Program
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
private static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MAIN());
|
||||
Console.Title = "The Cashew Project - Native Shell (do not close)";
|
||||
Console.WriteLine("Welcome to Cashew. Your programs output will be redirected here");
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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("cashew")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("cashew")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[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("1ac90e29-b37e-401c-9960-66bc66d4efbf")]
|
||||
|
||||
// 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")]
|
|
@ -1,63 +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 cashew.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("cashew.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,117 +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.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>
|
|
@ -1,26 +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 cashew.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.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>
|
|
@ -8,10 +8,15 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.CodeDom.Compiler;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace cashew {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
|
@ -19,27 +24,27 @@ namespace cashew {
|
|||
// 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()]
|
||||
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[DebuggerNonUserCode()]
|
||||
[CompilerGenerated()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
private static ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
private static CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
[SuppressMessage("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 {
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
internal static ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("cashew.Resources", typeof(Resources).Assembly);
|
||||
if (ReferenceEquals(resourceMan, null)) {
|
||||
ResourceManager temp = new ResourceManager("cashew.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
|
@ -50,8 +55,8 @@ namespace cashew {
|
|||
/// 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 {
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
internal static CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
|
@ -63,11 +68,27 @@ namespace cashew {
|
|||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] Python {
|
||||
internal static byte[] IronPythonBCL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Python", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("IronPythonBCL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
|
||||
///<packages>
|
||||
/// <package id="CC-Functions.Misc" version="1.0.2" targetFramework="net461" />
|
||||
/// <package id="DynamicLanguageRuntime" version="1.2.2" targetFramework="net461" />
|
||||
/// <package id="Humanizer.Core" version="2.7.9" targetFramework="net472" />
|
||||
/// <package id="ICSharpCode.Decompiler" version="5.0.2.5153" targetFramework="net472" />
|
||||
/// <package id="ICSharpCode.NRefactory" version="5.5.1" targetFramework="net472" />
|
||||
/// <package id="ICSharpCode.TextEditor.Extended" [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string packages {
|
||||
get {
|
||||
return ResourceManager.GetString("packages", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,10 @@
|
|||
<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="Python" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Python.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="IronPythonBCL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>IronPythonBCL.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="packages" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>cashew.csproj;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
</root>
|
Binary file not shown.
|
@ -0,0 +1,73 @@
|
|||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace cashew
|
||||
{
|
||||
partial class Splash
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Splash));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.Location = new System.Drawing.Point(218, 127);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(64, 39);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "-------------------\r\n| CASHEW |\r\n-------------------";
|
||||
//
|
||||
// Splash
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.ClientSize = new System.Drawing.Size(500, 300);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Splash";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Splash";
|
||||
this.TransparencyKey = System.Drawing.Color.Maroon;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Label label1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System.Windows.Forms;
|
||||
|
||||
namespace cashew
|
||||
{
|
||||
public partial class Splash : Form
|
||||
{
|
||||
public Splash()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,138 +1,32 @@
|
|||
<?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')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1AC90E29-B37E-401C-9960-66BC66D4EFBF}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>cashew</RootNamespace>
|
||||
<AssemblyName>cashew</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</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>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<Deterministic>false</Deterministic>
|
||||
<AssemblyVersion>1.0.*</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Cashew-64.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CCFunctions">
|
||||
<HintPath>..\..\T.O.F.U\Net_TOFU\bin\Release\CCFunctions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Costura, Version=3.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Costura.Fody.3.1.0\lib\net46\Costura.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MetroFramework.Design, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Design.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MetroFramework.Fonts, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression">
|
||||
<HintPath>..\..\T.O.F.U\Net_TOFU\bin\Release\System.IO.Compression.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.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>
|
||||
<EmbeddedResource Include="Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<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>
|
||||
<EmbeddedResource Include="Resources\Python.zip" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<AdditionalFiles Include="IronPythonBCL.zip">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Cashew-64.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Fody.3.1.4\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.1.4\build\Fody.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets')" />
|
||||
<Import Project="..\packages\Fody.3.1.4\build\Fody.targets" Condition="Exists('..\packages\Fody.3.1.4\build\Fody.targets')" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CC-Functions.Misc" Version="1.1.7474.36199" />
|
||||
<PackageReference Include="ICSharpCode.Decompiler" Version="5.0.2.5153" />
|
||||
<PackageReference Include="ICSharpCode.TextEditor.Extended" Version="4.2.4" />
|
||||
<PackageReference Include="IronPython" Version="2.7.10" />
|
||||
<PackageReference Include="ModernUI" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
if exist "$(SolutionDir)Data\pkgtool.exe" ($(SolutionDir)Data\pkgtool.exe build --noLogo --binDir .) else if exist "%appdata%\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app\pkgtool.exe" ("%appdata%\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app\pkgtool.exe" build --noLogo --binDir .) else echo Cound not find Package build tools, skipping</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Costura.Fody" version="3.1.0" targetFramework="net471" />
|
||||
<package id="Fody" version="3.1.4" targetFramework="net471" developmentDependency="true" />
|
||||
<package id="MetroModernUI" version="1.4.0.0" targetFramework="net461" />
|
||||
</packages>
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
}
|
Reference in New Issue