mac
Miepee 3 years ago
parent 73a8e9a710
commit 40fa5584d4

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<ApplicationIcon>applicationIcon.ico</ApplicationIcon>
<RollForward>LatestMajor</RollForward>
<TargetFramework>net6.0-windows</TargetFramework>
</PropertyGroup>

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

@ -13,4 +13,19 @@
<ProjectReference Include="..\..\GlennLib\GlennLib.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
</Project>

@ -6,6 +6,7 @@ using System.Threading.Tasks;
using GlennLib;
using Eto.Forms;
using Eto.Drawing;
using ResourcesLib = GlennLib.Resources;
namespace GlennGUI;
@ -23,8 +24,8 @@ public partial class MainForm : Form
return nameOfResource switch
{
nameof(Resources.icon) => Resources.icon,
nameof(Resources.splash) => Resources.splash,
nameof(ResourcesLib.icon) => ResourcesLib.icon,
nameof(ResourcesLib.splash) => ResourcesLib.splash,
_ => throw new InvalidDataException("Invalid Resource name given!")
};
}
@ -34,6 +35,8 @@ public partial class MainForm : Form
Title = $"Glenn - v{Core.Version}";
MinimumSize = new Size(260, 280);
Icon = new Icon(1f, new Bitmap(Resources.applicationIcon));
var mainLayout = new DynamicLayout() {Padding = 10};
mainLayout.BeginVertical();
mainLayout.AddRange(labelSelectMod,
@ -119,12 +122,12 @@ public partial class MainForm : Form
private void ButtonEditSplashClick(object sender, EventArgs e)
{
ButtonEditResourceClick(imageViewSplash, nameof(Resources.splash));
ButtonEditResourceClick(imageViewSplash, nameof(ResourcesLib.splash));
}
private void ButtonEditIconClick(object sender, EventArgs e)
{
ButtonEditResourceClick(imageViewIcon, nameof(Resources.icon));
ButtonEditResourceClick(imageViewIcon, nameof(ResourcesLib.icon));
}
private async void ButtonPortOnClick(object sender, EventArgs e)
@ -140,8 +143,8 @@ public partial class MainForm : Form
string androidPath = $"{currentDir}/{Path.GetFileNameWithoutExtension(modZipPath)}_ANDROID.apk";
string macPath = $"{currentDir}/{Path.GetFileNameWithoutExtension(modZipPath)}_MACOS.zip";
string iconPath = RawMods.GetProperPathToBuiltinIcons(nameof(Resources.icon), userIconPath);
string splashPath = RawMods.GetProperPathToBuiltinIcons(nameof(Resources.splash), userSplashPath);
string iconPath = RawMods.GetProperPathToBuiltinIcons(nameof(ResourcesLib.icon), userIconPath);
string splashPath = RawMods.GetProperPathToBuiltinIcons(nameof(ResourcesLib.splash), userSplashPath);
try
{
@ -228,8 +231,8 @@ public partial class MainForm : Form
string destName = nameOfResource switch
{
nameof(Resources.icon) => userIconPath,
nameof(Resources.splash) => userSplashPath,
nameof(ResourcesLib.icon) => userIconPath,
nameof(ResourcesLib.splash) => userSplashPath,
_ => throw new Exception("You dun goofed!")
};
@ -295,7 +298,7 @@ public partial class MainForm : Form
private readonly ImageView imageViewIcon = new ImageView
{
Image = new Bitmap(GetByteArrayFromResource(nameof(Resources.icon))),
Image = new Bitmap(GetByteArrayFromResource(nameof(ResourcesLib.icon))),
Size = new Size(64, 64)
};
private readonly Button buttonEditIcon = new Button
@ -305,7 +308,7 @@ public partial class MainForm : Form
private readonly ImageView imageViewSplash = new ImageView
{
Image = new Bitmap(GetByteArrayFromResource(nameof(Resources.splash))),
Image = new Bitmap(GetByteArrayFromResource(nameof(ResourcesLib.splash))),
Size = new Size(128, 96),
};
private readonly Button buttonEditSplash = new Button

@ -0,0 +1,58 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GlennGUI {
using System;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static System.Resources.ResourceManager resourceMan;
private static System.Globalization.CultureInfo resourceCulture;
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Resources.ResourceManager ResourceManager {
get {
if (object.Equals(null, resourceMan)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("GlennGUI.Resources.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] applicationIcon {
get {
object obj = ResourceManager.GetObject("applicationIcon", resourceCulture);
return ((byte[])(obj));
}
}
}
}

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="applicationIcon" type="System.Resources.ResXFileRef">
<value>Resources\applicationIcon.ico;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Loading…
Cancel
Save