mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-09-06 20:51:15 +12:00
Remove use of resx file Resource files are marked as "Resource" instead Resources are loaded via resource dictionaries (either from code behind or XAML directly through binding) Reduce amount of required image conversions Also fix overlay of 50 percent transparency (is now rendered half transparent correct instead of adding "white fog") Remove obsolete image as rendering is done directly in code Also fix rendering of link indicator at correct image position Also remove setting Icons of all Windows (as default is application icon anyway)
37 lines
1 KiB
C#
37 lines
1 KiB
C#
// <copyright file="TaskbarLogo.xaml.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
//
|
|
// Copyright (c) 2022-2023 Peter Kirmeier
|
|
|
|
namespace SystemTrayMenu.UserInterface
|
|
{
|
|
using System;
|
|
using System.Reflection;
|
|
using System.Windows;
|
|
|
|
/// <summary>
|
|
/// Logic of Taskbar window.
|
|
/// </summary>
|
|
public partial class TaskbarLogo : Window
|
|
{
|
|
public TaskbarLogo()
|
|
{
|
|
InitializeComponent();
|
|
|
|
Assembly myassembly = Assembly.GetExecutingAssembly();
|
|
string myname = myassembly.GetName().Name ?? string.Empty;
|
|
Title = myname;
|
|
|
|
Closed += (_, _) => Application.Current.Shutdown();
|
|
ContentRendered += MoveOutOfScreen;
|
|
}
|
|
|
|
private void MoveOutOfScreen(object? sender, EventArgs e)
|
|
{
|
|
// Do this only once
|
|
ContentRendered -= MoveOutOfScreen;
|
|
Top += SystemParameters.VirtualScreenHeight;
|
|
}
|
|
}
|
|
}
|