test app dev

main
syneffort 2 years ago
parent cb61f436bb
commit 5354553163
  1. 103
      XamarinMSSQL/XamarinMSSQL.sln
  2. 19
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Assets/AboutAssets.txt
  3. 28
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/MainActivity.cs
  4. 6
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Properties/AndroidManifest.xml
  5. 30
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Properties/AssemblyInfo.cs
  6. 50
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/AboutResources.txt
  7. 29680
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/Resource.designer.cs
  8. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/drawable/icon_about.png
  9. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/drawable/icon_feed.png
  10. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/drawable/icon_monster.png
  11. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/drawable/icon_sql.png
  12. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/drawable/xamarin_logo.png
  13. 5
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-anydpi-v26/icon.xml
  14. 5
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-anydpi-v26/icon_round.xml
  15. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-hdpi/icon.png
  16. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-hdpi/launcher_foreground.png
  17. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-mdpi/icon.png
  18. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-mdpi/launcher_foreground.png
  19. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-xhdpi/icon.png
  20. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-xhdpi/launcher_foreground.png
  21. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-xxhdpi/icon.png
  22. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-xxhdpi/launcher_foreground.png
  23. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-xxxhdpi/icon.png
  24. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png
  25. 7
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/values/colors.xml
  26. 28
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/Resources/values/styles.xml
  27. 104
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.Android/XamarinMSSQL.Android.csproj
  28. 7
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/App.xaml
  29. 106
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/App.xaml.cs
  30. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/LargeTile.scale-100.png
  31. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/LargeTile.scale-200.png
  32. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/LargeTile.scale-400.png
  33. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/SmallTile.scale-100.png
  34. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/SmallTile.scale-200.png
  35. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/SmallTile.scale-400.png
  36. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/SplashScreen.scale-100.png
  37. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/SplashScreen.scale-200.png
  38. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/SplashScreen.scale-400.png
  39. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square150x150Logo.scale-100.png
  40. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square150x150Logo.scale-200.png
  41. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square150x150Logo.scale-400.png
  42. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
  43. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
  44. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
  45. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.scale-100.png
  46. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.scale-200.png
  47. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.scale-400.png
  48. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.targetsize-16.png
  49. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.targetsize-256.png
  50. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Square44x44Logo.targetsize-48.png
  51. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/StoreLogo.backup.png
  52. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/StoreLogo.scale-100.png
  53. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/StoreLogo.scale-200.png
  54. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/StoreLogo.scale-400.png
  55. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Wide310x150Logo.scale-100.png
  56. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Wide310x150Logo.scale-200.png
  57. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Assets/Wide310x150Logo.scale-400.png
  58. 12
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/MainPage.xaml
  59. 27
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/MainPage.xaml.cs
  60. 55
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Package.appxmanifest
  61. 29
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Properties/AssemblyInfo.cs
  62. 31
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/Properties/Default.rd.xml
  63. 166
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/XamarinMSSQL.UWP.csproj
  64. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/icon_about.png
  65. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/icon_feed.png
  66. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/icon_monster.png
  67. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/icon_sql.png
  68. BIN
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL.UWP/xamarin_logo.png
  69. 32
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/App.xaml
  70. 32
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/App.xaml.cs
  71. 48
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/AppShell.xaml
  72. 19
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/AppShell.xaml.cs
  73. 3
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/AssemblyInfo.cs
  74. 34
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/GettingStarted.txt
  75. 16
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Models/EmployeeItem.cs
  76. 11
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Models/Item.cs
  77. 18
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Models/Monster.cs
  78. 15
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Services/IDataStore.cs
  79. 60
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Services/MockDataStore.cs
  80. 18
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/ViewModels/AboutViewModel.cs
  81. 56
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/ViewModels/BaseViewModel.cs
  82. 57
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/ViewModels/ItemDetailViewModel.cs
  83. 86
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/ViewModels/ItemsViewModel.cs
  84. 24
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/ViewModels/LoginViewModel.cs
  85. 65
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/ViewModels/NewItemViewModel.cs
  86. 52
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/AboutPage.xaml
  87. 15
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/AboutPage.xaml.cs
  88. 15
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/EmployeeDetailPage.xaml
  89. 22
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/EmployeeDetailPage.xaml.cs
  90. 14
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/ItemDetailPage.xaml
  91. 15
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/ItemDetailPage.xaml.cs
  92. 44
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/ItemsPage.xaml
  93. 32
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/ItemsPage.xaml.cs
  94. 14
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/LoginPage.xaml
  95. 21
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/LoginPage.xaml.cs
  96. 16
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/MonsterDetailPage.xaml
  97. 22
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/MonsterDetailPage.xaml.cs
  98. 25
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/MonsterPage.xaml
  99. 99
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/MonsterPage.xaml.cs
  100. 22
      XamarinMSSQL/XamarinMSSQL/XamarinMSSQL/Views/NewItemPage.xaml
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,103 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamarinMSSQL.UWP", "XamarinMSSQL\XamarinMSSQL.UWP\XamarinMSSQL.UWP.csproj", "{A7370C06-023F-4878-895C-ACE42860A915}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamarinMSSQL.Android", "XamarinMSSQL\XamarinMSSQL.Android\XamarinMSSQL.Android.csproj", "{4E28D147-5035-4F82-8E35-0540BF8DE8F2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamarinMSSQL", "XamarinMSSQL\XamarinMSSQL\XamarinMSSQL.csproj", "{6E81B089-A68A-4CE1-988F-E23E98AB07D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|Any CPU.ActiveCfg = Debug|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|Any CPU.Build.0 = Debug|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|Any CPU.Deploy.0 = Debug|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|ARM.ActiveCfg = Debug|ARM
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|ARM.Build.0 = Debug|ARM
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|ARM.Deploy.0 = Debug|ARM
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|x64.ActiveCfg = Debug|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|x64.Build.0 = Debug|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|x64.Deploy.0 = Debug|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|x86.ActiveCfg = Debug|x86
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|x86.Build.0 = Debug|x86
{A7370C06-023F-4878-895C-ACE42860A915}.Debug|x86.Deploy.0 = Debug|x86
{A7370C06-023F-4878-895C-ACE42860A915}.Release|Any CPU.ActiveCfg = Release|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Release|Any CPU.Build.0 = Release|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Release|Any CPU.Deploy.0 = Release|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Release|ARM.ActiveCfg = Release|ARM
{A7370C06-023F-4878-895C-ACE42860A915}.Release|ARM.Build.0 = Release|ARM
{A7370C06-023F-4878-895C-ACE42860A915}.Release|ARM.Deploy.0 = Release|ARM
{A7370C06-023F-4878-895C-ACE42860A915}.Release|x64.ActiveCfg = Release|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Release|x64.Build.0 = Release|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Release|x64.Deploy.0 = Release|x64
{A7370C06-023F-4878-895C-ACE42860A915}.Release|x86.ActiveCfg = Release|x86
{A7370C06-023F-4878-895C-ACE42860A915}.Release|x86.Build.0 = Release|x86
{A7370C06-023F-4878-895C-ACE42860A915}.Release|x86.Deploy.0 = Release|x86
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|ARM.ActiveCfg = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|ARM.Build.0 = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|ARM.Deploy.0 = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|x64.ActiveCfg = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|x64.Build.0 = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|x64.Deploy.0 = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|x86.ActiveCfg = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|x86.Build.0 = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Debug|x86.Deploy.0 = Debug|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|Any CPU.Build.0 = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|Any CPU.Deploy.0 = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|ARM.ActiveCfg = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|ARM.Build.0 = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|ARM.Deploy.0 = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|x64.ActiveCfg = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|x64.Build.0 = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|x64.Deploy.0 = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|x86.ActiveCfg = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|x86.Build.0 = Release|Any CPU
{4E28D147-5035-4F82-8E35-0540BF8DE8F2}.Release|x86.Deploy.0 = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|ARM.ActiveCfg = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|ARM.Build.0 = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|ARM.Deploy.0 = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|x64.ActiveCfg = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|x64.Build.0 = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|x64.Deploy.0 = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|x86.ActiveCfg = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|x86.Build.0 = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Debug|x86.Deploy.0 = Debug|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|Any CPU.Build.0 = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|Any CPU.Deploy.0 = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|ARM.ActiveCfg = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|ARM.Build.0 = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|ARM.Deploy.0 = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|x64.ActiveCfg = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|x64.Build.0 = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|x64.Deploy.0 = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|x86.ActiveCfg = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|x86.Build.0 = Release|Any CPU
{6E81B089-A68A-4CE1-988F-E23E98AB07D9}.Release|x86.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B16BDCD8-389F-442F-AE12-C78E1C27C404}
EndGlobalSection
EndGlobal

@ -0,0 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

@ -0,0 +1,28 @@
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.OS;
namespace XamarinMSSQL.Droid
{
[Activity(Label = "XamarinMSSQL", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
}

@ -0,0 +1,6 @@
<?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.xamarinmssql">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
<application android:label="XamarinMSSQL.Android" android:theme="@style/MainTheme"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

@ -0,0 +1,30 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("XamarinMSSQL.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("XamarinMSSQL.Android")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]

@ -0,0 +1,50 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable-hdpi/
icon.png
drawable-ldpi/
icon.png
drawable-mdpi/
icon.png
layout/
main.xml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:
public class Resource {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="launcher_background">#FFFFFF</color>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
<!-- As of Xamarin.Forms 4.6 the theme has moved into the Forms binary -->
<!-- If you want to override anything you can do that here. -->
<!-- Underneath are a couple of entries to get you started. -->
<!-- Set theme colors from https://aka.ms/material-colors -->
<!-- colorPrimary is used for the default action bar background -->
<!--<item name="colorPrimary">#2196F3</item>-->
<!-- colorPrimaryDark is used for the status bar -->
<!--<item name="colorPrimaryDark">#1976D2</item>-->
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<!--<item name="colorAccent">#FF4081</item>-->
</style>
<style name="MyTheme" parent="android:style/Theme.Material.Light.DarkActionBar">
<item name="android:colorPressedHighlight">@color/ListViewSelected</item>
<item name="android:colorLongPressedHighlight">@color/ListViewHighlighted</item>
<item name="android:colorFocusedHighlight">@color/ListViewSelected</item>
<item name="android:colorActivatedHighlight">@color/ListViewSelected</item>
<item name="android:activatedBackgroundIndicator">@color/ListViewSelected</item>
</style>
<color name="ListViewSelected">@android:color/darker_gray</color>
<color name="ListViewHighlighted">#E39696</color>
</resources>

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4E28D147-5035-4F82-8E35-0540BF8DE8F2}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{6968b3a4-1835-46a3-ac5c-1ae33b475983}</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>XamarinMSSQL.Droid</RootNamespace>
<AssemblyName>XamarinMSSQL.Android</AssemblyName>
<Deterministic>True</Deterministic>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v13.0</TargetFrameworkVersion>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<MandroidI18n>CJK</MandroidI18n>
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-mdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\drawable\xamarin_logo.png" />
<AndroidResource Include="Resources\drawable\icon_about.png" />
<AndroidResource Include="Resources\drawable\icon_feed.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XamarinMSSQL\XamarinMSSQL.csproj">
<Project>{B536AD16-59EA-48C0-9B29-626E15EAFDF8}</Project>
<Name>XamarinMSSQL</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\icon_sql.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\icon_monster.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

@ -0,0 +1,7 @@
<Application
x:Class="XamarinMSSQL.UWP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamarinMSSQL.UWP">
</Application>

@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace XamarinMSSQL.UWP
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
global::Xamarin.Forms.Forms.SetFlags("Shell_UWP_Experimental");
Xamarin.Forms.Forms.Init(e);
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,12 @@
<forms:WindowsPage
x:Class="XamarinMSSQL.UWP.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:forms="using:Xamarin.Forms.Platform.UWP"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamarinMSSQL.UWP"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
</Grid>
</forms:WindowsPage>

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace XamarinMSSQL.UWP
{
public sealed partial class MainPage
{
public MainPage()
{
this.InitializeComponent();
LoadApplication(new XamarinMSSQL.App());
}
}
}

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="E5DAF934-CCE1-42AC-ACE7-6F746D1623D0"
Publisher="CN=D36D4D95-EA2A-42D9-8348-A6638AB966BF"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="ec0cc741-fd3e-485c-81be-68815c480690" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>XamarinMSSQL.UWP</DisplayName>
<PublisherDisplayName>D36D4D95-EA2A-42D9-8348-A6638AB966BF</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="XamarinMSSQL.UWP.App">
<uap:VisualElements
DisplayName="XamarinMSSQL.UWP"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="XamarinMSSQL.UWP"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
<uap:ShowOn Tile="wide310x150Logo" />
<uap:ShowOn Tile="square310x310Logo" />
</uap:ShowNameOnTiles>
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

@ -0,0 +1,29 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("XamarinMSSQL.UWP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("XamarinMSSQL.UWP")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

@ -0,0 +1,31 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{A7370C06-023F-4878-895C-ACE42860A915}</ProjectGuid>
<TemplateGuid>{98C37F10-6541-44BE-B1E6-7EB3EB8C08F1}</TemplateGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>XamarinMSSQL.UWP</RootNamespace>
<AssemblyName>XamarinMSSQL.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>portable</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>portable</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>portable</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="icon_monster.png" />
<Content Include="icon_sql.png" />
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LargeTile.scale-100.png" />
<Content Include="Assets\LargeTile.scale-200.png" />
<Content Include="Assets\LargeTile.scale-400.png" />
<Content Include="Assets\SmallTile.scale-100.png" />
<Content Include="Assets\SmallTile.scale-200.png" />
<Content Include="Assets\SmallTile.scale-400.png" />
<Content Include="Assets\SplashScreen.scale-100.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-400.png" />
<Content Include="Assets\Square150x150Logo.scale-100.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-400.png" />
<Content Include="Assets\Square44x44Logo.altform-unplated_targetsize-16.png" />
<Content Include="Assets\Square44x44Logo.altform-unplated_targetsize-256.png" />
<Content Include="Assets\Square44x44Logo.altform-unplated_targetsize-48.png" />
<Content Include="Assets\Square44x44Logo.scale-100.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-400.png" />
<Content Include="Assets\Square44x44Logo.targetsize-16.png" />
<Content Include="Assets\Square44x44Logo.targetsize-256.png" />
<Content Include="Assets\Square44x44Logo.targetsize-48.png" />
<Content Include="Assets\StoreLogo.scale-100.png" />
<Content Include="Assets\StoreLogo.scale-200.png" />
<Content Include="Assets\StoreLogo.scale-400.png" />
<Content Include="Assets\Wide310x150Logo.scale-100.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
<Content Include="Assets\Wide310x150Logo.scale-400.png" />
<Content Include="xamarin_logo.png" />
<Content Include="icon_about.png" />
<Content Include="icon_feed.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.12" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XamarinMSSQL\XamarinMSSQL.csproj">
<Project>{B536AD16-59EA-48C0-9B29-626E15EAFDF8}</Project>
<Name>XamarinMSSQL</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinMSSQL.App">
<!--
Define global resources and styles here, that apply to all pages in your app.
-->
<Application.Resources>
<ResourceDictionary>
<Color x:Key="Primary">#2196F3</Color>
<Style TargetType="Button">
<Setter Property="TextColor" Value="White"></Setter>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="{StaticResource Primary}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="#332196F3" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>

@ -0,0 +1,32 @@
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamarinMSSQL.Services;
using XamarinMSSQL.Views;
namespace XamarinMSSQL
{
public partial class App : Application
{
public App()
{
InitializeComponent();
DependencyService.Register<MockDataStore>();
MainPage = new AppShell();
}
protected override void OnStart()
{
}
protected override void OnSleep()
{
}
protected override void OnResume()
{
}
}
}

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:XamarinMSSQL.Views"
Title="XamarinMSSQL"
x:Class="XamarinMSSQL.AppShell">
<!--
The overall app visual hierarchy is defined here, along with navigation.
https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/shell/
-->
<Shell.Resources>
<ResourceDictionary>
<Style x:Key="BaseStyle" TargetType="Element">
<Setter Property="Shell.BackgroundColor" Value="{StaticResource Primary}" />
<Setter Property="Shell.ForegroundColor" Value="White" />
<Setter Property="Shell.TitleColor" Value="White" />
<Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" />
<Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" />
<Setter Property="Shell.TabBarBackgroundColor" Value="{StaticResource Primary}" />
<Setter Property="Shell.TabBarForegroundColor" Value="White"/>
<Setter Property="Shell.TabBarUnselectedColor" Value="#95FFFFFF"/>
<Setter Property="Shell.TabBarTitleColor" Value="White"/>
</Style>
<Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />
<Style TargetType="FlyoutItem" BasedOn="{StaticResource BaseStyle}" />
</ResourceDictionary>
</Shell.Resources>
<TabBar>
<!--<ShellContent Title="Browse" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:ItemsPage}" />-->
<ShellContent Title="MSSQL" Icon="icon_monster.png" ContentTemplate="{DataTemplate local:MonsterPage}"/>
<ShellContent Title="MSSQL" Icon="icon_sql.png" ContentTemplate="{DataTemplate local:SqlPage}"/>
<!--<ShellContent Title="About" Icon="icon_about.png" Route="AboutPage" ContentTemplate="{DataTemplate local:AboutPage}" />-->
</TabBar>
<!--
If you would like to navigate to this content you can do so by calling
await Shell.Current.GoToAsync("//LoginPage");
-->
<TabBar>
<ShellContent Route="LoginPage" ContentTemplate="{DataTemplate local:LoginPage}" />
</TabBar>
</Shell>

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using Xamarin.Forms;
using XamarinMSSQL.ViewModels;
using XamarinMSSQL.Views;
namespace XamarinMSSQL
{
public partial class AppShell : Xamarin.Forms.Shell
{
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute(nameof(ItemDetailPage), typeof(ItemDetailPage));
Routing.RegisterRoute(nameof(NewItemPage), typeof(NewItemPage));
}
}
}

@ -0,0 +1,3 @@
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]

@ -0,0 +1,34 @@
Welcome to Xamarin.Forms! Here are some tips to get started building your app.
Building Your App UI
--------------------
XAML Hot Reload quickly applies UI changes as you make them to your running app.
This is the most productive way to preview and iteratively create your UI.
Try it out:
1. Run the app by clicking the Start Debugging (play) button in the above toolbar.
2. Open <MainProject>\Views\AboutPage.xaml.
Don't stop the app - keep it running while making changes.
3. Change something! Hint: change the Accent color on line 14 from "#96d1ff" to "Pink".
4. Watch the About screen update on the device or emulator, with the logo background now pink.
Keep going and try more changes!
QuickStart Guide
----------------
Learn more of the fundamentals for building apps with Xamarin here: https://aka.ms/xamarin-quickstart
Your App Shell
--------------
This template uses Shell, an app container that reduces the complexity of your apps by providing fundamental features including:
- A single place to describe the app's visual hierarchy.
- Common navigation such as a flyout menu and tabs.
- A URI-based navigation scheme that permits navigation to any page in the application.
- An integrated search handler.
Open AppShell.xaml to begin exploring. To learn more about Shell visit: https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/shell/introduction

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace XamarinMSSQL.Models
{
public class EmployeeItem
{
public int ID { get; set; }
public string Name { get; set; }
public string Job { get; set; }
public DateTime HireDate { get; set; }
public int Salary { get; set; }
public int Commission { get; set; }
}
}

@ -0,0 +1,11 @@
using System;
namespace XamarinMSSQL.Models
{
public class Item
{
public string Id { get; set; }
public string Text { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace XamarinMSSQL.Models
{
public class Monster
{
public int Id { get; set; }
public string Name { get; set; }
public string Portrait { get; set; }
public int HP { get; set; }
public int MP { get; set; }
public double Attack { get; set; }
public double Defence { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace XamarinMSSQL.Services
{
public interface IDataStore<T>
{
Task<bool> AddItemAsync(T item);
Task<bool> UpdateItemAsync(T item);
Task<bool> DeleteItemAsync(string id);
Task<T> GetItemAsync(string id);
Task<IEnumerable<T>> GetItemsAsync(bool forceRefresh = false);
}
}

@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using XamarinMSSQL.Models;
namespace XamarinMSSQL.Services
{
public class MockDataStore : IDataStore<Item>
{
readonly List<Item> items;
public MockDataStore()
{
items = new List<Item>()
{
new Item { Id = Guid.NewGuid().ToString(), Text = "First item", Description="This is an item description." },
new Item { Id = Guid.NewGuid().ToString(), Text = "Second item", Description="This is an item description." },
new Item { Id = Guid.NewGuid().ToString(), Text = "Third item", Description="This is an item description." },
new Item { Id = Guid.NewGuid().ToString(), Text = "Fourth item", Description="This is an item description." },
new Item { Id = Guid.NewGuid().ToString(), Text = "Fifth item", Description="This is an item description." },
new Item { Id = Guid.NewGuid().ToString(), Text = "Sixth item", Description="This is an item description." }
};
}
public async Task<bool> AddItemAsync(Item item)
{
items.Add(item);
return await Task.FromResult(true);
}
public async Task<bool> UpdateItemAsync(Item item)
{
var oldItem = items.Where((Item arg) => arg.Id == item.Id).FirstOrDefault();
items.Remove(oldItem);
items.Add(item);
return await Task.FromResult(true);
}
public async Task<bool> DeleteItemAsync(string id)
{
var oldItem = items.Where((Item arg) => arg.Id == id).FirstOrDefault();
items.Remove(oldItem);
return await Task.FromResult(true);
}
public async Task<Item> GetItemAsync(string id)
{
return await Task.FromResult(items.FirstOrDefault(s => s.Id == id));
}
public async Task<IEnumerable<Item>> GetItemsAsync(bool forceRefresh = false)
{
return await Task.FromResult(items);
}
}
}

@ -0,0 +1,18 @@
using System;
using System.Windows.Input;
using Xamarin.Essentials;
using Xamarin.Forms;
namespace XamarinMSSQL.ViewModels
{
public class AboutViewModel : BaseViewModel
{
public AboutViewModel()
{
Title = "About";
OpenWebCommand = new Command(async () => await Browser.OpenAsync("https://aka.ms/xamarin-quickstart"));
}
public ICommand OpenWebCommand { get; }
}
}

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Xamarin.Forms;
using XamarinMSSQL.Models;
using XamarinMSSQL.Services;
namespace XamarinMSSQL.ViewModels
{
public class BaseViewModel : INotifyPropertyChanged
{
public IDataStore<Item> DataStore => DependencyService.Get<IDataStore<Item>>();
bool isBusy = false;
public bool IsBusy
{
get { return isBusy; }
set { SetProperty(ref isBusy, value); }
}
string title = string.Empty;
public string Title
{
get { return title; }
set { SetProperty(ref title, value); }
}
protected bool SetProperty<T>(ref T backingStore, T value,
[CallerMemberName] string propertyName = "",
Action onChanged = null)
{
if (EqualityComparer<T>.Default.Equals(backingStore, value))
return false;
backingStore = value;
onChanged?.Invoke();
OnPropertyChanged(propertyName);
return true;
}
#region INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string propertyName = "")
{
var changed = PropertyChanged;
if (changed == null)
return;
changed.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#endregion
}
}

@ -0,0 +1,57 @@
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Xamarin.Forms;
using XamarinMSSQL.Models;
namespace XamarinMSSQL.ViewModels
{
[QueryProperty(nameof(ItemId), nameof(ItemId))]
public class ItemDetailViewModel : BaseViewModel
{
private string itemId;
private string text;
private string description;
public string Id { get; set; }
public string Text
{
get => text;
set => SetProperty(ref text, value);
}
public string Description
{
get => description;
set => SetProperty(ref description, value);
}
public string ItemId
{
get
{
return itemId;
}
set
{
itemId = value;
LoadItemId(value);
}
}
public async void LoadItemId(string itemId)
{
try
{
var item = await DataStore.GetItemAsync(itemId);
Id = item.Id;
Text = item.Text;
Description = item.Description;
}
catch (Exception)
{
Debug.WriteLine("Failed to Load Item");
}
}
}
}

@ -0,0 +1,86 @@
using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Threading.Tasks;
using Xamarin.Forms;
using XamarinMSSQL.Models;
using XamarinMSSQL.Views;
namespace XamarinMSSQL.ViewModels
{
public class ItemsViewModel : BaseViewModel
{
private Item _selectedItem;
public ObservableCollection<Item> Items { get; }
public Command LoadItemsCommand { get; }
public Command AddItemCommand { get; }
public Command<Item> ItemTapped { get; }
public ItemsViewModel()
{
Title = "Browse";
Items = new ObservableCollection<Item>();
LoadItemsCommand = new Command(async () => await ExecuteLoadItemsCommand());
ItemTapped = new Command<Item>(OnItemSelected);
AddItemCommand = new Command(OnAddItem);
}
async Task ExecuteLoadItemsCommand()
{
IsBusy = true;
try
{
Items.Clear();
var items = await DataStore.GetItemsAsync(true);
foreach (var item in items)
{
Items.Add(item);
}
}
catch (Exception ex)
{
Debug.WriteLine(ex);
}
finally
{
IsBusy = false;
}
}
public void OnAppearing()
{
IsBusy = true;
SelectedItem = null;
}
public Item SelectedItem
{
get => _selectedItem;
set
{
SetProperty(ref _selectedItem, value);
OnItemSelected(value);
}
}
private async void OnAddItem(object obj)
{
await Shell.Current.GoToAsync(nameof(NewItemPage));
}
async void OnItemSelected(Item item)
{
if (item == null)
return;
// This will push the ItemDetailPage onto the navigation stack
await Shell.Current.GoToAsync($"{nameof(ItemDetailPage)}?{nameof(ItemDetailViewModel.ItemId)}={item.Id}");
}
}
}

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xamarin.Forms;
using XamarinMSSQL.Views;
namespace XamarinMSSQL.ViewModels
{
public class LoginViewModel : BaseViewModel
{
public Command LoginCommand { get; }
public LoginViewModel()
{
LoginCommand = new Command(OnLoginClicked);
}
private async void OnLoginClicked(object obj)
{
// Prefixing with `//` switches to a different navigation stack instead of pushing to the active one
await Shell.Current.GoToAsync($"//{nameof(AboutPage)}");
}
}
}

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
using Xamarin.Forms;
using XamarinMSSQL.Models;
namespace XamarinMSSQL.ViewModels
{
public class NewItemViewModel : BaseViewModel
{
private string text;
private string description;
public NewItemViewModel()
{
SaveCommand = new Command(OnSave, ValidateSave);
CancelCommand = new Command(OnCancel);
this.PropertyChanged +=
(_, __) => SaveCommand.ChangeCanExecute();
}
private bool ValidateSave()
{
return !String.IsNullOrWhiteSpace(text)
&& !String.IsNullOrWhiteSpace(description);
}
public string Text
{
get => text;
set => SetProperty(ref text, value);
}
public string Description
{
get => description;
set => SetProperty(ref description, value);
}
public Command SaveCommand { get; }
public Command CancelCommand { get; }
private async void OnCancel()
{
// This will pop the current page off the navigation stack
await Shell.Current.GoToAsync("..");
}
private async void OnSave()
{
Item newItem = new Item()
{
Id = Guid.NewGuid().ToString(),
Text = Text,
Description = Description
};
await DataStore.AddItemAsync(newItem);
// This will pop the current page off the navigation stack
await Shell.Current.GoToAsync("..");
}
}
}

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinMSSQL.Views.AboutPage"
xmlns:vm="clr-namespace:XamarinMSSQL.ViewModels"
Title="{Binding Title}">
<ContentPage.BindingContext>
<vm:AboutViewModel />
</ContentPage.BindingContext>
<ContentPage.Resources>
<ResourceDictionary>
<Color x:Key="Accent">#96d1ff</Color>
</ResourceDictionary>
</ContentPage.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackLayout BackgroundColor="{StaticResource Accent}" VerticalOptions="FillAndExpand" HorizontalOptions="Fill">
<StackLayout Orientation="Horizontal" HorizontalOptions="Center" VerticalOptions="Center">
<ContentView Padding="0,40,0,40" VerticalOptions="FillAndExpand">
<Image Source="xamarin_logo.png" VerticalOptions="Center" HeightRequest="64" />
</ContentView>
</StackLayout>
</StackLayout>
<ScrollView Grid.Row="1">
<StackLayout Orientation="Vertical" Padding="30,24,30,24" Spacing="10">
<Label Text="Start developing now" FontSize="Title"/>
<Label Text="Make changes to your XAML file and save to see your UI update in the running app with XAML Hot Reload. Give it a try!" FontSize="16" Padding="0,0,0,0"/>
<Label FontSize="16" Padding="0,24,0,0">
<Label.FormattedText>
<FormattedString>
<FormattedString.Spans>
<Span Text="Learn more at "/>
<Span Text="https://aka.ms/xamarin-quickstart" FontAttributes="Bold"/>
</FormattedString.Spans>
</FormattedString>
</Label.FormattedText>
</Label>
<Button Margin="0,10,0,0" Text="Learn more"
Command="{Binding OpenWebCommand}"
BackgroundColor="{StaticResource Primary}"
TextColor="White" />
</StackLayout>
</ScrollView>
</Grid>
</ContentPage>

@ -0,0 +1,15 @@
using System;
using System.ComponentModel;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace XamarinMSSQL.Views
{
public partial class AboutPage : ContentPage
{
public AboutPage()
{
InitializeComponent();
}
}
}

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinMSSQL.Views.EmployeeDetailPage">
<ContentPage.Content>
<StackLayout>
<Label Text="{Binding Name}" FontSize="Header" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"/>
<Label Text="{Binding Job, StringFormat='Job: {0}'}" FontSize="Large" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Text="{Binding ID, StringFormat='ID: {0}'}" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Text="{Binding HireDate, StringFormat='{0:yyyy-MM-dd hh:mm:ss}'}" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Text="{Binding Salary, StringFormat='Salary: {0:#,##0}'}" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Text="{Binding Commission, StringFormat='Commision: {0: #,##0}'}" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
</StackLayout>
</ContentPage.Content>
</ContentPage>

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamarinMSSQL.Models;
namespace XamarinMSSQL.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class EmployeeDetailPage : ContentPage
{
public EmployeeDetailPage(EmployeeItem employee)
{
InitializeComponent();
this.BindingContext = employee;
}
}
}

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinMSSQL.Views.ItemDetailPage"
Title="{Binding Title}">
<StackLayout Spacing="20" Padding="15">
<Label Text="Text:" FontSize="Medium" />
<Label Text="{Binding Text}" FontSize="Small"/>
<Label Text="Description:" FontSize="Medium" />
<Label Text="{Binding Description}" FontSize="Small"/>
</StackLayout>
</ContentPage>

@ -0,0 +1,15 @@
using System.ComponentModel;
using Xamarin.Forms;
using XamarinMSSQL.ViewModels;
namespace XamarinMSSQL.Views
{
public partial class ItemDetailPage : ContentPage
{
public ItemDetailPage()
{
InitializeComponent();
BindingContext = new ItemDetailViewModel();
}
}
}

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinMSSQL.Views.ItemsPage"
Title="{Binding Title}"
xmlns:local="clr-namespace:XamarinMSSQL.ViewModels"
xmlns:model="clr-namespace:XamarinMSSQL.Models"
x:Name="BrowseItemsPage">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Add" Command="{Binding AddItemCommand}" />
</ContentPage.ToolbarItems>
<!--
x:DataType enables compiled bindings for better performance and compile time validation of binding expressions.
https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/data-binding/compiled-bindings
-->
<RefreshView x:DataType="local:ItemsViewModel" Command="{Binding LoadItemsCommand}" IsRefreshing="{Binding IsBusy, Mode=TwoWay}">
<CollectionView x:Name="ItemsListView"
ItemsSource="{Binding Items}"
SelectionMode="None">
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout Padding="10" x:DataType="model:Item">
<Label Text="{Binding Text}"
LineBreakMode="NoWrap"
Style="{DynamicResource ListItemTextStyle}"
FontSize="16" />
<Label Text="{Binding Description}"
LineBreakMode="NoWrap"
Style="{DynamicResource ListItemDetailTextStyle}"
FontSize="13" />
<StackLayout.GestureRecognizers>
<TapGestureRecognizer
NumberOfTapsRequired="1"
Command="{Binding Source={RelativeSource AncestorType={x:Type local:ItemsViewModel}}, Path=ItemTapped}"
CommandParameter="{Binding .}">
</TapGestureRecognizer>
</StackLayout.GestureRecognizers>
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</RefreshView>
</ContentPage>

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamarinMSSQL.Models;
using XamarinMSSQL.ViewModels;
using XamarinMSSQL.Views;
namespace XamarinMSSQL.Views
{
public partial class ItemsPage : ContentPage
{
ItemsViewModel _viewModel;
public ItemsPage()
{
InitializeComponent();
BindingContext = _viewModel = new ItemsViewModel();
}
protected override void OnAppearing()
{
base.OnAppearing();
_viewModel.OnAppearing();
}
}
}

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="XamarinMSSQL.Views.LoginPage"
Shell.NavBarIsVisible="False">
<ContentPage.Content>
<StackLayout Padding="10,0,10,0" VerticalOptions="Center">
<Button VerticalOptions="Center" Text="Login" Command="{Binding LoginCommand}"/>
</StackLayout>
</ContentPage.Content>
</ContentPage>

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamarinMSSQL.ViewModels;
namespace XamarinMSSQL.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class LoginPage : ContentPage
{
public LoginPage()
{
InitializeComponent();
this.BindingContext = new LoginViewModel();
}
}
}

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinMSSQL.Views.MonsterDetailPage">
<ContentPage.Content>
<StackLayout BackgroundColor="White">
<Image Source="{Binding Portrait}" HeightRequest="150" Margin="50"/>
<Label Text="{Binding Name}" TextColor="DimGray" FontSize="Large" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"/>
<Label Text="{Binding HP, StringFormat='HP: {0:#,##0}'}" TextColor="DimGray" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Text="{Binding MP, StringFormat='MP: {0:#,##0}'}" TextColor="DimGray" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Text="{Binding Attack, StringFormat='Attack: {0:#,##0.##}'}" TextColor="DimGray" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Text="{Binding Defence, StringFormat='Defence: {0:#,##0.##}'}" TextColor="DimGray" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Text="{Binding Description}" TextColor="DimGray" FontSize="Small" HorizontalTextAlignment="Start" Margin="30"/>
</StackLayout>
</ContentPage.Content>
</ContentPage>

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamarinMSSQL.Models;
namespace XamarinMSSQL.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MonsterDetailPage : ContentPage
{
public MonsterDetailPage(Monster monster)
{
InitializeComponent();
this.BindingContext = monster;
}
}
}

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinMSSQL.Views.MonsterPage">
<ContentPage.Content>
<ListView x:Name="mainListView" ItemsSource="{Binding .}"
BackgroundColor="White"
HasUnevenRows="True"
IsPullToRefreshEnabled="True" IsRefreshing="True"
Refreshing="mainListView_Refreshing" ItemTapped="mainListView_ItemTapped">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" Padding="6,6">
<Image Source="{Binding Portrait}" WidthRequest="50"/>
<Label Text="{Binding Name}" TextColor="DimGray" FontSize="Large" VerticalTextAlignment="Center" HorizontalOptions="StartAndExpand"/>
<Label Text="{Binding HP, StringFormat='HP: {0}'}" TextColor="DimGray" FontSize="Medium" VerticalTextAlignment="Center" HorizontalOptions="End"/>
<Label Text="{Binding MP, StringFormat='MP: {0}'}" TextColor="DimGray" FontSize="Medium" VerticalTextAlignment="Center" HorizontalOptions="End"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage.Content>
</ContentPage>

@ -0,0 +1,99 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamarinMSSQL.Models;
namespace XamarinMSSQL.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MonsterPage : ContentPage
{
private List<Monster> monsters;
public MonsterPage()
{
InitializeComponent();
InitInstance();
}
private void InitInstance()
{
GetDataFromSQLServer();
mainListView.EndRefresh();
}
private void GetDataFromSQLServer()
{
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder()
{
DataSource = "peacecloud.synology.me,21433",
InitialCatalog = "Study",
UserID = "study",
Password = "Study123$",
IntegratedSecurity = false
};
SqlConnection conn = new SqlConnection(builder.ConnectionString);
try
{
conn.Open();
SqlDataAdapter adapter = new SqlDataAdapter();
string qry = "SELECT * FROM MONSTER";
adapter.SelectCommand = new SqlCommand(qry, conn);
DataSet ds = new DataSet();
adapter.Fill(ds);
monsters = new List<Monster>();
foreach (DataRow row in ds.Tables[0].Rows)
{
monsters.Add(new Monster()
{
Id = (int)row["id"],
Name = (string)row["name"],
Portrait = ConvertObject<string>(row["portrait"], "https://cdn3.iconfinder.com/data/icons/fantasy-and-role-play-game-adventure-quest/512/Spell_Book-256.png"),
HP = (int)row["hp"],
MP = (int)row["mp"],
Attack = (double)row["attack"],
Defence = (double)row["defence"],
Description = ConvertObject<string>(row["description"], ""),
});
}
mainListView.ItemsSource = monsters;
}
catch (Exception ex)
{
return;
}
}
private T ConvertObject<T>(object obj, T defaultValue)
{
if (obj == null || obj == DBNull.Value)
return defaultValue;
return (T)obj;
}
private void mainListView_Refreshing(object sender, EventArgs e)
{
GetDataFromSQLServer();
mainListView.EndRefresh();
}
private void mainListView_ItemTapped(object sender, ItemTappedEventArgs e)
{
Monster monster = (Monster)e.Item;
Navigation.PushAsync(new MonsterDetailPage(monster));
}
}
}

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinMSSQL.Views.NewItemPage"
Shell.PresentationMode="ModalAnimated"
Title="New Item"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
ios:Page.UseSafeArea="true">
<ContentPage.Content>
<StackLayout Spacing="3" Padding="15">
<Label Text="Text" FontSize="Medium" />
<Entry Text="{Binding Text, Mode=TwoWay}" FontSize="Medium" />
<Label Text="Description" FontSize="Medium" />
<Editor Text="{Binding Description, Mode=TwoWay}" AutoSize="TextChanges" FontSize="Medium" Margin="0" />
<StackLayout Orientation="Horizontal">
<Button Text="Cancel" Command="{Binding CancelCommand}" HorizontalOptions="FillAndExpand"></Button>
<Button Text="Save" Command="{Binding SaveCommand}" HorizontalOptions="FillAndExpand"></Button>
</StackLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save