Initial commit to new repository

This commit is contained in:
2026-04-03 18:22:19 +09:00
commit 4458bb0f52
7672 changed files with 452440 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
using System.Windows;
using System.Windows.Media;
using System.Windows.Threading;
namespace AxCopilot.Views;
/// <summary>
/// 스포이드 색상 추출 결과를 반투명 창으로 5초간 표시합니다.
/// 클릭 위치 근처에 나타나며, HEX 코드를 클립보드에 복사합니다.
/// </summary>
public partial class ColorPickResultWindow : Window
{
private readonly DispatcherTimer _timer;
public ColorPickResultWindow(System.Drawing.Color color, double screenX, double screenY)
{
InitializeComponent();
// 색상 표시
var wpfColor = Color.FromRgb(color.R, color.G, color.B);
ColorPreview.Fill = new SolidColorBrush(wpfColor);
HexText.Text = $"#{color.R:X2}{color.G:X2}{color.B:X2}";
RgbText.Text = $"RGB({color.R}, {color.G}, {color.B})";
// 클립보드에 HEX 코드 복사
try { Clipboard.SetText(HexText.Text); }
catch { }
// 위치: 클릭 지점 오른쪽 아래
var area = SystemParameters.WorkArea;
Left = Math.Min(screenX + 20, area.Right - 200);
Top = Math.Min(screenY + 20, area.Bottom - 160);
// 5초 타이머
_timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(5) };
_timer.Tick += (_, _) => Close();
_timer.Start();
// 클릭으로 닫기
MouseDown += (_, _) => Close();
// 등장 애니메이션
Opacity = 0;
Loaded += (_, _) =>
{
var anim = new System.Windows.Media.Animation.DoubleAnimation(0, 1,
TimeSpan.FromMilliseconds(200));
BeginAnimation(OpacityProperty, anim);
};
}
protected override void OnClosed(EventArgs e)
{
_timer.Stop();
base.OnClosed(e);
}
}