develop #10

Merged
s426229 merged 80 commits from develop into master 2021-01-27 18:32:19 +01:00
9 changed files with 639 additions and 609 deletions
Showing only changes of commit 4b41abf79d - Show all commits

View File

@ -223,8 +223,6 @@ namespace Klient.Droid
public void LoadFromCamera(View v) public void LoadFromCamera(View v)
{ {
Intent intent = new Intent(MediaStore.ActionImageCapture); Intent intent = new Intent(MediaStore.ActionImageCapture);
//Android.Net.Uri pictureUri = Android.Net.Uri.FromFile(new File(GetExternalFilesDir(Android.OS.Environment.DirectoryDcim), Guid.NewGuid().ToString().Replace(".", "")+".jpg"));
//intent.PutExtra(MediaStore.ExtraOutput, pictureUri);
StartActivityForResult(intent, 0); StartActivityForResult(intent, 0);
} }
@ -249,7 +247,9 @@ namespace Klient.Droid
{ {
photo = data; photo = data;
base.OnActivityResult(requestCode, resultCode, data); base.OnActivityResult(requestCode, resultCode, data);
if(data != null) bitmap = (Bitmap)data.Extras.Get("data"); if (data != null)
{
bitmap = (Bitmap)data.Extras.Get("data");
byte[] bitmapData; byte[] bitmapData;
var stream = new MemoryStream(); var stream = new MemoryStream();
@ -259,14 +259,20 @@ namespace Klient.Droid
FindViewById<ImageView>(Resource.Id.Preview).SetImageBitmap(bitmap); FindViewById<ImageView>(Resource.Id.Preview).SetImageBitmap(bitmap);
}
else SetContentView(Resource.Layout.ekranPoLogowaniu);
} }
else if(requestCode == PickImageId) else if(requestCode == PickImageId)
{
if(data == null) SetContentView(Resource.Layout.ekranPoLogowaniu);
else
{ {
Android.Net.Uri uri = data.Data; Android.Net.Uri uri = data.Data;
photo = data; photo = data;
FindViewById<ImageView>(Resource.Id.Preview).SetImageURI(uri); FindViewById<ImageView>(Resource.Id.Preview).SetImageURI(uri);
} }
}
else if(data == null) else if(data == null)
{ {
SetContentView(Resource.Layout.ekranPoLogowaniu); SetContentView(Resource.Layout.ekranPoLogowaniu);
@ -308,7 +314,7 @@ namespace Klient.Droid
if (fullLink.Count < 10) end = fullLink.Count; if (fullLink.Count < 10) end = fullLink.Count;
for (int i = 0; i < end; i++) for (int i = 0; i < end; i++)
{ {
FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + fullLink[i].title + ": " + fullLink[i].link + "\n\n"; FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + fullLink[i].title + ": \n" + fullLink[i].link + "\n\n";
} }
} }
else else
@ -459,5 +465,12 @@ namespace Klient.Droid
{ {
SetContentView(Resource.Layout.ekranPomocZdjecie); SetContentView(Resource.Layout.ekranPomocZdjecie);
} }
[Java.Interop.Export("LogOut")]
public void LogOut(View v)
{
SetContentView(Resource.Layout.ekranStartowy);
}
} }
} }

View File

@ -181,6 +181,9 @@
<ItemGroup> <ItemGroup>
<AndroidResource Include="Resources\xml\file_paths.xml" /> <AndroidResource Include="Resources\xml\file_paths.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Obraz8.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

View File

@ -16,7 +16,7 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:background="#ffbdd7f0" android:background="#ffbdd7f0"
android:gravity="center" android:gravity="center"
android:onClick="GoToProfile" /> android:onClick="GoToPoLogowaniu" />
<TextView <TextView
android:text="Poszukiwacz 2021" android:text="Poszukiwacz 2021"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"

View File

@ -45,15 +45,14 @@
android:textColor="#ff000000" android:textColor="#ff000000"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" /> android:layout_centerHorizontal="true" />
<Button <ImageButton
android:text="Back" android:src="@drawable/obraz4"
android:layout_width="38.5dp" android:layout_width="38.5dp"
android:layout_height="35.0dp" android:layout_height="35.0dp"
android:id="@+id/backRegisterHelp" android:id="@+id/backRegisterHelp"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:background="#ff0b31c8" android:background="#ffbdd7f0"
android:textColor="#fffcfcfc"
android:gravity="center" android:gravity="center"
android:onClick="GoToRegister" /> android:onClick="GoToRegister" />

View File

@ -26,7 +26,7 @@
android:gravity="center" android:gravity="center"
android:onClick="GoToPoLogowaniu" /> android:onClick="GoToPoLogowaniu" />
<TextView <TextView
android:text="W celu załadowania zdjęcia z pamięci telefonu \nwybierz ikonę folderu, w celu zrobnienia zdjęcia \nwybierz ikonę aparatu i postępuj jak przy robieniu zdjęcia. \nNa następnym ekranie zostanie wyświtlony \npodgląd załadowanego zdjęcia." android:text="W celu załadowania zdjęcia z pamięci telefonu \nwybierz ikonę folderu, w celu zrobienia zdjęcia \nwybierz ikonę aparatu i postępuj jak przy robieniu zdjęcia. \nNa następnym ekranie zostanie wyświtlony \npodgląd załadowanego zdjęcia."
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -120,4 +120,13 @@
android:layout_below="@id/Save" android:layout_below="@id/Save"
android:translationY="45dp" android:translationY="45dp"
android:onClick="GetHistory" /> android:onClick="GetHistory" />
<ImageButton
android:src="@drawable/obraz8"
android:layout_width="35.0dp"
android:layout_height="35.0dp"
android:background="#ffbdd7f0"
android:id="@+id/LogOut"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:onClick="LogOut" />
</RelativeLayout> </RelativeLayout>

View File

@ -32,7 +32,7 @@ namespace Serwer.Api.Framework
{ {
var statusCode = HttpStatusCode.BadRequest; var statusCode = HttpStatusCode.BadRequest;
context.Response.StatusCode = (int)statusCode; context.Response.StatusCode = (int)statusCode;
return context.Response.WriteAsync($"Error: {exception.Message}"); return context.Response.WriteAsync($"Błąd: {exception.Message}");
} }
} }
} }