diff --git a/cashew/Form1.Designer.cs b/cashew/Form1.Designer.cs index a4a3e28..497465e 100644 --- a/cashew/Form1.Designer.cs +++ b/cashew/Form1.Designer.cs @@ -30,7 +30,7 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MAIN)); - this.metroTabControl1 = new MetroFramework.Controls.MetroTabControl(); + this.languageTabControl = new MetroFramework.Controls.MetroTabControl(); this.cstab = new MetroFramework.Controls.MetroTabPage(); this.cslive = new MetroFramework.Controls.MetroTile(); this.csinftc = new MetroFramework.Controls.MetroTabControl(); @@ -43,17 +43,18 @@ this.csediterrors = new MetroFramework.Controls.MetroLabel(); this.cseditref = new MetroFramework.Controls.MetroTile(); this.cslivetp = new MetroFramework.Controls.MetroTabPage(); + this.cslivenotyetimplemented = new MetroFramework.Controls.MetroLabel(); this.csedit = new MetroFramework.Controls.MetroTile(); this.htmltab = new MetroFramework.Controls.MetroTabPage(); this.htmlSep = new System.Windows.Forms.SplitContainer(); this.htmlRefreshTile = new MetroFramework.Controls.MetroTile(); - this.livehider = new MetroFramework.Controls.MetroPanel(); - this.htmlUpdateToggle = new MetroFramework.Controls.MetroToggle(); this.htmlLiveLabel = new MetroFramework.Controls.MetroLabel(); this.htmlLoad = new MetroFramework.Controls.MetroTile(); this.htmlSave = new MetroFramework.Controls.MetroTile(); this.htmlOptionsTile = new MetroFramework.Controls.MetroTile(); this.htmltext = new MetroFramework.Controls.MetroTextBox(); + this.livehider = new MetroFramework.Controls.MetroPanel(); + this.htmlUpdateToggle = new MetroFramework.Controls.MetroToggle(); this.htmlLoadIndicator = new MetroFramework.Controls.MetroProgressSpinner(); this.htmltitle = new MetroFramework.Controls.MetroLabel(); this.htmldisplay = new System.Windows.Forms.WebBrowser(); @@ -69,6 +70,7 @@ this.hTMLStructureSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.linkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.imageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.centercenterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.textToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.headingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.heading1h1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -77,6 +79,7 @@ this.heading4h4ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.heading5h5ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.heading6h6ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.paragraphpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.boldbToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.underlineuToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.italiciToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -129,10 +132,15 @@ this.htmlSaveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.htmlOpenFileDialog = new System.Windows.Forms.OpenFileDialog(); this.nightmodehide = new MetroFramework.Controls.MetroPanel(); - this.cslivenotyetimplemented = new MetroFramework.Controls.MetroLabel(); - this.centercenterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.paragraphpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.metroTabControl1.SuspendLayout(); + this.pythontab = new MetroFramework.Controls.MetroTabPage(); + this.pythonSave = new MetroFramework.Controls.MetroTile(); + this.pythonRun = new MetroFramework.Controls.MetroTile(); + this.pythonOpen = new MetroFramework.Controls.MetroTile(); + this.pythonCode = new MetroFramework.Controls.MetroTextBox(); + this.pythonExtract = new MetroFramework.Controls.MetroTile(); + this.pythonOpenFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.pythonSaveFileDialog = new System.Windows.Forms.SaveFileDialog(); + this.languageTabControl.SuspendLayout(); this.cstab.SuspendLayout(); this.csinftc.SuspendLayout(); this.csedittp.SuspendLayout(); @@ -145,22 +153,24 @@ this.htmlSep.SuspendLayout(); this.infotab.SuspendLayout(); this.htmlOptionsMenu.SuspendLayout(); + this.pythontab.SuspendLayout(); this.SuspendLayout(); // - // metroTabControl1 + // languageTabControl // - this.metroTabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.languageTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.metroTabControl1.Controls.Add(this.cstab); - this.metroTabControl1.Controls.Add(this.htmltab); - this.metroTabControl1.Controls.Add(this.infotab); - this.metroTabControl1.Location = new System.Drawing.Point(23, 63); - this.metroTabControl1.Name = "metroTabControl1"; - this.metroTabControl1.SelectedIndex = 0; - this.metroTabControl1.Size = new System.Drawing.Size(797, 432); - this.metroTabControl1.TabIndex = 0; - this.metroTabControl1.UseSelectable = true; + this.languageTabControl.Controls.Add(this.cstab); + this.languageTabControl.Controls.Add(this.htmltab); + this.languageTabControl.Controls.Add(this.pythontab); + this.languageTabControl.Controls.Add(this.infotab); + this.languageTabControl.Location = new System.Drawing.Point(23, 63); + this.languageTabControl.Name = "languageTabControl"; + this.languageTabControl.SelectedIndex = 2; + this.languageTabControl.Size = new System.Drawing.Size(797, 432); + this.languageTabControl.TabIndex = 0; + this.languageTabControl.UseSelectable = true; // // cstab // @@ -364,6 +374,20 @@ this.cslivetp.VerticalScrollbarHighlightOnWheel = false; this.cslivetp.VerticalScrollbarSize = 10; // + // cslivenotyetimplemented + // + this.cslivenotyetimplemented.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cslivenotyetimplemented.AutoSize = true; + this.cslivenotyetimplemented.FontSize = MetroFramework.MetroLabelSize.Tall; + this.cslivenotyetimplemented.FontWeight = MetroFramework.MetroLabelWeight.Bold; + this.cslivenotyetimplemented.Location = new System.Drawing.Point(240, 143); + this.cslivenotyetimplemented.Name = "cslivenotyetimplemented"; + this.cslivenotyetimplemented.Size = new System.Drawing.Size(220, 25); + this.cslivenotyetimplemented.TabIndex = 2; + this.cslivenotyetimplemented.Text = "NOT YET IMPLEMENTED"; + // // csedit // this.csedit.ActiveControl = null; @@ -432,34 +456,6 @@ this.htmlRefreshTile.UseSelectable = true; this.htmlRefreshTile.Click += new System.EventHandler(this.htmlRefreshTile_Click); // - // livehider - // - this.livehider.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.livehider.HorizontalScrollbarBarColor = true; - this.livehider.HorizontalScrollbarHighlightOnWheel = false; - this.livehider.HorizontalScrollbarSize = 10; - this.livehider.Location = new System.Drawing.Point(238, 3); - this.livehider.Name = "livehider"; - this.livehider.Size = new System.Drawing.Size(45, 17); - this.livehider.TabIndex = 4; - this.livehider.VerticalScrollbarBarColor = true; - this.livehider.VerticalScrollbarHighlightOnWheel = false; - this.livehider.VerticalScrollbarSize = 10; - // - // htmlUpdateToggle - // - this.htmlUpdateToggle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.htmlUpdateToggle.AutoSize = true; - this.htmlUpdateToggle.Checked = true; - this.htmlUpdateToggle.CheckState = System.Windows.Forms.CheckState.Checked; - this.htmlUpdateToggle.Location = new System.Drawing.Point(255, 3); - this.htmlUpdateToggle.Name = "htmlUpdateToggle"; - this.htmlUpdateToggle.Size = new System.Drawing.Size(80, 17); - this.htmlUpdateToggle.TabIndex = 4; - this.htmlUpdateToggle.Text = "An"; - this.htmlUpdateToggle.UseSelectable = true; - this.htmlUpdateToggle.CheckedChanged += new System.EventHandler(this.metroToggle2_CheckedChanged); - // // htmlLiveLabel // this.htmlLiveLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -550,6 +546,34 @@ this.htmltext.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); this.htmltext.TextChanged += new System.EventHandler(this.htmltext_TextChanged); // + // livehider + // + this.livehider.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.livehider.HorizontalScrollbarBarColor = true; + this.livehider.HorizontalScrollbarHighlightOnWheel = false; + this.livehider.HorizontalScrollbarSize = 10; + this.livehider.Location = new System.Drawing.Point(238, 3); + this.livehider.Name = "livehider"; + this.livehider.Size = new System.Drawing.Size(45, 17); + this.livehider.TabIndex = 4; + this.livehider.VerticalScrollbarBarColor = true; + this.livehider.VerticalScrollbarHighlightOnWheel = false; + this.livehider.VerticalScrollbarSize = 10; + // + // htmlUpdateToggle + // + this.htmlUpdateToggle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.htmlUpdateToggle.AutoSize = true; + this.htmlUpdateToggle.Checked = true; + this.htmlUpdateToggle.CheckState = System.Windows.Forms.CheckState.Checked; + this.htmlUpdateToggle.Location = new System.Drawing.Point(255, 3); + this.htmlUpdateToggle.Name = "htmlUpdateToggle"; + this.htmlUpdateToggle.Size = new System.Drawing.Size(80, 17); + this.htmlUpdateToggle.TabIndex = 4; + this.htmlUpdateToggle.Text = "An"; + this.htmlUpdateToggle.UseSelectable = true; + this.htmlUpdateToggle.CheckedChanged += new System.EventHandler(this.metroToggle2_CheckedChanged); + // // htmlLoadIndicator // this.htmlLoadIndicator.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -603,11 +627,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(473, 95); + this.infoPanel.Size = new System.Drawing.Size(532, 95); this.infoPanel.TabIndex = 2; - this.infoPanel.Text = "This Program uses MetroModernUI by Dennis Magno.\r\nFunctionality:\r\n- Select a cate" + - "gory (Top bar) and use the provided functions to write programs.\r\n\r\nIF YOU WANT " + - "A PROFESSIONAL PROGRAM, DON\'T USE THIS!"; + this.infoPanel.Text = resources.GetString("infoPanel.Text"); // // nightmodeToggle // @@ -695,6 +717,13 @@ this.imageToolStripMenuItem.Text = "Image"; this.imageToolStripMenuItem.Click += new System.EventHandler(this.imageToolStripMenuItem_Click); // + // centercenterToolStripMenuItem + // + this.centercenterToolStripMenuItem.Name = "centercenterToolStripMenuItem"; + this.centercenterToolStripMenuItem.Size = new System.Drawing.Size(191, 22); + this.centercenterToolStripMenuItem.Text = "Center
"; + this.centercenterToolStripMenuItem.Click += new System.EventHandler(this.centercenterToolStripMenuItem_Click); + // // textToolStripMenuItem // this.textToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -765,6 +794,13 @@ this.heading6h6ToolStripMenuItem.Text = "Heading 6
"; this.heading6h6ToolStripMenuItem.Click += new System.EventHandler(this.heading6h6ToolStripMenuItem_Click); // + // paragraphpToolStripMenuItem + // + this.paragraphpToolStripMenuItem.Name = "paragraphpToolStripMenuItem"; + this.paragraphpToolStripMenuItem.Size = new System.Drawing.Size(183, 22); + this.paragraphpToolStripMenuItem.Text = "Paragraph

