Files
ServiceBus98/ServiceBus98/App.xaml.cs
2025-09-05 20:21:45 -04:00

64 lines
1.6 KiB
C#

using System.Configuration;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace ServiceBus95;
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private void TitlebarMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
Window parent = Window.GetWindow((DockPanel)sender);
if (e.ChangedButton == System.Windows.Input.MouseButton.Left)
{
parent.DragMove();
}
}
private void CloseButtonClick(object sender, RoutedEventArgs e)
{
Window parent = Window.GetWindow((Button)sender);
parent.Close();
}
private void MinimizeButtonClick(object sender, RoutedEventArgs e)
{
Window parent = Window.GetWindow((Button)sender);
parent.WindowState = WindowState.Minimized;
}
private void MaximizeButtonClick(object sender, RoutedEventArgs e)
{
Window parent = Window.GetWindow((Button)sender);
if (parent.WindowState == WindowState.Normal)
{
// TODO: This actually goes fullscreen. Manually setting width and height to fixed values just as an indication that it is working.
parent.WindowState = WindowState.Maximized;
parent.Width = 1280;
parent.Height = 720;
}
else
{
parent.WindowState = WindowState.Normal;
parent.Width = 800;
parent.Height = 600;
}
}
private void TabCloseButton_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("You close the tab");
}
}