commit 10d59ede33234d6d4c046471241fd1fcd881a640 Author: Krzysztof Smaga Date: Thu Jul 16 12:25:33 2026 +0200 Przeprowadzka diff --git a/App.xaml b/App.xaml new file mode 100755 index 0000000..36fbbd4 --- /dev/null +++ b/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100755 index 0000000..5d371e5 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,16 @@ +using Microsoft.Extensions.DependencyInjection; + +namespace HomePantry; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + } + + protected override Window CreateWindow(IActivationState? activationState) + { + return new Window(new AppShell()); + } +} \ No newline at end of file diff --git a/AppShell.xaml b/AppShell.xaml new file mode 100755 index 0000000..cc767ee --- /dev/null +++ b/AppShell.xaml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AppShell.xaml.cs b/AppShell.xaml.cs new file mode 100755 index 0000000..76bd540 --- /dev/null +++ b/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace HomePantry; + +public partial class AppShell : Shell +{ + public AppShell() + { + InitializeComponent(); + Routing.RegisterRoute("productdetail", typeof(Views.ProductDetailPage)); + } +} diff --git a/HomePantry.csproj b/HomePantry.csproj new file mode 100755 index 0000000..546add8 --- /dev/null +++ b/HomePantry.csproj @@ -0,0 +1,73 @@ + + + + net10.0-android + $(TargetFrameworks);net10.0-ios;net10.0-maccatalyst + $(TargetFrameworks);net10.0-windows10.0.19041.0 + + + + + Exe + HomePantry + true + true + enable + enable + + + SourceGen + + + HomePantry + + + com.companyname.homepantry + + + 1.0 + 1 + + + None + + 15.0 + 15.0 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HomePantry.csproj.SdkResolver.-1268947263.proj.Backup.tmp b/HomePantry.csproj.SdkResolver.-1268947263.proj.Backup.tmp new file mode 100755 index 0000000..9ff537f --- /dev/null +++ b/HomePantry.csproj.SdkResolver.-1268947263.proj.Backup.tmp @@ -0,0 +1,8 @@ + + + + + 10.0.8 + + + \ No newline at end of file diff --git a/HomePantry.csproj.SdkResolver.-2113450520.proj.Backup.tmp b/HomePantry.csproj.SdkResolver.-2113450520.proj.Backup.tmp new file mode 100755 index 0000000..1b69c90 --- /dev/null +++ b/HomePantry.csproj.SdkResolver.-2113450520.proj.Backup.tmp @@ -0,0 +1,8 @@ + + + + + 10.0.8 + + + \ No newline at end of file diff --git a/HomePantry.csproj.SdkResolver.-292308786.proj.Backup.tmp b/HomePantry.csproj.SdkResolver.-292308786.proj.Backup.tmp new file mode 100755 index 0000000..c63d844 --- /dev/null +++ b/HomePantry.csproj.SdkResolver.-292308786.proj.Backup.tmp @@ -0,0 +1,8 @@ + + + + + 10.0.8 + + + \ No newline at end of file diff --git a/HomePantry.csproj.SdkResolver.1491831640.proj.Backup.tmp b/HomePantry.csproj.SdkResolver.1491831640.proj.Backup.tmp new file mode 100755 index 0000000..3d62d38 --- /dev/null +++ b/HomePantry.csproj.SdkResolver.1491831640.proj.Backup.tmp @@ -0,0 +1,8 @@ + + + + + 10.0.8 + + + \ No newline at end of file diff --git a/HomePantry.csproj.user b/HomePantry.csproj.user new file mode 100755 index 0000000..137b32c --- /dev/null +++ b/HomePantry.csproj.user @@ -0,0 +1,6 @@ + + + + net10.0-maccatalyst + + \ No newline at end of file diff --git a/MauiProgram.cs b/MauiProgram.cs new file mode 100755 index 0000000..7a31db4 --- /dev/null +++ b/MauiProgram.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.Logging; + +namespace HomePantry; + +public static class MauiProgram +{ + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => + { + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); + }); + +#if DEBUG + builder.Logging.AddDebug(); +#endif + + return builder.Build(); + } +} diff --git a/Platforms/.DS_Store b/Platforms/.DS_Store new file mode 100644 index 0000000..6c168bc Binary files /dev/null and b/Platforms/.DS_Store differ diff --git a/Platforms/Android/AndroidManifest.xml b/Platforms/Android/AndroidManifest.xml new file mode 100755 index 0000000..bdec9b5 --- /dev/null +++ b/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Platforms/Android/MainActivity.cs b/Platforms/Android/MainActivity.cs new file mode 100755 index 0000000..090d478 --- /dev/null +++ b/Platforms/Android/MainActivity.cs @@ -0,0 +1,10 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace HomePantry; + +[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] +public class MainActivity : MauiAppCompatActivity +{ +} diff --git a/Platforms/Android/MainApplication.cs b/Platforms/Android/MainApplication.cs new file mode 100755 index 0000000..2706858 --- /dev/null +++ b/Platforms/Android/MainApplication.cs @@ -0,0 +1,15 @@ +using Android.App; +using Android.Runtime; + +namespace HomePantry; + +[Application] +public class MainApplication : MauiApplication +{ + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/Platforms/Android/Resources/values/colors.xml b/Platforms/Android/Resources/values/colors.xml new file mode 100755 index 0000000..5cd1604 --- /dev/null +++ b/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/Platforms/MacCatalyst/AppDelegate.cs b/Platforms/MacCatalyst/AppDelegate.cs new file mode 100755 index 0000000..376dfd5 --- /dev/null +++ b/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,9 @@ +using Foundation; + +namespace HomePantry; + +[Register("AppDelegate")] +public class AppDelegate : MauiUIApplicationDelegate +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/Platforms/MacCatalyst/Entitlements.plist b/Platforms/MacCatalyst/Entitlements.plist new file mode 100755 index 0000000..8e87c0c --- /dev/null +++ b/Platforms/MacCatalyst/Entitlements.plist @@ -0,0 +1,14 @@ + + + + + + + com.apple.security.app-sandbox + + + com.apple.security.network.client + + + + diff --git a/Platforms/MacCatalyst/Info.plist b/Platforms/MacCatalyst/Info.plist new file mode 100755 index 0000000..cfd1c83 --- /dev/null +++ b/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + UIDeviceFamily + + 2 + + LSApplicationCategoryType + public.app-category.lifestyle + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/Platforms/MacCatalyst/Program.cs b/Platforms/MacCatalyst/Program.cs new file mode 100755 index 0000000..eb348e3 --- /dev/null +++ b/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,15 @@ +using ObjCRuntime; +using UIKit; + +namespace HomePantry; + +public class Program +{ + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } +} diff --git a/Platforms/Windows/App.xaml b/Platforms/Windows/App.xaml new file mode 100755 index 0000000..fb5cc53 --- /dev/null +++ b/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/Platforms/Windows/App.xaml.cs b/Platforms/Windows/App.xaml.cs new file mode 100755 index 0000000..01bdd17 --- /dev/null +++ b/Platforms/Windows/App.xaml.cs @@ -0,0 +1,24 @@ +using Microsoft.UI.Xaml; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace HomePantry.WinUI; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +public partial class App : MauiWinUIApplication +{ + /// + /// 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() + { + this.InitializeComponent(); + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} + diff --git a/Platforms/Windows/Package.appxmanifest b/Platforms/Windows/Package.appxmanifest new file mode 100755 index 0000000..95c19cd --- /dev/null +++ b/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,46 @@ + + + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Platforms/Windows/app.manifest b/Platforms/Windows/app.manifest new file mode 100755 index 0000000..aba62ca --- /dev/null +++ b/Platforms/Windows/app.manifest @@ -0,0 +1,17 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + true + + + diff --git a/Platforms/iOS/AppDelegate.cs b/Platforms/iOS/AppDelegate.cs new file mode 100755 index 0000000..376dfd5 --- /dev/null +++ b/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,9 @@ +using Foundation; + +namespace HomePantry; + +[Register("AppDelegate")] +public class AppDelegate : MauiUIApplicationDelegate +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/Platforms/iOS/Info.plist b/Platforms/iOS/Info.plist new file mode 100755 index 0000000..358337b --- /dev/null +++ b/Platforms/iOS/Info.plist @@ -0,0 +1,32 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/Platforms/iOS/Program.cs b/Platforms/iOS/Program.cs new file mode 100755 index 0000000..eb348e3 --- /dev/null +++ b/Platforms/iOS/Program.cs @@ -0,0 +1,15 @@ +using ObjCRuntime; +using UIKit; + +namespace HomePantry; + +public class Program +{ + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } +} diff --git a/Platforms/iOS/Resources/PrivacyInfo.xcprivacy b/Platforms/iOS/Resources/PrivacyInfo.xcprivacy new file mode 100755 index 0000000..1ea3a5d --- /dev/null +++ b/Platforms/iOS/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,51 @@ + + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + E174.1 + + + + + + diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100755 index 0000000..f4c6c8d --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "Project", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100755 index 0000000..d02977c --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Laboratorium 1 - rozwiązanie + +

