Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
5b1657e4f6 | |||
74df2904b2 | |||
4b41abf79d | |||
4ccce95280 | |||
d103e4146d | |||
|
1941a77a91 | ||
|
41c703bb6d | ||
8b51fa1310 | |||
327262473d | |||
8ce472a931 | |||
|
f2f98bb92d | ||
966edab483 | |||
925b79e1ca | |||
f0e62f261e | |||
15e4ebbaa0 | |||
8c97d210bc | |||
08c27b3c3a | |||
3128f9ef5d | |||
b7a4361a00 |
@ -12,16 +12,29 @@ using System.Collections.Generic;
|
|||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.IO;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Klient.Droid.Modules;
|
using Klient.Droid.Modules;
|
||||||
|
using Android.Provider;
|
||||||
|
using Android.Content;
|
||||||
|
using Android.Graphics;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
using Com.Xamarin.Formsviewgroup;
|
||||||
|
using Android.Icu.Text;
|
||||||
|
using System.IO;
|
||||||
|
using Android.Media;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Java.IO;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
|
||||||
namespace Klient.Droid
|
namespace Klient.Droid
|
||||||
{
|
{
|
||||||
[Activity(Label = "Klient", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
|
[Activity(Label = "Klient", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
|
||||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||||
{
|
{
|
||||||
|
Bitmap bitmap;
|
||||||
|
ByteArrayContent fileContent;
|
||||||
public static int PickImageId = 1000;
|
public static int PickImageId = 1000;
|
||||||
private static readonly HttpClient client = new HttpClient();
|
private static readonly HttpClient client = new HttpClient();
|
||||||
public static Android.Content.Intent photo;
|
public static Android.Content.Intent photo;
|
||||||
@ -37,7 +50,9 @@ namespace Klient.Droid
|
|||||||
|
|
||||||
base.OnCreate(savedInstanceState);
|
base.OnCreate(savedInstanceState);
|
||||||
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
|
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
|
||||||
LoadApplication(new App());
|
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
|
||||||
|
StrictMode.SetVmPolicy(builder.Build());
|
||||||
|
LoadApplication(new App());
|
||||||
SetContentView(Resource.Layout.ekranStartowy);
|
SetContentView(Resource.Layout.ekranStartowy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +77,7 @@ namespace Klient.Droid
|
|||||||
};
|
};
|
||||||
|
|
||||||
var content = new FormUrlEncodedContent(values);
|
var content = new FormUrlEncodedContent(values);
|
||||||
var response = await client.PostAsync("http://10.0.2.2:5001/api/User/SignIn", content);
|
var response = await client.PostAsync("https://pixblocksaddition.azurewebsites.net/api/User/SignIn", content);
|
||||||
|
|
||||||
if (response.StatusCode == HttpStatusCode.OK)
|
if (response.StatusCode == HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
@ -87,6 +102,12 @@ namespace Klient.Droid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Java.Interop.Export("HelpLoginScreen")]
|
||||||
|
public void GoToAboutScreen(View v)
|
||||||
|
{
|
||||||
|
SetContentView(Resource.Layout.ekranInformacji);
|
||||||
|
}
|
||||||
|
|
||||||
[Java.Interop.Export("SignUp")]
|
[Java.Interop.Export("SignUp")]
|
||||||
async public void SignUp(View v)
|
async public void SignUp(View v)
|
||||||
{
|
{
|
||||||
@ -138,7 +159,7 @@ namespace Klient.Droid
|
|||||||
|
|
||||||
var content = new FormUrlEncodedContent(values);
|
var content = new FormUrlEncodedContent(values);
|
||||||
|
|
||||||
var response = await client.PostAsync("http://10.0.2.2:5001/api/User/Register", content);
|
var response = await client.PostAsync("https://pixblocksaddition.azurewebsites.net/api/User/Register", content);
|
||||||
|
|
||||||
var responseString = await response.Content.ReadAsStringAsync();
|
var responseString = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
@ -153,6 +174,13 @@ namespace Klient.Droid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Java.Interop.Export("HelpRegisterScreen")]
|
||||||
|
public void GoToRegisterHelp(View v)
|
||||||
|
{
|
||||||
|
SetContentView(Resource.Layout.ekranPomocRejestracja);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[Java.Interop.Export("GoToProfile")]
|
[Java.Interop.Export("GoToProfile")]
|
||||||
public void GoBackToProfile(View v)
|
public void GoBackToProfile(View v)
|
||||||
{
|
{
|
||||||
@ -176,11 +204,6 @@ namespace Klient.Droid
|
|||||||
SetContentView(Resource.Layout.ekranRejestracji);
|
SetContentView(Resource.Layout.ekranRejestracji);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Java.Interop.Export("HelpLoginScreen")]
|
|
||||||
public void MainScreenAbout(View v)
|
|
||||||
{
|
|
||||||
SetContentView(Resource.Layout.ekranInformacji);
|
|
||||||
}
|
|
||||||
[Java.Interop.Export("GoToMainScreenFromInformation")]
|
[Java.Interop.Export("GoToMainScreenFromInformation")]
|
||||||
public void GoToMainScreenFromInformation(View v)
|
public void GoToMainScreenFromInformation(View v)
|
||||||
{
|
{
|
||||||
@ -195,6 +218,16 @@ namespace Klient.Droid
|
|||||||
|
|
||||||
StartActivityForResult(Android.Content.Intent.CreateChooser(Intent, "Select Picture"), PickImageId);
|
StartActivityForResult(Android.Content.Intent.CreateChooser(Intent, "Select Picture"), PickImageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Java.Interop.Export("LoadFromCamera")]
|
||||||
|
public void LoadFromCamera(View v)
|
||||||
|
{
|
||||||
|
Intent intent = new Intent(MediaStore.ActionImageCapture);
|
||||||
|
StartActivityForResult(intent, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[Java.Interop.Export("GoToStart")]
|
[Java.Interop.Export("GoToStart")]
|
||||||
public void GoToStart(View v)
|
public void GoToStart(View v)
|
||||||
{
|
{
|
||||||
@ -209,37 +242,117 @@ namespace Klient.Droid
|
|||||||
protected override void OnActivityResult(int requestCode, Result resultCode, Android.Content.Intent data)
|
protected override void OnActivityResult(int requestCode, Result resultCode, Android.Content.Intent data)
|
||||||
{
|
{
|
||||||
SetContentView(Resource.Layout.ekranPoZdjeciu);
|
SetContentView(Resource.Layout.ekranPoZdjeciu);
|
||||||
Android.Net.Uri uri = data.Data;
|
FindViewById<TextView>(Resource.Id.ErrorPhoto).Text = "";
|
||||||
photo = data;
|
if (requestCode == 0)
|
||||||
FindViewById<ImageView>(Resource.Id.Preview).SetImageURI(uri);
|
{
|
||||||
|
photo = data;
|
||||||
|
base.OnActivityResult(requestCode, resultCode, data);
|
||||||
|
if (data != null)
|
||||||
|
{
|
||||||
|
bitmap = (Bitmap)data.Extras.Get("data");
|
||||||
|
|
||||||
|
byte[] bitmapData;
|
||||||
|
var stream = new MemoryStream();
|
||||||
|
bitmap.Compress(Bitmap.CompressFormat.Png, 100, stream);
|
||||||
|
bitmapData = stream.ToArray();
|
||||||
|
fileContent = new ByteArrayContent(bitmapData);
|
||||||
|
|
||||||
|
|
||||||
|
FindViewById<ImageView>(Resource.Id.Preview).SetImageBitmap(bitmap);
|
||||||
|
}
|
||||||
|
else SetContentView(Resource.Layout.ekranPoLogowaniu);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(requestCode == PickImageId)
|
||||||
|
{
|
||||||
|
if(data == null) SetContentView(Resource.Layout.ekranPoLogowaniu);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Android.Net.Uri uri = data.Data;
|
||||||
|
photo = data;
|
||||||
|
FindViewById<ImageView>(Resource.Id.Preview).SetImageURI(uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(data == null)
|
||||||
|
{
|
||||||
|
SetContentView(Resource.Layout.ekranPoLogowaniu);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Java.Interop.Export("SendPhoto")]
|
[Java.Interop.Export("SendPhoto")]
|
||||||
async public void UploadPhoto(View v)
|
async public void UploadPhoto(View v)
|
||||||
{
|
{
|
||||||
|
if(photo.Data == null)
|
||||||
|
{
|
||||||
|
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/octet-stream");
|
||||||
|
fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
|
||||||
|
{
|
||||||
|
Name = "image",
|
||||||
|
FileName = Guid.NewGuid().ToString()
|
||||||
|
};
|
||||||
|
|
||||||
|
string boundary = "---8d0f01e6b3b5dafaaadaad";
|
||||||
|
MultipartFormDataContent formDataContent = new MultipartFormDataContent(boundary);
|
||||||
|
formDataContent.Add(fileContent);
|
||||||
|
|
||||||
|
var response = await client.PostAsync("https://pixblocksaddition.azurewebsites.net/api/Image/Process", formDataContent);
|
||||||
|
if (response.StatusCode == HttpStatusCode.OK)
|
||||||
|
{
|
||||||
|
var jsonString = await response.Content.ReadAsStringAsync();
|
||||||
|
FindViewById<TextView>(Resource.Id.ErrorPhoto).Text = "Przesłano zdjęcie!";
|
||||||
|
SetContentView(Resource.Layout.ekranZLinkami);
|
||||||
|
var second_response = await client.GetAsync($"https://pixblocksaddition.azurewebsites.net/api/Search/{jsonString}");
|
||||||
|
if (second_response.StatusCode == HttpStatusCode.OK)
|
||||||
|
{
|
||||||
|
var second_jsonString = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
List<SearchResult> fullLink = JsonConvert.DeserializeObject<List<SearchResult>>(second_jsonString);
|
||||||
|
|
||||||
|
int end = 10;
|
||||||
|
if (fullLink.Count < 10) end = fullLink.Count;
|
||||||
|
for (int i = 0; i < end; i++)
|
||||||
|
{
|
||||||
|
FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + fullLink[i].title + ": \n" + fullLink[i].link + "\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FindViewById<TextView>(Resource.Id.links).Text = "Coś poszło nie tak!";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string msg = await response.Content.ReadAsStringAsync();
|
||||||
|
FindViewById<TextView>(Resource.Id.ErrorPhoto).Text = msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
using(var imageStream = ContentResolver.OpenInputStream(photo.Data))
|
using(var imageStream = ContentResolver.OpenInputStream(photo.Data))
|
||||||
using(var stramContent = new StreamContent(imageStream))
|
using(var stramContent = new StreamContent(imageStream))
|
||||||
using(var byteArrayContent = new ByteArrayContent(await stramContent.ReadAsByteArrayAsync()))
|
using(var byteArrayContent = new ByteArrayContent(await stramContent.ReadAsByteArrayAsync()))
|
||||||
using(var formDataContent = new MultipartFormDataContent())
|
using(var formDataContent = new MultipartFormDataContent())
|
||||||
{
|
{
|
||||||
formDataContent.Add(byteArrayContent, "image", Guid.NewGuid() + ".jpg");
|
formDataContent.Add(byteArrayContent, "image", Guid.NewGuid() + ".jpg");
|
||||||
foreach (var content in formDataContent)
|
foreach (var content in formDataContent)
|
||||||
{
|
{
|
||||||
content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(ContentResolver.GetType(photo.Data));
|
content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(ContentResolver.GetType(photo.Data));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
var response = await client.PostAsync("http://10.0.2.2:5001/api/Image/Process", formDataContent);
|
var response = await client.PostAsync("https://pixblocksaddition.azurewebsites.net/api/Image/Process", formDataContent);
|
||||||
if(response.StatusCode == HttpStatusCode.OK)
|
if(response.StatusCode == HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
var jsonString = await response.Content.ReadAsStringAsync();
|
var jsonString = await response.Content.ReadAsStringAsync();
|
||||||
FindViewById<TextView>(Resource.Id.ErrorPhoto).Text = "Przesłano zdjęcie!";
|
FindViewById<TextView>(Resource.Id.ErrorPhoto).Text = "Przesłano zdjęcie!";
|
||||||
SetContentView(Resource.Layout.ekranZLinkami);
|
SetContentView(Resource.Layout.ekranZLinkami);
|
||||||
var second_response = await client.GetAsync($"http://10.0.2.2:5001/api/Search/{jsonString}");
|
var second_response = await client.GetAsync($"https://pixblocksaddition.azurewebsites.net/api/Search/{jsonString}");
|
||||||
if(second_response.StatusCode == HttpStatusCode.OK)
|
if(second_response.StatusCode == HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
var second_jsonString = await second_response.Content.ReadAsStringAsync();
|
var second_jsonString = await second_response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
List<SearchResult> fullLink = JsonConvert.DeserializeObject<List<SearchResult>>(second_jsonString);
|
List<SearchResult> fullLink = JsonConvert.DeserializeObject<List<SearchResult>>(second_jsonString);
|
||||||
|
|
||||||
int end = 10;
|
int end = 10;
|
||||||
@ -261,7 +374,7 @@ namespace Klient.Droid
|
|||||||
string msg = await response.Content.ReadAsStringAsync();
|
string msg = await response.Content.ReadAsStringAsync();
|
||||||
FindViewById<TextView>(Resource.Id.ErrorPhoto).Text = msg;
|
FindViewById<TextView>(Resource.Id.ErrorPhoto).Text = msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Java.Interop.Export("GoToProfil")]
|
[Java.Interop.Export("GoToProfil")]
|
||||||
@ -302,7 +415,7 @@ namespace Klient.Droid
|
|||||||
{ "login", savedLogin }
|
{ "login", savedLogin }
|
||||||
};
|
};
|
||||||
var content = new FormUrlEncodedContent(values);
|
var content = new FormUrlEncodedContent(values);
|
||||||
var response = await client.PostAsync("http://10.0.2.2:5001/api/User/Update", content);
|
var response = await client.PostAsync("https://pixblocksaddition.azurewebsites.net/api/User/Update", content);
|
||||||
|
|
||||||
if (response.StatusCode == HttpStatusCode.OK)
|
if (response.StatusCode == HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
@ -325,7 +438,7 @@ namespace Klient.Droid
|
|||||||
public async void GetUserHistory(View v)
|
public async void GetUserHistory(View v)
|
||||||
{
|
{
|
||||||
SetContentView(Resource.Layout.ekranHistorii);
|
SetContentView(Resource.Layout.ekranHistorii);
|
||||||
var response = await client.GetAsync("http://10.0.2.2:5001/api/History");
|
var response = await client.GetAsync("https://pixblocksaddition.azurewebsites.net/api/History");
|
||||||
if (response.StatusCode == HttpStatusCode.OK)
|
if (response.StatusCode == HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
var jsonString = await response.Content.ReadAsStringAsync();
|
var jsonString = await response.Content.ReadAsStringAsync();
|
||||||
@ -343,8 +456,22 @@ namespace Klient.Droid
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FindViewById<TextView>(Resource.Id.history).Text = "Coś poszło nie tak!";
|
string msg = await response.Content.ReadAsStringAsync();
|
||||||
|
FindViewById<TextView>(Resource.Id.HistoryError).Text = msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Java.Interop.Export("HelpPhoto")]
|
||||||
|
public void GotToHelpPhoto(View v)
|
||||||
|
{
|
||||||
|
SetContentView(Resource.Layout.ekranPomocZdjecie);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Java.Interop.Export("LogOut")]
|
||||||
|
public void LogOut(View v)
|
||||||
|
{
|
||||||
|
SetContentView(Resource.Layout.ekranStartowy);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -36,6 +36,7 @@
|
|||||||
<BundleAssemblies>false</BundleAssemblies>
|
<BundleAssemblies>false</BundleAssemblies>
|
||||||
<MandroidI18n />
|
<MandroidI18n />
|
||||||
<Debugger>Xamarin</Debugger>
|
<Debugger>Xamarin</Debugger>
|
||||||
|
<AndroidSupportedAbis />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -149,11 +150,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</AndroidResource>
|
</AndroidResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResourceAnalysisConfig Include="Resources\layout\ekranPomocRejestracja.xml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</AndroidResourceAnalysisConfig>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AndroidResource Include="Resources\layout\ekranPomocZdjecie.xml">
|
<AndroidResource Include="Resources\layout\ekranPomocZdjecie.xml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@ -174,6 +170,20 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</AndroidResource>
|
</AndroidResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AndroidResource Include="Resources\layout\ekranPomocRejestracja.xml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</AndroidResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AndroidResource Include="Resources\drawable\Obraz4.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AndroidResource Include="Resources\xml\file_paths.xml" />
|
||||||
|
</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>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?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" android:installLocation="preferExternal">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.Klient.Android" android:installLocation="internalOnly">
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
|
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="27" />
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<application android:label="Klient.Android" android:usesCleartextTraffic="true" android:theme="@style/Base.Theme.AppCompat.Light.DarkActionBar" />
|
<application android:label="Klient.Android" android:usesCleartextTraffic="true" android:theme="@style/Base.Theme.AppCompat.Light.DarkActionBar" />
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
</manifest>
|
</manifest>
|
1465
Klient/Klient/Klient.Android/Resources/Resource.designer.cs
generated
1465
Klient/Klient/Klient.Android/Resources/Resource.designer.cs
generated
File diff suppressed because it is too large
Load Diff
BIN
Klient/Klient/Klient.Android/Resources/drawable/Obraz4.png
Normal file
BIN
Klient/Klient/Klient.Android/Resources/drawable/Obraz4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 361 B |
BIN
Klient/Klient/Klient.Android/Resources/drawable/Obraz8.png
Normal file
BIN
Klient/Klient/Klient.Android/Resources/drawable/Obraz8.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 730 B |
@ -7,17 +7,16 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#ffbdd7f0">
|
android:background="#ffbdd7f0">
|
||||||
<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/backHistory"
|
android:id="@+id/backHistory"
|
||||||
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="GoToProfile" />
|
android:onClick="GoToPoLogowaniu" />
|
||||||
<TextView
|
<TextView
|
||||||
android:text="Poszukiwacz 2021"
|
android:text="Poszukiwacz 2021"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
@ -26,7 +25,7 @@
|
|||||||
android:id="@+id/text3"
|
android:id="@+id/text3"
|
||||||
android:textColor="#ff000000"
|
android:textColor="#ff000000"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true" />
|
android:layout_centerHorizontal="true"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:text="Historia wyszukiwań"
|
android:text="Historia wyszukiwań"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
@ -44,7 +43,27 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/history"
|
android:id="@+id/history"
|
||||||
|
android:layout_below="@+id/HistoryError"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:paddingBottom="35dp"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:isScrollContainer="true"
|
||||||
|
android:fadeScrollbars="true"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
android:verticalScrollbarPosition="right"
|
||||||
|
android:scrollIndicators="right"
|
||||||
|
android:scrollbarAlwaysDrawVerticalTrack="true"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:paddingTop="10dp"/>
|
||||||
|
<TextView
|
||||||
|
android:text=""
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/HistoryError"
|
||||||
android:layout_below="@+id/HistoryTitle"
|
android:layout_below="@+id/HistoryTitle"
|
||||||
android:textColor="#ff000000" />
|
android:textColor="#ffff0000"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:paddingTop="10dp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -39,15 +39,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/backInformation"
|
android:id="@+id/backInformation"
|
||||||
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="GoToMainScreenFromInformation" />
|
android:onClick="GoToMainScreenFromInformation" />
|
||||||
|
|
||||||
|
@ -60,15 +60,14 @@
|
|||||||
android:text="Zaloguj"
|
android:text="Zaloguj"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:foregroundGravity="center" />
|
android:foregroundGravity="center" />
|
||||||
<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/backLogowanie"
|
android:id="@+id/backLogowanie"
|
||||||
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="GoToStart"/>
|
android:onClick="GoToStart"/>
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
android:onClick="LoadFromCamera" />
|
android:onClick="LoadFromCamera" />
|
||||||
<Button
|
<Button
|
||||||
android:text="?"
|
android:text="?"
|
||||||
android:layout_width="35.0dp"
|
android:layout_width="25.0dp"
|
||||||
android:layout_height="35.0dp"
|
android:layout_height="25.0dp"
|
||||||
android:id="@+id/helpPhoto"
|
android:id="@+id/helpPhoto"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
@ -27,15 +27,14 @@
|
|||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_below="@id/SendPhoto"
|
android:layout_below="@id/SendPhoto"
|
||||||
android:textColor="#ffd60000" />
|
android:textColor="#ffd60000" />
|
||||||
<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/backZdjecie"
|
android:id="@+id/backZdjecie"
|
||||||
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="GoToPoLogowaniu" />
|
android:onClick="GoToPoLogowaniu" />
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -27,6 +27,17 @@
|
|||||||
android:layout_below="@+id/loginTip"
|
android:layout_below="@+id/loginTip"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:textColor="#ff000000" />
|
android:textColor="#ff000000" />
|
||||||
|
<TextView
|
||||||
|
android:text="Wszystkie pola formularza są wymagane!"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="25px"
|
||||||
|
android:minHeight="25px"
|
||||||
|
android:id="@+id/GeneralTip"
|
||||||
|
android:layout_below="@+id/passwordTip"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:textColor="#ff000000" />
|
||||||
<TextView
|
<TextView
|
||||||
android:text="To jest pomoc \n w rejestracji \n co miałem \n napisac"
|
android:text="To jest pomoc \n w rejestracji \n co miałem \n napisac"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
@ -35,7 +46,8 @@
|
|||||||
android:id="@+id/textView1"
|
android:id="@+id/textView1"
|
||||||
android:textColor="#ffb1d5f8"
|
android:textColor="#ffb1d5f8"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentBottom="true" />
<TextView
|
android:layout_alignParentBottom="true" />
|
||||||
|
<TextView
|
||||||
android:text="Poszukiwacz 2021"
|
android:text="Poszukiwacz 2021"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -43,14 +55,16 @@
|
|||||||
android:id="@+id/text1"
|
android:id="@+id/text1"
|
||||||
android:textColor="#ff000000"
|
android:textColor="#ff000000"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true" />
<Button
|
android:layout_centerHorizontal="true" />
|
||||||
android:text="Back"
|
<ImageButton
|
||||||
|
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" />
</RelativeLayout>
|
android:onClick="GoToRegister" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
@ -15,22 +15,22 @@
|
|||||||
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/backPomocZdjecie"
|
android:id="@+id/backPomocZdjecie"
|
||||||
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="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"
|
||||||
android:id="@+id/textView1" />
|
android:id="@+id/textView1"
|
||||||
|
android:textColor="#ff000000" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -102,15 +102,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/backProfil"
|
android:id="@+id/backProfil"
|
||||||
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="GoToPoLogowaniu" />
|
android:onClick="GoToPoLogowaniu" />
|
||||||
<Button
|
<Button
|
||||||
@ -121,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>
|
||||||
|
@ -80,6 +80,8 @@
|
|||||||
android:layout_height="58.0dp"
|
android:layout_height="58.0dp"
|
||||||
android:minWidth="25px"
|
android:minWidth="25px"
|
||||||
android:minHeight="25px"
|
android:minHeight="25px"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:textColorHint="#ff6c6767"
|
||||||
android:id="@+id/NewPassword"
|
android:id="@+id/NewPassword"
|
||||||
android:inputType="none|textPassword" />
|
android:inputType="none|textPassword" />
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
@ -100,7 +102,8 @@
|
|||||||
android:minHeight="25px"
|
android:minHeight="25px"
|
||||||
android:id="@+id/RepeatPassword"
|
android:id="@+id/RepeatPassword"
|
||||||
android:inputType="none|textPassword"
|
android:inputType="none|textPassword"
|
||||||
android:textColor="#ff000000" />
|
android:textColor="#ff000000"
|
||||||
|
android:textColorHint="#ff6c6767" />
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
<android.support.design.widget.TextInputLayout
|
<android.support.design.widget.TextInputLayout
|
||||||
android:id="@+id/LayoutNewLogin"
|
android:id="@+id/LayoutNewLogin"
|
||||||
@ -151,8 +154,8 @@
|
|||||||
android:layout_centerHorizontal="true" />
|
android:layout_centerHorizontal="true" />
|
||||||
<Button
|
<Button
|
||||||
android:text="?"
|
android:text="?"
|
||||||
android:layout_width="35.0dp"
|
android:layout_width="25.0dp"
|
||||||
android:layout_height="35.0dp"
|
android:layout_height="25.0dp"
|
||||||
android:id="@+id/helpRegister"
|
android:id="@+id/helpRegister"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
@ -160,15 +163,14 @@
|
|||||||
android:textColor="#fffcfcfc"
|
android:textColor="#fffcfcfc"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:onClick="HelpRegisterScreen" />
|
android:onClick="HelpRegisterScreen" />
|
||||||
<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/backRejestracja"
|
android:id="@+id/backRejestracja"
|
||||||
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="GoToStart" />
|
android:onClick="GoToStart" />
|
||||||
|
|
||||||
|
@ -29,9 +29,9 @@
|
|||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true" />
|
android:layout_centerHorizontal="true" />
|
||||||
<Button
|
<Button
|
||||||
android:text="i"
|
android:text="?"
|
||||||
android:layout_width="35.0dp"
|
android:layout_width="25.0dp"
|
||||||
android:layout_height="35.0dp"
|
android:layout_height="25.0dp"
|
||||||
android:id="@+id/about"
|
android:id="@+id/about"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
@ -24,19 +24,38 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/links"
|
android:id="@+id/links"
|
||||||
android:layout_below="@+id/linkTitle"
|
android:layout_below="@+id/LinkError"
|
||||||
android:textColor="#ff393939"
|
android:textColor="#ff393939"
|
||||||
android:linksClickable="true"
|
android:linksClickable="true"
|
||||||
android:autoLink="web" />
|
android:autoLink="web"
|
||||||
<Button
|
android:fadeScrollbars="true"
|
||||||
android:text="Back"
|
android:scrollbars="vertical"
|
||||||
|
android:verticalScrollbarPosition="right"
|
||||||
|
android:scrollIndicators="right"
|
||||||
|
android:paddingBottom="35dp"
|
||||||
|
android:scrollbarAlwaysDrawVerticalTrack="true"
|
||||||
|
android:isScrollContainer="true"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:paddingTop="10dp" />
|
||||||
|
<TextView
|
||||||
|
android:text=""
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/linkTitle"
|
||||||
|
android:id="@+id/LinkError"
|
||||||
|
android:textColor="#ffff0000"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:paddingTop="10dp" />
|
||||||
|
<ImageButton
|
||||||
|
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/backToSendPhoto"
|
android:id="@+id/backToSendPhoto"
|
||||||
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="GoToPoLogowaniu" />
|
android:onClick="GoToPoLogowaniu" />
|
||||||
<TextView
|
<TextView
|
||||||
@ -48,4 +67,4 @@
|
|||||||
android:textColor="#ff000000"
|
android:textColor="#ff000000"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true" />
|
android:layout_centerHorizontal="true" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<cache-path name="my_images"
|
||||||
|
path="path" />
|
||||||
|
</paths>
|
@ -7,6 +7,12 @@
|
|||||||
"commands": [
|
"commands": [
|
||||||
"dotnet-ef"
|
"dotnet-ef"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"swashbuckle.aspnetcore.cli": {
|
||||||
|
"version": "5.6.3",
|
||||||
|
"commands": [
|
||||||
|
"swagger"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"resourceGroupName": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "PixBlocksAdditionResourceGroup",
|
||||||
|
"metadata": {
|
||||||
|
"_parameterType": "resourceGroup",
|
||||||
|
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resourceGroupLocation": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "centralus",
|
||||||
|
"metadata": {
|
||||||
|
"_parameterType": "location",
|
||||||
|
"description": "Location of the resource group. Resource groups could have different location than resources."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resourceLocation": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "[parameters('resourceGroupLocation')]",
|
||||||
|
"metadata": {
|
||||||
|
"_parameterType": "location",
|
||||||
|
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Resources/resourceGroups",
|
||||||
|
"name": "[parameters('resourceGroupName')]",
|
||||||
|
"location": "[parameters('resourceGroupLocation')]",
|
||||||
|
"apiVersion": "2019-10-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Resources/deployments",
|
||||||
|
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('SerwerApi', subscription().subscriptionId)))]",
|
||||||
|
"resourceGroup": "[parameters('resourceGroupName')]",
|
||||||
|
"apiVersion": "2019-10-01",
|
||||||
|
"dependsOn": [
|
||||||
|
"[parameters('resourceGroupName')]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"mode": "Incremental",
|
||||||
|
"template": {
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"name": "SerwerApiapi",
|
||||||
|
"type": "Microsoft.ApiManagement/service",
|
||||||
|
"location": "[parameters('resourceLocation')]",
|
||||||
|
"properties": {},
|
||||||
|
"sku": {
|
||||||
|
"name": "Consumption",
|
||||||
|
"capacity": 0
|
||||||
|
},
|
||||||
|
"identity": null,
|
||||||
|
"apiVersion": "2019-12-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Microsoft.ApiManagement/service/apis",
|
||||||
|
"name": "SerwerApiapi/SerwerApi",
|
||||||
|
"properties": {},
|
||||||
|
"apiVersion": "2019-12-01",
|
||||||
|
"dependsOn": [
|
||||||
|
"SerwerApiapi"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"_dependencyType": "apis.azure"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"apis1": {
|
||||||
|
"resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.ApiManagement/service/SerwerApiapi/apis/SerwerApi",
|
||||||
|
"type": "apis.azure"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
Serwer/Serwer.Api/Properties/serviceDependencies.json
Normal file
7
Serwer/Serwer.Api/Properties/serviceDependencies.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"apis1": {
|
||||||
|
"type": "apis"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -98,18 +98,19 @@ namespace Serwer.Api
|
|||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
|
app.UseCors(builder =>
|
||||||
|
{
|
||||||
|
builder.AllowAnyHeader();
|
||||||
|
builder.AllowAnyMethod();
|
||||||
|
builder.AllowAnyOrigin();
|
||||||
|
});
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseCors(builder =>
|
|
||||||
{
|
|
||||||
builder.AllowAnyHeader();
|
|
||||||
builder.AllowAnyMethod();
|
|
||||||
builder.AllowAnyOrigin();
|
|
||||||
});
|
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
app.UseSwagger();
|
//app.UseSwagger();
|
||||||
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Serwer.Api v1"));
|
//app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Serwer.Api v1"));
|
||||||
}
|
}
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
||||||
|
@ -1,50 +1,44 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 16.0.30717.126
|
VisualStudioVersion = 16.0.30717.126
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serwer.Tests", "Serwer.Tests\Serwer.Tests.csproj", "{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serwer.Core", "Serwer.Core\Serwer.Core.csproj", "{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serwer.Core", "Serwer.Core\Serwer.Core.csproj", "{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serwer.Infrastructure", "Serwer.Infrastructure\Serwer.Infrastructure.csproj", "{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}"
|
||||||
EndProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serwer.Infrastructure", "Serwer.Infrastructure\Serwer.Infrastructure.csproj", "{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}"
|
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82} = {115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
EndProjectSection
|
||||||
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82} = {115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}
|
EndProject
|
||||||
EndProjectSection
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serwer.Api", "Serwer.Api\Serwer.Api.csproj", "{335159FF-5AB8-48E5-A04C-778A46058204}"
|
||||||
EndProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serwer.Api", "Serwer.Api\Serwer.Api.csproj", "{335159FF-5AB8-48E5-A04C-778A46058204}"
|
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82} = {115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C} = {523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}
|
||||||
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82} = {115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}
|
EndProjectSection
|
||||||
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C} = {523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}
|
EndProject
|
||||||
EndProjectSection
|
Global
|
||||||
EndProject
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Global
|
Debug|Any CPU = Debug|Any CPU
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
Release|Any CPU = Release|Any CPU
|
||||||
Debug|Any CPU = Debug|Any CPU
|
EndGlobalSection
|
||||||
Release|Any CPU = Release|Any CPU
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
EndGlobalSection
|
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4169F6FD-E08D-4329-BF87-A1411A9F1EF4}.Release|Any CPU.Build.0 = Release|Any CPU
|
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{335159FF-5AB8-48E5-A04C-778A46058204}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{115E0BB1-FCC1-4E45-92B0-D3B6B4A3DA82}.Release|Any CPU.Build.0 = Release|Any CPU
|
{335159FF-5AB8-48E5-A04C-778A46058204}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{335159FF-5AB8-48E5-A04C-778A46058204}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{335159FF-5AB8-48E5-A04C-778A46058204}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
EndGlobalSection
|
||||||
{523E9EE6-B8D9-4E08-A9A0-50D7F872C79C}.Release|Any CPU.Build.0 = Release|Any CPU
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
{335159FF-5AB8-48E5-A04C-778A46058204}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
HideSolutionNode = FALSE
|
||||||
{335159FF-5AB8-48E5-A04C-778A46058204}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
EndGlobalSection
|
||||||
{335159FF-5AB8-48E5-A04C-778A46058204}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
{335159FF-5AB8-48E5-A04C-778A46058204}.Release|Any CPU.Build.0 = Release|Any CPU
|
SolutionGuid = {30A333CB-6AC2-4EAD-B05B-926DB9690CED}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
EndGlobal
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {30A333CB-6AC2-4EAD-B05B-926DB9690CED}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
|
Loading…
Reference in New Issue
Block a user