This commit is contained in:
Javier Suárez Ruiz 2017-01-22 14:44:56 +01:00
Родитель 1efc689fb6
Коммит 4ed2da8f01
116 изменённых файлов: 26005 добавлений и 0 удалений

Двоичные данные
src/MyTaxiCompany02/.vs/MyTaxiCompany02/v14/.suo Normal file

Двоичный файл не отображается.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,260 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyTaxiCompany02", "MyTaxiCompany02\MyTaxiCompany02\MyTaxiCompany02.csproj", "{5F03108F-2FFC-4800-A530-1011604BA16D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyTaxiCompany02.Droid", "MyTaxiCompany02\MyTaxiCompany02.Droid\MyTaxiCompany02.Droid.csproj", "{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyTaxiCompany02.iOS", "MyTaxiCompany02\MyTaxiCompany02.iOS\MyTaxiCompany02.iOS.csproj", "{E9FB58FC-AC78-46EF-94C4-FCC821B30190}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyTaxiCompany02.UWP", "MyTaxiCompany02\MyTaxiCompany02.UWP\MyTaxiCompany02.UWP.csproj", "{61D04144-6C88-41A7-B41A-57441B865243}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Ad-Hoc|ARM = Ad-Hoc|ARM
Ad-Hoc|iPhone = Ad-Hoc|iPhone
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
Ad-Hoc|x64 = Ad-Hoc|x64
Ad-Hoc|x86 = Ad-Hoc|x86
AppStore|Any CPU = AppStore|Any CPU
AppStore|ARM = AppStore|ARM
AppStore|iPhone = AppStore|iPhone
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
AppStore|x64 = AppStore|x64
AppStore|x86 = AppStore|x86
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|Any CPU.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|ARM.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|ARM.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|iPhone.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|x64.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|x64.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|x86.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.AppStore|x86.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|ARM.Build.0 = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|iPhone.Build.0 = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|x64.ActiveCfg = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|x64.Build.0 = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|x86.ActiveCfg = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Debug|x86.Build.0 = Debug|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|Any CPU.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|ARM.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|ARM.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|iPhone.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|iPhone.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|x64.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|x64.Build.0 = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|x86.ActiveCfg = Release|Any CPU
{5F03108F-2FFC-4800-A530-1011604BA16D}.Release|x86.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|Any CPU.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|ARM.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|ARM.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|ARM.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|iPhone.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|iPhone.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|x64.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|x64.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|x64.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|x86.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|x86.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.AppStore|x86.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|ARM.ActiveCfg = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|ARM.Build.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|ARM.Deploy.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|iPhone.Build.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|x64.ActiveCfg = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|x64.Build.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|x64.Deploy.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|x86.ActiveCfg = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|x86.Build.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Debug|x86.Deploy.0 = Debug|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|Any CPU.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|Any CPU.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|ARM.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|ARM.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|ARM.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|iPhone.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|iPhone.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|iPhone.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|x64.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|x64.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|x64.Deploy.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|x86.ActiveCfg = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|x86.Build.0 = Release|Any CPU
{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}.Release|x86.Deploy.0 = Release|Any CPU
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.AppStore|ARM.ActiveCfg = AppStore|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.AppStore|iPhone.Build.0 = AppStore|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.AppStore|x64.ActiveCfg = AppStore|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.AppStore|x86.ActiveCfg = AppStore|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Debug|Any CPU.ActiveCfg = Debug|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Debug|ARM.ActiveCfg = Debug|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Debug|iPhone.ActiveCfg = Debug|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Debug|iPhone.Build.0 = Debug|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Debug|x64.ActiveCfg = Debug|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Debug|x86.ActiveCfg = Debug|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Release|Any CPU.ActiveCfg = Release|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Release|ARM.ActiveCfg = Release|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Release|iPhone.ActiveCfg = Release|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Release|iPhone.Build.0 = Release|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Release|x64.ActiveCfg = Release|iPhone
{E9FB58FC-AC78-46EF-94C4-FCC821B30190}.Release|x86.ActiveCfg = Release|iPhone
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|Any CPU.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|Any CPU.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|Any CPU.Deploy.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|ARM.Build.0 = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|ARM.Deploy.0 = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|iPhone.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|iPhone.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|iPhone.Deploy.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|x64.ActiveCfg = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|x64.Build.0 = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|x64.Deploy.0 = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|x86.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|x86.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Ad-Hoc|x86.Deploy.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|Any CPU.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|Any CPU.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|Any CPU.Deploy.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|ARM.ActiveCfg = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|ARM.Build.0 = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|ARM.Deploy.0 = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|iPhone.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|iPhone.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|iPhone.Deploy.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|iPhoneSimulator.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|iPhoneSimulator.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|iPhoneSimulator.Deploy.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|x64.ActiveCfg = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|x64.Build.0 = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|x64.Deploy.0 = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|x86.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|x86.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.AppStore|x86.Deploy.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|Any CPU.ActiveCfg = Debug|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|ARM.ActiveCfg = Debug|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|ARM.Build.0 = Debug|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|ARM.Deploy.0 = Debug|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|iPhone.ActiveCfg = Debug|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|iPhone.Build.0 = Debug|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|iPhone.Deploy.0 = Debug|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|x64.ActiveCfg = Debug|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|x64.Build.0 = Debug|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|x64.Deploy.0 = Debug|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|x86.ActiveCfg = Debug|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|x86.Build.0 = Debug|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Debug|x86.Deploy.0 = Debug|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Release|Any CPU.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Release|ARM.ActiveCfg = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Release|ARM.Build.0 = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Release|ARM.Deploy.0 = Release|ARM
{61D04144-6C88-41A7-B41A-57441B865243}.Release|iPhone.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Release|iPhoneSimulator.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Release|x64.ActiveCfg = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Release|x64.Build.0 = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Release|x64.Deploy.0 = Release|x64
{61D04144-6C88-41A7-B41A-57441B865243}.Release|x86.ActiveCfg = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Release|x86.Build.0 = Release|x86
{61D04144-6C88-41A7-B41A-57441B865243}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
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 you 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,27 @@
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace MyTaxiCompany02.Droid
{
[Activity(Label = "MyTaxiCompany02", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
}
}
}

Просмотреть файл

@ -0,0 +1,22 @@
using Android.Gms.Maps.Model;
using MyTaxiCompany02.Models;
namespace MyTaxiCompany02.Droid.Maps
{
public static class CoordinateConverter
{
public static LatLng ConvertToNative(Geoposition position)
{
return new LatLng(position.Latitude, position.Longitude);
}
public static Geoposition ConvertToAbstraction(LatLng position)
{
return new Geoposition
{
Latitude = position.Latitude,
Longitude = position.Longitude
};
}
}
}

Просмотреть файл

@ -0,0 +1,16 @@
using Android.Gms.Maps.Model;
namespace MyTaxiCompany02.Droid.Maps.Icons
{
public abstract class BaseIcon
{
public MarkerOptions MarkerOptions { get; }
protected BaseIcon()
{
MarkerOptions = new MarkerOptions();
MarkerOptions.Draggable(false);
MarkerOptions.Anchor(0.5f, 0.5f);
}
}
}

Просмотреть файл

@ -0,0 +1,41 @@
using Android.Gms.Maps.Model;
using MyTaxiCompany02.Models;
namespace MyTaxiCompany02.Droid.Maps.Icons
{
public class CustomerIcon : BaseIcon
{
private const int BusinessResource = Resource.Drawable.business;
private const int GroupResource = Resource.Drawable.group;
private const int AnonymousResource = Resource.Drawable.anonymous;
public CustomerIcon(Customer customer)
: base()
{
Customer = customer;
Initialize();
}
public Customer Customer { get; }
private void Initialize()
{
switch (Customer.CustomerCategory)
{
case CustomerType.Business:
var businessIcon = BitmapDescriptorFactory.FromResource(BusinessResource);
MarkerOptions.SetIcon(businessIcon);
break;
case CustomerType.Group:
var groupIcon = BitmapDescriptorFactory.FromResource(GroupResource);
MarkerOptions.SetIcon(groupIcon);
break;
default:
var anonymousIcon = BitmapDescriptorFactory.FromResource(AnonymousResource);
MarkerOptions.SetIcon(anonymousIcon);
break;
}
}
}
}

Просмотреть файл

@ -0,0 +1,67 @@
using System.Collections.Generic;
using System.Linq;
using MyTaxiCompany02.Maps;
using Android.Gms.Maps.Model;
using Android.Gms.Maps;
using MyTaxiCompany02.Controls;
using MyTaxiCompany02.Models;
using MyTaxiCompany02.Droid.Maps.Icons;
namespace MyTaxiCompany02.Droid.Maps
{
public class MarkerManager : AbstractPushpinManager
{
private readonly Dictionary<int, Marker> _customerPushpinMappings;
private GoogleMap _nativeMap;
private bool _isUserInteractionEnabled;
public MarkerManager(GoogleMap nativeMap, CustomMap formsMap)
: base(formsMap)
{
_nativeMap = nativeMap;
_customerPushpinMappings = new Dictionary<int, Marker>();
_isUserInteractionEnabled = true;
}
protected override void AddCustomerToMap(Customer customer)
{
var customerIcon = new CustomerIcon(customer);
var markerOptions = customerIcon.MarkerOptions;
markerOptions.SetPosition(new LatLng(customer.Latitude, customer.Longitude));
Marker marker = _nativeMap.AddMarker(markerOptions);
_customerPushpinMappings.Add(customer.Id, marker);
}
public override void RemoveAllCustomers()
{
List<Marker> allMarkers = _customerPushpinMappings.Select(m => m.Value)
.ToList();
_customerPushpinMappings.Clear();
foreach (Marker marker in allMarkers)
{
marker.Remove();
}
}
public override void RemoveCustomers(IEnumerable<Customer> removedCustomers)
{
List<KeyValuePair<int, Marker>> entriesToRemove =
_customerPushpinMappings.Where(x => removedCustomers.Any(i => i.Id == x.Key))
.ToList();
foreach (KeyValuePair<int, Marker> entry in entriesToRemove)
{
entry.Value.Remove();
_customerPushpinMappings.Remove(entry.Key);
}
}
private KeyValuePair<int, Marker> GetCustomerMappedMarker(Marker marker)
{
return _customerPushpinMappings.FirstOrDefault(m => m.Value.Id == marker.Id);
}
}
}

Просмотреть файл

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EC86A3DF-F187-4A95-9C40-5DD95B0B27ED}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyTaxiCompany02.Droid</RootNamespace>
<AssemblyName>MyTaxiCompany02.Droid</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidApplication>true</AndroidApplication>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
<JavaMaximumHeapSize />
<JavaOptions />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
</PropertyGroup>
<ItemGroup>
<Reference Include="FormsViewGroup, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL">
<HintPath>..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ObjectModel" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.Design, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.CardView, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.MediaRouter, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.RecyclerView, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Maps, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.Maps.2.3.4.184-pre1\lib\MonoAndroid10\Xamarin.Forms.Maps.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Maps.Android, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.Maps.2.3.4.184-pre1\lib\MonoAndroid10\Xamarin.Forms.Maps.Android.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.GooglePlayServices.Base, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.GooglePlayServices.Base.29.0.0.1\lib\MonoAndroid41\Xamarin.GooglePlayServices.Base.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.GooglePlayServices.Basement, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.GooglePlayServices.Basement.29.0.0.1\lib\MonoAndroid41\Xamarin.GooglePlayServices.Basement.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.GooglePlayServices.Maps, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.GooglePlayServices.Maps.29.0.0.1\lib\MonoAndroid41\Xamarin.GooglePlayServices.Maps.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Maps\CoordinateConverter.cs" />
<Compile Include="Maps\Icons\BaseIcon.cs" />
<Compile Include="Maps\Icons\CustomerIcon.cs" />
<Compile Include="Renderers\CustomMapRenderer.cs" />
<Compile Include="Maps\MarkerManager.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\icon.png" />
<AndroidResource Include="Resources\drawable-hdpi\icon.png" />
<AndroidResource Include="Resources\drawable-xhdpi\icon.png" />
<AndroidResource Include="Resources\drawable-xxhdpi\icon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.axml" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidResource Include="Resources\values\styles.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyTaxiCompany02\MyTaxiCompany02.csproj">
<Project>{73a2f47a-9821-4498-b35d-9476b0a03b55}</Project>
<Name>MyTaxiCompany02</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\anonymous.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\business.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\group.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" />
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.4.184-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.4.184-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets'))" />
</Target>
<Import Project="..\..\packages\Xamarin.Forms.2.3.4.184-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.4.184-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
</Project>

Просмотреть файл

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application android:label="MyTaxiCompany02.Droid">
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBW-GFo0w0wXxrEAXSIBUZ3yF0ErW6jdlc" />
</application>
</manifest>

Просмотреть файл

@ -0,0 +1,34 @@
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("MyTaxiCompany02.Droid")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MyTaxiCompany02.Droid")]
[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
//
// 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")]
// 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,75 @@
using MyTaxiCompany02.Droid.Renderers;
using MyTaxiCompany02.Controls;
using Xamarin.Forms;
using Android.Gms.Maps;
using Xamarin.Forms.Maps.Android;
using System;
using System.ComponentModel;
using Xamarin.Forms.Platform.Android;
using Xamarin.Forms.Maps;
using MyTaxiCompany02.Maps;
using MyTaxiCompany02.Droid.Maps;
[assembly: ExportRenderer(typeof(CustomMap), typeof(CustomMapRenderer))]
namespace MyTaxiCompany02.Droid.Renderers
{
public class CustomMapRenderer : MapRenderer, IOnMapReadyCallback
{
private MapView _androidMapView;
private GoogleMap _nativeMap;
private CustomMap _customMap;
private MapManager _mapManager;
protected override void OnElementChanged(ElementChangedEventArgs<Map> e)
{
base.OnElementChanged(e);
if (e.OldElement != null)
{
_nativeMap = null;
_mapManager = null;
_androidMapView = null;
}
if (e.NewElement != null)
{
_androidMapView = Control;
_customMap = (CustomMap)Element;
}
}
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName.Equals("Renderer", StringComparison.CurrentCultureIgnoreCase))
{
_androidMapView.GetMapAsync(this);
}
else
{
_mapManager?.HandleCustomMapPropertyChange(e);
}
}
public void OnMapReady(GoogleMap googleMap)
{
_nativeMap = googleMap;
// Disable zoom buttons
_nativeMap.UiSettings.ZoomControlsEnabled = true;
_nativeMap.UiSettings.MapToolbarEnabled = false;
AddManagers();
_mapManager?.Initialize();
}
private void AddManagers()
{
var annotationManager = new MarkerManager(_nativeMap, _customMap);
_mapManager = new MapManager(_customMap, annotationManager);
}
}
}

