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,49 @@
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Input;
using System.Windows.Interop;
using AxCopilot.ViewModels;
namespace AxCopilot.Views;
public partial class StatisticsWindow : Window
{
[DllImport("user32.dll")] private static extern void ReleaseCapture();
[DllImport("user32.dll")] private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
private const int WM_NCLBUTTONDOWN = 0xA1;
private const int HTBOTTOMRIGHT = 17;
private readonly StatisticsViewModel _vm;
public StatisticsWindow()
{
InitializeComponent();
_vm = new StatisticsViewModel();
DataContext = _vm;
}
private void Window_MouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left && e.LeftButton == MouseButtonState.Pressed)
try { DragMove(); } catch { }
}
private void ResizeGrip_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (e.ButtonState != MouseButtonState.Pressed) return;
ReleaseCapture();
SendMessage(new WindowInteropHelper(this).Handle, WM_NCLBUTTONDOWN, (IntPtr)HTBOTTOMRIGHT, IntPtr.Zero);
}
private void Close_Click(object sender, RoutedEventArgs e) => Close();
private void Refresh_Click(object sender, RoutedEventArgs e) => _vm.Refresh();
private void StatsTab_Click(object sender, RoutedEventArgs e)
{
if (PanelMain == null || PanelCommander == null || PanelAgent == null) return;
PanelMain.Visibility = StatsTabMain.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
PanelCommander.Visibility = StatsTabCommander.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
PanelAgent.Visibility = StatsTabAgent.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
}
}