Major Features: - Integrated osquery for comprehensive system information gathering - Added OsqueryService for executing SQL queries against system tables - Implemented Osquery Console tab for interactive SQL queries System Info Improvements: - Enhanced system info collection using osquery tables - Added support for multiple GPU detection - Improved memory detection with proper GB formatting - Fixed OS Architecture detection (x64/x86) - Better network interface detection (IPv4 only) - Human-readable timestamp formatting UI/UX Enhancements: - Added window resizing with corner drag support - Implemented dynamic window sizing (SizeToContent) - Added ScrollViewer for content overflow - Improved IP address formatting with bullet points - Added field labels to all system info displays - Set minimum/maximum window size constraints Bug Fixes: - Fixed XAML StackPanel Spacing property issue - Merged duplicate MainWindow constructors - Fixed non-nullable field warnings - Fixed EventHandler nullability signatures - Removed redundant hostname/OS name fields - Fixed GPU registry query to detect all GPUs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
929 B
C#
38 lines
929 B
C#
using System;
|
|
using System.Text.Json;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
|
|
using LD_SysInfo.Services;
|
|
|
|
namespace LD_SysInfo
|
|
{
|
|
public partial class OsqueryConsole : Window
|
|
{
|
|
public OsqueryConsole()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private async void RunQuery_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
OutputBox.Text = "Running query...";
|
|
string sql = QueryBox.Text.Trim();
|
|
|
|
try
|
|
{
|
|
var result = await Task.Run(() => OsqueryService.Query(sql));
|
|
|
|
string prettyJson = JsonSerializer.Serialize(result,
|
|
new JsonSerializerOptions { WriteIndented = true });
|
|
|
|
OutputBox.Text = prettyJson;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
OutputBox.Text = $"❌ Error running query:\n{ex}";
|
|
}
|
|
}
|
|
}
|
|
}
|