Просмотреть файл

@ -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.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 964 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 964 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:tabIndicatorColor="@android:color/white"
app:tabGravity="fill"
app:tabMode="fixed" />

Просмотреть файл

@ -0,0 +1,9 @@
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
<!-- 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>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item>
</style>
</resources>

Просмотреть файл

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="monoandroid70" />
<package id="Unity" version="4.0.1" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid70" />
<package id="Xamarin.Forms" version="2.3.4.184-pre1" targetFramework="monoandroid70" />
<package id="Xamarin.Forms.Maps" version="2.3.4.184-pre1" targetFramework="monoandroid70" />
<package id="Xamarin.GooglePlayServices.Base" version="29.0.0.1" targetFramework="monoandroid70" />
<package id="Xamarin.GooglePlayServices.Basement" version="29.0.0.1" targetFramework="monoandroid70" />
<package id="Xamarin.GooglePlayServices.Maps" version="29.0.0.1" targetFramework="monoandroid70" />
</packages>

Просмотреть файл

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

Просмотреть файл

@ -0,0 +1,107 @@
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 MyTaxiCompany02.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;
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();
}
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.9 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 964 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 964 B

Просмотреть файл

@ -0,0 +1,36 @@
using System;
using System.Threading.Tasks;
using Windows.Graphics.Imaging;
using Windows.Storage.Streams;
namespace MyTaxiCompany02.UWP.Extensions
{
public static class RandomAccessStreamReferenceExtensions
{
// http://stackoverflow.com/questions/39618846/xamarin-forms-image-to-from-irandomaccessstreamreference/39632398#39632398
public static async Task<RandomAccessStreamReference> ScaleTo(this IRandomAccessStreamReference imageStream, uint width, uint height)
{
using (IRandomAccessStream fileStream = await imageStream.OpenReadAsync())
{
var decoder = await BitmapDecoder.CreateAsync(fileStream);
//create a RandomAccessStream as output stream
var memStream = new InMemoryRandomAccessStream();
//creates a new BitmapEncoder and initializes it using data from an existing BitmapDecoder
BitmapEncoder encoder = await BitmapEncoder.CreateForTranscodingAsync(memStream, decoder);
//resize the image
encoder.BitmapTransform.ScaledWidth = width;
encoder.BitmapTransform.ScaledHeight = height;
encoder.BitmapTransform.InterpolationMode = BitmapInterpolationMode.Cubic;
//commits and flushes all of the image data
await encoder.FlushAsync();
//return the output stream as RandomAccessStreamReference
return RandomAccessStreamReference.CreateFromStream(memStream);
}
}
}
}