"; + this.paragraphpToolStripMenuItem.Click += new System.EventHandler(this.paragraphpToolStripMenuItem_Click); + // // boldbToolStripMenuItem // this.boldbToolStripMenuItem.Name = "boldbToolStripMenuItem"; @@ -1170,33 +1206,111 @@ this.nightmodehide.VerticalScrollbarHighlightOnWheel = false; this.nightmodehide.VerticalScrollbarSize = 10; // - // cslivenotyetimplemented + // pythontab // - this.cslivenotyetimplemented.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.pythontab.Controls.Add(this.pythonExtract); + this.pythontab.Controls.Add(this.pythonSave); + this.pythontab.Controls.Add(this.pythonRun); + this.pythontab.Controls.Add(this.pythonOpen); + this.pythontab.Controls.Add(this.pythonCode); + this.pythontab.HorizontalScrollbarBarColor = true; + this.pythontab.HorizontalScrollbarHighlightOnWheel = false; + this.pythontab.HorizontalScrollbarSize = 10; + this.pythontab.Location = new System.Drawing.Point(4, 38); + this.pythontab.Name = "pythontab"; + this.pythontab.Size = new System.Drawing.Size(789, 390); + this.pythontab.TabIndex = 3; + this.pythontab.Text = "Python"; + this.pythontab.VerticalScrollbarBarColor = true; + this.pythontab.VerticalScrollbarHighlightOnWheel = false; + this.pythontab.VerticalScrollbarSize = 10; + // + // pythonSave + // + this.pythonSave.ActiveControl = null; + this.pythonSave.Location = new System.Drawing.Point(84, 3); + this.pythonSave.Name = "pythonSave"; + this.pythonSave.Size = new System.Drawing.Size(75, 38); + this.pythonSave.TabIndex = 8; + this.pythonSave.Text = "Save"; + this.pythonSave.UseSelectable = true; + this.pythonSave.Click += new System.EventHandler(this.pythonSave_Click); + // + // pythonRun + // + this.pythonRun.ActiveControl = null; + this.pythonRun.Location = new System.Drawing.Point(165, 3); + this.pythonRun.Name = "pythonRun"; + this.pythonRun.Size = new System.Drawing.Size(75, 38); + this.pythonRun.TabIndex = 7; + this.pythonRun.Text = "Run"; + this.pythonRun.UseSelectable = true; + this.pythonRun.Click += new System.EventHandler(this.pythonRun_Click); + // + // pythonOpen + // + this.pythonOpen.ActiveControl = null; + this.pythonOpen.Location = new System.Drawing.Point(3, 3); + this.pythonOpen.Name = "pythonOpen"; + this.pythonOpen.Size = new System.Drawing.Size(75, 38); + this.pythonOpen.TabIndex = 9; + this.pythonOpen.Text = "Open"; + this.pythonOpen.UseSelectable = true; + this.pythonOpen.Click += new System.EventHandler(this.pythonOpen_Click); + // + // pythonCode + // + this.pythonCode.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.cslivenotyetimplemented.AutoSize = true; - this.cslivenotyetimplemented.FontSize = MetroFramework.MetroLabelSize.Tall; - this.cslivenotyetimplemented.FontWeight = MetroFramework.MetroLabelWeight.Bold; - this.cslivenotyetimplemented.Location = new System.Drawing.Point(240, 143); - this.cslivenotyetimplemented.Name = "cslivenotyetimplemented"; - this.cslivenotyetimplemented.Size = new System.Drawing.Size(220, 25); - this.cslivenotyetimplemented.TabIndex = 2; - this.cslivenotyetimplemented.Text = "NOT YET IMPLEMENTED"; // - // centercenterToolStripMenuItem // - this.centercenterToolStripMenuItem.Name = "centercenterToolStripMenuItem"; - this.centercenterToolStripMenuItem.Size = new System.Drawing.Size(191, 22); - this.centercenterToolStripMenuItem.Text = "Center

