diff --git a/AmiReel.WinUI/.github/instructions/accessibility.instructions.md b/.github/instructions/accessibility.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/accessibility.instructions.md rename to .github/instructions/accessibility.instructions.md diff --git a/AmiReel.WinUI/.github/instructions/code-quality.instructions.md b/.github/instructions/code-quality.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/code-quality.instructions.md rename to .github/instructions/code-quality.instructions.md diff --git a/AmiReel.WinUI/.github/instructions/design-principles.instructions.md b/.github/instructions/design-principles.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/design-principles.instructions.md rename to .github/instructions/design-principles.instructions.md diff --git a/AmiReel.WinUI/.github/instructions/globalization.instructions.md b/.github/instructions/globalization.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/globalization.instructions.md rename to .github/instructions/globalization.instructions.md diff --git a/AmiReel.WinUI/.github/instructions/performance.instructions.md b/.github/instructions/performance.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/performance.instructions.md rename to .github/instructions/performance.instructions.md diff --git a/AmiReel.WinUI/.github/instructions/security.instructions.md b/.github/instructions/security.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/security.instructions.md rename to .github/instructions/security.instructions.md diff --git a/AmiReel.WinUI/.github/instructions/testing.instructions.md b/.github/instructions/testing.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/testing.instructions.md rename to .github/instructions/testing.instructions.md diff --git a/AmiReel.WinUI/.github/instructions/windows-apis.instructions.md b/.github/instructions/windows-apis.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/windows-apis.instructions.md rename to .github/instructions/windows-apis.instructions.md diff --git a/AmiReel.WinUI/.github/instructions/winui-best-practices.instructions.md b/.github/instructions/winui-best-practices.instructions.md similarity index 100% rename from AmiReel.WinUI/.github/instructions/winui-best-practices.instructions.md rename to .github/instructions/winui-best-practices.instructions.md diff --git a/.gitignore b/.gitignore index 4d53f18..cd47807 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,55 @@ -bin/ -obj/ +# Build output +[Bb]in/ +[Oo]bj/ +[Dd]ebug/ +[Rr]elease/ +publish/ + +# IDE / tooling .vs/ .vscode/ +_ReSharper*/ +*.DotSettings.user +*.dotCover +.idea/ + +# MSBuild / user files +*.user +*.suo +*.userosscache +*.sln.docstates *.pdb *.cache *.tmp *.log -*.userosscache +*.binlog + +# Test results TestResults/ +[Tt]est[Rr]esult*/ +*.trx +*.coverage +*.coveragexml + +# NuGet +*.nupkg +*.snupkg +*.nuget.props +*.nuget.targets +project.lock.json + +# MSIX packaging output +AppPackages/ +BundleArtifacts/ +*.msix +*.msixupload +*.appx +*.appxbundle +*.appxupload + +# Local dev signing certificate +devcert.pfx + +# Embedded third-party binaries (fetched separately, see ThirdParty/README.md) ThirdParty/ffmpeg.exe ThirdParty/ffprobe.exe -*.user -*.suo diff --git a/AmiReel.WinUI/AGENTS.md b/AGENTS.md similarity index 100% rename from AmiReel.WinUI/AGENTS.md rename to AGENTS.md diff --git a/AmiReel.WinUI/.gitignore b/AmiReel.WinUI/.gitignore deleted file mode 100644 index dd39356..0000000 --- a/AmiReel.WinUI/.gitignore +++ /dev/null @@ -1,54 +0,0 @@ -## .NET / Visual Studio -[Bb]in/ -[Oo]bj/ -[Dd]ebug/ -[Rr]elease/ -.vs/ -*.user -*.suo -*.userosscache -*.sln.docstates -artifacts/ - -# Build logs -[Ll]og/ -[Ll]ogs/ -*.log -*.binlog - -# Test results -[Tt]est[Rr]esult*/ -*.trx -*.coverage -*.coveragexml - -# NuGet -*.nupkg -*.snupkg -*.nuget.props -*.nuget.targets -project.lock.json - -# MSIX packaging output -AppPackages/ -BundleArtifacts/ -*.msix -*.msixupload -*.appx -*.appxbundle -*.appxupload - -# Publish output -publish/ -*.pubxml -PublishScripts/ - -# Code analysis and tooling -_ReSharper*/ -*.DotSettings.user -*.dotCover -.idea/ - -# Generated files -Generated\ Files/ -*_wpftmp.csproj diff --git a/AmiReel.WinUI/App.xaml b/AmiReel.WinUI/App.xaml deleted file mode 100644 index cc8b137..0000000 --- a/AmiReel.WinUI/App.xaml +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - 18 - - 460 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AmiReel.WinUI/App.xaml.cs b/AmiReel.WinUI/App.xaml.cs deleted file mode 100644 index 7e911c5..0000000 --- a/AmiReel.WinUI/App.xaml.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Controls.Primitives; -using Microsoft.UI.Xaml.Data; -using Microsoft.UI.Xaml.Input; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Navigation; -using Microsoft.UI.Xaml.Shapes; -using WinRT.Interop; - -// To learn more about WinUI, the WinUI project structure, -// and more about our project templates, see: http://aka.ms/winui-project-info. - -namespace AmiReel_WinUI; - -/// -/// Provides application-specific behavior to supplement the default Application class. -/// -public partial class App : Application -{ - private Window? _window; - public static IntPtr MainWindowHandle { get; private set; } - public static MainWindow? MainWindowInstance { get; set; } - - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() - { - InitializeComponent(); - } - - /// - /// Invoked when the application is launched. - /// - /// Details about the launch request and process. - protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) - { - _window = new MainWindow(); - MainWindowHandle = WindowNative.GetWindowHandle(_window); - _window.Activate(); - } -} diff --git a/AmiReel.WinUI/MainWindow.xaml b/AmiReel.WinUI/MainWindow.xaml deleted file mode 100644 index 247e84c..0000000 --- a/AmiReel.WinUI/MainWindow.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/AmiReel.WinUI/MainWindow.xaml.cs b/AmiReel.WinUI/MainWindow.xaml.cs deleted file mode 100644 index 5155340..0000000 --- a/AmiReel.WinUI/MainWindow.xaml.cs +++ /dev/null @@ -1,116 +0,0 @@ -using Microsoft.UI; -using Microsoft.UI.Windowing; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using System; -using System.IO; -using System.Runtime.InteropServices; -using Windows.Graphics; -using Windows.UI; -using WinRT.Interop; - -// To learn more about WinUI, the WinUI project structure, -// and more about our project templates, see: http://aka.ms/winui-project-info. - -namespace AmiReel_WinUI; - -/// -/// The application window. This hosts a Frame that displays pages. Add your -/// UI and logic to MainPage.xaml / MainPage.xaml.cs instead of here so you -/// can use Page features such as navigation events and the Loaded lifecycle. -/// -public sealed partial class MainWindow : Window -{ - private bool _exitConfirmed; - - public MainWindow() - { - InitializeComponent(); - App.MainWindowInstance = this; - - ExtendsContentIntoTitleBar = true; - SetTitleBar(AppTitleBar); - - string? executablePath = Environment.ProcessPath; - if (!string.IsNullOrWhiteSpace(executablePath) && File.Exists(executablePath)) - AppWindow.SetIcon(executablePath); - - SetDefaultSizeAndPosition(); - - // Navigate the root frame to the main page on startup. - RootFrame.Navigate(typeof(MainPage)); - - AppWindow.Closing += AppWindow_Closing; - } - - private void SetDefaultSizeAndPosition() - { - const int DefaultWidth = 1280; - const int DefaultHeight = 860; - const int MinWidth = 1100; - const int MinHeight = 780; - - IntPtr hwnd = WindowNative.GetWindowHandle(this); - double scale = GetDpiForWindow(hwnd) / 96.0; - int width = (int)(DefaultWidth * scale); - int height = (int)(DefaultHeight * scale); - - AppWindow.Resize(new SizeInt32(width, height)); - - if (AppWindow.Presenter is OverlappedPresenter presenter) - { - presenter.PreferredMinimumWidth = (int)(MinWidth * scale); - presenter.PreferredMinimumHeight = (int)(MinHeight * scale); - } - - DisplayArea? displayArea = DisplayArea.GetFromWindowId(Win32Interop.GetWindowIdFromWindow(hwnd), DisplayAreaFallback.Primary); - if (displayArea is not null) - { - int centerX = displayArea.WorkArea.X + (displayArea.WorkArea.Width - width) / 2; - int centerY = displayArea.WorkArea.Y + (displayArea.WorkArea.Height - height) / 2; - AppWindow.Move(new PointInt32(centerX, centerY)); - } - } - - [DllImport("user32.dll")] - private static extern int GetDpiForWindow(IntPtr hwnd); - - public void ApplyTheme(bool isDark) - { - if (Content is FrameworkElement root) - root.RequestedTheme = isDark ? ElementTheme.Dark : ElementTheme.Light; - - AppWindowTitleBar titleBar = AppWindow.TitleBar; - Color foreground = isDark ? Color.FromArgb(255, 0xF5, 0xF7, 0xFB) : Color.FromArgb(255, 0x12, 0x20, 0x33); - Color hoverBackground = isDark ? Color.FromArgb(255, 0x2E, 0x44, 0x6C) : Color.FromArgb(255, 0xD7, 0xE4, 0xF4); - - titleBar.ButtonBackgroundColor = Colors.Transparent; - titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; - titleBar.ButtonForegroundColor = foreground; - titleBar.ButtonInactiveForegroundColor = foreground; - titleBar.ButtonHoverBackgroundColor = hoverBackground; - titleBar.ButtonHoverForegroundColor = foreground; - titleBar.ButtonPressedBackgroundColor = hoverBackground; - titleBar.ButtonPressedForegroundColor = foreground; - } - - private async void AppWindow_Closing(AppWindow sender, AppWindowClosingEventArgs args) - { - if (_exitConfirmed) return; - args.Cancel = true; - - FrameworkElement root = (FrameworkElement)Content; - ContentDialog dialog = DialogHelper.CreateStyled(RootFrame.XamlRoot, root.RequestedTheme); - dialog.Title = "Exit AmiReel?"; - dialog.Content = "Are you sure you want to close the application?"; - dialog.PrimaryButtonText = "Exit"; - dialog.CloseButtonText = "Cancel"; - dialog.DefaultButton = ContentDialogButton.Primary; - - ContentDialogResult result = await dialog.ShowAsync(); - if (result != ContentDialogResult.Primary) return; - - _exitConfirmed = true; - Close(); - } -} diff --git a/AmiReel.WinUI/AmiReel.WinUI.csproj b/AmiReel.csproj similarity index 85% rename from AmiReel.WinUI/AmiReel.WinUI.csproj rename to AmiReel.csproj index 509b078..bd370c0 100644 --- a/AmiReel.WinUI/AmiReel.WinUI.csproj +++ b/AmiReel.csproj @@ -3,9 +3,9 @@ WinExe net10.0-windows10.0.26100.0 10.0.17763.0 - AmiReel_WinUI + AmiReel AmiReel - ..\assets\AmiReel.ico + branding\AmiReel.ico app.manifest x86;x64;ARM64 win-$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) @@ -36,13 +36,8 @@ - - - - - - - + + + + + + + + + + + + - + + + + + + + - + + + + + + - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + 18 + + 460 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs index 2eb3309..c28bd70 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -1,5 +1,48 @@ -namespace AmigaDB.VideoRenderer; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Microsoft.UI.Xaml.Shapes; +using WinRT.Interop; -public partial class App : System.Windows.Application +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace AmiReel; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +public partial class App : Application { + private Window? _window; + public static IntPtr MainWindowHandle { get; private set; } + public static MainWindow? MainWindowInstance { get; set; } + + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + InitializeComponent(); + } + + /// + /// Invoked when the application is launched. + /// + /// Details about the launch request and process. + protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) + { + _window = new MainWindow(); + MainWindowHandle = WindowNative.GetWindowHandle(_window); + _window.Activate(); + } } diff --git a/AmiReel.WinUI/Assets/AppIcon.ico b/Assets/AppIcon.ico similarity index 100% rename from AmiReel.WinUI/Assets/AppIcon.ico rename to Assets/AppIcon.ico diff --git a/AmiReel.WinUI/Assets/LockScreenLogo.scale-200.png b/Assets/LockScreenLogo.scale-200.png similarity index 100% rename from AmiReel.WinUI/Assets/LockScreenLogo.scale-200.png rename to Assets/LockScreenLogo.scale-200.png diff --git a/AmiReel.WinUI/Assets/SplashScreen.scale-200.png b/Assets/SplashScreen.scale-200.png similarity index 100% rename from AmiReel.WinUI/Assets/SplashScreen.scale-200.png rename to Assets/SplashScreen.scale-200.png diff --git a/AmiReel.WinUI/Assets/Square150x150Logo.scale-200.png b/Assets/Square150x150Logo.scale-200.png similarity index 100% rename from AmiReel.WinUI/Assets/Square150x150Logo.scale-200.png rename to Assets/Square150x150Logo.scale-200.png diff --git a/AmiReel.WinUI/Assets/Square44x44Logo.scale-200.png b/Assets/Square44x44Logo.scale-200.png similarity index 100% rename from AmiReel.WinUI/Assets/Square44x44Logo.scale-200.png rename to Assets/Square44x44Logo.scale-200.png diff --git a/AmiReel.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Assets/Square44x44Logo.targetsize-24_altform-unplated.png similarity index 100% rename from AmiReel.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png rename to Assets/Square44x44Logo.targetsize-24_altform-unplated.png diff --git a/AmiReel.WinUI/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png b/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png similarity index 100% rename from AmiReel.WinUI/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png rename to Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png diff --git a/AmiReel.WinUI/Assets/StoreLogo.png b/Assets/StoreLogo.png similarity index 100% rename from AmiReel.WinUI/Assets/StoreLogo.png rename to Assets/StoreLogo.png diff --git a/AmiReel.WinUI/Assets/Wide310x150Logo.scale-200.png b/Assets/Wide310x150Logo.scale-200.png similarity index 100% rename from AmiReel.WinUI/Assets/Wide310x150Logo.scale-200.png rename to Assets/Wide310x150Logo.scale-200.png diff --git a/AmiReel.WinUI/DialogHelper.cs b/DialogHelper.cs similarity index 98% rename from AmiReel.WinUI/DialogHelper.cs rename to DialogHelper.cs index ae9dcab..54b2cab 100644 --- a/AmiReel.WinUI/DialogHelper.cs +++ b/DialogHelper.cs @@ -2,7 +2,7 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; -namespace AmiReel_WinUI; +namespace AmiReel; /// /// Builds ContentDialogs styled to match the app's own palette and button shapes, diff --git a/AmiReel.WinUI/MainPage.xaml b/MainPage.xaml similarity index 99% rename from AmiReel.WinUI/MainPage.xaml rename to MainPage.xaml index 2922a3c..85fd395 100644 --- a/AmiReel.WinUI/MainPage.xaml +++ b/MainPage.xaml @@ -1,6 +1,6 @@ - - - - + + + - - + + - - - - - - - - - - - - -