develop #10
@ -22,10 +22,11 @@ namespace Klient.Droid
|
|||||||
|
|
||||||
protected override void OnCreate(Bundle savedInstanceState)
|
protected override void OnCreate(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
|
|
||||||
base.OnCreate(savedInstanceState);
|
base.OnCreate(savedInstanceState);
|
||||||
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
|
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
|
||||||
LoadApplication(new App());
|
LoadApplication(new App());
|
||||||
SetContentView(Resource.Layout.ekranPoLogowaniu);
|
SetContentView(Resource.Layout.ekranStartowy);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Java.Interop.Export("SignIn")]
|
[Java.Interop.Export("SignIn")]
|
||||||
@ -34,7 +35,8 @@ namespace Klient.Droid
|
|||||||
var Login = FindViewById<EditText>(Resource.Id.Login).Text;
|
var Login = FindViewById<EditText>(Resource.Id.Login).Text;
|
||||||
SecureString Password = new NetworkCredential("", FindViewById<EditText>(Resource.Id.Password).Text).SecurePassword;
|
SecureString Password = new NetworkCredential("", FindViewById<EditText>(Resource.Id.Password).Text).SecurePassword;
|
||||||
|
|
||||||
if(Login.Length < 3 || Login.Length > 12)
|
|
||||||
|
if (Login.Length < 3 || Login.Length > 12)
|
||||||
{
|
{
|
||||||
SetContentView(Resource.Layout.ekranLogowania);
|
SetContentView(Resource.Layout.ekranLogowania);
|
||||||
}
|
}
|
||||||
@ -51,9 +53,10 @@ namespace Klient.Droid
|
|||||||
|
|
||||||
var content = new FormUrlEncodedContent(values);
|
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")]
|
[Java.Interop.Export("ResetPassword")]
|
||||||
@ -88,11 +91,11 @@ namespace Klient.Droid
|
|||||||
|
|
||||||
var content = new FormUrlEncodedContent(values);
|
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();
|
var responseString = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
if (responseString == "Ok") SetContentView(Resource.Layout.ekranLogowania);
|
if (response.IsSuccessStatusCode) SetContentView(Resource.Layout.ekranLogowania);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Java.Interop.Export("HelpLoginScreen")]
|
[Java.Interop.Export("HelpLoginScreen")]
|
||||||
@ -118,5 +121,11 @@ namespace Klient.Droid
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Java.Interop.Export("LoadFromCamera")]
|
||||||
|
async public void TakePhoto(View v)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,6 +35,7 @@
|
|||||||
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
|
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
|
||||||
<BundleAssemblies>false</BundleAssemblies>
|
<BundleAssemblies>false</BundleAssemblies>
|
||||||
<MandroidI18n />
|
<MandroidI18n />
|
||||||
|
<Debugger>Xamarin</Debugger>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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" />
|
<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>
|
</manifest>
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#ffbdd7f0">
|
android:background="#ffbdd7f0">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:src="@drawable/imgToSend"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="217.5dp"
|
android:layout_height="217.5dp"
|
||||||
android:minWidth="100px"
|
android:minWidth="100px"
|
||||||
|
Loading…
Reference in New Issue
Block a user