diff --git a/Save/AutoSavePDFinAWS/App.xaml b/Save/AutoSavePDFinAWS/App.xaml new file mode 100644 index 0000000..73fd659 --- /dev/null +++ b/Save/AutoSavePDFinAWS/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/Save/AutoSavePDFinAWS/App.xaml.cs b/Save/AutoSavePDFinAWS/App.xaml.cs new file mode 100644 index 0000000..de61783 --- /dev/null +++ b/Save/AutoSavePDFinAWS/App.xaml.cs @@ -0,0 +1,16 @@ +namespace AutoSavePDFinAWS +{ + public partial class App : Application + { + public App() + { + Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("Add valid license key"); + InitializeComponent(); + } + + protected override Window CreateWindow(IActivationState? activationState) + { + return new Window(new AppShell()); + } + } +} \ No newline at end of file diff --git a/Save/AutoSavePDFinAWS/AppShell.xaml b/Save/AutoSavePDFinAWS/AppShell.xaml new file mode 100644 index 0000000..5a99305 --- /dev/null +++ b/Save/AutoSavePDFinAWS/AppShell.xaml @@ -0,0 +1,14 @@ + + + + + + diff --git a/Save/AutoSavePDFinAWS/AppShell.xaml.cs b/Save/AutoSavePDFinAWS/AppShell.xaml.cs new file mode 100644 index 0000000..f5e9010 --- /dev/null +++ b/Save/AutoSavePDFinAWS/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace AutoSavePDFinAWS +{ + public partial class AppShell : Shell + { + public AppShell() + { + InitializeComponent(); + } + } +} diff --git a/Save/AutoSavePDFinAWS/AutoSavePDFinAWS.csproj b/Save/AutoSavePDFinAWS/AutoSavePDFinAWS.csproj new file mode 100644 index 0000000..e98412c --- /dev/null +++ b/Save/AutoSavePDFinAWS/AutoSavePDFinAWS.csproj @@ -0,0 +1,69 @@ + + + + net9.0-android;net9.0-ios;net9.0-maccatalyst + $(TargetFrameworks);net9.0-windows10.0.19041.0 + + + + + + + Exe + AutoSavePDFinAWS + true + true + enable + enable + + + AutoSavePDFinAWS + + + com.companyname.autosavepdfinaws + + + 1.0 + 1 + + + None + + 15.0 + 15.0 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Save/AutoSavePDFinAWS/AutoSavePDFinAWS.sln b/Save/AutoSavePDFinAWS/AutoSavePDFinAWS.sln new file mode 100644 index 0000000..1397a01 --- /dev/null +++ b/Save/AutoSavePDFinAWS/AutoSavePDFinAWS.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36203.30 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoSavePDFinAWS", "AutoSavePDFinAWS.csproj", "{626306A7-D53A-409E-A65E-2D1D3714EC3F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {626306A7-D53A-409E-A65E-2D1D3714EC3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {626306A7-D53A-409E-A65E-2D1D3714EC3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {626306A7-D53A-409E-A65E-2D1D3714EC3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {626306A7-D53A-409E-A65E-2D1D3714EC3F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BADD224A-DD7D-497F-A2D1-4D59A4DC92AA} + EndGlobalSection +EndGlobal diff --git a/Save/AutoSavePDFinAWS/Converter/InverseBooleanConverter.cs b/Save/AutoSavePDFinAWS/Converter/InverseBooleanConverter.cs new file mode 100644 index 0000000..8d23760 --- /dev/null +++ b/Save/AutoSavePDFinAWS/Converter/InverseBooleanConverter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AutoSavePDFinAWS +{ + /// + /// Value converter that inverts boolean values for data binding scenarios. + /// Used in XAML to bind UI elements that need the opposite of a boolean property. + /// For example, enabling a Save button when Auto-Save is disabled. + /// + public class InverseBooleanConverter : IValueConverter + { + /// + /// Converts a boolean value to its inverse. + /// + /// The boolean value to convert + /// The type of the binding target property (must be bool) + /// Optional parameter for the converter (not used) + /// Culture information for the conversion (not used) + /// The inverted boolean value + /// Thrown when target type is not boolean + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + // Validate that the target type is boolean + if (targetType != typeof(bool)) + throw new InvalidOperationException("The target must be a boolean"); + + // Return the inverse of the input boolean value + return value is bool boolValue ? !boolValue : false; + } + + /// + /// Converts back from the inverted value to the original (not supported). + /// This converter is designed for one-way binding only. + /// + /// The value to convert back + /// The type to convert to + /// Optional parameter for the converter + /// Culture information for the conversion + /// Not supported + /// Always thrown as this operation is not supported + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotSupportedException("InverseBooleanConverter does not support ConvertBack operation"); + } + } +} diff --git a/Save/AutoSavePDFinAWS/MainPage.xaml b/Save/AutoSavePDFinAWS/MainPage.xaml new file mode 100644 index 0000000..5d37022 --- /dev/null +++ b/Save/AutoSavePDFinAWS/MainPage.xaml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +