mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add GUI skeleton.
This commit is contained in:
17
DiscImageChef.Gui/DiscImageChef.Gui.csproj
Normal file
17
DiscImageChef.Gui/DiscImageChef.Gui.csproj
Normal file
@@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.6</TargetFramework>
|
||||
<RootNamespace>DiscImageChef.Gui</RootNamespace>
|
||||
<PackageVersion>1.0</PackageVersion>
|
||||
<Title>DiscImageChef.Gui</Title>
|
||||
<Copyright>Copyright © 2018</Copyright>
|
||||
<Description>Description of DiscImageChef.Gui</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Eto.Forms" Version="2.4.1" />
|
||||
<PackageReference Include="Eto.Serialization.Xaml" Version="2.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
34
DiscImageChef.Gui/MainForm.xeto
Normal file
34
DiscImageChef.Gui/MainForm.xeto
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Form
|
||||
xmlns="http://schema.picoe.ca/eto.forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="My Eto Form"
|
||||
ClientSize="400, 350"
|
||||
Padding="10"
|
||||
>
|
||||
<StackLayout>
|
||||
<Label>Some Content</Label>
|
||||
</StackLayout>
|
||||
|
||||
<Form.Menu>
|
||||
<MenuBar>
|
||||
<ButtonMenuItem Text="F&ile">
|
||||
<ButtonMenuItem Text="Click Me!" Click="HandleClickMe" />
|
||||
</ButtonMenuItem>
|
||||
<MenuBar.ApplicationItems>
|
||||
<ButtonMenuItem Text="Preferences.." Shortcut="{On Control+O, Mac=Application+Comma}" />
|
||||
</MenuBar.ApplicationItems>
|
||||
<MenuBar.QuitItem>
|
||||
<ButtonMenuItem Text="Quit" Shortcut="CommonModifier+Q" Click="HandleQuit" />
|
||||
</MenuBar.QuitItem>
|
||||
<MenuBar.AboutItem>
|
||||
<ButtonMenuItem Text="About..." Click="HandleAbout" />
|
||||
</MenuBar.AboutItem>
|
||||
</MenuBar>
|
||||
</Form.Menu>
|
||||
<Form.ToolBar>
|
||||
<ToolBar>
|
||||
<ButtonToolItem Text="Click Me!" Click="HandleClickMe" />
|
||||
</ToolBar>
|
||||
</Form.ToolBar>
|
||||
</Form>
|
||||
31
DiscImageChef.Gui/MainForm.xeto.cs
Normal file
31
DiscImageChef.Gui/MainForm.xeto.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Eto.Forms;
|
||||
using Eto.Drawing;
|
||||
using Eto.Serialization.Xaml;
|
||||
|
||||
namespace DiscImageChef.Gui
|
||||
{
|
||||
public class MainForm : Form
|
||||
{
|
||||
public MainForm()
|
||||
{
|
||||
XamlReader.Load(this);
|
||||
}
|
||||
|
||||
protected void HandleClickMe(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("I was clicked!");
|
||||
}
|
||||
|
||||
protected void HandleAbout(object sender, EventArgs e)
|
||||
{
|
||||
new AboutDialog().ShowDialog(this);
|
||||
}
|
||||
|
||||
protected void HandleQuit(object sender, EventArgs e)
|
||||
{
|
||||
Application.Instance.Quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user