public MainPage(ILoginManager loginmanager)
        {
            InitializeComponent();

            loginManager = loginmanager;

            settings = new Settings();
            string sUser   = settings.UserID;
            string sPass   = settings.UserPass;
            string api_url = settings.server + settings.server_api;

            DNC = new DataNoseConnector(api_url, new ScannerAccount()
            {
                User = sUser, Pass = sPass
            });

            Responses.Add(new DataNoseCodeResponse()
            {
                id = "", student = "Tap the SCAN button", programme = "to begin", remarks = "", HeightChanged = CarouselItemSizeChanged
            });

            carouselInfo.ItemsSource = Responses;
        }
        private async void btnLogin_Clicked(object sender, EventArgs e)
        {
            string sUser   = User.Text;
            string sPass   = Password.Text;
            string api_url = settings.server + settings.server_api;

            DataNoseConnector DNC = new DataNoseConnector(api_url, new ScannerAccount()
            {
                User = sUser, Pass = sPass
            });
            DataNoseKeyResponse response = await DNC.tryKey();

            if ((response != null) && (response.status == "valid-key"))
            {
                settings.UserID   = sUser;
                settings.UserPass = sPass;
                settings.SignedUp = true;
                LoginSuccessfull(response.message);
            }
            else
            {
                LoginFailed();
            }
        }