From 256325accf78df0f2239e80e70b5edb3a2b71f1f Mon Sep 17 00:00:00 2001 From: gene Date: Wed, 10 May 2023 11:05:52 -0500 Subject: [PATCH] user groups test page --- CircleViewerMaui/App.xaml.cs | 9 +++- CircleViewerMaui/AppShell.xaml | 14 ++++-- CircleViewerMaui/CircleViewerMaui.csproj | 12 +++++ CircleViewerMaui/MainPage.xaml | 5 --- CircleViewerMaui/MainPage.xaml.cs | 10 ++--- CircleViewerMaui/UserGroups.xaml | 56 ++++++++++++++++++++++++ CircleViewerMaui/UserGroups.xaml.cs | 41 +++++++++++++++++ 7 files changed, 130 insertions(+), 17 deletions(-) create mode 100644 CircleViewerMaui/UserGroups.xaml create mode 100644 CircleViewerMaui/UserGroups.xaml.cs diff --git a/CircleViewerMaui/App.xaml.cs b/CircleViewerMaui/App.xaml.cs index 1d0e732..3f7204b 100644 --- a/CircleViewerMaui/App.xaml.cs +++ b/CircleViewerMaui/App.xaml.cs @@ -1,7 +1,12 @@ -namespace CircleViewerMaui; +using CDPShared; + +namespace CircleViewerMaui; public partial class App : Application { + private static CDPWorker _cdp; + public static CDPWorker CDP =>_cdp; + private string syncFusionLicenseKey = "MTg3MzUyM0AzMjMxMmUzMTJlMzQzMVhOUDNaUUxSMUExWTB3a1EzK294VjhKcGh3eENlanRIdXR2aWVrSGZUVTg9"; public App() { @@ -9,7 +14,7 @@ public partial class App : Application //Register SyncFusion license Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(syncFusionLicenseKey); - + _cdp = new CDPWorker(); InitializeComponent(); MainPage = new AppShell(); diff --git a/CircleViewerMaui/AppShell.xaml b/CircleViewerMaui/AppShell.xaml index 183d753..9955416 100644 --- a/CircleViewerMaui/AppShell.xaml +++ b/CircleViewerMaui/AppShell.xaml @@ -5,9 +5,15 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:CircleViewerMaui" Shell.FlyoutBehavior="Disabled"> - - + + + + diff --git a/CircleViewerMaui/CircleViewerMaui.csproj b/CircleViewerMaui/CircleViewerMaui.csproj index e70390a..2afb6a2 100644 --- a/CircleViewerMaui/CircleViewerMaui.csproj +++ b/CircleViewerMaui/CircleViewerMaui.csproj @@ -64,4 +64,16 @@ + + + UserGroups.xaml + + + + + + MSBuild:Compile + + + diff --git a/CircleViewerMaui/MainPage.xaml b/CircleViewerMaui/MainPage.xaml index 6fb6c19..7e9ab4e 100644 --- a/CircleViewerMaui/MainPage.xaml +++ b/CircleViewerMaui/MainPage.xaml @@ -4,11 +4,6 @@ xmlns:pdfViewer="http://schemas.syncfusion.com/maui" x:Class="CircleViewerMaui.MainPage"> - - - - - diff --git a/CircleViewerMaui/MainPage.xaml.cs b/CircleViewerMaui/MainPage.xaml.cs index 57dd870..6b8841a 100644 --- a/CircleViewerMaui/MainPage.xaml.cs +++ b/CircleViewerMaui/MainPage.xaml.cs @@ -7,7 +7,7 @@ namespace CircleViewerMaui; public partial class MainPage : ContentPage { int count = 0; - private CDPWorker _cdp; +// private CDPWorker _cdp; Timer _timer; Boolean _bConnected = false; @@ -15,18 +15,16 @@ public partial class MainPage : ContentPage { using (LogMethod.Log(MethodBase.GetCurrentMethod().ReflectedType.Name)) { - _cdp = new CDPWorker(); InitializeComponent(); _timer = new Timer(IsReady, null, 250, 250); - } } void IsReady(object state) { - if (_bConnected != _cdp.Ready) + if (_bConnected != App.CDP.Ready) { - _bConnected = _cdp.Ready; + _bConnected = App.CDP.Ready; OnReady(); _timer = null; } @@ -76,7 +74,7 @@ public partial class MainPage : ContentPage { using (LogMethod.Log(MethodBase.GetCurrentMethod().ReflectedType.Name)) { - var result = await _cdp.Decrypt(fileToLoad); + var result = await App.CDP.Decrypt(fileToLoad); if (result.Status.Result.GetValueOrDefault(false)) { byte[] buf = Convert.FromBase64String(result.DecryptedData); diff --git a/CircleViewerMaui/UserGroups.xaml b/CircleViewerMaui/UserGroups.xaml new file mode 100644 index 0000000..3a4493d --- /dev/null +++ b/CircleViewerMaui/UserGroups.xaml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + +