mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
[WIP] First working save and load
Still have an issue where the 'Equals' doesn't detect that there is a different primary screen, so it won't let me save a new profile for the slightly changed display settings.
This commit is contained in:
parent
ddbd6431c5
commit
5aad5003ac
@ -111,7 +111,7 @@ namespace DisplayMagicianShared.AMD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonRequired]
|
/*[JsonRequired]
|
||||||
public override List<ScreenPosition> Screens
|
public override List<ScreenPosition> Screens
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -135,8 +135,8 @@ namespace DisplayMagicianShared.AMD
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
/*if (!ProfileRepository.ProfilesLoaded)
|
*//*if (!ProfileRepository.ProfilesLoaded)
|
||||||
return null;*/
|
return null;*//*
|
||||||
|
|
||||||
if (_profileBitmap != null)
|
if (_profileBitmap != null)
|
||||||
return _profileBitmap;
|
return _profileBitmap;
|
||||||
@ -154,9 +154,8 @@ namespace DisplayMagicianShared.AMD
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//[JsonConverter(typeof(CustomBitmapConverter))]
|
[JsonConverter(typeof(CustomBitmapConverter))]
|
||||||
|
public override Bitmap ProfileTightestBitmap
|
||||||
/*public override Bitmap ProfileTightestBitmap
|
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -132,7 +132,7 @@ namespace DisplayMagicianShared.NVIDIA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonRequired]
|
/*[JsonRequired]
|
||||||
public override List<ScreenPosition> Screens
|
public override List<ScreenPosition> Screens
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -170,6 +170,26 @@ namespace DisplayMagicianShared.NVIDIA
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonConverter(typeof(CustomBitmapConverter))]
|
||||||
|
public override Bitmap ProfileTightestBitmap
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_profileShortcutBitmap != null)
|
||||||
|
return _profileShortcutBitmap;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_profileShortcutBitmap = this.ProfileIcon.ToTightestBitmap();
|
||||||
|
return _profileShortcutBitmap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_profileShortcutBitmap = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public override bool IsValid()
|
public override bool IsValid()
|
||||||
|
@ -58,7 +58,7 @@ namespace DisplayMagicianShared
|
|||||||
private ProfileIcon _profileIcon;
|
private ProfileIcon _profileIcon;
|
||||||
private Bitmap _profileBitmap, _profileShortcutBitmap;
|
private Bitmap _profileBitmap, _profileShortcutBitmap;
|
||||||
private List<string> _profileDisplayIdentifiers = new List<string>();
|
private List<string> _profileDisplayIdentifiers = new List<string>();
|
||||||
private List<ScreenPosition> _screens;
|
private List<ScreenPosition> _screens = new List<ScreenPosition>();
|
||||||
|
|
||||||
internal static string AppDataPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "DisplayMagician");
|
internal static string AppDataPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "DisplayMagician");
|
||||||
private static readonly string uuidV4Regex = @"(?im)^[{(]?[0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$";
|
private static readonly string uuidV4Regex = @"(?im)^[{(]?[0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$";
|
||||||
@ -196,9 +196,6 @@ namespace DisplayMagicianShared
|
|||||||
|
|
||||||
public virtual string Name { get; set; }
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
//public Topology.Path[] Paths { get; set; } = new Topology.Path[0];
|
|
||||||
|
|
||||||
//public virtual ProfileData { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual ProfileIcon ProfileIcon
|
public virtual ProfileIcon ProfileIcon
|
||||||
@ -220,7 +217,7 @@ namespace DisplayMagicianShared
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonRequired]
|
[JsonIgnore]
|
||||||
public virtual List<ScreenPosition> Screens
|
public virtual List<ScreenPosition> Screens
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -96,7 +96,7 @@ namespace DisplayMagicianShared.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonRequired]
|
/*[JsonRequired]
|
||||||
public override List<ScreenPosition> Screens
|
public override List<ScreenPosition> Screens
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -120,8 +120,8 @@ namespace DisplayMagicianShared.Windows
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
/*if (!ProfileRepository.ProfilesLoaded)
|
*//*if (!ProfileRepository.ProfilesLoaded)
|
||||||
return null;*/
|
return null;*//*
|
||||||
|
|
||||||
if (_profileBitmap != null)
|
if (_profileBitmap != null)
|
||||||
return _profileBitmap;
|
return _profileBitmap;
|
||||||
@ -137,7 +137,7 @@ namespace DisplayMagicianShared.Windows
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*[JsonConverter(typeof(CustomBitmapConverter))]
|
/*[JsonConverter(typeof(CustomBitmapConverter))]
|
||||||
public override Bitmap ProfileTightestBitmap
|
public override Bitmap ProfileTightestBitmap
|
||||||
|
Loading…
Reference in New Issue
Block a user