Просмотреть файл

@ -0,0 +1,15 @@
<forms:WindowsPage
x:Class="MyTaxiCompany02.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:MyTaxiCompany02.UWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
</Grid>
</forms:WindowsPage>

Просмотреть файл

@ -0,0 +1,14 @@
namespace MyTaxiCompany02.UWP
{
public sealed partial class MainPage
{
public MainPage()
{
this.InitializeComponent();
Xamarin.FormsMaps.Init(GlobalSetting.BingMapsAPIKey);
LoadApplication(new MyTaxiCompany02.App());
}
}
}

Просмотреть файл

@ -0,0 +1,25 @@
using Windows.Devices.Geolocation;
namespace MyTaxiCompany02.UWP.Maps
{
public static class CoordinateConverter
{
public static Geopoint ConvertToNative(Models.Geoposition position)
{
return new Geopoint(new BasicGeoposition
{
Latitude = position.Latitude,
Longitude = position.Longitude
});
}
public static Models.Geoposition ConvertToAbstraction(Geopoint position)
{
return new Models.Geoposition
{
Latitude = position.Position.Latitude,
Longitude = position.Position.Longitude
};
}
}
}

Просмотреть файл

@ -0,0 +1,120 @@
using MyTaxiCompany02.Controls;
using MyTaxiCompany02.Maps;
using MyTaxiCompany02.Models;
using MyTaxiCompany02.UWP.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using Windows.Devices.Geolocation;
using Windows.Foundation;
using Windows.Storage.Streams;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls.Maps;
namespace MyTaxiCompany02.UWP.Maps
{
public class PushpinManager : AbstractPushpinManager
{
private readonly MapControl _nativeMap;
private readonly MapItemsControl _mapItems;
private readonly Dictionary<MapIcon, int> _pushpinMappings;
public PushpinManager(MapControl nativeMap, CustomMap formsMap)
: base(formsMap)
{
_nativeMap = nativeMap;
_mapItems = new MapItemsControl();
_nativeMap.Children.Add(_mapItems);
_pushpinMappings = new Dictionary<MapIcon, int>();
}
protected override async void AddCustomerToMap(Customer customer)
{
var geoLocation = CoordinateConverter.ConvertToNative(customer.GeoLocation);
var mapIcon = new MapIcon();
mapIcon.CollisionBehaviorDesired = MapElementCollisionBehavior.RemainVisible;
mapIcon.Location = geoLocation;
mapIcon.NormalizedAnchorPoint = new Point(0.5, 1.0);
mapIcon.ZIndex = 1000;
var iconImageUri = default(Uri);
switch (customer.CustomerCategory)
{
case CustomerType.Business:
iconImageUri = new Uri("ms-appx:///Assets/business.png");
break;
case CustomerType.Group:
iconImageUri = new Uri("ms-appx:///Assets/group.png");
break;
default:
iconImageUri = new Uri("ms-appx:///Assets/anonymous.png");
break;
}
RandomAccessStreamReference stream = RandomAccessStreamReference.CreateFromUri(iconImageUri);
mapIcon.Image = await stream.ScaleTo(48, 48);
_nativeMap.MapElements.Add(mapIcon);
_pushpinMappings.Add(mapIcon, customer.Id);
}
private Models.Geoposition GetIconPosition(DependencyObject icon)
{
if (icon == null)
{
return default(Models.Geoposition);
}
Geopoint geoLocation = MapControl.GetLocation(icon);
return CoordinateConverter.ConvertToAbstraction(geoLocation);
}
private void SetMapIconPosition(DependencyObject icon, Models.Geoposition geoLocation, Point anchorPoint)
{
var nativeCoordinate = CoordinateConverter.ConvertToNative(geoLocation);
MapControl.SetLocation(icon, nativeCoordinate);
MapControl.SetNormalizedAnchorPoint(icon, anchorPoint);
}
public override void RemoveAllCustomers()
{
RemoveCustomersIcons(_pushpinMappings.Keys.ToList());
}
public override void RemoveCustomers(IEnumerable<Customer> removedCustomers)
{
var iconsToRemove = _pushpinMappings.Where(x => removedCustomers.Any(i => i.Id == x.Value))
.Select(x => x.Key)
.ToList();
RemoveCustomersIcons(iconsToRemove);
}
private void RemoveCustomersIcons(List<MapIcon> icons)
{
if (icons != null)
{
foreach (var icon in icons)
{
_nativeMap?.MapElements?.Remove(icon);
_pushpinMappings.Remove(icon);
}
}
}
private void RemoveIcons(IEnumerable<DependencyObject> icons)
{
if (icons != null)
{
foreach (var icon in icons)
{
_mapItems?.Items?.Remove(icon);
}
}
}
}
}