Zrzuty ekranu z zadania:

+ +Zrzut ekranu 2026-06-10 o 11 47 52 +Zrzut ekranu 2026-06-10 o 11 47 38 +Zrzut ekranu 2026-06-10 o 11 48 32 +Zrzut ekranu 2026-06-10 o 11 48 26 +Zrzut ekranu 2026-06-10 o 13 34 13 +Zrzut ekranu 2026-06-10 o 13 34 09 +Zrzut ekranu 2026-06-10 o 11 52 38 diff --git a/Resources/.DS_Store b/Resources/.DS_Store new file mode 100644 index 0000000..0d83307 Binary files /dev/null and b/Resources/.DS_Store differ diff --git a/Resources/AppIcon/appicon.svg b/Resources/AppIcon/appicon.svg new file mode 100755 index 0000000..5f04fcf --- /dev/null +++ b/Resources/AppIcon/appicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Resources/AppIcon/appiconfg.svg b/Resources/AppIcon/appiconfg.svg new file mode 100755 index 0000000..62d66d7 --- /dev/null +++ b/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Resources/Fonts/OpenSans-Regular.ttf b/Resources/Fonts/OpenSans-Regular.ttf new file mode 100755 index 0000000..9b09396 Binary files /dev/null and b/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/Resources/Fonts/OpenSans-Semibold.ttf b/Resources/Fonts/OpenSans-Semibold.ttf new file mode 100755 index 0000000..ca26718 Binary files /dev/null and b/Resources/Fonts/OpenSans-Semibold.ttf differ diff --git a/Resources/Images/dotnet_bot.png b/Resources/Images/dotnet_bot.png new file mode 100755 index 0000000..054167e Binary files /dev/null and b/Resources/Images/dotnet_bot.png differ diff --git a/Resources/Raw/AboutAssets.txt b/Resources/Raw/AboutAssets.txt new file mode 100755 index 0000000..f22d3bf --- /dev/null +++ b/Resources/Raw/AboutAssets.txt @@ -0,0 +1,15 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories). Deployment of the asset to your application +is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. + + + +These files will be deployed with your package and will be accessible using Essentials: + + async Task LoadMauiAsset() + { + using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); + using var reader = new StreamReader(stream); + + var contents = reader.ReadToEnd(); + } diff --git a/Resources/Splash/splash.svg b/Resources/Splash/splash.svg new file mode 100755 index 0000000..62d66d7 --- /dev/null +++ b/Resources/Splash/splash.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Resources/Styles/Colors.xaml b/Resources/Styles/Colors.xaml new file mode 100755 index 0000000..bd62d3c --- /dev/null +++ b/Resources/Styles/Colors.xaml @@ -0,0 +1,49 @@ + + + + + + #2E7D32 + #C8E6C9 + #E65100 + #F5F5F5 + + #512BD4 + #ac99ea + #242424 + #DFD8F7 + #9880e5 + #2B0B98 + + White + Black + #D600AA + #190649 + #1f1f1f + + #E1E1E1 + #C8C8C8 + #ACACAC + #919191 + #6E6E6E + #404040 + #212121 + #141414 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Resources/Styles/Styles.xaml b/Resources/Styles/Styles.xaml new file mode 100755 index 0000000..1d7ba22 --- /dev/null +++ b/Resources/Styles/Styles.xaml @@ -0,0 +1,444 @@ + + + 24 + 16 + 20,10,20,10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ViewModels/PantryInfo.cs b/ViewModels/PantryInfo.cs new file mode 100755 index 0000000..9187554 --- /dev/null +++ b/ViewModels/PantryInfo.cs @@ -0,0 +1,10 @@ +namespace HomePantry.ViewModels; + +public class PantryInfo +{ + public string AppTitle { get; set; } = "🏠 Domowa spiżarnia"; + public string Subtitle { get; set; } = "Twoja wirtualna spiżarnia - zawsze pod ręką!"; + public string CurrentDate { get; set; } = DateTime.Now.ToString("dddd, d MMMM yyyy", new System.Globalization.CultureInfo("pl-PL")); + public int TotalProducts { get; set; } = 0; + public int ExpiredProducts { get; set; } = 0; +} \ No newline at end of file diff --git a/Views/AddProductPage.xaml b/Views/AddProductPage.xaml new file mode 100755 index 0000000..c7a33b0 --- /dev/null +++ b/Views/AddProductPage.xaml @@ -0,0 +1,19 @@ + + + +