much happenings in this fucked up world

This commit is contained in:
Persephone Bubblegum-Holidy 2025-05-05 18:16:52 -07:00
parent 29fc81ef37
commit 2f6d3b7b5b
55 changed files with 1067 additions and 52 deletions

View file

@ -0,0 +1,57 @@
using System;
using Eto.Forms;
using Eto.Drawing;
namespace PC2Player
{
public partial class MainForm : Form
{
public MainForm()
{
Title = "My Eto Form";
MinimumSize = new Size(200, 200);
Content = new StackLayout
{
Padding = 10,
Items =
{
"Hello World!",
// add more controls here
}
};
// create a few commands that can be used for the menu and toolbar
var clickMe = new Command { MenuText = "Click Me!", ToolBarText = "Click Me!" };
clickMe.Executed += (sender, e) => MessageBox.Show(this, "I was clicked!");
var quitCommand = new Command { MenuText = "Quit", Shortcut = Application.Instance.CommonModifier | Keys.Q };
quitCommand.Executed += (sender, e) => Application.Instance.Quit();
var aboutCommand = new Command { MenuText = "About..." };
aboutCommand.Executed += (sender, e) => new AboutDialog().ShowDialog(this);
// create menu
Menu = new MenuBar
{
Items =
{
// File submenu
new SubMenuItem { Text = "&File", Items = { clickMe } },
// new SubMenuItem { Text = "&Edit", Items = { /* commands/items */ } },
// new SubMenuItem { Text = "&View", Items = { /* commands/items */ } },
},
ApplicationItems =
{
// application (OS X) or file menu (others)
new ButtonMenuItem { Text = "&Preferences..." },
},
QuitItem = quitCommand,
AboutItem = aboutCommand
};
// create toolbar
ToolBar = new ToolBar { Items = { clickMe } };
}
}
}

View file

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Eto.Forms" Version="2.9.0" />
</ItemGroup>
</Project>