Просмотреть файл

@ -0,0 +1,148 @@
<?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>{61D04144-6C88-41A7-B41A-57441B865243}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyTaxiCompany02.UWP</RootNamespace>
<AssemblyName>MyTaxiCompany02.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>Windows_TemporaryKey.pfx</PackageCertificateKeyFile>
</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>full</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>full</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>full</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>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="Extensions\RandomAccessStreamReferenceExtensions.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Maps\CoordinateConverter.cs" />
<Compile Include="Maps\PushpinManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Renderers\CustomMapRenderer.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="Windows_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\anonymous.png" />
<Content Include="Assets\business.png" />
<Content Include="Assets\group.png" />
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.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>
<ProjectReference Include="..\MyTaxiCompany02\MyTaxiCompany02.csproj">
<Project>{73a2f47a-9821-4498-b35d-9476b0a03b55}</Project>
<Name>MyTaxiCompany02</Name>
</ProjectReference>
</ItemGroup>
<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>

Просмотреть файл

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(NuGetPackageRoot)' == ''">
<NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
</PropertyGroup>
<ImportGroup>
<Import Project="$(NuGetPackageRoot)\Xamarin.Forms.Maps\2.3.4.184-pre1\build\win81\Xamarin.Forms.Maps.props" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms.Maps\2.3.4.184-pre1\build\win81\Xamarin.Forms.Maps.props')" />
</ImportGroup>
</Project>

