POS_Sprint_2 #4

Merged
s426229 merged 12 commits from POS_Sprint_2 into develop 2020-12-14 19:27:10 +01:00
5 changed files with 422 additions and 401 deletions
Showing only changes of commit b1b934ca9b - Show all commits

View File

@ -22,10 +22,11 @@ namespace Klient.Droid
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
SetContentView(Resource.Layout.ekranPoLogowaniu);
SetContentView(Resource.Layout.ekranStartowy);
}
[Java.Interop.Export("SignIn")]
@ -34,6 +35,7 @@ namespace Klient.Droid
var Login = FindViewById<EditText>(Resource.Id.Login).Text;
SecureString Password = new NetworkCredential("", FindViewById<EditText>(Resource.Id.Password).Text).SecurePassword;
if (Login.Length < 3 || Login.Length > 12)
{
SetContentView(Resource.Layout.ekranLogowania);
@ -51,9 +53,10 @@ namespace Klient.Droid
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://localhost:44371/api/User/SignIn", content);
var response = await client.PostAsync("http://10.0.2.2:5001/api/User/SignIn", content);
var responseString = await response.Content.ReadAsStringAsync();
if (response.StatusCode == HttpStatusCode.InternalServerError) SetContentView(Resource.Layout.ekranPoLogowaniu);
}
[Java.Interop.Export("ResetPassword")]
@ -88,11 +91,11 @@ namespace Klient.Droid
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://localhost:44371/api/User/Register", content);
var response = await client.PostAsync("http://10.0.2.2:5001/api/User/Register", content);
var responseString = await response.Content.ReadAsStringAsync();
if (responseString == "Ok") SetContentView(Resource.Layout.ekranLogowania);
if (response.IsSuccessStatusCode) SetContentView(Resource.Layout.ekranLogowania);
}
[Java.Interop.Export("HelpLoginScreen")]
@ -118,5 +121,11 @@ namespace Klient.Droid
{
}
[Java.Interop.Export("LoadFromCamera")]
async public void TakePhoto(View v)
{
}
}
}

View File

@ -35,6 +35,7 @@
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<BundleAssemblies>false</BundleAssemblies>
<MandroidI18n />
<Debugger>Xamarin</Debugger>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.Klient.Android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.Klient.Android" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="Klient.Android"></application>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="Klient.Android" />
</manifest>

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
android:layout_height="match_parent"
android:background="#ffbdd7f0">
<ImageView
android:src="@drawable/imgToSend"
android:layout_width="match_parent"
android:layout_height="217.5dp"
android:minWidth="100px"