mirror of
https://github.com/XFox111/GUTSchedule.git
synced 2026-04-22 06:58:01 +03:00
Updated packages
This commit is contained in:
@@ -4,7 +4,6 @@ using Android.App;
|
|||||||
using Android.Content;
|
using Android.Content;
|
||||||
using Android.Content.PM;
|
using Android.Content.PM;
|
||||||
using Android.OS;
|
using Android.OS;
|
||||||
using Android.Preferences;
|
|
||||||
using Android.Support.V7.App;
|
using Android.Support.V7.App;
|
||||||
using Android.Text.Method;
|
using Android.Text.Method;
|
||||||
using Android.Views;
|
using Android.Views;
|
||||||
@@ -13,6 +12,7 @@ using GUTSchedule.Models;
|
|||||||
using GUTSchedule.Droid.Fragments;
|
using GUTSchedule.Droid.Fragments;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using AndroidX.Preference;
|
||||||
|
|
||||||
namespace GUTSchedule.Droid.Activities
|
namespace GUTSchedule.Droid.Activities
|
||||||
{
|
{
|
||||||
@@ -27,17 +27,6 @@ namespace GUTSchedule.Droid.Activities
|
|||||||
public static int SelectedCalendarIndex { get; set; }
|
public static int SelectedCalendarIndex { get; set; }
|
||||||
public static int Reminder { get; set; }
|
public static int Reminder { get; set; }
|
||||||
|
|
||||||
private List<(string, string)> _availableOccupations;
|
|
||||||
private List<(string, string)> AvailableOccupations
|
|
||||||
{
|
|
||||||
get => _availableOccupations;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_availableOccupations = value;
|
|
||||||
applyForOccupation.Visibility = value.Count > 0 ? ViewStates.Visible : ViewStates.Gone;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DateTime startDate = DateTime.Today;
|
DateTime startDate = DateTime.Today;
|
||||||
DateTime endDate = DateTime.Today.AddDays(7);
|
DateTime endDate = DateTime.Today.AddDays(7);
|
||||||
|
|
||||||
@@ -101,11 +90,12 @@ namespace GUTSchedule.Droid.Activities
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AvailableOccupations = await Parser.CheckAvailableOccupations(email.Text, password.Text);
|
var classes = await Parser.CheckAvailableOccupations(email.Text, password.Text);
|
||||||
|
applyForOccupation.Visibility = classes.Count > 0 ? ViewStates.Visible : ViewStates.Gone;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
AvailableOccupations = new List<(string, string)>();
|
applyForOccupation.Visibility = ViewStates.Gone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,19 +281,23 @@ namespace GUTSchedule.Droid.Activities
|
|||||||
};
|
};
|
||||||
applyForOccupation.Click += async (s, e) =>
|
applyForOccupation.Click += async (s, e) =>
|
||||||
{
|
{
|
||||||
|
List<(string, string)> classes = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
applyForOccupation.Visibility = ViewStates.Gone;
|
applyForOccupation.Visibility = ViewStates.Gone;
|
||||||
var occupations = await Parser.CheckAvailableOccupations(email.Text, password.Text);
|
classes = await Parser.CheckAvailableOccupations(email.Text, password.Text);
|
||||||
await Parser.ApplyForOccupations(email.Text, password.Text, occupations);
|
await Parser.ApplyForOccupations(email.Text, password.Text, classes);
|
||||||
Toast.MakeText(ApplicationContext, Resources.GetText(Resource.String.attendSuccess), ToastLength.Short).Show();
|
Toast.MakeText(ApplicationContext, Resources.GetText(Resource.String.attendSuccess), ToastLength.Short).Show();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Toast.MakeText(ApplicationContext, $"{Resources.GetText(Resource.String.attendFailed)}\n{ex.Message}", ToastLength.Short).Show();
|
Toast.MakeText(ApplicationContext, $"{Resources.GetText(Resource.String.attendFailed)}\n{ex.Message}", ToastLength.Short).Show();
|
||||||
}
|
}
|
||||||
AvailableOccupations = await Parser.CheckAvailableOccupations(email.Text, password.Text);
|
|
||||||
|
classes = await Parser.CheckAvailableOccupations(email.Text, password.Text);
|
||||||
|
applyForOccupation.Visibility = classes.Count > 0 ? ViewStates.Visible : ViewStates.Gone;
|
||||||
};
|
};
|
||||||
|
|
||||||
validateCredential.Click += async (s, e) =>
|
validateCredential.Click += async (s, e) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -314,7 +308,8 @@ namespace GUTSchedule.Droid.Activities
|
|||||||
PreferenceManager.GetDefaultSharedPreferences(this).Edit().PutString("email", email.Text).Apply();
|
PreferenceManager.GetDefaultSharedPreferences(this).Edit().PutString("email", email.Text).Apply();
|
||||||
PreferenceManager.GetDefaultSharedPreferences(this).Edit().PutString("password", password.Text).Apply();
|
PreferenceManager.GetDefaultSharedPreferences(this).Edit().PutString("password", password.Text).Apply();
|
||||||
|
|
||||||
AvailableOccupations = await Parser.CheckAvailableOccupations(email.Text, password.Text);
|
var classes = await Parser.CheckAvailableOccupations(email.Text, password.Text);
|
||||||
|
applyForOccupation.Visibility = classes.Count > 0 ? ViewStates.Visible : ViewStates.Gone;
|
||||||
Toast.MakeText(ApplicationContext, Resources.GetText(Resource.String.validationSuccess), ToastLength.Short).Show();
|
Toast.MakeText(ApplicationContext, Resources.GetText(Resource.String.validationSuccess), ToastLength.Short).Show();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@@ -133,7 +133,10 @@
|
|||||||
<Version>4.7.0</Version>
|
<Version>4.7.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Newtonsoft.Json">
|
<PackageReference Include="Newtonsoft.Json">
|
||||||
<Version>13.0.1</Version>
|
<Version>13.0.3</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.Net.Http">
|
||||||
|
<Version>4.3.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" />
|
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" />
|
||||||
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" />
|
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" />
|
||||||
@@ -141,7 +144,19 @@
|
|||||||
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat">
|
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat">
|
||||||
<Version>28.0.0.3</Version>
|
<Version>28.0.0.3</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
|
<PackageReference Include="Xamarin.AndroidX.CardView">
|
||||||
|
<Version>1.0.0.18</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.UI">
|
||||||
|
<Version>1.0.0.17</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
|
||||||
|
<Version>2.5.1.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Xamarin.AndroidX.Preference">
|
||||||
|
<Version>1.2.0.4</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Xamarin.Essentials" Version="1.7.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AndroidResource Include="Resources\layout\SplashScreen.xml">
|
<AndroidResource Include="Resources\layout\SplashScreen.xml">
|
||||||
|
|||||||
@@ -1,6 +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="0-development-test" package="com.xfox111.gut.schedule" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="0-development-test" package="com.xfox111.gut.schedule" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="31" />
|
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
|
||||||
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/appName" android:supportsRtl="true" android:theme="@style/AppTheme.Light"></application>
|
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/appName" android:supportsRtl="true" android:theme="@style/AppTheme.Light"></application>
|
||||||
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
||||||
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
|
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
|
||||||
|
|||||||
+2259
-1303
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
|
||||||
@@ -9,10 +9,10 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
||||||
<PackageReference Include="nunit" Version="3.12.0" />
|
<PackageReference Include="nunit" Version="3.13.3" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
|
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard1.4</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user