Compare commits
64 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 |
|
@ -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
|
|
@ -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)
|
||||
|
|
|
@ -5,7 +5,10 @@ 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}") = "Misc", "..\CC-Functions\Misc\Misc.csproj", "{B80D5E09-B935-4602-A173-BAF7C1974999}"
|
||||
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
|
||||
{B80D5E09-B935-4602-A173-BAF7C1974999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B80D5E09-B935-4602-A173-BAF7C1974999}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B80D5E09-B935-4602-A173-BAF7C1974999}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B80D5E09-B935-4602-A173-BAF7C1974999}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Humanizer" publicKeyToken="979442b78dfc278e" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.0.0" newVersion="2.7.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Mono.Cecil" publicKeyToken="50cebf1cceb9d05e" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.10.1.0" newVersion="0.10.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<Costura CreateTemporaryAssemblies="true" />
|
||||
</Weavers>
|
|
@ -1,106 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuild. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCompression" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCleanup" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification on the target assembly after all weavers have been finished.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
375
cashew/Form1.cs
375
cashew/Form1.cs
|
@ -1,375 +0,0 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework;
|
||||
using MetroFramework.Forms;
|
||||
using System.IO;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using ICSharpCode.TextEditor.Document;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using ICSharpCode.Decompiler;
|
||||
using ICSharpCode.Decompiler.CSharp;
|
||||
using ICSharpCode.Decompiler.TypeSystem;
|
||||
using System.Reflection;
|
||||
using System.IO.Compression;
|
||||
using MetroFramework.Interfaces;
|
||||
using CC_Functions.Misc;
|
||||
using System.CodeDom.Compiler;
|
||||
using Microsoft.CSharp;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
namespace cashew {
|
||||
public partial class MAIN : MetroForm {
|
||||
#region General
|
||||
IMetroControl[] metroControls;
|
||||
Control[] normalControls;
|
||||
ToolStripMenuItem[] menuItems;
|
||||
string[] cseditcodel;
|
||||
string[] cseditrefl;
|
||||
string TempPath = Path.GetTempPath() + "cashew";
|
||||
public MAIN() {
|
||||
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 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" };
|
||||
htmldisplay.DocumentText = htmlText.Text;
|
||||
metroToggle1_CheckedChanged(this, new EventArgs());
|
||||
languageTabControl.SelectedTab = infotab;
|
||||
if (Directory.Exists(TempPath)) { Directory.Delete(TempPath, true); }
|
||||
Directory.CreateDirectory(TempPath + @"\xshd");
|
||||
File.WriteAllBytes(TempPath + @"\tmp.zip", Resources.xshd);
|
||||
ZipFile.ExtractToDirectory(TempPath + @"\tmp.zip", TempPath + @"\xshd");
|
||||
File.Delete(TempPath + @"\tmp.zip");
|
||||
HighlightingManager.Manager.AddSyntaxModeFileProvider(new FileSyntaxModeProvider(TempPath + @"\xshd"));
|
||||
try {
|
||||
if (Directory.Exists(TempPath + @"\Python\")) {
|
||||
Directory.Delete(TempPath + @"\Python\");
|
||||
}
|
||||
try { Directory.CreateDirectory(TempPath + @"\Python\"); } catch { }
|
||||
File.WriteAllBytes(TempPath + @"\Python.zip", Resources.Python);
|
||||
ZipFile.ExtractToDirectory(TempPath + @"\Python.zip", TempPath + @"\Python");
|
||||
} catch (Exception e) { MessageBox.Show(e.ToString()); }
|
||||
splash.Hide();
|
||||
}
|
||||
|
||||
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 (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
|
||||
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 cseditsave_Click(object sender, EventArgs e) {
|
||||
if (csSaveFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
if (cseditref.Text == "Code") {
|
||||
cseditrefl = cseditcode.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
||||
} else {
|
||||
cseditcodel = cseditcode.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
||||
}
|
||||
Stream s = File.OpenWrite(csSaveFileDialog.FileName);
|
||||
new BinaryFormatter().Serialize(s, new string[][] { cseditcodel, cseditrefl });
|
||||
s.Dispose();
|
||||
} 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.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
||||
} else {
|
||||
cseditcodel = cseditcode.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
||||
}
|
||||
CSharpCodeProvider provider = new CSharpCodeProvider();
|
||||
CompilerParameters parameters = new CompilerParameters
|
||||
{
|
||||
GenerateInMemory = true,
|
||||
GenerateExecutable = true
|
||||
};
|
||||
for (int i = 0; i < cseditrefl.Length; i++)
|
||||
parameters.ReferencedAssemblies.Add(cseditrefl[i]);
|
||||
CompilerResults results = provider.CompileAssemblyFromSource(parameters, ArrayFormatter.ArrayToString(cseditcodel));
|
||||
if (results.Errors.HasErrors)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (CompilerError error in results.Errors)
|
||||
{
|
||||
sb.AppendLine(string.Format("Error ({0}): {1}", error.ErrorNumber, error.ErrorText));
|
||||
}
|
||||
throw new InvalidOperationException(sb.ToString());
|
||||
}
|
||||
Assembly assembly = results.CompiledAssembly;
|
||||
Type program = assembly.GetType("Project.Program");
|
||||
script = program.GetMethod("Main");
|
||||
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 {
|
||||
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];
|
||||
if (cseditref.Text == "References")
|
||||
cseditcode.Text = ArrayFormatter.ArrayToString(cseditcodel);
|
||||
else
|
||||
cseditcode.Text = ArrayFormatter.ArrayToString(cseditrefl);
|
||||
} else {
|
||||
CSharpDecompiler decompiler = new CSharpDecompiler(csOpenFileDialog.FileName, new DecompilerSettings());
|
||||
cseditcodel = decompiler.DecompileWholeModuleAsString().Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
||||
cseditrefl = new string[]{};
|
||||
if (cseditref.Text == "References")
|
||||
cseditcode.Text = ArrayFormatter.ArrayToString(cseditcodel);
|
||||
else
|
||||
cseditcode.Text = ArrayFormatter.ArrayToString(cseditrefl);
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
MessageBox.Show(e1.ToString(), "Failed to Load");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditref_Click(object sender, EventArgs e) {
|
||||
if (cseditref.Text == "References") {
|
||||
cseditcodel = cseditcode.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
||||
cseditcode.Text = ArrayFormatter.ArrayToString(cseditrefl);
|
||||
cseditcode.Refresh();
|
||||
cseditref.Text = "Code";
|
||||
} else {
|
||||
cseditrefl = cseditcode.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
||||
cseditcode.Text = ArrayFormatter.ArrayToString(cseditcodel);
|
||||
cseditcode.Refresh();
|
||||
cseditref.Text = "References";
|
||||
}
|
||||
}
|
||||
|
||||
private void cseditexecutor_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) {
|
||||
while (cseditexecutor.CancellationPending == false) {
|
||||
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_1(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) {
|
||||
if (htmlText.ActiveTextAreaControl.TextArea.SelectionManager.HasSomethingSelected) {
|
||||
ISelection sel = htmlText.ActiveTextAreaControl.SelectionManager.SelectionCollection[0];
|
||||
List<string> tmp = htmlText.Text.Split(new string[] { "\r\n" }, StringSplitOptions.None).ToList();
|
||||
//Not working: sele not working
|
||||
tmp.RemoveRange(sel.EndPosition.Line - 1, tmp.Count - sel.EndPosition.Line); //Determins line
|
||||
sels = ArrayFormatter.ArrayToString(tmp.ToArray()).ToCharArray().Length + sel.StartPosition.Column; //Line + Column
|
||||
sele = sels + sel.Length;
|
||||
} else { sels = 0; sele = htmlText.Text.Length; }
|
||||
}
|
||||
|
||||
private void addToHTMLBox(string inFront, string atEnd) {
|
||||
htmlText.Text = htmlText.Text.Insert(sele, atEnd);
|
||||
htmlText.Text = htmlText.Text.Insert(sels, inFront);
|
||||
}
|
||||
|
||||
private void htmlSave_Click(object sender, EventArgs e) {
|
||||
if (htmlSaveFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
File.WriteAllText(htmlSaveFileDialog.FileName, htmlText.Text);
|
||||
} catch (Exception e1) {
|
||||
MessageBox.Show(e1.Message, "Saving Failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void htmlLoad_Click(object sender, EventArgs e) {
|
||||
if (htmlOpenFileDialog.ShowDialog() == DialogResult.OK) {
|
||||
try {
|
||||
htmlText.Text = File.ReadAllText(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.Text = File.ReadAllText(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.WriteAllText(pythonSaveFileDialog.FileName, pythonCode.Text);
|
||||
}
|
||||
catch (Exception e1) {
|
||||
MessageBox.Show(e1.Message, "Saving Failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void pythonRun_Click(object sender, EventArgs e) {
|
||||
File.WriteAllText(TempPath + @"\Python\tmp.py", pythonCode.Text);
|
||||
Process process = Process.Start(new ProcessStartInfo { FileName = TempPath + @"\Python\python.exe", Arguments = TempPath + @"\Python\tmp.py", UseShellExecute = true });
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
//Fix HTML Tab; Add syntax tree to cs?
|
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,28 +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>
|
||||
}</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>
|
||||
|
@ -146,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,13 +1,18 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace cashew {
|
||||
static class Program {
|
||||
namespace cashew
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
[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("A basic GUI for multiple common programming languages")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("CreepyCrafter24")]
|
||||
[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,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -1,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,20 +68,26 @@ 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 resource of type System.Byte[].
|
||||
/// 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 byte[] xshd {
|
||||
internal static string packages {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("xshd", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
return ResourceManager.GetString("packages", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,10 +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="xshd" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\xshd.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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.
Binary file not shown.
|
@ -1,11 +1,14 @@
|
|||
namespace cashew
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace cashew
|
||||
{
|
||||
partial class Splash
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
private IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
|
@ -65,6 +68,6 @@
|
|||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private Label label1;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace cashew
|
||||
{
|
||||
|
@ -17,4 +9,4 @@ namespace cashew
|
|||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,221 +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.2</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="Humanizer, Version=2.7.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Humanizer.Core.2.7.2\lib\netstandard2.0\Humanizer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.Decompiler, Version=4.0.0.4521, Culture=neutral, PublicKeyToken=d4bfe873e7598c49, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ICSharpCode.Decompiler.4.0.0.4521\lib\net46\ICSharpCode.Decompiler.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.NRefactory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=d4bfe873e7598c49, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ICSharpCode.NRefactory.5.5.1\lib\Net40\ICSharpCode.NRefactory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.NRefactory.Cecil, Version=5.0.0.0, Culture=neutral, PublicKeyToken=d4bfe873e7598c49, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ICSharpCode.NRefactory.5.5.1\lib\Net40\ICSharpCode.NRefactory.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.NRefactory.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=d4bfe873e7598c49, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ICSharpCode.NRefactory.5.5.1\lib\Net40\ICSharpCode.NRefactory.CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.NRefactory.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=d4bfe873e7598c49, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ICSharpCode.NRefactory.5.5.1\lib\Net40\ICSharpCode.NRefactory.Xml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.TextEditorEx, Version=1.0.0.6, Culture=neutral, PublicKeyToken=4d61825e8dd49f1a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ICSharpCode.TextEditorEx.1.0.0.6\lib\net40\ICSharpCode.TextEditorEx.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="Mono.Cecil, Version=0.11.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Mono.Cecil.0.11.0\lib\net40\Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.Mdb, Version=0.11.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Mono.Cecil.0.11.0\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.Pdb, Version=0.11.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Mono.Cecil.0.11.0\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.Rocks, Version=0.11.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Mono.Cecil.0.11.0\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath>..\..\..\ICSharpCode.TextEditor\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<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.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UIAutomationProvider" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="WindowsFormsIntegration" />
|
||||
</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>
|
||||
<Compile Include="Splash.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Splash.Designer.cs">
|
||||
<DependentUpon>Splash.cs</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>
|
||||
<EmbeddedResource Include="Splash.resx">
|
||||
<DependentUpon>Splash.cs</DependentUpon>
|
||||
</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" />
|
||||
<None Include="Resources\xshd.zip" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<AdditionalFiles Include="IronPythonBCL.zip">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Cashew-64.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="AxMicrosoft.Vbe.Interop.Forms">
|
||||
<Guid>{0D452EE1-E08F-101A-852E-02608C4D0BB4}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>aximp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
</COMReference>
|
||||
<COMReference Include="Microsoft.Vbe.Interop.Forms">
|
||||
<Guid>{0D452EE1-E08F-101A-852E-02608C4D0BB4}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="stdole">
|
||||
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<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>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\CC-Functions\Misc\Misc.csproj">
|
||||
<Project>{b80d5e09-b935-4602-a173-baf7c1974999}</Project>
|
||||
<Name>Misc</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<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,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Humanizer.Core" version="2.7.2" targetFramework="net472" />
|
||||
<package id="ICSharpCode.Decompiler" version="4.0.0.4521" targetFramework="net472" />
|
||||
<package id="ICSharpCode.NRefactory" version="5.5.1" targetFramework="net472" />
|
||||
<package id="ICSharpCode.TextEditorEx" version="1.0.0.6" targetFramework="net472" />
|
||||
<package id="MetroModernUI" version="1.4.0.0" targetFramework="net461" />
|
||||
<package id="Mono.Cecil" version="0.11.0" targetFramework="net472" />
|
||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net472" />
|
||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net472" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
||||
</packages>
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
}
|
Reference in New Issue