|8?Td*(mZB94YjghdZ3M07-C
zEDi1HSRlqI?6SthYLc4SgFUF#mLs5&bD`mWYY
z-iFl6yqk7iQu`Km;{B{U0=0~%z8pHsSeSosGh^ZUMXbzx=Q4A)BpzryaN{BKW-*=}
z_6FaW8#i7&R`Nwmj48R@@5EN4u0B?{~ezU@44Bja$x<;IQm+T!JQk7?ze5s0
zx<4Mc5zl%ouT3>IN+C%rX{A%$^(C$93BvPPj{L0-ImIfAH?rO_Cbfr{1-$>)zkzuJz0?{Ca_HZjFH=oL(-q-+6!x+V)|v`mh-5V`9;>Y4RQvW-lu+jyj&3yd17Z#^{>o7
z9qT_Xl}S+rMo;hMU+zErp6)p?t4Qt5y^HTRZQ7W%e$wH}KeoSY7xV1;ci{Y~_MhQP
z%dg1jN^ao(JvHuJaD`L(@~CqU*=3|(PI2SyOt6pp`ad?xx&EQDP5a%w={FR44&=bj|?d8=xK?sw^bSQ2%-d&kE9q$^JnYr5)>ihr&8
z!aeVLSbD0`v=7^M9q;>f#gKW%4e8H4n;z@z%81Pt)-R7(e(q-Pcb@O1#w+cvBwR0L
zoZqeQr(3(sP&iIJe#)(^XKOw>-+Fuf`$}CKi|miPZp`{I>6qMcFP#Uik@HGEh+
zuTf^!)cyHi*sjhn>5I
WwR+AA-fCceWAJqKb6Mw<&;$TUJ-KrL
literal 0
HcmV?d00001
diff --git a/Klient/Klient/Klient.Android/Resources/layout/ekranPoLogowaniu.xml b/Klient/Klient/Klient.Android/Resources/layout/ekranPoLogowaniu.xml
index b767785..5ee46b3 100644
--- a/Klient/Klient/Klient.Android/Resources/layout/ekranPoLogowaniu.xml
+++ b/Klient/Klient/Klient.Android/Resources/layout/ekranPoLogowaniu.xml
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/Klient/Klient/Klient.Android/Resources/layout/ekranProfil.xml b/Klient/Klient/Klient.Android/Resources/layout/ekranProfil.xml
new file mode 100644
index 0000000..e9a0994
--- /dev/null
+++ b/Klient/Klient/Klient.Android/Resources/layout/ekranProfil.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Klient/Klient/Klient.Android/Resources/layout/ekranRejestracji.xml b/Klient/Klient/Klient.Android/Resources/layout/ekranRejestracji.xml
index bd7d9f1..3836409 100644
--- a/Klient/Klient/Klient.Android/Resources/layout/ekranRejestracji.xml
+++ b/Klient/Klient/Klient.Android/Resources/layout/ekranRejestracji.xml
@@ -146,12 +146,12 @@
android:text="?"
android:layout_width="35.0dp"
android:layout_height="35.0dp"
- android:id="@+id/help"
+ android:id="@+id/helpRegister"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="#ff0b31c8"
android:textColor="#fffcfcfc"
android:gravity="center"
- android:onClick="HelpLoginScreen" />
+ android:onClick="HelpRegisterScreen" />
From 2ea2a4293f57299f9585732438f246db7410bbe4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wojciech=20Przyby=C5=82a?=
Date: Mon, 21 Dec 2020 16:19:54 +0100
Subject: [PATCH 08/10] POS-32 Dodano ekran edycji profilu
---
Klient/Klient/Klient.Android/MainActivity.cs | 44 ++++++++--------
.../Klient/Klient.Android/Poszukiwacz.csproj | 3 ++
.../Resources/Resource.designer.cs | 50 +++++++++----------
.../Resources/layout/ekranPoZdjeciu.xml | 18 +++++--
.../Resources/layout/ekranProfil.xml | 29 ++++-------
5 files changed, 74 insertions(+), 70 deletions(-)
diff --git a/Klient/Klient/Klient.Android/MainActivity.cs b/Klient/Klient/Klient.Android/MainActivity.cs
index 85f507c..e25828f 100644
--- a/Klient/Klient/Klient.Android/MainActivity.cs
+++ b/Klient/Klient/Klient.Android/MainActivity.cs
@@ -13,6 +13,7 @@ using System.Security;
using System.Net;
using System.Linq;
using System.IO;
+using Newtonsoft.Json;
namespace Klient.Droid
{
@@ -23,6 +24,9 @@ namespace Klient.Droid
private static readonly HttpClient client = new HttpClient();
public static Android.Content.Intent photo;
public string savedLogin = "";
+ public string savedName = "";
+ public string savedSurname = "";
+ public string savedEmail = "";
protected override void OnCreate(Bundle savedInstanceState)
{
@@ -34,7 +38,7 @@ namespace Klient.Droid
}
[Java.Interop.Export("SignIn")]
- async public void SignIn(View v)
+ async public void SignIn(Android.Views.View v)
{
var Login = FindViewById(Resource.Id.Login).Text;
SecureString Password = new NetworkCredential("", FindViewById(Resource.Id.Password).Text).SecurePassword;
@@ -66,12 +70,6 @@ namespace Klient.Droid
}
}
- [Java.Interop.Export("ResetPassword")]
- async public void ResetPassword()
- {
- SetContentView(Resource.Layout.ekranLogowania);
- }
-
[Java.Interop.Export("SignUp")]
async public void SignUp(View v)
{
@@ -178,26 +176,28 @@ namespace Klient.Droid
var Name = FindViewById(Resource.Id.ChangeName).Text;
var Surname = FindViewById(Resource.Id.ChangeSurname).Text;
var Email = FindViewById(Resource.Id.ChangeEmail).Text;
- SecureString Password = new NetworkCredential("", FindViewById(Resource.Id.ChangePassword).Text).SecurePassword;
-
- var values = new Dictionary
+ if (string.IsNullOrEmpty(Name) | string.IsNullOrEmpty(Email) | string.IsNullOrEmpty(Surname))
{
- { "email", Email },
- { "name", Name },
- { "surname", Surname },
- { "login", savedLogin },
- { "password", new NetworkCredential("", Password).Password }
- };
+ FindViewById(Resource.Id.NullValueProfile).Text = "Wartości nie mogą być puste!";
+ }
+ else
+ {
+ var values = new Dictionary
+ {
+ { "email", Email },
+ { "name", Name },
+ { "surname", Surname },
+ { "login", savedLogin }
+ };
+ var content = new FormUrlEncodedContent(values);
+ var response = await client.PostAsync("http://10.0.2.2:5001/api/User/Update", content);
- var content = new FormUrlEncodedContent(values);
+ var responseString = await response.Content.ReadAsStringAsync();
- var response = await client.PostAsync("http://10.0.2.2:5001/api/User/Update", content);
-
- var responseString = await response.Content.ReadAsStringAsync();
-
- if (response.StatusCode == HttpStatusCode.OK) SetContentView(Resource.Layout.ekranPoLogowaniu);
+ if (response.StatusCode == HttpStatusCode.OK) FindViewById(Resource.Id.NullValueProfile).Text = "Zapisano!";
+ }
}
}
}
\ No newline at end of file
diff --git a/Klient/Klient/Klient.Android/Poszukiwacz.csproj b/Klient/Klient/Klient.Android/Poszukiwacz.csproj
index a2d8821..64896ce 100644
--- a/Klient/Klient/Klient.Android/Poszukiwacz.csproj
+++ b/Klient/Klient/Klient.Android/Poszukiwacz.csproj
@@ -57,6 +57,9 @@
+
+ 12.0.3
+
1.5.3.2
diff --git a/Klient/Klient/Klient.Android/Resources/Resource.designer.cs b/Klient/Klient/Klient.Android/Resources/Resource.designer.cs
index c2a6d32..a0d3c60 100644
--- a/Klient/Klient/Klient.Android/Resources/Resource.designer.cs
+++ b/Klient/Klient/Klient.Android/Resources/Resource.designer.cs
@@ -9193,10 +9193,7 @@ namespace Klient.Droid
public const int ChangeName = 2131230723;
// aapt resource value: 0x7F080004
- public const int ChangePassword = 2131230724;
-
- // aapt resource value: 0x7F080005
- public const int ChangeSurname = 2131230725;
+ public const int ChangeSurname = 2131230724;
// aapt resource value: 0x7F080052
public const int checkbox = 2131230802;
@@ -9261,8 +9258,8 @@ namespace Klient.Droid
// aapt resource value: 0x7F080065
public const int edit_query = 2131230821;
- // aapt resource value: 0x7F080006
- public const int Email = 2131230726;
+ // aapt resource value: 0x7F080005
+ public const int Email = 2131230725;
// aapt resource value: 0x7F080066
public const int end = 2131230822;
@@ -9276,6 +9273,9 @@ namespace Klient.Droid
// aapt resource value: 0x7F080069
public const int enterAlwaysCollapsed = 2131230825;
+ // aapt resource value: 0x7F080006
+ public const int ErrorPhoto = 2131230726;
+
// aapt resource value: 0x7F08006A
public const int exitUntilCollapsed = 2131230826;
@@ -9385,16 +9385,13 @@ namespace Klient.Droid
public const int LayoutNewPassword2 = 2131230736;
// aapt resource value: 0x7F080011
- public const int LayoutNewPasswordC = 2131230737;
+ public const int LayoutPassword = 2131230737;
// aapt resource value: 0x7F080012
- public const int LayoutPassword = 2131230738;
+ public const int LayoutSurname = 2131230738;
// aapt resource value: 0x7F080013
- public const int LayoutSurname = 2131230739;
-
- // aapt resource value: 0x7F080014
- public const int LayoutSurnameC = 2131230740;
+ public const int LayoutSurnameC = 2131230739;
// aapt resource value: 0x7F080084
public const int left = 2131230852;
@@ -9411,14 +9408,14 @@ namespace Klient.Droid
// aapt resource value: 0x7F080088
public const int list_item = 2131230856;
+ // aapt resource value: 0x7F080014
+ public const int LoadFromCamera = 2131230740;
+
// aapt resource value: 0x7F080015
- public const int LoadFromCamera = 2131230741;
+ public const int LoadFromFolder = 2131230741;
// aapt resource value: 0x7F080016
- public const int LoadFromFolder = 2131230742;
-
- // aapt resource value: 0x7F080017
- public const int Login = 2131230743;
+ public const int Login = 2131230742;
// aapt resource value: 0x7F080089
public const int main_appbar = 2131230857;
@@ -9441,8 +9438,8 @@ namespace Klient.Droid
// aapt resource value: 0x7F08008F
public const int message = 2131230863;
- // aapt resource value: 0x7F080018
- public const int META = 2131230744;
+ // aapt resource value: 0x7F080017
+ public const int META = 2131230743;
// aapt resource value: 0x7F080090
public const int middle = 2131230864;
@@ -9597,8 +9594,8 @@ namespace Klient.Droid
// aapt resource value: 0x7F0800C2
public const int multiply = 2131230914;
- // aapt resource value: 0x7F080019
- public const int Name = 2131230745;
+ // aapt resource value: 0x7F080018
+ public const int Name = 2131230744;
// aapt resource value: 0x7F0800C3
public const int navigation_header_container = 2131230915;
@@ -9606,11 +9603,11 @@ namespace Klient.Droid
// aapt resource value: 0x7F0800C4
public const int never = 2131230916;
- // aapt resource value: 0x7F08001A
- public const int NewLogin = 2131230746;
+ // aapt resource value: 0x7F080019
+ public const int NewLogin = 2131230745;
- // aapt resource value: 0x7F08001B
- public const int NewPassword = 2131230747;
+ // aapt resource value: 0x7F08001A
+ public const int NewPassword = 2131230746;
// aapt resource value: 0x7F0800C5
public const int none = 2131230917;
@@ -9627,6 +9624,9 @@ namespace Klient.Droid
// aapt resource value: 0x7F0800C9
public const int notification_main_column_container = 2131230921;
+ // aapt resource value: 0x7F08001B
+ public const int NullValueProfile = 2131230747;
+
// aapt resource value: 0x7F0800CA
public const int outline = 2131230922;
diff --git a/Klient/Klient/Klient.Android/Resources/layout/ekranPoZdjeciu.xml b/Klient/Klient/Klient.Android/Resources/layout/ekranPoZdjeciu.xml
index 9fa1526..19bd960 100644
--- a/Klient/Klient/Klient.Android/Resources/layout/ekranPoZdjeciu.xml
+++ b/Klient/Klient/Klient.Android/Resources/layout/ekranPoZdjeciu.xml
@@ -1,5 +1,5 @@
-
+ android:id="@+id/SendPhoto"
+ android:onClick="SendPhoto"
+ android:layout_below="@id/Preview" />
+
-
+
diff --git a/Klient/Klient/Klient.Android/Resources/layout/ekranProfil.xml b/Klient/Klient/Klient.Android/Resources/layout/ekranProfil.xml
index e9a0994..5081c6f 100644
--- a/Klient/Klient/Klient.Android/Resources/layout/ekranProfil.xml
+++ b/Klient/Klient/Klient.Android/Resources/layout/ekranProfil.xml
@@ -63,34 +63,25 @@
android:textColorHint="#ff6c6767"
android:textColor="#ff000000"
android:inputType="none|textEmailAddress" />
-
-
-
+
From 10cf3ca9c08b25c5fd72115441779c26985ea08d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wojciech=20Przyby=C5=82a?=
Date: Mon, 21 Dec 2020 16:26:48 +0100
Subject: [PATCH 09/10] POS-32 Poprwka
---
Klient/Klient/Klient.Android/MainActivity.cs | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/Klient/Klient/Klient.Android/MainActivity.cs b/Klient/Klient/Klient.Android/MainActivity.cs
index e25828f..f7e9564 100644
--- a/Klient/Klient/Klient.Android/MainActivity.cs
+++ b/Klient/Klient/Klient.Android/MainActivity.cs
@@ -66,7 +66,13 @@ namespace Klient.Droid
if (response.StatusCode == HttpStatusCode.OK)
{
savedLogin = Login;
+ var jsonString = await response.Content.ReadAsStringAsync();
+ dynamic jsonObject = JsonConvert.DeserializeObject(jsonString);
SetContentView(Resource.Layout.ekranPoLogowaniu);
+ savedName = jsonObject.user.name;
+ savedEmail = jsonObject.user.email;
+ savedSurname = jsonObject.user.surname;
+
}
}
@@ -177,12 +183,18 @@ namespace Klient.Droid
var Surname = FindViewById(Resource.Id.ChangeSurname).Text;
var Email = FindViewById(Resource.Id.ChangeEmail).Text;
- if (string.IsNullOrEmpty(Name) | string.IsNullOrEmpty(Email) | string.IsNullOrEmpty(Surname))
+ if (string.IsNullOrEmpty(Name))
{
- FindViewById(Resource.Id.NullValueProfile).Text = "Wartości nie mogą być puste!";
+ Name = savedName;
}
- else
+ if (string.IsNullOrEmpty(Email))
{
+ Email = savedEmail;
+ }
+ if (string.IsNullOrEmpty(Surname))
+ {
+ Surname = savedSurname
+ }
var values = new Dictionary
{
{ "email", Email },
@@ -197,7 +209,7 @@ namespace Klient.Droid
var responseString = await response.Content.ReadAsStringAsync();
if (response.StatusCode == HttpStatusCode.OK) FindViewById(Resource.Id.NullValueProfile).Text = "Zapisano!";
- }
+
}
}
}
\ No newline at end of file
From dbc629f94237e4c7d46170994c350d86b0b1a1ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wojciech=20Przyby=C5=82a?=
Date: Mon, 21 Dec 2020 16:29:10 +0100
Subject: [PATCH 10/10] =?UTF-8?q?POS-32=20Poprawiony=20b=C5=82=C4=85d?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Klient/Klient/Klient.Android/MainActivity.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Klient/Klient/Klient.Android/MainActivity.cs b/Klient/Klient/Klient.Android/MainActivity.cs
index f7e9564..efa4f87 100644
--- a/Klient/Klient/Klient.Android/MainActivity.cs
+++ b/Klient/Klient/Klient.Android/MainActivity.cs
@@ -193,7 +193,7 @@ namespace Klient.Droid
}
if (string.IsNullOrEmpty(Surname))
{
- Surname = savedSurname
+ Surname = savedSurname;
}
var values = new Dictionary
{