Просмотреть файл

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(NuGetPackageRoot)' == ''">
<NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
</PropertyGroup>
<ImportGroup>
<Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.3.180\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.3.180\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
<Import Project="$(NuGetPackageRoot)\Xamarin.Forms.Maps\2.3.4.184-pre1\build\win81\Xamarin.Forms.Maps.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms.Maps\2.3.4.184-pre1\build\win81\Xamarin.Forms.Maps.targets')" />
</ImportGroup>
</Project>

Просмотреть файл

@ -0,0 +1,49 @@
<?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="c1fb653a-ac5e-4e47-a90a-d345be199592"
Publisher="CN=javie"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="c1fb653a-ac5e-4e47-a90a-d345be199592" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>MyTaxiCompany02.UWP</DisplayName>
<PublisherDisplayName>javie</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="MyTaxiCompany02.UWP.App">
<uap:VisualElements
DisplayName="MyTaxiCompany02.UWP"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="MyTaxiCompany02.UWP"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<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("MyTaxiCompany02.UWP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MyTaxiCompany02.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 http://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,61 @@
using MyTaxiCompany02.Controls;
using MyTaxiCompany02.Maps;
using MyTaxiCompany02.UWP.Maps;
using MyTaxiCompany02.UWP.Renderers;
using System;
using System.ComponentModel;
using Windows.UI.Xaml.Controls.Maps;
using Xamarin.Forms.Maps;
using Xamarin.Forms.Maps.UWP;
using Xamarin.Forms.Platform.UWP;
[assembly: ExportRenderer(typeof(CustomMap), typeof(CustomMapRenderer))]
namespace MyTaxiCompany02.UWP.Renderers
{
public class CustomMapRenderer : MapRenderer
{
private MapControl _nativeMap;
private CustomMap _customMap;
private MapManager _mapManager;
protected override void OnElementChanged(ElementChangedEventArgs<Map> e)
{
base.OnElementChanged(e);
if (e.OldElement != null)
{
_nativeMap = null;
_mapManager = null;
}
if (e.NewElement != null)
{
_nativeMap = Control;
_customMap = (CustomMap)Element;
AddManagers();
}
}
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName.Equals("Renderer", StringComparison.CurrentCultureIgnoreCase))
{
_mapManager?.Initialize();
}
else
{
_mapManager?.HandleCustomMapPropertyChange(e);
}
}
private void AddManagers()
{
var annotationManager = new PushpinManager(_nativeMap, _customMap);
_mapManager = new MapManager(_customMap, annotationManager);
}
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,19 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"Unity": "4.0.1",
"Xamarin.Forms": "2.3.3.180",
"Xamarin.Forms.Maps": "2.3.4.184-pre1"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace MyTaxiCompany02.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
}

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>6.0</string>
<key>CFBundleDisplayName</key>
<string>MyTaxiCompany02</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.MyTaxiCompany02</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-60@2x</string>
<string>Icon-60@3x</string>
<string>Icon-76</string>
<string>Icon-76@2x</string>
<string>Default</string>
<string>Default@2x</string>
<string>Default-568h@2x</string>
<string>Default-Portrait</string>
<string>Default-Portrait@2x</string>
<string>Icon-Small-40</string>
<string>Icon-Small-40@2x</string>
<string>Icon-Small-40@3x</string>
<string>Icon-Small</string>
<string>Icon-Small@2x</string>
<string>Icon-Small@3x</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace MyTaxiCompany02.iOS
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, "AppDelegate");
}
}
}

Просмотреть файл

@ -0,0 +1,88 @@
using CoreLocation;
using MapKit;
using MyTaxiCompany02.Controls;
using MyTaxiCompany02.iOS.Maps.Annotations;
using MyTaxiCompany02.Maps;
using MyTaxiCompany02.Models;
using System.Collections.Generic;
using System.Linq;
namespace MyTaxiCompany02.iOS.Maps
{
public class AnnotationManager : AbstractPushpinManager
{
private readonly MKMapView _nativeMap;
public AnnotationManager(MKMapView nativeMap, CustomMap formsMap)
: base(formsMap)
{
_nativeMap = nativeMap;
}
public MKAnnotationView GetViewForAnnotation(MKMapView mapView, IMKAnnotation annotation)
{
if (annotation is CustomerAnnotation)
{
return GetViewForCustomerAnnotation(annotation as CustomerAnnotation);
}
else
{
return null;
}
}
public override void RemoveAllCustomers()
{
CustomerAnnotation[] annotations =
_nativeMap?.Annotations?.OfType<CustomerAnnotation>()
.ToArray();
if (annotations != null)
{
_nativeMap.RemoveAnnotations(annotations);
}
}
public override void RemoveCustomers(IEnumerable<Customer> removedCustomers)
{
CustomerAnnotation[] annotations =
_nativeMap?.Annotations?.OfType<CustomerAnnotation>()
.Where(a => removedCustomers.Any(i => i.Id == a.Customer.Id))
.ToArray();
if (annotations != null)
{
_nativeMap.RemoveAnnotations(annotations);
}
}
protected override void AddCustomerToMap(Customer customer)
{
var annotation = new CustomerAnnotation(new
CLLocationCoordinate2D
{
Latitude = customer.Latitude,
Longitude = customer.Longitude
},
customer);
_nativeMap.AddAnnotation(annotation);
}
private MKAnnotationView GetViewForCustomerAnnotation(CustomerAnnotation annotation)
{
var annotationView = _nativeMap.DequeueReusableAnnotation(CustomerAnnotationView.CustomReuseIdentifier) as CustomerAnnotationView;
if (annotationView == null)
{
annotationView = new CustomerAnnotationView(annotation, annotation.Customer);
}
else
{
annotationView.Customer = annotation.Customer;
}
return annotationView;
}
}
}

Просмотреть файл

@ -0,0 +1,11 @@
using UIKit;
namespace MyTaxiCompany02.iOS.Maps.Annotations
{
public static class AnnotationImages
{
public static UIImage AnonymousImage = UIImage.FromFile("anonymous.png");
public static UIImage BusinessImage = UIImage.FromFile("business.png");
public static UIImage GroupImage = UIImage.FromFile("group.png");
}
}

