diff --git a/GUT.Schedule/GUT.Schedule/Activities/MainActivity.cs b/GUT.Schedule/GUT.Schedule/Activities/MainActivity.cs index 00db56d..672a8b7 100644 --- a/GUT.Schedule/GUT.Schedule/Activities/MainActivity.cs +++ b/GUT.Schedule/GUT.Schedule/Activities/MainActivity.cs @@ -1,9 +1,12 @@ using System; +using System.IO; using System.Linq; using Android.App; using Android.Content; using Android.OS; +using Android.Support.V4.Text; using Android.Support.V7.App; +using Android.Text.Method; using Android.Views; using Android.Widget; using GUT.Schedule.Models; @@ -51,6 +54,7 @@ namespace GUT.Schedule { error.Text = "Ошибка: Неправильный диапазон дат"; error.Visibility = ViewStates.Visible; + return; } // Forming export parameters @@ -154,11 +158,20 @@ namespace GUT.Schedule { switch (item.ItemId) { - case Resource.Id.github: - StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("https://github.com/xfox111/GUTSchedule"))); + case Resource.Id.about: + Android.Support.V7.App.AlertDialog.Builder builder = new Android.Support.V7.App.AlertDialog.Builder(this); + builder.SetMessage(HtmlCompat.FromHtml(new StreamReader(Assets.Open("About.html")).ReadToEnd(), HtmlCompat.FromHtmlModeLegacy)) + .SetTitle("ГУТ.Расписание") + .SetPositiveButton("ОК", (IDialogInterfaceOnClickListener)null); + + Android.Support.V7.App.AlertDialog dialog = builder.Create(); + dialog.Show(); + + // Making links clickable + dialog.FindViewById(Android.Resource.Id.Message).MovementMethod = LinkMovementMethod.Instance; return true; case Resource.Id.email: - StartActivity(new Intent(Intent.CategoryAppEmail, Android.Net.Uri.Parse("feedback@xfox111.net"))); + StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("mailto:feedback@xfox111.net"))); return true; } diff --git a/GUT.Schedule/GUT.Schedule/Assets/About.html b/GUT.Schedule/GUT.Schedule/Assets/About.html new file mode 100644 index 0000000..06558be --- /dev/null +++ b/GUT.Schedule/GUT.Schedule/Assets/About.html @@ -0,0 +1,21 @@ +

+ Приложение для экспорта расписания студентов СПбГУТ в Google календарь +

+ +

+ Разработал: Михаил Гордеев, ИКСС, ИКТ-907
+ Веб-сайт: https://xfox111.net/
+ Твиттер: @xfox111
+ ВКонтакте: @xfox.mike
+ LinkedIn: @xfox
+

+ +

+ Поддержать: By me a coffee +

+ +

+ ©2020 Michael "XFox" Gordeev.
+ ПО с открытым исходным кодом
+ Лицензия: General Public License v3
+