"; - this.centercenterToolStripMenuItem.Click += new System.EventHandler(this.centercenterToolStripMenuItem_Click); // - // paragraphpToolStripMenuItem + this.pythonCode.CustomButton.Image = null; + this.pythonCode.CustomButton.Location = new System.Drawing.Point(445, 2); + this.pythonCode.CustomButton.Name = ""; + this.pythonCode.CustomButton.Size = new System.Drawing.Size(335, 335); + this.pythonCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.pythonCode.CustomButton.TabIndex = 1; + this.pythonCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.pythonCode.CustomButton.UseSelectable = true; + this.pythonCode.CustomButton.Visible = false; + this.pythonCode.Lines = new string[] { + "import time", + "print(\"Hello World!\")", + "time.sleep(3)"}; + this.pythonCode.Location = new System.Drawing.Point(3, 47); + this.pythonCode.MaxLength = 32767; + this.pythonCode.Multiline = true; + this.pythonCode.Name = "pythonCode"; + this.pythonCode.PasswordChar = '\0'; + this.pythonCode.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.pythonCode.SelectedText = ""; + this.pythonCode.SelectionLength = 0; + this.pythonCode.SelectionStart = 0; + this.pythonCode.ShortcutsEnabled = true; + this.pythonCode.Size = new System.Drawing.Size(783, 340); + this.pythonCode.TabIndex = 6; + this.pythonCode.Text = "import time\r\nprint(\"Hello World!\")\r\ntime.sleep(3)"; + this.pythonCode.UseSelectable = true; + this.pythonCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.pythonCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); // - this.paragraphpToolStripMenuItem.Name = "paragraphpToolStripMenuItem"; - this.paragraphpToolStripMenuItem.Size = new System.Drawing.Size(183, 22); - this.paragraphpToolStripMenuItem.Text = "Paragraph

