diff --git a/BuildTime.txt b/BuildTime.txt index 3a7f7b3..8634bc7 100644 --- a/BuildTime.txt +++ b/BuildTime.txt @@ -1 +1 @@ -2026-03-29 20:23:53 \ No newline at end of file +2026-03-29 21:14:20 \ No newline at end of file diff --git a/GitCommit.txt b/GitCommit.txt index a4544c3..ec9abb1 100644 --- a/GitCommit.txt +++ b/GitCommit.txt @@ -1 +1 @@ -36f467d \ No newline at end of file +9f12c64 \ No newline at end of file diff --git a/Gui/AppManager.cs b/Gui/AppManager.cs index 95d2a5b..c103d3c 100644 --- a/Gui/AppManager.cs +++ b/Gui/AppManager.cs @@ -143,6 +143,7 @@ namespace CMLeonOS.Gui RegisterApp(new AppMetadata("UILib Gallery", () => { return new UILibGallery(); }, Icons.Icon_Default, Color.FromArgb(25, 25, 25))); RegisterApp(new AppMetadata("Music Editor", () => { return new MusicEditor(); }, Icons.Icon_Default, Color.FromArgb(25, 25, 25))); RegisterApp(new AppMetadata("Function Grapher", () => { return new FunctionGrapher(); }, Icons.Icon_Default, Color.FromArgb(25, 25, 25))); + RegisterApp(new AppMetadata("CodeBlocks", () => { return new CodeBlocks(); }, Icons.Icon_Default, Color.FromArgb(25, 25, 25))); Logger.Logger.Instance.Info("AppManager", $"{AppMetadatas.Count} apps were registered."); diff --git a/Gui/Apps/CodeBlocks.cs b/Gui/Apps/CodeBlocks.cs new file mode 100644 index 0000000..2ca1e9c --- /dev/null +++ b/Gui/Apps/CodeBlocks.cs @@ -0,0 +1,537 @@ +using CMLeonOS; +using CMLeonOS.Gui.UILib; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; + +namespace CMLeonOS.Gui.Apps +{ + internal class CodeBlocks : Process + { + internal CodeBlocks() : base("CodeBlocks", ProcessType.Application) { } + + private const string ProjectMagic = "CBLK1"; + + private class Block + { + internal string Type; + internal int A; + internal int B; + internal string Text; + } + + private AppWindow window; + private readonly WindowManager wm = ProcessManager.GetProcess(); + + private Table paletteTable; + private Table programTable; + private Table outputTable; + private TextBox argTextBox; + private NumericUpDown argA; + private NumericUpDown argB; + private TextBox statusBox; + private FileBrowser fileBrowser; + private readonly List