\ No newline at end of file diff --git a/GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj b/GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj index 8516f4b..916813e 100644 --- a/GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj +++ b/GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj @@ -109,7 +109,9 @@ - + + + 0.13.0 diff --git a/GUT.Schedule/GUT.Schedule/Resources/Resource.designer.cs b/GUT.Schedule/GUT.Schedule/Resources/Resource.designer.cs index 49bf708..acaf49c 100644 --- a/GUT.Schedule/GUT.Schedule/Resources/Resource.designer.cs +++ b/GUT.Schedule/GUT.Schedule/Resources/Resource.designer.cs @@ -3220,257 +3220,257 @@ namespace GUT.Schedule public partial class Id { - // aapt resource value: 0x7F080017 - public const int actions = 2131230743; - // aapt resource value: 0x7F080006 - public const int action_bar = 2131230726; - - // aapt resource value: 0x7F080007 - public const int action_bar_activity_content = 2131230727; - - // aapt resource value: 0x7F080008 - public const int action_bar_container = 2131230728; - - // aapt resource value: 0x7F080009 - public const int action_bar_root = 2131230729; - - // aapt resource value: 0x7F08000A - public const int action_bar_spinner = 2131230730; - - // aapt resource value: 0x7F08000B - public const int action_bar_subtitle = 2131230731; - - // aapt resource value: 0x7F08000C - public const int action_bar_title = 2131230732; - - // aapt resource value: 0x7F08000D - public const int action_container = 2131230733; - - // aapt resource value: 0x7F08000E - public const int action_context_bar = 2131230734; - - // aapt resource value: 0x7F08000F - public const int action_divider = 2131230735; - - // aapt resource value: 0x7F080010 - public const int action_image = 2131230736; - - // aapt resource value: 0x7F080011 - public const int action_menu_divider = 2131230737; - - // aapt resource value: 0x7F080012 - public const int action_menu_presenter = 2131230738; - - // aapt resource value: 0x7F080013 - public const int action_mode_bar = 2131230739; - - // aapt resource value: 0x7F080014 - public const int action_mode_bar_stub = 2131230740; - - // aapt resource value: 0x7F080015 - public const int action_mode_close_button = 2131230741; - - // aapt resource value: 0x7F080016 - public const int action_text = 2131230742; + public const int about = 2131230726; // aapt resource value: 0x7F080018 - public const int activity_chooser_view_content = 2131230744; + public const int actions = 2131230744; + + // aapt resource value: 0x7F080007 + public const int action_bar = 2131230727; + + // aapt resource value: 0x7F080008 + public const int action_bar_activity_content = 2131230728; + + // aapt resource value: 0x7F080009 + public const int action_bar_container = 2131230729; + + // aapt resource value: 0x7F08000A + public const int action_bar_root = 2131230730; + + // aapt resource value: 0x7F08000B + public const int action_bar_spinner = 2131230731; + + // aapt resource value: 0x7F08000C + public const int action_bar_subtitle = 2131230732; + + // aapt resource value: 0x7F08000D + public const int action_bar_title = 2131230733; + + // aapt resource value: 0x7F08000E + public const int action_container = 2131230734; + + // aapt resource value: 0x7F08000F + public const int action_context_bar = 2131230735; + + // aapt resource value: 0x7F080010 + public const int action_divider = 2131230736; + + // aapt resource value: 0x7F080011 + public const int action_image = 2131230737; + + // aapt resource value: 0x7F080012 + public const int action_menu_divider = 2131230738; + + // aapt resource value: 0x7F080013 + public const int action_menu_presenter = 2131230739; + + // aapt resource value: 0x7F080014 + public const int action_mode_bar = 2131230740; + + // aapt resource value: 0x7F080015 + public const int action_mode_bar_stub = 2131230741; + + // aapt resource value: 0x7F080016 + public const int action_mode_close_button = 2131230742; + + // aapt resource value: 0x7F080017 + public const int action_text = 2131230743; // aapt resource value: 0x7F080019 - public const int add = 2131230745; + public const int activity_chooser_view_content = 2131230745; // aapt resource value: 0x7F08001A - public const int alertTitle = 2131230746; + public const int add = 2131230746; // aapt resource value: 0x7F08001B - public const int all = 2131230747; + public const int alertTitle = 2131230747; + + // aapt resource value: 0x7F08001C + public const int all = 2131230748; // aapt resource value: 0x7F080000 public const int ALT = 2131230720; - // aapt resource value: 0x7F08001C - public const int always = 2131230748; - // aapt resource value: 0x7F08001D - public const int async = 2131230749; + public const int always = 2131230749; // aapt resource value: 0x7F08001E - public const int auto = 2131230750; + public const int async = 2131230750; // aapt resource value: 0x7F08001F - public const int beginning = 2131230751; + public const int auto = 2131230751; // aapt resource value: 0x7F080020 - public const int blocking = 2131230752; + public const int beginning = 2131230752; // aapt resource value: 0x7F080021 - public const int bottom = 2131230753; + public const int blocking = 2131230753; // aapt resource value: 0x7F080022 - public const int browser_actions_header_text = 2131230754; - - // aapt resource value: 0x7F080025 - public const int browser_actions_menu_items = 2131230757; + public const int bottom = 2131230754; // aapt resource value: 0x7F080023 - public const int browser_actions_menu_item_icon = 2131230755; - - // aapt resource value: 0x7F080024 - public const int browser_actions_menu_item_text = 2131230756; + public const int browser_actions_header_text = 2131230755; // aapt resource value: 0x7F080026 - public const int browser_actions_menu_view = 2131230758; + public const int browser_actions_menu_items = 2131230758; + + // aapt resource value: 0x7F080024 + public const int browser_actions_menu_item_icon = 2131230756; + + // aapt resource value: 0x7F080025 + public const int browser_actions_menu_item_text = 2131230757; // aapt resource value: 0x7F080027 - public const int buttonPanel = 2131230759; + public const int browser_actions_menu_view = 2131230759; // aapt resource value: 0x7F080028 - public const int calendar = 2131230760; + public const int buttonPanel = 2131230760; // aapt resource value: 0x7F080029 - public const int center = 2131230761; + public const int calendar = 2131230761; // aapt resource value: 0x7F08002A - public const int center_horizontal = 2131230762; + public const int center = 2131230762; // aapt resource value: 0x7F08002B - public const int center_vertical = 2131230763; + public const int center_horizontal = 2131230763; // aapt resource value: 0x7F08002C - public const int checkbox = 2131230764; + public const int center_vertical = 2131230764; // aapt resource value: 0x7F08002D - public const int chronometer = 2131230765; + public const int checkbox = 2131230765; // aapt resource value: 0x7F08002E - public const int clip_horizontal = 2131230766; + public const int chronometer = 2131230766; // aapt resource value: 0x7F08002F - public const int clip_vertical = 2131230767; + public const int clip_horizontal = 2131230767; // aapt resource value: 0x7F080030 - public const int collapseActionView = 2131230768; + public const int clip_vertical = 2131230768; // aapt resource value: 0x7F080031 - public const int container = 2131230769; + public const int collapseActionView = 2131230769; // aapt resource value: 0x7F080032 - public const int content = 2131230770; + public const int container = 2131230770; // aapt resource value: 0x7F080033 - public const int contentPanel = 2131230771; + public const int content = 2131230771; // aapt resource value: 0x7F080034 - public const int coordinator = 2131230772; + public const int contentPanel = 2131230772; // aapt resource value: 0x7F080035 - public const int course = 2131230773; + public const int coordinator = 2131230773; + + // aapt resource value: 0x7F080036 + public const int course = 2131230774; // aapt resource value: 0x7F080001 public const int CTRL = 2131230721; - // aapt resource value: 0x7F080036 - public const int custom = 2131230774; - // aapt resource value: 0x7F080037 - public const int customPanel = 2131230775; + public const int custom = 2131230775; // aapt resource value: 0x7F080038 - public const int decor_content_parent = 2131230776; + public const int customPanel = 2131230776; // aapt resource value: 0x7F080039 - public const int default_activity_button = 2131230777; + public const int decor_content_parent = 2131230777; // aapt resource value: 0x7F08003A - public const int design_bottom_sheet = 2131230778; + public const int default_activity_button = 2131230778; // aapt resource value: 0x7F08003B - public const int design_menu_item_action_area = 2131230779; + public const int design_bottom_sheet = 2131230779; // aapt resource value: 0x7F08003C - public const int design_menu_item_action_area_stub = 2131230780; + public const int design_menu_item_action_area = 2131230780; // aapt resource value: 0x7F08003D - public const int design_menu_item_text = 2131230781; + public const int design_menu_item_action_area_stub = 2131230781; // aapt resource value: 0x7F08003E - public const int design_navigation_view = 2131230782; + public const int design_menu_item_text = 2131230782; // aapt resource value: 0x7F08003F - public const int disableHome = 2131230783; + public const int design_navigation_view = 2131230783; // aapt resource value: 0x7F080040 - public const int edit_query = 2131230784; + public const int disableHome = 2131230784; // aapt resource value: 0x7F080041 - public const int email = 2131230785; + public const int edit_query = 2131230785; // aapt resource value: 0x7F080042 - public const int end = 2131230786; + public const int email = 2131230786; // aapt resource value: 0x7F080043 - public const int enterAlways = 2131230787; + public const int end = 2131230787; // aapt resource value: 0x7F080044 - public const int enterAlwaysCollapsed = 2131230788; + public const int enterAlways = 2131230788; // aapt resource value: 0x7F080045 - public const int error = 2131230789; + public const int enterAlwaysCollapsed = 2131230789; // aapt resource value: 0x7F080046 - public const int exitUntilCollapsed = 2131230790; - - // aapt resource value: 0x7F080048 - public const int expanded_menu = 2131230792; + public const int error = 2131230790; // aapt resource value: 0x7F080047 - public const int expand_activities_button = 2131230791; + public const int exitUntilCollapsed = 2131230791; // aapt resource value: 0x7F080049 - public const int export = 2131230793; + public const int expanded_menu = 2131230793; + + // aapt resource value: 0x7F080048 + public const int expand_activities_button = 2131230792; // aapt resource value: 0x7F08004A - public const int faculty = 2131230794; + public const int export = 2131230794; // aapt resource value: 0x7F08004B - public const int fill = 2131230795; - - // aapt resource value: 0x7F08004E - public const int filled = 2131230798; + public const int faculty = 2131230795; // aapt resource value: 0x7F08004C - public const int fill_horizontal = 2131230796; - - // aapt resource value: 0x7F08004D - public const int fill_vertical = 2131230797; + public const int fill = 2131230796; // aapt resource value: 0x7F08004F - public const int @fixed = 2131230799; + public const int filled = 2131230799; + + // aapt resource value: 0x7F08004D + public const int fill_horizontal = 2131230797; + + // aapt resource value: 0x7F08004E + public const int fill_vertical = 2131230798; // aapt resource value: 0x7F080050 - public const int forDay = 2131230800; - - // aapt resource value: 0x7F080054 - public const int forever = 2131230804; + public const int @fixed = 2131230800; // aapt resource value: 0x7F080051 - public const int forMonth = 2131230801; + public const int forDay = 2131230801; + + // aapt resource value: 0x7F080055 + public const int forever = 2131230805; // aapt resource value: 0x7F080052 - public const int forSemester = 2131230802; + public const int forMonth = 2131230802; // aapt resource value: 0x7F080053 - public const int forWeek = 2131230803; + public const int forSemester = 2131230803; + + // aapt resource value: 0x7F080054 + public const int forWeek = 2131230804; // aapt resource value: 0x7F080002 public const int FUNCTION = 2131230722; - // aapt resource value: 0x7F080055 - public const int ghost_view = 2131230805; - // aapt resource value: 0x7F080056 - public const int github = 2131230806; + public const int ghost_view = 2131230806; // aapt resource value: 0x7F080057 public const int group = 2131230807; diff --git a/GUT.Schedule/GUT.Schedule/Resources/layout/activity_main.xml b/GUT.Schedule/GUT.Schedule/Resources/layout/activity_main.xml index e6337ec..dbfa4e8 100644 --- a/GUT.Schedule/GUT.Schedule/Resources/layout/activity_main.xml +++ b/GUT.Schedule/GUT.Schedule/Resources/layout/activity_main.xml @@ -172,10 +172,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="©2019 Михаил Гордеев ИКСС, ИКТ-907"/> - diff --git a/GUT.Schedule/GUT.Schedule/Resources/menu/menu_main.xml b/GUT.Schedule/GUT.Schedule/Resources/menu/menu_main.xml index 9f05153..a9c9177 100644 --- a/GUT.Schedule/GUT.Schedule/Resources/menu/menu_main.xml +++ b/GUT.Schedule/GUT.Schedule/Resources/menu/menu_main.xml @@ -1,12 +1,12 @@ - +