diff --git a/cashew/MainForm.Designer.cs b/cashew/MainForm.Designer.cs index 043c942..9fb6f27 100644 --- a/cashew/MainForm.Designer.cs +++ b/cashew/MainForm.Designer.cs @@ -275,7 +275,9 @@ this.cseditCode.Size = new System.Drawing.Size(780, 291); this.cseditCode.TabIndex = 9; this.cseditCode.TabStop = false; - this.cseditCode.Text = resources.GetString("cseditCode.Text"); + this.cseditCode.Text = "using System;\r\n\r\nnamespace Project\r\n{\r\n public class Program\r\n {\r\n p" + + "ublic static void Main()\r\n {\r\n Console.WriteLine(\"Hello, world" + + "!\");\r\n }\r\n }\r\n}\r\n"; // // htmltab // @@ -543,9 +545,9 @@ this.infoPanel.AutoSize = true; this.infoPanel.Location = new System.Drawing.Point(3, 0); this.infoPanel.Name = "infoPanel"; - this.infoPanel.Size = new System.Drawing.Size(119, 38); + this.infoPanel.Size = new System.Drawing.Size(682, 76); this.infoPanel.TabIndex = 2; - this.infoPanel.Text = "This Program uses:\r\n[PACKAGELIST]"; + this.infoPanel.Text = resources.GetString("infoPanel.Text"); // // nightmodeToggle // diff --git a/cashew/MainForm.cs b/cashew/MainForm.cs index b31732a..f25c21b 100644 --- a/cashew/MainForm.cs +++ b/cashew/MainForm.cs @@ -34,8 +34,8 @@ namespace cashew private readonly IMetroControl[] metroControls; private readonly Control[] normalControls; private readonly ToolStripMenuItem[] menuItems; - private string[] cseditcodel; - private string[] cseditrefl; + private string[] cseditcodel = new string[0]; + private string[] cseditrefl = new string[0]; public MainForm() { @@ -52,7 +52,6 @@ namespace cashew 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; @@ -68,7 +67,7 @@ namespace cashew { ar.ExtractToDirectory(Path.Combine(Path.GetTempPath(), "Cashew\\Python")); } - infoPanel.Text = "This Program uses:" + string.Join("", XDocument.Parse(Resources.packages).Element("packages").Elements("package").Select(s => "\r\n- " + s.Attribute("id").Value + " " + s.Attribute("version").Value).OrderBy(s => s)); + infoPanel.Text = infoPanel.Text.Replace("[PACKAGELIST]", string.Join("\r\n", XDocument.Parse(Resources.packages).Element("packages").Elements("package").Select(s => "- " + s.Attribute("id").Value + " " + s.Attribute("version").Value).OrderBy(s => s))); } private void MAIN_Load(object sender, EventArgs e) => BringToFront(); diff --git a/cashew/MainForm.resx b/cashew/MainForm.resx index aa95b82..47c7580 100644 --- a/cashew/MainForm.resx +++ b/cashew/MainForm.resx @@ -117,21 +117,11 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - using System; -using System.Windows.Forms; - -namespace Project -{ - public class Program - { - public static void Main() - { - MessageBox.Show("Hello, world!"); - } - } -} - + + 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] 17, 17 diff --git a/cashew/Program.cs b/cashew/Program.cs index 194ee72..551e558 100644 --- a/cashew/Program.cs +++ b/cashew/Program.cs @@ -10,6 +10,7 @@ namespace cashew { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); + Console.Title = "The Cashew Project - Native Shell"; Application.Run(new MainForm()); } }