Display an actual splash screen image if we have one in the current directory

This commit is contained in:
Michael Becker 2019-10-01 02:42:29 -04:00
parent 8adf3fb598
commit 7cef4b2432
5 changed files with 12 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -694,6 +694,9 @@
</ItemGroup>
<ItemGroup>
<None Include="Accessors\File.uexml" />
<None Include="Images\SplashScreen.png" />
<None Include="Images\SplashScreen.xcf" />
<None Include="splash.bmp" />
</ItemGroup>
<Target Name="Build">
<Copy SourceFiles="@(Content)" DestinationFiles="@(Content-&gt;'$(OutputPath)%(RelativeDir)%(Filename)%(Extension)')" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

View File

@ -33,11 +33,18 @@ namespace UniversalEditor.UserInterface
{
this.Decorated = false;
this.Layout = new BoxLayout(Orientation.Vertical);
this.Size = new Dimension2D(300, 300);
this.StartPosition = WindowStartPosition.Center;
PictureFrame image = new PictureFrame();
image.IconName = "universal-editor";
if (System.IO.File.Exists("splash.bmp"))
{
image.Image = Image.FromFile("splash.bmp");
}
else
{
image.IconName = "universal-editor";
this.Size = new Dimension2D(300, 300);
}
image.IconSize = new Dimension2D(128, 128);
Label lbl = new Label("Universal Editor");