Просмотреть файл

@ -0,0 +1,30 @@
using CoreLocation;
using MapKit;
namespace MyTaxiCompany02.iOS.Maps.Annotations
{
public abstract class BaseAnnotation : MKAnnotation
{
private CLLocationCoordinate2D _coordinate;
public override CLLocationCoordinate2D Coordinate
{
get
{
return _coordinate;
}
}
protected BaseAnnotation(CLLocationCoordinate2D coordinate)
{
_coordinate = coordinate;
}
public override void SetCoordinate(CLLocationCoordinate2D coordinate)
{
WillChangeValue("coordinate");
_coordinate = coordinate;
DidChangeValue("coordinate");
}
}
}

Просмотреть файл

@ -0,0 +1,16 @@
using CoreLocation;
using MyTaxiCompany02.Models;
namespace MyTaxiCompany02.iOS.Maps.Annotations
{
public class CustomerAnnotation : BaseAnnotation
{
public Customer Customer { get; private set; }
public CustomerAnnotation(CLLocationCoordinate2D coordinate, Customer customer)
: base(coordinate)
{
Customer = customer;
}
}
}

Просмотреть файл

@ -0,0 +1,48 @@
using MapKit;
using MyTaxiCompany02.Models;
namespace MyTaxiCompany02.iOS.Maps.Annotations
{
public class CustomerAnnotationView : MKAnnotationView
{
public const string CustomReuseIdentifier = nameof(CustomerAnnotationView);
private Customer _customer;
public Customer Customer
{
get
{
return _customer;
}
set
{
_customer = value;
UpdateImage();
}
}
public CustomerAnnotationView(IMKAnnotation annotation, Customer customer)
: base(annotation, CustomReuseIdentifier)
{
Customer = customer;
}
private void UpdateImage()
{
switch (Customer.CustomerCategory)
{
case CustomerType.Business:
Image = AnnotationImages.BusinessImage;
break;
case CustomerType.Group:
Image = AnnotationImages.GroupImage;
break;
default:
Image = AnnotationImages.AnonymousImage;
break;
}
}
}
}

Просмотреть файл

@ -0,0 +1,26 @@
using CoreLocation;
using MyTaxiCompany02.Models;
namespace MyTaxiCompany02.iOS.Maps
{
public static class CoordinateConverter
{
public static CLLocationCoordinate2D ConvertToNative(Geoposition position)
{
return new CLLocationCoordinate2D()
{
Latitude = position.Latitude,
Longitude = position.Longitude
};
}
public static Geoposition ConvertToAbstraction(CLLocationCoordinate2D position)
{
return new Geoposition
{
Latitude = position.Latitude,
Longitude = position.Longitude
};
}
}
}

Просмотреть файл

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E9FB58FC-AC78-46EF-94C4-FCC821B30190}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>MyTaxiCompany02.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>MyTaxiCompany02.iOS</AssemblyName>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>i386, x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchArch>i386, x86_64</MtouchArch>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<BuildIpa>True</BuildIpa>
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\AppStore</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignProvision>Automatic:AppStore</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<Compile Include="Maps\CoordinateConverter.cs" />
<Compile Include="Renderers\CustomMapRenderer.cs" />
<None Include="Entitlements.plist" />
<None Include="Info.plist" />
<Compile Include="Maps\AnnotationManager.cs" />
<Compile Include="Maps\Annotations\AnnotationImages.cs" />
<Compile Include="Maps\Annotations\BaseAnnotation.cs" />
<Compile Include="Maps\Annotations\CustomerAnnotation.cs" />
<Compile Include="Maps\Annotations\CustomerAnnotationView.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<ITunesArtwork Include="iTunesArtwork" />
<ITunesArtwork Include="iTunesArtwork@2x" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Default-568h%402x.png" />
<BundleResource Include="Resources\Default-Portrait.png" />
<BundleResource Include="Resources\Default-Portrait%402x.png" />
<BundleResource Include="Resources\Default.png" />
<BundleResource Include="Resources\Default%402x.png" />
<BundleResource Include="Resources\Icon-60%402x.png" />
<BundleResource Include="Resources\Icon-60%403x.png" />
<BundleResource Include="Resources\Icon-76.png" />
<BundleResource Include="Resources\Icon-76%402x.png" />
<BundleResource Include="Resources\Icon-Small-40.png" />
<BundleResource Include="Resources\Icon-Small-40%402x.png" />
<BundleResource Include="Resources\Icon-Small-40%403x.png" />
<BundleResource Include="Resources\Icon-Small.png" />
<BundleResource Include="Resources\Icon-Small%402x.png" />
<BundleResource Include="Resources\Icon-Small%403x.png" />
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL">
<HintPath>..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Maps, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.Maps.2.3.4.184-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Maps.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Maps.iOS, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.Maps.2.3.4.184-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Maps.iOS.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.184-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyTaxiCompany02\MyTaxiCompany02.csproj">
<Project>{73a2f47a-9821-4498-b35d-9476b0a03b55}</Project>
<Name>MyTaxiCompany02</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\anonymous.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\business.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\group.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Forms.2.3.4.184-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.4.184-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.4.184-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.4.184-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -0,0 +1,36 @@
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("MyTaxiCompany02.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MyTaxiCompany02.iOS")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
// 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")]

Просмотреть файл

