diff --git a/FiloContainer.slnx b/FiloContainer.slnx index 8393e94..4610440 100644 --- a/FiloContainer.slnx +++ b/FiloContainer.slnx @@ -1,4 +1,10 @@ + + + + + + diff --git a/app/FiloExplorer/App.xaml b/app/FiloExplorer/App.xaml new file mode 100644 index 0000000..376cc99 --- /dev/null +++ b/app/FiloExplorer/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/app/FiloExplorer/App.xaml.cs b/app/FiloExplorer/App.xaml.cs new file mode 100644 index 0000000..1b15aeb --- /dev/null +++ b/app/FiloExplorer/App.xaml.cs @@ -0,0 +1,36 @@ +using Microsoft.UI.Xaml; +using Microsoft.Windows.AppNotifications; +using System; + + +namespace FiloExplorer; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +public partial class App : Application +{ + private Window? _window; + public static IServiceProvider Services { get; private set; } = null!; + + /// + /// 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(LaunchActivatedEventArgs args) + { + _window = new MainWindow(); + _window.Activate(); + + AppNotificationManager.Default.Register(); + } +} diff --git a/app/FiloExplorer/Assets/AppIcon.png b/app/FiloExplorer/Assets/AppIcon.png new file mode 100644 index 0000000..33f9592 Binary files /dev/null and b/app/FiloExplorer/Assets/AppIcon.png differ diff --git a/app/FiloExplorer/Assets/AppLogo.png b/app/FiloExplorer/Assets/AppLogo.png new file mode 100644 index 0000000..e79710c Binary files /dev/null and b/app/FiloExplorer/Assets/AppLogo.png differ diff --git a/app/FiloExplorer/Assets/LargeTile.scale-100.png b/app/FiloExplorer/Assets/LargeTile.scale-100.png new file mode 100644 index 0000000..a533552 Binary files /dev/null and b/app/FiloExplorer/Assets/LargeTile.scale-100.png differ diff --git a/app/FiloExplorer/Assets/LargeTile.scale-125.png b/app/FiloExplorer/Assets/LargeTile.scale-125.png new file mode 100644 index 0000000..6f57546 Binary files /dev/null and b/app/FiloExplorer/Assets/LargeTile.scale-125.png differ diff --git a/app/FiloExplorer/Assets/LargeTile.scale-150.png b/app/FiloExplorer/Assets/LargeTile.scale-150.png new file mode 100644 index 0000000..2079736 Binary files /dev/null and b/app/FiloExplorer/Assets/LargeTile.scale-150.png differ diff --git a/app/FiloExplorer/Assets/LargeTile.scale-200.png b/app/FiloExplorer/Assets/LargeTile.scale-200.png new file mode 100644 index 0000000..f35ce5e Binary files /dev/null and b/app/FiloExplorer/Assets/LargeTile.scale-200.png differ diff --git a/app/FiloExplorer/Assets/LargeTile.scale-400.png b/app/FiloExplorer/Assets/LargeTile.scale-400.png new file mode 100644 index 0000000..e17474b Binary files /dev/null and b/app/FiloExplorer/Assets/LargeTile.scale-400.png differ diff --git a/app/FiloExplorer/Assets/LockScreenLogo.scale-200.png b/app/FiloExplorer/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000..7440f0d Binary files /dev/null and b/app/FiloExplorer/Assets/LockScreenLogo.scale-200.png differ diff --git a/app/FiloExplorer/Assets/Remove text from lay.png b/app/FiloExplorer/Assets/Remove text from lay.png new file mode 100644 index 0000000..800b32d Binary files /dev/null and b/app/FiloExplorer/Assets/Remove text from lay.png differ diff --git a/app/FiloExplorer/Assets/SmallTile.scale-100.png b/app/FiloExplorer/Assets/SmallTile.scale-100.png new file mode 100644 index 0000000..524dffd Binary files /dev/null and b/app/FiloExplorer/Assets/SmallTile.scale-100.png differ diff --git a/app/FiloExplorer/Assets/SmallTile.scale-125.png b/app/FiloExplorer/Assets/SmallTile.scale-125.png new file mode 100644 index 0000000..fb6a742 Binary files /dev/null and b/app/FiloExplorer/Assets/SmallTile.scale-125.png differ diff --git a/app/FiloExplorer/Assets/SmallTile.scale-150.png b/app/FiloExplorer/Assets/SmallTile.scale-150.png new file mode 100644 index 0000000..19fb7bd Binary files /dev/null and b/app/FiloExplorer/Assets/SmallTile.scale-150.png differ diff --git a/app/FiloExplorer/Assets/SmallTile.scale-200.png b/app/FiloExplorer/Assets/SmallTile.scale-200.png new file mode 100644 index 0000000..84de515 Binary files /dev/null and b/app/FiloExplorer/Assets/SmallTile.scale-200.png differ diff --git a/app/FiloExplorer/Assets/SmallTile.scale-400.png b/app/FiloExplorer/Assets/SmallTile.scale-400.png new file mode 100644 index 0000000..27c3b57 Binary files /dev/null and b/app/FiloExplorer/Assets/SmallTile.scale-400.png differ diff --git a/app/FiloExplorer/Assets/SplashScreen.scale-100.png b/app/FiloExplorer/Assets/SplashScreen.scale-100.png new file mode 100644 index 0000000..8d6538b Binary files /dev/null and b/app/FiloExplorer/Assets/SplashScreen.scale-100.png differ diff --git a/app/FiloExplorer/Assets/SplashScreen.scale-125.png b/app/FiloExplorer/Assets/SplashScreen.scale-125.png new file mode 100644 index 0000000..8071fd2 Binary files /dev/null and b/app/FiloExplorer/Assets/SplashScreen.scale-125.png differ diff --git a/app/FiloExplorer/Assets/SplashScreen.scale-150.png b/app/FiloExplorer/Assets/SplashScreen.scale-150.png new file mode 100644 index 0000000..69d1408 Binary files /dev/null and b/app/FiloExplorer/Assets/SplashScreen.scale-150.png differ diff --git a/app/FiloExplorer/Assets/SplashScreen.scale-200.png b/app/FiloExplorer/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000..59ea27f Binary files /dev/null and b/app/FiloExplorer/Assets/SplashScreen.scale-200.png differ diff --git a/app/FiloExplorer/Assets/SplashScreen.scale-400.png b/app/FiloExplorer/Assets/SplashScreen.scale-400.png new file mode 100644 index 0000000..7850cda Binary files /dev/null and b/app/FiloExplorer/Assets/SplashScreen.scale-400.png differ diff --git a/app/FiloExplorer/Assets/Square150x150Logo.scale-100.png b/app/FiloExplorer/Assets/Square150x150Logo.scale-100.png new file mode 100644 index 0000000..58a061b Binary files /dev/null and b/app/FiloExplorer/Assets/Square150x150Logo.scale-100.png differ diff --git a/app/FiloExplorer/Assets/Square150x150Logo.scale-125.png b/app/FiloExplorer/Assets/Square150x150Logo.scale-125.png new file mode 100644 index 0000000..5069cd2 Binary files /dev/null and b/app/FiloExplorer/Assets/Square150x150Logo.scale-125.png differ diff --git a/app/FiloExplorer/Assets/Square150x150Logo.scale-150.png b/app/FiloExplorer/Assets/Square150x150Logo.scale-150.png new file mode 100644 index 0000000..c8ec4da Binary files /dev/null and b/app/FiloExplorer/Assets/Square150x150Logo.scale-150.png differ diff --git a/app/FiloExplorer/Assets/Square150x150Logo.scale-200.png b/app/FiloExplorer/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000..cdc5b66 Binary files /dev/null and b/app/FiloExplorer/Assets/Square150x150Logo.scale-200.png differ diff --git a/app/FiloExplorer/Assets/Square150x150Logo.scale-400.png b/app/FiloExplorer/Assets/Square150x150Logo.scale-400.png new file mode 100644 index 0000000..17c7e84 Binary files /dev/null and b/app/FiloExplorer/Assets/Square150x150Logo.scale-400.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png new file mode 100644 index 0000000..7e99e81 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png new file mode 100644 index 0000000..f93c1d3 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png new file mode 100644 index 0000000..7edc3ff Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png new file mode 100644 index 0000000..a840b14 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png new file mode 100644 index 0000000..71c6624 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-16.png new file mode 100644 index 0000000..7e99e81 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-256.png new file mode 100644 index 0000000..7edc3ff Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-32.png new file mode 100644 index 0000000..a840b14 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-48.png new file mode 100644 index 0000000..71c6624 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.scale-100.png b/app/FiloExplorer/Assets/Square44x44Logo.scale-100.png new file mode 100644 index 0000000..6519315 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.scale-100.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.scale-125.png b/app/FiloExplorer/Assets/Square44x44Logo.scale-125.png new file mode 100644 index 0000000..d2d9822 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.scale-125.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.scale-150.png b/app/FiloExplorer/Assets/Square44x44Logo.scale-150.png new file mode 100644 index 0000000..0db34ab Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.scale-150.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.scale-200.png b/app/FiloExplorer/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000..a7d3d1e Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.scale-200.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.scale-400.png b/app/FiloExplorer/Assets/Square44x44Logo.scale-400.png new file mode 100644 index 0000000..4d6f247 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.scale-400.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.targetsize-16.png b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-16.png new file mode 100644 index 0000000..c6bc82a Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-16.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.targetsize-24.png b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-24.png new file mode 100644 index 0000000..ef8441d Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-24.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000..f93c1d3 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.targetsize-256.png b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-256.png new file mode 100644 index 0000000..c348dce Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-256.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.targetsize-32.png b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-32.png new file mode 100644 index 0000000..e6ec315 Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-32.png differ diff --git a/app/FiloExplorer/Assets/Square44x44Logo.targetsize-48.png b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-48.png new file mode 100644 index 0000000..f87c8ac Binary files /dev/null and b/app/FiloExplorer/Assets/Square44x44Logo.targetsize-48.png differ diff --git a/app/FiloExplorer/Assets/StoreLogo.backup.png b/app/FiloExplorer/Assets/StoreLogo.backup.png new file mode 100644 index 0000000..a4586f2 Binary files /dev/null and b/app/FiloExplorer/Assets/StoreLogo.backup.png differ diff --git a/app/FiloExplorer/Assets/StoreLogo.scale-100.png b/app/FiloExplorer/Assets/StoreLogo.scale-100.png new file mode 100644 index 0000000..3b0bac3 Binary files /dev/null and b/app/FiloExplorer/Assets/StoreLogo.scale-100.png differ diff --git a/app/FiloExplorer/Assets/StoreLogo.scale-125.png b/app/FiloExplorer/Assets/StoreLogo.scale-125.png new file mode 100644 index 0000000..353cad9 Binary files /dev/null and b/app/FiloExplorer/Assets/StoreLogo.scale-125.png differ diff --git a/app/FiloExplorer/Assets/StoreLogo.scale-150.png b/app/FiloExplorer/Assets/StoreLogo.scale-150.png new file mode 100644 index 0000000..36e85b2 Binary files /dev/null and b/app/FiloExplorer/Assets/StoreLogo.scale-150.png differ diff --git a/app/FiloExplorer/Assets/StoreLogo.scale-200.png b/app/FiloExplorer/Assets/StoreLogo.scale-200.png new file mode 100644 index 0000000..bb1c940 Binary files /dev/null and b/app/FiloExplorer/Assets/StoreLogo.scale-200.png differ diff --git a/app/FiloExplorer/Assets/StoreLogo.scale-400.png b/app/FiloExplorer/Assets/StoreLogo.scale-400.png new file mode 100644 index 0000000..1ac154a Binary files /dev/null and b/app/FiloExplorer/Assets/StoreLogo.scale-400.png differ diff --git a/app/FiloExplorer/Assets/Wide310x150Logo.scale-100.png b/app/FiloExplorer/Assets/Wide310x150Logo.scale-100.png new file mode 100644 index 0000000..9602459 Binary files /dev/null and b/app/FiloExplorer/Assets/Wide310x150Logo.scale-100.png differ diff --git a/app/FiloExplorer/Assets/Wide310x150Logo.scale-125.png b/app/FiloExplorer/Assets/Wide310x150Logo.scale-125.png new file mode 100644 index 0000000..081657d Binary files /dev/null and b/app/FiloExplorer/Assets/Wide310x150Logo.scale-125.png differ diff --git a/app/FiloExplorer/Assets/Wide310x150Logo.scale-150.png b/app/FiloExplorer/Assets/Wide310x150Logo.scale-150.png new file mode 100644 index 0000000..4af2799 Binary files /dev/null and b/app/FiloExplorer/Assets/Wide310x150Logo.scale-150.png differ diff --git a/app/FiloExplorer/Assets/Wide310x150Logo.scale-200.png b/app/FiloExplorer/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000..8d6538b Binary files /dev/null and b/app/FiloExplorer/Assets/Wide310x150Logo.scale-200.png differ diff --git a/app/FiloExplorer/Assets/Wide310x150Logo.scale-400.png b/app/FiloExplorer/Assets/Wide310x150Logo.scale-400.png new file mode 100644 index 0000000..59ea27f Binary files /dev/null and b/app/FiloExplorer/Assets/Wide310x150Logo.scale-400.png differ diff --git a/app/FiloExplorer/Assets/folder.png b/app/FiloExplorer/Assets/folder.png new file mode 100644 index 0000000..ca84780 Binary files /dev/null and b/app/FiloExplorer/Assets/folder.png differ diff --git a/app/FiloExplorer/Assets/icon.png b/app/FiloExplorer/Assets/icon.png new file mode 100644 index 0000000..70c7b52 Binary files /dev/null and b/app/FiloExplorer/Assets/icon.png differ diff --git a/app/FiloExplorer/Assets/iconfilo.png b/app/FiloExplorer/Assets/iconfilo.png new file mode 100644 index 0000000..881d67e Binary files /dev/null and b/app/FiloExplorer/Assets/iconfilo.png differ diff --git a/app/FiloExplorer/FiloExplorer.csproj b/app/FiloExplorer/FiloExplorer.csproj new file mode 100644 index 0000000..1acf605 --- /dev/null +++ b/app/FiloExplorer/FiloExplorer.csproj @@ -0,0 +1,97 @@ + + + WinExe + net10.0-windows10.0.22000.0 + 10.0.17763.0 + FiloExplorer + app.manifest + x64 + win-x64 + win-$(Platform).pubxml + true + false + true + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + true + + + + False + True + False + False + 01ABAD0860577FBCDFD634C13DB67FAAA6AF155A + True + True + SHA256 + True + True + Always + x64 + E:\source\FiloContainer\app\FiloExplorer\AppPackages\App + 0 + + \ No newline at end of file diff --git a/app/FiloExplorer/Helpers/MimeHelper.cs b/app/FiloExplorer/Helpers/MimeHelper.cs new file mode 100644 index 0000000..fc2904d --- /dev/null +++ b/app/FiloExplorer/Helpers/MimeHelper.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.IO; + +namespace FiloExplorer.Helpers; + +public static class MimeHelper +{ + private static readonly Dictionary _map = new(StringComparer.OrdinalIgnoreCase) + { + // Images + [".jpg"] = "image/jpeg", + [".jpeg"] = "image/jpeg", + [".png"] = "image/png", + [".gif"] = "image/gif", + [".bmp"] = "image/bmp", + [".webp"] = "image/webp", + + // Video + [".mp4"] = "video/mp4", + [".mkv"] = "video/x-matroska", + [".webm"] = "video/webm", + [".avi"] = "video/x-msvideo", + + // Audio + [".mp3"] = "audio/mpeg", + [".wav"] = "audio/wav", + [".aac"] = "audio/aac", + [".flac"] = "audio/flac", + + // Text + [".txt"] = "text/plain", + [".json"] = "application/json", + [".xml"] = "application/xml", + [".html"] = "text/html", + [".css"] = "text/css", + + // Other + [".pdf"] = "application/pdf", + [".zip"] = "application/zip", + }; + + public static string GetMimeType(string filePath) + { + var ext = Path.GetExtension(filePath); + + if (!string.IsNullOrEmpty(ext) && _map.TryGetValue(ext, out var mime)) + return mime; + + return "application/octet-stream"; // fallback + } +} diff --git a/app/FiloExplorer/Helpers/MsgHelper.cs b/app/FiloExplorer/Helpers/MsgHelper.cs new file mode 100644 index 0000000..5d09dc6 --- /dev/null +++ b/app/FiloExplorer/Helpers/MsgHelper.cs @@ -0,0 +1,87 @@ +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.Windows.AppNotifications; +using Microsoft.Windows.AppNotifications.Builder; +using System; +using System.Threading.Tasks; + +namespace FiloExplorer.Helpers; + +public static class MsgHelper +{ + public static async Task ShowMessageDialogAsync(string title, string message, XamlRoot xamlRoot) + { + var dialog = new ContentDialog + { + Title = title, + Content = message, + CloseButtonText = "OK", + XamlRoot = xamlRoot, + }; + + await dialog.ShowAsync(); + } + + public static async Task ShowConfirmationDialogAsync(string title, string message, XamlRoot xamlRoot) + { + var dialog = new ContentDialog + { + Title = title, + Content = message, + PrimaryButtonText = "Yes", + SecondaryButtonText = "No", + DefaultButton = ContentDialogButton.Primary, + XamlRoot = xamlRoot + }; + var result = await dialog.ShowAsync(); + return result == ContentDialogResult.Primary; + } + + public static async Task ShowPasswordDialogAsync(XamlRoot xamlRoot) + { + var passwordBox = new PasswordBox + { + PlaceholderText = "Enter container password", + Width = 320, + Margin = new Thickness(0, 12, 0, 0) + }; + + var content = new StackPanel + { + Spacing = 8, + Children = + { + new TextBlock + { + Text = "This container is encrypted with AES-256.\nPlease enter the correct password to unlock it.", + TextWrapping = TextWrapping.Wrap, + Margin = new Thickness(0, 0, 0, 8) + }, + passwordBox + } + }; + + var dialog = new ContentDialog + { + Title = "Encrypted Filo Container", + Content = content, + PrimaryButtonText = "Unlock", + SecondaryButtonText = "Cancel", + DefaultButton = ContentDialogButton.Primary, + XamlRoot = xamlRoot + }; + + var result = await dialog.ShowAsync(); + return result == ContentDialogResult.Primary ? passwordBox.Password?.Trim() : null; + } + + public static void ShowToast(string title, string message) + { + var content = new AppNotificationBuilder() + .AddText(title) + .AddText(message) + .BuildNotification(); + + AppNotificationManager.Default.Show(content); + } +} \ No newline at end of file diff --git a/app/FiloExplorer/MainWindow.xaml b/app/FiloExplorer/MainWindow.xaml new file mode 100644 index 0000000..ca383b1 --- /dev/null +++ b/app/FiloExplorer/MainWindow.xaml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/FiloExplorer/MainWindow.xaml.cs b/app/FiloExplorer/MainWindow.xaml.cs new file mode 100644 index 0000000..bbf8485 --- /dev/null +++ b/app/FiloExplorer/MainWindow.xaml.cs @@ -0,0 +1,193 @@ +using FiloExplorer.Views; +using Microsoft.UI; +using Microsoft.UI.Text; +using Microsoft.UI.Windowing; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +using Microsoft.Windows.Storage.Pickers; +using System; +using System.Threading.Tasks; +using Windows.Graphics; + +namespace FiloExplorer; + +/// +/// An empty window that can be used on its own or navigated to within a Frame. +/// +public sealed partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + + // Modern Fluent Title Bar Setup + ExtendsContentIntoTitleBar = true; + SetTitleBar(AppTitleBar); // Drag region + + AppWindow.Title = "Filo Explorer"; + AppWindow.Resize(new SizeInt32(1100, 720)); + + // Prefer Mica + Dark theme for premium feel + //AppWindow.TitleBar.PreferredTheme = TitleBarTheme.Dark; + + RootFrame.Navigate(typeof(MainPage)); + } + + private void menuFileNew_Click(object sender, RoutedEventArgs e) + { + RootFrame.Navigate(typeof(NewPage)); + } + + private async void menuFileOpen_Click(object sender, RoutedEventArgs e) + { + var picker = new FileOpenPicker(this.RootFrame.XamlRoot.ContentIslandEnvironment.AppWindowId); + picker.FileTypeFilter.Add(".filo"); + + var file = picker.PickSingleFileAsync().GetAwaiter().GetResult(); + if (file != null) + { + RootFrame.Navigate(typeof(ViewPage), file.Path); + } + } + + private void menuFileExit_Click(object sender, RoutedEventArgs e) + { + Close(); + } + + private void menuHelpView_Click(object sender, RoutedEventArgs e) + { + RootFrame.Navigate(typeof(HelpPage)); + } + + private async void menuHelpAbout_Click(object sender, RoutedEventArgs e) + { + await ShowAboutDialogAsync(); + } + + private async Task ShowAboutDialogAsync() + { + var aboutContent = new StackPanel + { + Spacing = 24, + HorizontalAlignment = HorizontalAlignment.Center, + MaxWidth = 420 + }; + + // App Icon + Name + var header = new StackPanel + { + Orientation = Orientation.Horizontal, + Spacing = 16, + HorizontalAlignment = HorizontalAlignment.Center + }; + + header.Children.Add(new Border + { + Width = 80, + Height = 80, + CornerRadius = new CornerRadius(16), + Background = new SolidColorBrush(Microsoft.UI.Colors.DeepSkyBlue), + Child = new Image + { + Source = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:///Assets/AppLogo.png")), + Stretch = Stretch.UniformToFill + } + //Child = new FontIcon + //{ + // Glyph = "\uE8A7", // Container / Archive icon + // FontSize = 48, + // Foreground = new SolidColorBrush(Colors.White) + //} + }); + + var titleStack = new StackPanel + { + VerticalAlignment = VerticalAlignment.Center, + Spacing = 4 + }; + + titleStack.Children.Add(new TextBlock + { + Text = "Filo Explorer", + FontSize = 28, + FontWeight = FontWeights.Bold + }); + + titleStack.Children.Add(new TextBlock + { + Text = "Version 1.1.0", + Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray), + FontSize = 15 + }); + + header.Children.Add(titleStack); + aboutContent.Children.Add(header); + + // Description + aboutContent.Children.Add(new TextBlock + { + Text = "A modern, secure, and lightweight archive tool for creating and exploring encrypted .filo containers.", + TextWrapping = TextWrapping.Wrap, + TextAlignment = TextAlignment.Center, + Margin = new Thickness(0, 8, 0, 0) + }); + + // Features / Info + var infoPanel = new StackPanel { Spacing = 12, Margin = new Thickness(0, 20, 0, 0) }; + + infoPanel.Children.Add(CreateInfoRow("\uE72E", "AES-256 Encryption")); + infoPanel.Children.Add(CreateInfoRow("\uE8A5", "Fast Preview for Images & Media")); + infoPanel.Children.Add(CreateInfoRow("\uE8B7", "Built with WinUI 3 & Fluent Design")); + + aboutContent.Children.Add(infoPanel); + + // Footer / Copyright + aboutContent.Children.Add(new TextBlock + { + Text = "© 2026 ManuHub • All rights reserved", + FontSize = 13, + Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray), + HorizontalAlignment = HorizontalAlignment.Center, + Margin = new Thickness(0, 30, 0, 0) + }); + + var dialog = new ContentDialog + { + Title = "", // We use custom header + Content = aboutContent, + CloseButtonText = "Close", + DefaultButton = ContentDialogButton.Close, + XamlRoot = this.Content.XamlRoot, + Style = Application.Current.Resources["DefaultContentDialogStyle"] as Style + }; + + await dialog.ShowAsync(); + } + + // Helper to create nice info rows + private StackPanel CreateInfoRow(string glyph, string text) + { + return new StackPanel + { + Orientation = Orientation.Horizontal, + Spacing = 12, + Children = + { + new FontIcon + { + Glyph = glyph, + FontSize = 20, + Foreground = new SolidColorBrush(Microsoft.UI.Colors.DeepSkyBlue) + }, + new TextBlock + { + Text = text, + VerticalAlignment = VerticalAlignment.Center, + FontSize = 15 + } + } + }; + } +} diff --git a/app/FiloExplorer/Models/ContainerItem.cs b/app/FiloExplorer/Models/ContainerItem.cs new file mode 100644 index 0000000..2b90ca5 --- /dev/null +++ b/app/FiloExplorer/Models/ContainerItem.cs @@ -0,0 +1,27 @@ +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +using Windows.UI; + +namespace FiloExplorer.Models; + +public class ContainerItem +{ + public string Name { get; set; } + public string FullPath { get; set; } + public bool IsFolder { get; set; } + public long Size { get; set; } + public string MimeType { get; set; } + public bool Encrypted { get; set; } + + public string DisplaySize => IsFolder ? "" : FormatSize(Size); + public Symbol IconSymbol => IsFolder ? Symbol.Folder : Symbol.Document; + public Brush IconColor => IsFolder ? new SolidColorBrush(Color.FromArgb(255, 255, 193, 7)) : new SolidColorBrush(Color.FromArgb(255, 0, 120, 215)); + + private string FormatSize(long size) + { + if (size < 1024) return $"{size} B"; + if (size < 1024 * 1024) return $"{size / 1024.0:F1} KB"; + if (size < 1024 * 1024 * 1024) return $"{size / 1024.0 / 1024.0:F1} MB"; + return $"{size / 1024.0 / 1024.0 / 1024.0:F1} GB"; + } +} diff --git a/app/FiloExplorer/Models/PendingItem.cs b/app/FiloExplorer/Models/PendingItem.cs new file mode 100644 index 0000000..f4ce139 --- /dev/null +++ b/app/FiloExplorer/Models/PendingItem.cs @@ -0,0 +1,25 @@ +using Microsoft.UI.Xaml.Media.Imaging; +using System.ComponentModel; + +namespace FiloExplorer.Models; + +public class PendingItem : INotifyPropertyChanged +{ + public string Name => System.IO.Path.GetFileName(Path); + public string Path { get; set; } + public bool IsDirectory { get; set; } + + public string DisplaySize => IsDirectory ? "" : FormatSize(new System.IO.FileInfo(Path).Length); + + public BitmapImage? Thumbnail { get; set; } + + public event PropertyChangedEventHandler? PropertyChanged; + + private string FormatSize(long size) + { + if (size < 1024) return $"{size} B"; + if (size < 1024 * 1024) return $"{size / 1024.0:F1} KB"; + if (size < 1024 * 1024 * 1024) return $"{size / 1024.0 / 1024.0:F1} MB"; + return $"{size / 1024.0 / 1024.0 / 1024.0:F1} GB"; + } +} diff --git a/app/FiloExplorer/Package.appxmanifest b/app/FiloExplorer/Package.appxmanifest new file mode 100644 index 0000000..7f0a229 --- /dev/null +++ b/app/FiloExplorer/Package.appxmanifest @@ -0,0 +1,60 @@ + + + + + + + + + + Filo Explorer + ManuHub + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/FiloExplorer/Properties/launchSettings.json b/app/FiloExplorer/Properties/launchSettings.json new file mode 100644 index 0000000..752e0cf --- /dev/null +++ b/app/FiloExplorer/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "FiloExplorer (Package)": { + "commandName": "MsixPackage" + }, + "FiloExplorer (Unpackaged)": { + "commandName": "MsixPackage" + } + } +} \ No newline at end of file diff --git a/app/FiloExplorer/Views/HelpPage.xaml b/app/FiloExplorer/Views/HelpPage.xaml new file mode 100644 index 0000000..befefbc --- /dev/null +++ b/app/FiloExplorer/Views/HelpPage.xaml @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/FiloExplorer/Views/HelpPage.xaml.cs b/app/FiloExplorer/Views/HelpPage.xaml.cs new file mode 100644 index 0000000..ab0ac06 --- /dev/null +++ b/app/FiloExplorer/Views/HelpPage.xaml.cs @@ -0,0 +1,23 @@ +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; + +namespace FiloExplorer.Views; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class HelpPage : Page +{ + public HelpPage() + { + InitializeComponent(); + } + + private void BackButton_Click(object sender, RoutedEventArgs e) + { + if (Frame.CanGoBack) + { + Frame.GoBack(); + } + } +} diff --git a/app/FiloExplorer/Views/MainPage.xaml b/app/FiloExplorer/Views/MainPage.xaml new file mode 100644 index 0000000..3530f70 --- /dev/null +++ b/app/FiloExplorer/Views/MainPage.xaml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/FiloExplorer/Views/MainPage.xaml.cs b/app/FiloExplorer/Views/MainPage.xaml.cs new file mode 100644 index 0000000..d95443e --- /dev/null +++ b/app/FiloExplorer/Views/MainPage.xaml.cs @@ -0,0 +1,37 @@ +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.Windows.Storage.Pickers; +using System; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace FiloExplorer.Views; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class MainPage : Page +{ + public MainPage() + { + InitializeComponent(); + } + + private void New_Click(object sender, RoutedEventArgs e) + { + Frame.Navigate(typeof(NewPage)); + } + + private async void Open_Click(object sender, RoutedEventArgs e) + { + var picker = new FileOpenPicker(this.XamlRoot.ContentIslandEnvironment.AppWindowId); + picker.FileTypeFilter.Add(".filo"); + + var file = await picker.PickSingleFileAsync(); + if (file != null) + { + Frame.Navigate(typeof(ViewPage), file.Path); + } + } +} diff --git a/app/FiloExplorer/Views/NewPage.xaml b/app/FiloExplorer/Views/NewPage.xaml new file mode 100644 index 0000000..b287bd4 --- /dev/null +++ b/app/FiloExplorer/Views/NewPage.xaml @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +