Move dlgMetadata as main form.
This commit is contained in:
@@ -39,7 +39,7 @@ namespace CICMMetadataEditor.Desktop
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
new Application(Eto.Platform.Detect).Run(new MainForm());
|
new Application(Eto.Platform.Detect).Run(new dlgMetadata());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ namespace CICMMetadataEditor.XamMac
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
new Application(Eto.Platforms.XamMac2).Run(new MainForm());
|
new Application(Eto.Platforms.XamMac2).Run(new dlgMetadata());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--
|
|
||||||
//
|
|
||||||
// Author:
|
|
||||||
// Natalia Portillo claunia@claunia.com
|
|
||||||
//
|
|
||||||
// Copyright (c) 2017-2018, © Natalia Portillo
|
|
||||||
//
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
|
||||||
// following conditions are met:
|
|
||||||
//
|
|
||||||
// * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
|
||||||
// following disclaimer.
|
|
||||||
// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
|
|
||||||
// following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote
|
|
||||||
// products derived from this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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>
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
//
|
|
||||||
// Author:
|
|
||||||
// Natalia Portillo claunia@claunia.com
|
|
||||||
//
|
|
||||||
// Copyright (c) 2017-2018, © Natalia Portillo
|
|
||||||
//
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
|
||||||
// following conditions are met:
|
|
||||||
//
|
|
||||||
// * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
|
||||||
// following disclaimer.
|
|
||||||
// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
|
|
||||||
// following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote
|
|
||||||
// products derived from this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Eto.Forms;
|
|
||||||
using Eto.Drawing;
|
|
||||||
using Eto.Serialization.Xaml;
|
|
||||||
|
|
||||||
namespace CICMMetadataEditor
|
|
||||||
{
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
//
|
//
|
||||||
-->
|
-->
|
||||||
<Dialog xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="533" Width="909" Resizable="True" Title="Editing metadata...">
|
<Form xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="533" Width="909" Resizable="True" Title="Editing metadata...">
|
||||||
<StackLayout Orientation="Vertical">
|
<StackLayout Orientation="Vertical">
|
||||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||||
<TabControl>
|
<TabControl>
|
||||||
@@ -346,4 +346,24 @@
|
|||||||
</StackLayout>
|
</StackLayout>
|
||||||
</StackLayoutItem>
|
</StackLayoutItem>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</Dialog>
|
<Form.Menu>
|
||||||
|
<MenuBar>
|
||||||
|
<ButtonMenuItem Text="F&ile">
|
||||||
|
<ButtonMenuItem Text="New" Shortcut="CommonModifier+N" Click="OnNewClicked" />
|
||||||
|
<ButtonMenuItem Text="Open" Shortcut="CommonModifier+O" Click="OnOpenClicked" />
|
||||||
|
<SeparatorMenuItem/>
|
||||||
|
<ButtonMenuItem Text="Save" Shortcut="CommonModifier+S" Click="OnSaveClicked" />
|
||||||
|
<ButtonMenuItem Text="Save as" Shortcut="{On Control+Shift+S, Mac=AlternateModifier+Application+Shift+S}" Click="OnSaveAsClicked" />
|
||||||
|
</ButtonMenuItem>
|
||||||
|
<MenuBar.ApplicationItems>
|
||||||
|
<ButtonMenuItem Text="Preferences.." Shortcut="{On Control+Shift+Comma, Mac=Application+Comma}" />
|
||||||
|
</MenuBar.ApplicationItems>
|
||||||
|
<MenuBar.QuitItem>
|
||||||
|
<ButtonMenuItem Text="Quit" Shortcut="CommonModifier+Q" Click="OnQuitClicked" />
|
||||||
|
</MenuBar.QuitItem>
|
||||||
|
<MenuBar.AboutItem>
|
||||||
|
<ButtonMenuItem Text="About..." Click="OnAboutClicked" />
|
||||||
|
</MenuBar.AboutItem>
|
||||||
|
</MenuBar>
|
||||||
|
</Form.Menu>
|
||||||
|
</Form>
|
||||||
@@ -41,7 +41,7 @@ using BorderType = Schemas.BorderType;
|
|||||||
|
|
||||||
namespace CICMMetadataEditor
|
namespace CICMMetadataEditor
|
||||||
{
|
{
|
||||||
public class dlgMetadata : Dialog
|
public class dlgMetadata : Form
|
||||||
{
|
{
|
||||||
AdvertisementType[] adverts;
|
AdvertisementType[] adverts;
|
||||||
AudioMediaType[] audiomedias;
|
AudioMediaType[] audiomedias;
|
||||||
@@ -82,6 +82,36 @@ namespace CICMMetadataEditor
|
|||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void OnAboutClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
new AboutDialog().ShowDialog(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnQuitClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Application.Instance.Quit();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnNewClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnOpenClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnSaveClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnSaveAsClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void LoadData()
|
void LoadData()
|
||||||
{
|
{
|
||||||
Modified = false;
|
Modified = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user