mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-11 05:35:17 +00:00
44 lines
1.0 KiB
C#
44 lines
1.0 KiB
C#
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace MPF.UI.Core.Windows
|
|
{
|
|
public class WindowBase : Window
|
|
{
|
|
#region Event Handlers
|
|
|
|
/// <summary>
|
|
/// Handler for CloseButton Click event
|
|
/// </summary>
|
|
public void CloseButtonClick(object sender, RoutedEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
this.DialogResult = false;
|
|
}
|
|
catch { }
|
|
|
|
Close();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Handler for MinimizeButton Click event
|
|
/// </summary>
|
|
public void MinimizeButtonClick(object sender, RoutedEventArgs e)
|
|
{
|
|
this.WindowState = WindowState.Minimized;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Handler for Title MouseDown event
|
|
/// </summary>
|
|
public void TitleMouseDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
if (e.ChangedButton == MouseButton.Left)
|
|
this.DragMove();
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|