mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-04-21 19:24:00 +00:00
最大化
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using CMLeonOS;
|
||||
using CMLeonOS;
|
||||
using CMLeonOS.Gui.UILib;
|
||||
using Cosmos.System.Graphics;
|
||||
using System.Drawing;
|
||||
@@ -51,6 +51,29 @@ namespace CMLeonOS.Gui.Apps.CodeStudio
|
||||
|
||||
UpdateTitle();
|
||||
}
|
||||
|
||||
private void WindowResized()
|
||||
{
|
||||
int editorHeight = mainWindow.Height - headersHeight - problemsHeight - outputHeight - (headersHeight * 3);
|
||||
editor.Move(0, headersHeight);
|
||||
editor.Resize(mainWindow.Width, editorHeight);
|
||||
editor.MarkAllLines();
|
||||
editor.Render();
|
||||
|
||||
problems.Move(0, headersHeight + editorHeight + headersHeight);
|
||||
problems.Resize(mainWindow.Width, problemsHeight + (headersHeight * 2));
|
||||
problems.MarkAllLines();
|
||||
problems.Render();
|
||||
|
||||
output.Move(0, headersHeight + editorHeight + problemsHeight + (headersHeight * 2));
|
||||
output.Resize(mainWindow.Width, outputHeight + (headersHeight * 2));
|
||||
output.MarkAllLines();
|
||||
output.Render();
|
||||
|
||||
mainWindow.Clear(Theme.Background);
|
||||
mainWindow.DrawString("Problems", Color.White, 0, headersHeight + editorHeight);
|
||||
mainWindow.DrawString("Output", Color.White, 0, headersHeight + editorHeight + problemsHeight + headersHeight);
|
||||
}
|
||||
|
||||
private static class Theme
|
||||
{
|
||||
@@ -254,6 +277,8 @@ namespace CMLeonOS.Gui.Apps.CodeStudio
|
||||
mainWindow = new AppWindow(process, 96, 96, 800, 600);
|
||||
mainWindow.Clear(Theme.Background);
|
||||
mainWindow.Closing = process.TryStop;
|
||||
mainWindow.CanResize = true;
|
||||
mainWindow.UserResized = WindowResized;
|
||||
UpdateTitle();
|
||||
wm.AddWindow(mainWindow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user