@ -0,0 +1,63 @@
using MapKit;
using MyTaxiCompany02.Controls;
using MyTaxiCompany02.iOS.Maps;
using MyTaxiCompany02.iOS.Renderers;
using MyTaxiCompany02.Maps;
using System;
using System.ComponentModel;
using Xamarin.Forms;
using Xamarin.Forms.Maps.iOS;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(CustomMap), typeof(CustomMapRenderer))]
namespace MyTaxiCompany02.iOS.Renderers
{
public class CustomMapRenderer : MapRenderer
{
private MKMapView _iosMapView;
private CustomMap _customMap;
private MapManager _mapManager;
protected override void OnElementChanged(ElementChangedEventArgs<View> e)
{
base.OnElementChanged(e);
if (e.OldElement != null)
{
_iosMapView = null;
_mapManager = null;
}
if (e.NewElement != null)
{
_iosMapView = (MKMapView)Control;
_customMap = (CustomMap)Element;
_iosMapView.ZoomEnabled = true;
AddManagers();
}
}
private void AddManagers()
{
var annotationManager = new AnnotationManager(_iosMapView, _customMap);
_mapManager = new MapManager(_customMap, annotationManager);
_iosMapView.GetViewForAnnotation = annotationManager.GetViewForAnnotation;
}
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName.Equals("Renderer", StringComparison.CurrentCultureIgnoreCase))
{
_mapManager?.Initialize();
}
else
{
_mapManager?.HandleCustomMapPropertyChange(e);
}
}
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 34 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 21 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 729 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 955 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.1 KiB

Просмотреть файл

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="gAE-YM-kbH">
<objects>
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
<rect key="frame" x="270" y="270" width="60" height="60"/>
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39"/>
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="349" y="339"/>
</scene>
</scenes>
<resources>
<image name="Icon-60.png" width="180" height="180"/>
</resources>
</document>

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 964 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 964 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 20 KiB

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="xamarinios10" />
<package id="Unity" version="4.0.1" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="2.3.4.184-pre1" targetFramework="xamarinios10" />
<package id="Xamarin.Forms.Maps" version="2.3.4.184-pre1" targetFramework="xamarinios10" />
</packages>

Просмотреть файл

@ -0,0 +1,10 @@
<?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="MyTaxiCompany02.App">
<Application.Resources>
<!-- Application resource dictionary -->
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,38 @@
using MyTaxiCompany02.Services.Navigation;
using MyTaxiCompany02.ViewModels.Base;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace MyTaxiCompany02
{
public partial class App : Application
{
public App()
{
InitializeComponent();
InitNavigation();
}
private Task InitNavigation()
{
var navigationService = ViewModelLocator.Instance.Resolve<INavigationService>();
return navigationService.InitializeAsync();
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}

Просмотреть файл

@ -0,0 +1,33 @@
using MyTaxiCompany02.Models;
using System.Collections.Generic;
using Xamarin.Forms;
using Xamarin.Forms.Maps;
namespace MyTaxiCompany02.Controls
{
public class CustomMap : Map
{
public CustomMap()
{
Initialize();
}
public static readonly BindableProperty CustomersProperty =
BindableProperty.Create("Customers",
typeof(IEnumerable<Customer>), typeof(CustomMap), default(IEnumerable<Customer>),
BindingMode.TwoWay);
public IEnumerable<Customer> Customers
{
get { return (IEnumerable<Customer>)base.GetValue(CustomersProperty); }
set { base.SetValue(CustomersProperty, value); }
}
private void Initialize()
{
MoveToRegion(MapSpan.FromCenterAndRadius(
new Position(GlobalSetting.UserLatitude, GlobalSetting.UserLongitude),
Distance.FromMiles(GlobalSetting.ZoomLevel)));
}
}
}

Просмотреть файл

@ -0,0 +1,37 @@
[
{
"Id": 1,
"Phone": "(555) XXX-XXXX",
"Name": "Jhon Doe",
"Title": "Jhon Doe",
"Address": "Calle Dr. Miguel Ríos Sarmiento, 3, 41020 Sevilla, Spain",
"Description": "Quick business trip to city center.",
"UpdateDescription": "",
"Latitude": 37.404566,
"Longitude": -5.934433,
"CustomerType": 1,
"Taxis": [
{
"id": 3
}
],
"CustomerCategory": 1
},
{
"Id": 2,
"Phone": "(555) XXX-XXXX",
"Name": "Anna Doe",
"Title": "Anna Doe",
"Address": "Av. del Deporte, 33, 41020 Sevilla, Spain",
"Description": "You need to go to the nearest hospital.",
"UpdateDescription": "",
"Latitude": 37.394635,
"Longitude": -5.914357,
"Taxis": [
{
"id": 3
}
],
"CustomerCategory": 3
}
]

Просмотреть файл

@ -0,0 +1,38 @@
using MyTaxiCompany02.Models;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
namespace MyTaxiCompany02.Data
{
public static class DataRepository
{
private static IList<Customer> _customerList;
public static IList<Customer> LoadCustomerData()
{
return _customerList ??
(_customerList =
LoadData<IList<Customer>>(GlobalSetting.CustomerJsonDataFile));
}
private static T LoadData<T>(string dataFileName)
{
var assembly = typeof(DataRepository).GetTypeInfo().Assembly;
string preparedDataFileName = string.Format("MyTaxiCompany02.{0}",
dataFileName.Replace("/", "."));
Stream stream = assembly.GetManifestResourceStream(preparedDataFileName);
if (stream == null)
{
return default(T);
}
using (StreamReader sr = new StreamReader(stream))
{
return JsonConvert.DeserializeObject<T>(sr.ReadToEnd());
}
}
}
}

Просмотреть файл

@ -0,0 +1,11 @@
namespace MyTaxiCompany02
{
public class GlobalSetting
{
public const string CustomerJsonDataFile = "Data/CustomerData.json";
public const double UserLatitude = 37.405821;
public const double UserLongitude = -5.93129;
public const double ZoomLevel = 14.1;
public const string BingMapsAPIKey = "40mgB3YEUPMAewdi02Hm~HM0JyrqUSuQqAz9WoBg0Iw~Ar-hXz2S6oaN-ZJRM3VzCSS1lpPhUlNmParkTwh6zuaG7AcSb9j2N0Oe2wRpr5qz";
}
}

Просмотреть файл

@ -0,0 +1,30 @@
using MyTaxiCompany02.Models;
using MyTaxiCompany02.Controls;
using System.Collections.Generic;
namespace MyTaxiCompany02.Maps
{
public abstract class AbstractPushpinManager
{
protected readonly CustomMap FormsMap;
protected AbstractPushpinManager(CustomMap formsMap)
{
FormsMap = formsMap;
}
public void AddCustomers(IEnumerable<Customer> customers)
{
foreach (var customer in customers)
{
AddCustomerToMap(customer);
}
}
public abstract void RemoveAllCustomers();
public abstract void RemoveCustomers(IEnumerable<Customer> removedCustomers);
protected abstract void AddCustomerToMap(Customer customer);
}
}

Просмотреть файл

@ -0,0 +1,56 @@
using MyTaxiCompany02.Models;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
namespace MyTaxiCompany02.Maps
{
internal class CustomersObserver
{
private readonly MapManager _mapManager;
private IEnumerable<Customer> _customers;
public CustomersObserver(MapManager mapManager)
{
_mapManager = mapManager;
}
public void AttachCustomers(IEnumerable<Customer> customers)
{
_mapManager.PushpinManager.RemoveAllCustomers();
INotifyCollectionChanged currentCollection = _customers as INotifyCollectionChanged;
if (currentCollection != null)
{
currentCollection.CollectionChanged -= OnCustomersCollectionChanged;
}
_customers = customers;
if (_customers != null)
{
_mapManager.PushpinManager.AddCustomers(_customers);
}
if (currentCollection != null)
{
currentCollection.CollectionChanged -= OnCustomersCollectionChanged;
}
}
private void OnCustomersCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.Action == NotifyCollectionChangedAction.Add)
{
IEnumerable<Customer> newCustomers = e.NewItems.OfType<Customer>();
_mapManager.PushpinManager.AddCustomers(newCustomers);
}
else if (e.Action == NotifyCollectionChangedAction.Remove)
{
IEnumerable<Customer> removedCustomers = e.OldItems.OfType<Customer>();
_mapManager.PushpinManager.RemoveCustomers(removedCustomers);
}
}
}
}