"; - this.paragraphpToolStripMenuItem.Click += new System.EventHandler(this.paragraphpToolStripMenuItem_Click); + // pythonExtract + // + this.pythonExtract.ActiveControl = null; + this.pythonExtract.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pythonExtract.Location = new System.Drawing.Point(684, 3); + this.pythonExtract.Name = "pythonExtract"; + this.pythonExtract.Size = new System.Drawing.Size(102, 38); + this.pythonExtract.TabIndex = 10; + this.pythonExtract.Text = "Extract Python"; + this.pythonExtract.UseSelectable = true; + this.pythonExtract.Click += new System.EventHandler(this.metroTile1_Click); + // + // pythonSaveFileDialog + // + this.pythonSaveFileDialog.Filter = "Python Files|*.py"; // // MAIN // @@ -1204,14 +1318,14 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(843, 518); this.Controls.Add(this.nmtext); - this.Controls.Add(this.metroTabControl1); + this.Controls.Add(this.languageTabControl); this.Controls.Add(this.nightmodehide); this.Controls.Add(this.nightmodeToggle); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MinimumSize = new System.Drawing.Size(843, 518); this.Name = "MAIN"; this.Text = "The Cashew Project"; - this.metroTabControl1.ResumeLayout(false); + this.languageTabControl.ResumeLayout(false); this.cstab.ResumeLayout(false); this.csinftc.ResumeLayout(false); this.csedittp.ResumeLayout(false); @@ -1229,6 +1343,7 @@ this.infotab.ResumeLayout(false); this.infotab.PerformLayout(); this.htmlOptionsMenu.ResumeLayout(false); + this.pythontab.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -1236,7 +1351,7 @@ #endregion - private MetroFramework.Controls.MetroTabControl metroTabControl1; + private MetroFramework.Controls.MetroTabControl languageTabControl; private MetroFramework.Controls.MetroTabPage cstab; private MetroFramework.Controls.MetroTabPage infotab; private MetroFramework.Controls.MetroToggle nightmodeToggle; @@ -1338,6 +1453,14 @@ private MetroFramework.Controls.MetroLabel cslivenotyetimplemented; private System.Windows.Forms.ToolStripMenuItem centercenterToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem paragraphpToolStripMenuItem; + private MetroFramework.Controls.MetroTabPage pythontab; + private MetroFramework.Controls.MetroTile pythonSave; + private MetroFramework.Controls.MetroTile pythonRun; + private MetroFramework.Controls.MetroTile pythonOpen; + private MetroFramework.Controls.MetroTextBox pythonCode; + private MetroFramework.Controls.MetroTile pythonExtract; + private System.Windows.Forms.OpenFileDialog pythonOpenFileDialog; + private System.Windows.Forms.SaveFileDialog pythonSaveFileDialog; } } diff --git a/cashew/Form1.cs b/cashew/Form1.cs index 177b3b2..6d71c92 100644 --- a/cashew/Form1.cs +++ b/cashew/Form1.cs @@ -7,6 +7,7 @@ using System.IO; using CCFunctions; using System.Drawing; using System.Runtime.Serialization.Formatters.Binary; +using System.Diagnostics; #pragma warning disable IDE1006 namespace cashew { public partial class MAIN : MetroForm { @@ -18,8 +19,8 @@ namespace cashew { string[] cseditrefl; public MAIN() { InitializeComponent(); - metroControls = new MetroFramework.Interfaces.IMetroControl[] { nmtext, metroTabControl1, cstab, infotab, nightmodeToggle, cseditopen, cseditrun, cseditsave, cseditcode, csedit, cslive, csediterrorpanel, csediterrors, cseditref, infoPanel, htmltab, csinftc, csedittp, cslivetp, htmltext, htmltitle, htmlOptionsTile, htmlOptionsMenu, htmlRefreshTile, htmlLoad, htmlSave, - htmlLoadIndicator, htmlUpdateToggle, htmlLiveLabel, livehider, nightmodehide, cslivenotyetimplemented}; + metroControls = new MetroFramework.Interfaces.IMetroControl[] { nmtext, languageTabControl, cstab, infotab, nightmodeToggle, cseditopen, cseditrun, cseditsave, cseditcode, csedit, cslive, csediterrorpanel, csediterrors, cseditref, infoPanel, htmltab, csinftc, csedittp, cslivetp, htmltext, htmltitle, htmlOptionsTile, htmlOptionsMenu, htmlRefreshTile, htmlLoad, htmlSave, + htmlLoadIndicator, htmlUpdateToggle, htmlLiveLabel, livehider, nightmodehide, cslivenotyetimplemented, pythontab, pythonSave, pythonRun, pythonOpen, pythonCode, pythonExtract}; normalControls = new Control[] { htmlSep, htmldisplay }; menuItems = new ToolStripMenuItem[] { hTMLToolStripMenuItem, javaScriptToolStripMenuItem, cSSToolStripMenuItem, pHPToolStripMenuItem, hTMLStructureSetupToolStripMenuItem, javaStructureSetupToolStripMenuItem, cSSStructureSetupToolStripMenuItem, pHPStructureSetupToolStripMenuItem, linkToolStripMenuItem, imageToolStripMenuItem, textToolStripMenuItem, tableToolStripMenuItem, listsToolStripMenuItem, functionToolStripMenuItem, textToolStripMenuItem1, alertBoxToolStripMenuItem, timeoutToolStripMenuItem, randomNumberToolStripMenuItem, cSSCustomizeTagToolStripMenuItem, cSSCustomTagPropertiesToolStripMenuItem, textToolStripMenuItem3, headingsToolStripMenuItem, boldbToolStripMenuItem, underlineuToolStripMenuItem, italiciToolStripMenuItem, @@ -34,7 +35,7 @@ namespace cashew { csinftc.SizeMode = TabSizeMode.Fixed; htmldisplay.DocumentText = htmltext.Text; metroToggle1_CheckedChanged(this, new EventArgs()); - metroTabControl1.SelectedTab = infotab; + languageTabControl.SelectedTab = infotab; csinftc.SelectedTab = csedittp; } @@ -72,6 +73,7 @@ namespace cashew { Refresh(); } #endregion + #region CS System.Reflection.MethodInfo script; private void metroLabel2_Click(object sender, EventArgs e) => MessageBox.Show(csediterrors.Text, "Errors"); @@ -278,8 +280,41 @@ namespace cashew { #endregion #region Python + private void pythonOpen_Click(object sender, EventArgs e) { + if (pythonOpenFileDialog.ShowDialog() == DialogResult.OK) { + try { + pythonCode.Lines = File.ReadAllLines(pythonOpenFileDialog.FileName); + } catch (Exception e1) { + MessageBox.Show(e1.Message, "Loading Failed"); + } + } + } + + private void pythonSave_Click(object sender, EventArgs e) { + if (pythonSaveFileDialog.ShowDialog() == DialogResult.OK) { + try { + File.WriteAllLines(pythonSaveFileDialog.FileName, pythonCode.Lines); + } + catch (Exception e1) { + MessageBox.Show(e1.Message, "Saving Failed"); + } + } + } + + private void pythonRun_Click(object sender, EventArgs e) { + File.WriteAllLines(Path.GetTempPath() + @"Python\tmp.py",pythonCode.Lines); + Process process = Process.Start(new ProcessStartInfo { FileName = Path.GetTempPath() + @"Python\python.exe", Arguments = Path.GetTempPath() + @"Python\tmp.py", UseShellExecute = true }); + } + + private void metroTile1_Click(object sender, EventArgs e) { + if (Directory.Exists(Path.GetTempPath() + "Python")) { + Directory.Delete(Path.GetTempPath() + "Python"); + } + try { Directory.CreateDirectory(Path.GetTempPath() + "Python"); } catch { } + File.WriteAllBytes(Path.GetTempPath() + "Python.zip", Resources.Python); + System.IO.Compression.ZipFile.ExtractToDirectory(Path.GetTempPath() + "Python.zip", Path.GetTempPath() + "Python"); + } #endregion } } -//CPP? #endregion \ No newline at end of file diff --git a/cashew/Form1.resx b/cashew/Form1.resx index ce6082f..89cebf8 100644 --- a/cashew/Form1.resx +++ b/cashew/Form1.resx @@ -131,6 +131,13 @@ namespace Project } } } + + + 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! 17, 17 @@ -148,7 +155,13 @@ namespace Project 574, 17 - 710, 17 + 730, 17 + + + 890, 17 + + + 1064, 17 diff --git a/cashew/Resources.Designer.cs b/cashew/Resources.Designer.cs new file mode 100644 index 0000000..b7222cb --- /dev/null +++ b/cashew/Resources.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace cashew { + using System; + + + ///

+ /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] Python { + get { + object obj = ResourceManager.GetObject("Python", resourceCulture); + return ((byte[])(obj)); + } + } + } +} diff --git a/cashew/Resources.resx b/cashew/Resources.resx new file mode 100644 index 0000000..884ffbd --- /dev/null +++ b/cashew/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Resources\Python.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/cashew/Resources/Python.zip b/cashew/Resources/Python.zip new file mode 100644 index 0000000..9be2f86 Binary files /dev/null and b/cashew/Resources/Python.zip differ diff --git a/cashew/cashew.csproj b/cashew/cashew.csproj index db0eb5a..2ca5170 100644 --- a/cashew/cashew.csproj +++ b/cashew/cashew.csproj @@ -64,6 +64,7 @@ ..\..\T.O.F.U\Net_TOFU\bin\Release\System.IO.Compression.dll + @@ -84,6 +85,11 @@ + + True + True + Resources.resx + Form1.cs @@ -97,6 +103,10 @@ Resources.resx True + + ResXFileCodeGenerator + Resources.Designer.cs + SettingsSingleFileGenerator @@ -107,6 +117,7 @@ Settings.settings True +