mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 19:26:31 +00:00
add editor, fix some bugs
WIP
This commit is contained in:
@@ -7,7 +7,9 @@ public static class ColorExtensions
|
||||
public static Color ToColor(this int id)
|
||||
{
|
||||
var index = id % ColorValues.Length;
|
||||
var hex = $"#40{ColorValues[index]}";
|
||||
var hex = index == -1
|
||||
? "#40DDDDDD"
|
||||
: $"#40{ColorValues[index]}";
|
||||
var color =(Color)ColorConverter.ConvertFromString(hex);
|
||||
return color;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
using Azaion.Annotator.DTO;
|
||||
|
||||
namespace Azaion.Annotator.Extensions;
|
||||
|
||||
public static class WindowExtensions
|
||||
{
|
||||
public static WindowConfig GetConfig(this Window window) =>
|
||||
new()
|
||||
{
|
||||
WindowSize = new Size(window.Width, window.Height),
|
||||
WindowLocation = new Point(window.Left, window.Top),
|
||||
FullScreen = window.WindowState == WindowState.Maximized
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user