Просмотреть файл

@ -0,0 +1,35 @@
using System;
namespace MyTaxiCompany02.Maps
{
public static class MapHelper
{
public static double CalculateDistance(double lat1, double lon1, double lat2, double lon2, char unit)
{
double theta = lon1 - lon2;
double dist = Math.Sin(Deg2Rad(lat1)) * Math.Sin(Deg2Rad(lat2)) + Math.Cos(Deg2Rad(lat1)) * Math.Cos(Deg2Rad(lat2)) * Math.Cos(Deg2Rad(theta));
dist = Math.Acos(dist);
dist = Rad2Deg(dist);
dist = dist * 60 * 1.1515;
if (unit == 'K')
{
dist = dist * 1.609344;
}
else if (unit == 'N')
{
dist = dist * 0.8684;
}
return (dist);
}
private static double Deg2Rad(double deg)
{
return (deg * Math.PI / 180.0);
}
private static double Rad2Deg(double rad)
{
return (rad / Math.PI * 180.0);
}
}
}

Просмотреть файл

@ -0,0 +1,75 @@
using MyTaxiCompany02.Controls;
using MyTaxiCompany02.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Xamarin.Forms.Maps;
namespace MyTaxiCompany02.Maps
{
public class MapManager
{
private readonly CustomersObserver _customersObserver;
private bool _mapAlreadyCentered;
public AbstractPushpinManager PushpinManager { get; private set; }
public CustomMap FormsMap { get; private set; }
public MapManager(
CustomMap formsMap,
AbstractPushpinManager pushpinManager)
{
FormsMap = formsMap;
PushpinManager = pushpinManager;
_mapAlreadyCentered = false;
_customersObserver = new CustomersObserver(this);
}
public void Initialize()
{
}
public void HandleCustomMapPropertyChange(PropertyChangedEventArgs e)
{
if (e.PropertyName.Equals(CustomMap.CustomersProperty.PropertyName, StringComparison.CurrentCultureIgnoreCase))
{
_customersObserver.AttachCustomers(FormsMap.Customers);
if (!_mapAlreadyCentered && FormsMap.Customers?.Any() == true)
{
InitializeMapPosition();
_mapAlreadyCentered = true;
}
}
}
private void InitializeMapPosition()
{
IEnumerable<Customer> customers = FormsMap?.Customers;
if (customers?.Any() == false)
{
return;
}
var centerPosition = new Position(customers.Average(x => x.Latitude),
customers.Average(x => x.Longitude));
var minLongitude = customers.Min(x => x.Longitude);
var minLatitude = customers.Min(x => x.Latitude);
var maxLongitude = customers.Max(x => x.Longitude);
var maxLatitude = customers.Max(x => x.Latitude);
var distance = MapHelper.CalculateDistance(minLatitude, minLongitude,
maxLatitude, maxLongitude, 'M') / 2;
FormsMap.MoveToRegion(MapSpan.FromCenterAndRadius(centerPosition, Distance.FromMiles(distance)));
}
}
}

Просмотреть файл

@ -0,0 +1,34 @@
using System;
namespace MyTaxiCompany02.Models
{
public class Customer
{
private CustomerType _customerType;
public int Id { get; set; }
public string Name { get; set; }
public string Title { get; set; }
public string Phone { get; set; }
public string Address { get; set; }
public string Description { get; set; }
public double Longitude { get; set; }
public double Latitude { get; set; }
public DateTime? FullyAttendedTime { get; set; }
public Geoposition GeoLocation => new Geoposition { Latitude = Latitude, Longitude = Longitude };
public CustomerStatus CurrentStatus
{
get
{
return CustomerStatus.Resolving;
}
}
public CustomerType CustomerCategory
{
get { return _customerType; }
set { _customerType = value; }
}
}
}

Просмотреть файл

@ -0,0 +1,9 @@
namespace MyTaxiCompany02.Models
{
public enum CustomerStatus
{
AwaitingTaxi = 1,
Resolving = 2,
Resolved = 3
}
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше