2021-11-10 05:41:39 +13:00
|
|
|
|
// <copyright file="TaskbarForm.cs" company="PlaceholderCompany">
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
|
|
|
|
|
namespace SystemTrayMenu.UserInterface
|
|
|
|
|
{
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
public partial class TaskbarForm : Form
|
|
|
|
|
{
|
|
|
|
|
public TaskbarForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2021-11-18 11:46:43 +13:00
|
|
|
|
Icon = Config.GetAppIcon();
|
2021-12-10 08:00:33 +13:00
|
|
|
|
MaximumSize = new Size(10, 1);
|
2022-02-08 10:45:10 +13:00
|
|
|
|
|
2022-02-07 04:03:09 +13:00
|
|
|
|
// Opacity = 0.01f;
|
|
|
|
|
// (otherwise: Task View causes Explorer restart when SystemTrayMenu is open #299)
|
2021-11-10 05:41:39 +13:00
|
|
|
|
SetLocation();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void TaskbarForm_LocationChanged(object sender, System.EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
SetLocation();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Hide below taskbar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void SetLocation()
|
|
|
|
|
{
|
|
|
|
|
Screen screen = Screen.PrimaryScreen;
|
|
|
|
|
Location = new Point(
|
|
|
|
|
screen.Bounds.Right - Size.Width,
|
|
|
|
|
screen.Bounds.Bottom + 80);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|