2014-01-30 15:28:05 +00:00
|
|
|
|
using System.Drawing;
|
2014-05-18 02:03:38 +00:00
|
|
|
|
using Newtonsoft.Json;
|
2014-01-30 15:28:05 +00:00
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.Common
|
2014-01-30 00:55:31 +00:00
|
|
|
|
{
|
|
|
|
|
public class ToolDialogSettings
|
|
|
|
|
{
|
|
|
|
|
public ToolDialogSettings()
|
|
|
|
|
{
|
|
|
|
|
SaveWindowPosition = true;
|
2014-02-15 20:19:36 +00:00
|
|
|
|
FloatingWindow = true;
|
2014-01-30 00:55:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int? Wndx { get; set; }
|
|
|
|
|
public int? Wndy { get; set; }
|
|
|
|
|
public int? Width { get; set; }
|
|
|
|
|
public int? Height { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool SaveWindowPosition { get; set; }
|
2014-01-30 03:34:58 +00:00
|
|
|
|
public bool TopMost { get; set; }
|
2014-01-30 00:55:31 +00:00
|
|
|
|
public bool FloatingWindow { get; set; }
|
|
|
|
|
|
2014-05-18 02:03:38 +00:00
|
|
|
|
[JsonIgnore]
|
2014-01-30 00:55:31 +00:00
|
|
|
|
public bool UseWindowPosition
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return SaveWindowPosition && Wndx.HasValue && Wndy.HasValue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-18 02:03:38 +00:00
|
|
|
|
[JsonIgnore]
|
2014-01-30 00:55:31 +00:00
|
|
|
|
public bool UseWindowSize
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2014-01-30 03:10:17 +00:00
|
|
|
|
return SaveWindowPosition && Width.HasValue && Height.HasValue;
|
2014-01-30 00:55:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2014-01-30 15:28:05 +00:00
|
|
|
|
|
2014-05-18 02:03:38 +00:00
|
|
|
|
[JsonIgnore]
|
2014-01-30 15:28:05 +00:00
|
|
|
|
public Point WindowPosition
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new Point(Wndx ?? 0, Wndy ?? 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-18 02:03:38 +00:00
|
|
|
|
[JsonIgnore]
|
2014-01-30 15:28:05 +00:00
|
|
|
|
public Size WindowSize
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new Size(Width ?? 0, Height ?? 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-01-30 00:55:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|