diff --git a/Borepin/Borepin.UWP/Package.appxmanifest b/Borepin/Borepin.UWP/Package.appxmanifest
index b945646..82b7c23 100644
--- a/Borepin/Borepin.UWP/Package.appxmanifest
+++ b/Borepin/Borepin.UWP/Package.appxmanifest
@@ -54,6 +54,7 @@
-
+
+
\ No newline at end of file
diff --git a/Borepin/Borepin/App.xaml.cs b/Borepin/Borepin/App.xaml.cs
index 0398942..b3effeb 100644
--- a/Borepin/Borepin/App.xaml.cs
+++ b/Borepin/Borepin/App.xaml.cs
@@ -51,6 +51,7 @@ namespace Borepin
containerRegistry.RegisterForNavigation();
containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
containerRegistry.RegisterForNavigation();
containerRegistry.RegisterForNavigation();
#endregion
diff --git a/Borepin/Borepin/Borepin.csproj b/Borepin/Borepin/Borepin.csproj
index 69ae925..32ed436 100644
--- a/Borepin/Borepin/Borepin.csproj
+++ b/Borepin/Borepin/Borepin.csproj
@@ -111,6 +111,9 @@
MSBuild:UpdateDesignTimeXaml
+
+ MSBuild:UpdateDesignTimeXaml
+
MSBuild:UpdateDesignTimeXaml
@@ -156,6 +159,7 @@
+
diff --git a/Borepin/Borepin/Model/CardConfig.cs b/Borepin/Borepin/Model/CardConfig.cs
new file mode 100644
index 0000000..51c9524
--- /dev/null
+++ b/Borepin/Borepin/Model/CardConfig.cs
@@ -0,0 +1,63 @@
+using NFC.Helper;
+using System;
+using System.Globalization;
+
+namespace Borepin.Model
+{
+ public class CardConfig
+ {
+ #region Constructors
+ public CardConfig()
+ {
+ PICCKey = ByteOperation.GenerateEmptyArray(16);
+ APPKey = ByteOperation.GenerateEmptyArray(16);
+ }
+ #endregion
+
+ #region Fields
+ public string UserID;
+
+ public byte[] PICCKey;
+ public byte[] APPKey;
+
+ public bool DoFormat;
+
+ public byte[] CardToken;
+ public byte[] MetaInfo;
+ public byte[] SpaceInfo;
+ #endregion
+
+ #region Mehtods
+ public string ConvertToString(byte[] array)
+ {
+ string data = HexConverter.ConvertToHexString(array);
+ data = data.ToUpper(CultureInfo.InvariantCulture);
+
+ for(int i = 2; i < data.Length; i += 3)
+ {
+ data = data.Insert(i, " ");
+ }
+
+ return data;
+ }
+
+ public byte[] ConvertFromString(string data)
+ {
+ data = data.Trim();
+ data = data.Replace(" ", "");
+
+ byte[] array = HexConverter.ConvertFromHexString(data);
+ return array;
+ }
+
+ public byte[] GenerateRandomKey()
+ {
+ byte[] key = ByteOperation.GenerateEmptyArray(16);
+ Random random= new Random();
+
+ random.NextBytes(key);
+ return key;
+ }
+ #endregion
+ }
+}
diff --git a/Borepin/Borepin/Model/FabFireCard.cs b/Borepin/Borepin/Model/FabFireCard.cs
new file mode 100644
index 0000000..d4c2c94
--- /dev/null
+++ b/Borepin/Borepin/Model/FabFireCard.cs
@@ -0,0 +1,34 @@
+using Borepin.Service.ErrorMessage;
+using NFC.Interfaces;
+using System;
+
+namespace Borepin.Model
+{
+ public class FabFireCard
+ {
+ #region Private Fields
+ INFCService _NFCService;
+ IErrorMessageService _ErrorMessageService;
+ #endregion
+
+ #region Constructors
+ public FabFireCard(INFCService nfcService, IErrorMessageService errorMessageService)
+ {
+ _NFCService = nfcService;
+ _ErrorMessageService = errorMessageService;
+ }
+ #endregion
+
+ #region Methods
+ public void FormatCard(string readerID, CardConfig cardConfig)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void CreateCard(string readerID, CardConfig cardConfig)
+ {
+ throw new NotImplementedException();
+ }
+ #endregion
+ }
+}
diff --git a/Borepin/Borepin/Page/CreateCardPage.xaml b/Borepin/Borepin/Page/CreateCardPage.xaml
new file mode 100644
index 0000000..7e2df60
--- /dev/null
+++ b/Borepin/Borepin/Page/CreateCardPage.xaml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/CreateCardPage.xaml.cs b/Borepin/Borepin/Page/CreateCardPage.xaml.cs
new file mode 100644
index 0000000..7b84549
--- /dev/null
+++ b/Borepin/Borepin/Page/CreateCardPage.xaml.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+using Xamarin.Forms.Xaml;
+
+namespace Borepin.Page
+{
+ [XamlCompilation(XamlCompilationOptions.Compile)]
+ public partial class CreateCardPage : ContentPage
+ {
+ public CreateCardPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/UserPage.xaml b/Borepin/Borepin/Page/UserPage.xaml
index da07ab6..9c6bd6c 100644
--- a/Borepin/Borepin/Page/UserPage.xaml
+++ b/Borepin/Borepin/Page/UserPage.xaml
@@ -40,7 +40,11 @@
-
+
+
+
+
+
diff --git a/Borepin/Borepin/PageModel/CreateCardPageModel.cs b/Borepin/Borepin/PageModel/CreateCardPageModel.cs
new file mode 100644
index 0000000..9df22f4
--- /dev/null
+++ b/Borepin/Borepin/PageModel/CreateCardPageModel.cs
@@ -0,0 +1,259 @@
+using Borepin.Base;
+using Prism.Commands;
+using Prism.Navigation;
+using System.Windows.Input;
+using FabAccessAPI.Schema;
+using Prism.Services;
+using Borepin.Service;
+using System.Threading.Tasks;
+using Borepin.Base.Exceptions;
+using NFC.Interfaces;
+using System.Collections.Generic;
+using Borepin.Model;
+
+namespace Borepin.PageModel
+{
+ public class CreateCardPageModel : ConnectionModelBase
+ {
+ #region Private Fields
+ private CardConfig _CardConfig;
+ private User _User;
+ private INFCService _NFCService;
+ #endregion
+
+ #region Contructors
+ public CreateCardPageModel(INavigationService navigationService, IPageDialogService pageDialogService, IAPIService apiService, INFCService nfcService) : base(navigationService, pageDialogService, apiService)
+ {
+ _NFCService = nfcService;
+ _CardConfig= new CardConfig();
+
+ CreateCardCommand = new DelegateCommand(CreateCardCommandExecute);
+
+ ScanPICCKeyCommand = new DelegateCommand(ScanPICCKeyCommandExecute);
+ RandomPICCKeyCommand = new DelegateCommand(RandomPICCKeyCommandExecute);
+
+ ScanAPPKeyCommand = new DelegateCommand(ScanAPPKeyCommandExecute);
+ RandomAPPKeyCommand = new DelegateCommand(RandomAPPKeyCommandExecute);
+
+ RefreshCommand = new DelegateCommand(async () => await RefreshCommandExecute().ConfigureAwait(true));
+ }
+ #endregion
+
+ #region Data
+ public override Task LoadInstance(object instance)
+ {
+ if (instance is string)
+ {
+ _CardConfig.UserID = instance as string;
+ }
+ else
+ {
+ throw new InstanceIncorrectException();
+ }
+
+ return Task.CompletedTask;
+ }
+
+ public override async Task LoadAPIData()
+ {
+ _User = (await _API.Session.UserSystem.Search.GetUserByName(_CardConfig.UserID).ConfigureAwait(false)).Just;
+
+ ReaderIDs = await Task.Run(() =>
+ {
+ return _NFCService.GetReaderIDs();
+ }).ConfigureAwait(false);
+
+ if (ReaderIDs.Count > 0)
+ {
+ ReaderID = ReaderIDs[0];
+ }
+
+ PICCKey = _CardConfig.ConvertToString(_CardConfig.PICCKey);
+ APPKey = _CardConfig.ConvertToString(_CardConfig.APPKey);
+ }
+
+ public override Task