├── .gitattributes ├── .gitignore ├── LICENSE.md ├── Preview.png ├── README.md ├── XamarinCRM_TryItNow.png ├── automation ├── fake │ ├── build-helpers.fsx │ ├── build.cmd │ ├── build.fsx │ ├── build.sh │ ├── nuget.config │ └── tools │ │ ├── NuGet │ │ └── NuGet.exe │ │ ├── xpkg │ │ ├── xamarin-component │ │ └── xamarin-component.exe │ │ └── zipalign └── rake │ └── rakefile.rb └── src ├── DataService ├── README.md └── XamarinCRMAppService │ ├── XamarinCRMAppService.sln │ └── XamarinCRMAppService │ ├── AiExceptionLogger.cs │ ├── App_Start │ ├── MobileServiceInitializer.cs │ └── Startup.MobileApp.cs │ ├── ApplicationInsights.config │ ├── Controllers │ ├── AccountController.cs │ ├── BaseController.cs │ ├── CategoryController.cs │ ├── DataRefreshController.cs │ ├── OrderController.cs │ └── ProductController.cs │ ├── Models │ └── MobileServiceContext.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Service References │ └── Application Insights │ │ └── ConnectedService.json │ ├── SqlScripts │ └── GenerateRandomOrders.sql │ ├── Startup.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── XamarinCRMAppService.csproj │ ├── packages.config │ └── scripts │ ├── ai.0.15.0-build58334.js │ └── ai.0.15.0-build58334.min.js ├── MobileApp ├── Properties │ └── AssemblyInfo.cs ├── Screenshots │ ├── CustomerSalesPage.jpg │ ├── CustomerWeeklySalesAverage.jpg │ ├── NuGet_VS_Azure.jpg │ ├── NuGet_VS_Xamarin.jpg │ ├── VS_Integration_Debug_Breakpoint.jpg │ ├── VS_Integration_Toolbar.jpg │ ├── XTC_Historical_Summary_XamCRM_Android.jpg │ ├── XTC_Historical_Summary_XamCRM_iOS.jpg │ ├── XTC_Test_Script.jpg │ ├── Xam_CRM_Login.jpg │ ├── Xamarin_Component_Store_VS_1.jpg │ ├── Xamarin_Component_Store_VS_2.jpg │ └── Xamarin_Component_Store_VS_3.jpg ├── XamarinCRM.Analysis │ ├── App.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── XamarinCRM.Analysis.csproj │ └── XamarinCRM.Analysis.sln ├── XamarinCRM.Android │ ├── Assets │ │ └── AboutAssets.txt │ ├── Localization │ │ └── Localize.cs │ ├── MainActivity.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Renderers │ │ └── FloatingActionButtonViewRenderer.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── Resource.designer.cs │ │ ├── drawable-hdpi │ │ │ ├── about.png │ │ │ ├── about_background.png │ │ │ ├── add.png │ │ │ ├── customers.png │ │ │ ├── exit.png │ │ │ ├── fab_add.png │ │ │ ├── icon.png │ │ │ ├── info.png │ │ │ ├── products.png │ │ │ ├── sales.png │ │ │ ├── save.png │ │ │ ├── splash.png │ │ │ └── splashSlice.png │ │ ├── drawable-mdpi │ │ │ ├── about.png │ │ │ ├── about_background.png │ │ │ ├── add.png │ │ │ ├── customers.png │ │ │ ├── exit.png │ │ │ ├── fab_add.png │ │ │ ├── products.png │ │ │ ├── sales.png │ │ │ └── save.png │ │ ├── drawable-xhdpi │ │ │ ├── about.png │ │ │ ├── about_background.png │ │ │ ├── add.png │ │ │ ├── customers.png │ │ │ ├── exit.png │ │ │ ├── fab_add.png │ │ │ ├── icon.png │ │ │ ├── info.png │ │ │ ├── products.png │ │ │ ├── sales.png │ │ │ ├── save.png │ │ │ ├── splash.png │ │ │ └── splashSlice.png │ │ ├── drawable-xxhdpi │ │ │ ├── about.png │ │ │ ├── about_background.png │ │ │ ├── add.png │ │ │ ├── customers.png │ │ │ ├── exit.png │ │ │ ├── fab_add.png │ │ │ ├── icon.png │ │ │ ├── info.png │ │ │ ├── products.png │ │ │ ├── sales.png │ │ │ ├── save.png │ │ │ ├── splash.png │ │ │ └── splashSlice.png │ │ ├── drawable-xxxhdpi │ │ │ ├── about.png │ │ │ ├── about_background.png │ │ │ ├── add.png │ │ │ ├── customers.png │ │ │ ├── exit.png │ │ │ ├── fab_add.png │ │ │ ├── icon.png │ │ │ ├── info.png │ │ │ ├── products.png │ │ │ ├── sales.png │ │ │ ├── save.png │ │ │ ├── splash.png │ │ │ └── splashSlice.png │ │ ├── drawable │ │ │ ├── about_background.png │ │ │ ├── add_android_blue.png │ │ │ ├── add_android_gray.png │ │ │ ├── back_android.png │ │ │ ├── bottom_up_gradient.png │ │ │ ├── icon.png │ │ │ ├── info.png │ │ │ ├── map_marker_android.png │ │ │ ├── phone_android.png │ │ │ ├── splash.png │ │ │ ├── splashSlice.png │ │ │ └── xamarin_logo_plus_name_inline.png │ │ ├── layout │ │ │ ├── tabs.axml │ │ │ └── toolbar.axml │ │ ├── values-v21 │ │ │ └── styles.xml │ │ ├── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ └── valuesTemplate │ │ │ └── api-keys.xml │ ├── Services │ │ ├── Authenticator.cs │ │ └── ConfigFetcher.cs │ ├── XamarinCRM.Android.csproj │ ├── app.config │ └── packages.config ├── XamarinCRM.Models │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── XamarinCRM.Models.csproj │ └── packages.config ├── XamarinCRM.UITest │ ├── AppInitializer.cs │ ├── Pages │ │ ├── ABS3DPrinterKitsPage.cs │ │ ├── ABSFilamentPage.cs │ │ ├── BasePage.cs │ │ ├── BuildPlatesPage.cs │ │ ├── CoolingFansPage.cs │ │ ├── CustomerContactPage.cs │ │ ├── CustomerOrderDetailsPage.cs │ │ ├── CustomerOrdersPage.cs │ │ ├── CustomerSalesPage.cs │ │ ├── CustomersPage.cs │ │ ├── ExtrudersPage.cs │ │ ├── GlobalPage.cs │ │ ├── LeadContactPage.cs │ │ ├── LeadDetailsPage.cs │ │ ├── LoginPage.cs │ │ ├── PLA3DPrinterKitsPage.cs │ │ ├── PLAFilamentPage.cs │ │ ├── PartsPage.cs │ │ ├── ProductDetailsPage.cs │ │ ├── ProductsPage.cs │ │ ├── SalesHomePage.cs │ │ ├── SplashScreenPage.cs │ │ ├── StepperMotorsPage.cs │ │ ├── ThreeDFilamentPage.cs │ │ └── ThreeDPrinterKitsPage.cs │ ├── Tests │ │ ├── AbstractSetup.cs │ │ ├── BasicTests.cs │ │ ├── CustomersTest.cs │ │ ├── FilamentsTest.cs │ │ ├── OrdersTest.cs │ │ ├── ProductsTest.cs │ │ └── SalesPageTests.cs │ ├── XamarinCRM.UITest.csproj │ ├── accounts.csv │ ├── app.config │ └── packages.config ├── XamarinCRM.iOS │ ├── AppDelegate.cs │ ├── Entitlements.plist │ ├── Info.plist │ ├── LaunchScreen.xib │ ├── Localization │ │ └── Localize.cs │ ├── Main.cs │ ├── Renderers │ │ ├── StandardImageCellRenderer.cs │ │ ├── StandardPickerRenderer.cs │ │ └── StandardViewCellRenderer.cs │ ├── Resources │ │ ├── CustomersTab@3x.png │ │ ├── Default-568h@2x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── LeadContactDetailTab@3x.png │ │ ├── LeadDetailTab@3x.png │ │ ├── ProductsTab@3x.png │ │ ├── SalesTab@3x.png │ │ ├── about.png │ │ ├── about@2x.png │ │ ├── about@3x.png │ │ ├── about_background.png │ │ ├── add.png │ │ ├── add@2x.png │ │ ├── add@3x.png │ │ ├── add_ios_blue@3x.png │ │ ├── add_ios_gray.png │ │ ├── add_ios_gray@2x.png │ │ ├── add_ios_gray@3x.png │ │ ├── back_ios@3x.png │ │ ├── bottom_up_gradient.png │ │ ├── bottom_up_gradient@2x.png │ │ ├── bottom_up_gradient@3x.png │ │ ├── customers.png │ │ ├── customers@2x.png │ │ ├── customers@3x.png │ │ ├── icon_100.png │ │ ├── icon_114.png │ │ ├── icon_120.png │ │ ├── icon_144.png │ │ ├── icon_152.png │ │ ├── icon_29.png │ │ ├── icon_40.png │ │ ├── icon_50.png │ │ ├── icon_57.png │ │ ├── icon_58.png │ │ ├── icon_72.png │ │ ├── icon_76.png │ │ ├── icon_80.png │ │ ├── info.png │ │ ├── map_marker_ios.png │ │ ├── map_marker_ios@2x.png │ │ ├── map_marker_ios@3x.png │ │ ├── phone_ios.png │ │ ├── phone_ios@2x.png │ │ ├── phone_ios@3x.png │ │ ├── products.png │ │ ├── products@2x.png │ │ ├── products@3x.png │ │ ├── sales.png │ │ ├── sales@2x.png │ │ ├── sales@3x.png │ │ ├── save.png │ │ ├── save@2x.png │ │ ├── save@3x.png │ │ ├── slideout.png │ │ ├── slideout@2x.png │ │ ├── splash.png │ │ ├── splash@2x.png │ │ ├── splash@3x.png │ │ ├── splashSlice.png │ │ └── xamarin_logo_plus_name_inline.png │ ├── Services │ │ ├── Authenticator.cs │ │ ├── ConfigFetcher.cs │ │ └── HttpClientHandlerFactory.cs │ ├── XamarinCRM.iOS.csproj │ ├── XamarinCRM.iOS.csproj.bak │ ├── app.config │ ├── iTunesArtwork.png │ ├── iTunesArtwork@2x.png │ └── packages.config ├── XamarinCRM.sln ├── XamarinCRM │ ├── App.xaml │ ├── App.xaml.cs │ ├── Cells │ │ ├── PickerCell.cs │ │ └── Sales │ │ │ └── LeadListItemCell.cs │ ├── Config │ │ ├── config-sensitive.xml │ │ └── config.xml │ ├── ConfigTemplate │ │ └── config-sensitive.xml │ ├── Converters │ │ ├── BoolToLabelOpacityConverter.cs │ │ ├── CategoryTitleConverter.cs │ │ ├── CompanyLabelBooleanToColorConverter.cs │ │ ├── ConvertableConverter.cs │ │ ├── CurrencyDoubleConverter.cs │ │ ├── IndustryLabelBooleanToColorConverter.cs │ │ ├── InvertedBooleanConverter.cs │ │ ├── LoadingLabelHeightConverter.cs │ │ ├── OrderListHeaderViewBackgroudColorConverter.cs │ │ ├── ShortDatePatternConverter.cs │ │ ├── ToUpperConverter.cs │ │ └── WholePercentToDecimalPercent.cs │ ├── Extensions │ │ ├── ExceptionExtensions.cs │ │ ├── IEnumerableExtensions.cs │ │ ├── IListExtensions.cs │ │ ├── ObservableCollectionExtensions.cs │ │ └── StringExtensions.cs │ ├── Localization │ │ ├── ILocalize.cs │ │ ├── TextResources.Designer.cs │ │ ├── TextResources.resx │ │ └── TranslateExtension.cs │ ├── Models │ │ └── Local │ │ │ ├── CategorySalesDataPoint.cs │ │ │ ├── Grouping.cs │ │ │ ├── OrderStatusOption.cs │ │ │ └── WeeklySalesData.cs │ ├── Pages │ │ ├── About │ │ │ ├── AboutDetailPage.xaml │ │ │ ├── AboutDetailPage.xaml.cs │ │ │ ├── AboutItemListPage.cs │ │ │ └── AboutItemListPage.xaml │ │ ├── Base │ │ │ ├── ModelBoundContentPage.cs │ │ │ └── ModelBoundTabbedPage.cs │ │ ├── Customers │ │ │ ├── CustomerDetailPage.xaml │ │ │ ├── CustomerDetailPage.xaml.cs │ │ │ ├── CustomerMapPage.cs │ │ │ ├── CustomerOrderDetailPage.xaml │ │ │ ├── CustomerOrderDetailPage.xaml.cs │ │ │ ├── CustomerOrdersPage.xaml │ │ │ ├── CustomerOrdersPage.xaml.cs │ │ │ ├── CustomerSalesPage.xaml │ │ │ ├── CustomerSalesPage.xaml.cs │ │ │ ├── CustomersPage.xaml │ │ │ └── CustomersPage.xaml.cs │ │ ├── MenuPage.xaml │ │ ├── MenuPage.xaml.cs │ │ ├── Products │ │ │ ├── CategoryListPage.xaml │ │ │ ├── CategoryListPage.xaml.cs │ │ │ ├── ProductDetailPage.xaml │ │ │ ├── ProductDetailPage.xaml.cs │ │ │ ├── ProductListPage.xaml │ │ │ └── ProductListPage.xaml.cs │ │ ├── RootPage.cs │ │ ├── Sales │ │ │ ├── LeadDetailPage.cs │ │ │ └── SalesDashboardPage.cs │ │ └── Splash │ │ │ ├── SplashPage.xaml │ │ │ └── SplashPage.xaml.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Attributes │ │ │ ├── CurrencyAttribute.cs │ │ │ └── DisplayAttribute.cs │ ├── Services │ │ ├── AuthenticationService.cs │ │ ├── ChartDataService.cs │ │ ├── DataService.cs │ │ ├── GeoCodingService.cs │ │ ├── IAuthenticationService.cs │ │ ├── IAuthenticator.cs │ │ ├── IChartDataService.cs │ │ ├── IConfigFetcher.cs │ │ ├── IDataService.cs │ │ ├── IGeoCodingService.cs │ │ └── IHttpClientHandlerFactory.cs │ ├── Statics │ │ ├── FontSizes.cs │ │ ├── Fonts.cs │ │ ├── MessagingServiceConstants.cs │ │ ├── Palette.cs │ │ ├── RowSizes.cs │ │ └── Thicknesses.cs │ ├── ViewModels │ │ ├── About │ │ │ ├── AboutItemListViewModel.cs │ │ │ └── AboutItemViewModel.cs │ │ ├── Base │ │ │ └── BaseViewModel.cs │ │ ├── Customers │ │ │ ├── CustomerDetailViewModel.cs │ │ │ ├── CustomerMapViewModel.cs │ │ │ ├── CustomerSalesViewModel.cs │ │ │ ├── CustomersViewModel.cs │ │ │ ├── OrderDetailViewModel.cs │ │ │ └── OrdersViewModel.cs │ │ ├── Products │ │ │ ├── CategoriesViewModel.cs │ │ │ ├── ProductDetailViewModel.cs │ │ │ └── ProductsViewModel.cs │ │ ├── Sales │ │ │ ├── LeadDetailViewModel.cs │ │ │ ├── SalesDashboardChartViewModel.cs │ │ │ └── SalesDashboardLeadsViewModel.cs │ │ └── Splash │ │ │ └── SplashViewModel.cs │ ├── Views │ │ ├── Base │ │ │ └── ModelBoundContentView.cs │ │ ├── Customers │ │ │ ├── CustomerCategorySalesChartView.xaml │ │ │ ├── CustomerCategorySalesChartView.xaml.cs │ │ │ ├── CustomerDetailAddressView.xaml │ │ │ ├── CustomerDetailAddressView.xaml.cs │ │ │ ├── CustomerDetailContactView.xaml │ │ │ ├── CustomerDetailContactView.xaml.cs │ │ │ ├── CustomerDetailHeaderView.xaml │ │ │ ├── CustomerDetailHeaderView.xaml.cs │ │ │ ├── CustomerDetailPhoneView.xaml │ │ │ ├── CustomerDetailPhoneView.xaml.cs │ │ │ ├── CustomerListView.xaml │ │ │ ├── CustomerListView.xaml.cs │ │ │ ├── CustomerOrderListView.xaml │ │ │ ├── CustomerOrderListView.xaml.cs │ │ │ ├── CustomerWeeklySalesChartView.xaml │ │ │ └── CustomerWeeklySalesChartView.xaml.cs │ │ ├── FloatingActionButtonView.cs │ │ ├── NonPersistentSelectedItemListView.xaml │ │ ├── NonPersistentSelectedItemListView.xaml.cs │ │ ├── Products │ │ │ ├── CategoryListView.xaml │ │ │ ├── CategoryListView.xaml.cs │ │ │ ├── ProductListView.xaml │ │ │ └── ProductListView.xaml.cs │ │ └── Sales │ │ │ ├── LeadListHeaderView.cs │ │ │ ├── LeadListView.cs │ │ │ ├── LeadsView.cs │ │ │ ├── SalesChartHeaderView.cs │ │ │ └── SalesDashboardChartView.cs │ ├── XamarinCRM.csproj │ ├── app.config │ └── packages.config ├── XamarinCRMAndroid.keystore ├── debug.keystore ├── lib │ └── SyncFusion │ │ ├── android │ │ ├── Syncfusion.SfChart.Android.dll │ │ ├── Syncfusion.SfChart.XForms.Android.dll │ │ └── Syncfusion.SfChart.XForms.dll │ │ ├── ios-unified │ │ ├── Syncfusion.SfChart.XForms.dll │ │ ├── Syncfusion.SfChart.XForms.iOS.dll │ │ └── Syncfusion.SfChart.iOS.dll │ │ ├── ios │ │ ├── Syncfusion.SfChart.XForms.dll │ │ ├── Syncfusion.SfChart.XForms.iOS.dll │ │ └── Syncfusion.SfChart.iOS.dll │ │ ├── pcl │ │ └── Syncfusion.SfChart.XForms.dll │ │ └── wp8 │ │ ├── Syncfusion.SfChart.WP8.dll │ │ ├── Syncfusion.SfChart.XForms.WinPhone.dll │ │ └── Syncfusion.SfChart.XForms.dll ├── packages.config └── raw graphic resources │ ├── CustomersTab@3x.png │ ├── Default-568h@2x.png │ ├── Default-Portrait.png │ ├── Default-Portrait@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── LeadContactDetailTab@3x.png │ ├── LeadDetailTab@3x.png │ ├── ProductsTab@3x.png │ ├── SalesTab@3x.png │ ├── about_background.png │ ├── add_android_blue.png │ ├── add_android_gray.png │ ├── add_ios_blue@3x.png │ ├── add_ios_gray@3x.png │ ├── back_android.png │ ├── back_ios@3x.png │ ├── bottom_up_gradient.png │ ├── bottom_up_gradient@2x.png │ ├── bottom_up_gradient@3x.png │ ├── crm-icon.png │ ├── icon_100.png │ ├── icon_114.png │ ├── icon_120.png │ ├── icon_144.png │ ├── icon_152.png │ ├── icon_192.png │ ├── icon_29.png │ ├── icon_40.png │ ├── icon_50.png │ ├── icon_512.png │ ├── icon_57.png │ ├── icon_58.png │ ├── icon_640.png │ ├── icon_72.png │ ├── icon_76.png │ ├── icon_80.png │ ├── info.png │ ├── map_marker_android.png │ ├── map_marker_ios@3x.png │ ├── phone_android.png │ ├── phone_ios@3x.png │ ├── splash.png │ ├── splash@2x.png │ ├── splash@3x.png │ ├── splash_max_resolution.png │ └── xamarin_logo_plus_name_inline.png └── Models ├── Account.cs ├── BaseModel.cs ├── Category.cs ├── Order.cs └── Product.cs /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2015 Xamarin 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 8 | the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/Preview.png -------------------------------------------------------------------------------- /XamarinCRM_TryItNow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/XamarinCRM_TryItNow.png -------------------------------------------------------------------------------- /automation/fake/build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | if not exist packages\FAKE\tools\Fake.exe ( 4 | tools\NuGet\NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion 5 | ) 6 | if not exist packages\NUnit.Runners\tools\nunit-console.exe ( 7 | tools\NuGet\NuGet.exe install NUnit.Runners -OutputDirectory packages -ExcludeVersion 8 | ) 9 | packages\FAKE\tools\FAKE.exe build.fsx %* 2>&1 -------------------------------------------------------------------------------- /automation/fake/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -f packages/FAKE/tools/FAKE.exe ]; then 4 | mono tools/NuGet/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion 5 | fi 6 | 7 | if [ $# -eq 0 ]; then 8 | echo "You must at least provide a build target name." 9 | echo "Example: './build.sh [your buid target name]'" 10 | exit 1 11 | else 12 | if [ $# -eq 1 ]; then # Assuming the build target is for iOS, and requires no additional parameters. Using this for an Android build will fail, because we require two more parameters for that. See below. 13 | mono packages/FAKE/tools/FAKE.exe build.fsx $1 14 | else # Assuming the build target is for Android. Check to make sure both additional parameters are present. 15 | if [ $# -ne 3 ]; then 16 | echo "You must provide two additional arguments: 1) your android keystore password and 2) your Google Maps For Android v2 API key." 17 | echo "If you're using arguments in addition to the build target name arguments, it assumed you are attempting an Android build." 18 | echo "This particular Android app build requires both an android keystore password and a Google Maps For Android v2 API key." 19 | echo "Example: './build.sh [your buid target name] [your keystore password] [your Google Maps For Android v2 API key]'." 20 | exit 1 21 | else 22 | # use for our android build, which requires the keystore password for signing the app, and the Google Maps API key because this app uses Maps. 23 | mono packages/FAKE/tools/FAKE.exe build.fsx $1 android_keystore_password=$2 google_maps_for_android_v2_api_key=$3 24 | fi 25 | fi 26 | fi 27 | 28 | 29 | -------------------------------------------------------------------------------- /automation/fake/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /automation/fake/tools/NuGet/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/automation/fake/tools/NuGet/NuGet.exe -------------------------------------------------------------------------------- /automation/fake/tools/xpkg/xamarin-component: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export MONO_IOMAP=all 3 | exec mono $MONO_OPTIONS xamarin-component.exe "$@" 4 | -------------------------------------------------------------------------------- /automation/fake/tools/xpkg/xamarin-component.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/automation/fake/tools/xpkg/xamarin-component.exe -------------------------------------------------------------------------------- /automation/fake/tools/zipalign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/automation/fake/tools/zipalign -------------------------------------------------------------------------------- /src/DataService/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/DataService/README.md -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamarinCRMAppService", "XamarinCRMAppService\XamarinCRMAppService.csproj", "{E54AE035-000C-4AFC-AC1E-7C29F26C64B5}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E54AE035-000C-4AFC-AC1E-7C29F26C64B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {E54AE035-000C-4AFC-AC1E-7C29F26C64B5}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {E54AE035-000C-4AFC-AC1E-7C29F26C64B5}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {E54AE035-000C-4AFC-AC1E-7C29F26C64B5}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/AiExceptionLogger.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System; 4 | using System.Web.Http.ExceptionHandling; 5 | using Microsoft.ApplicationInsights; 6 | 7 | namespace XamarinCRMAppService 8 | { 9 | public class AiExceptionLogger : ExceptionLogger 10 | { 11 | static readonly Lazy _LazyAiClient = new Lazy(() => new TelemetryClient()); 12 | static TelemetryClient _AiClient => _LazyAiClient.Value; 13 | 14 | public override void Log(ExceptionLoggerContext context) 15 | { 16 | if (context?.Exception != null) 17 | { 18 | _AiClient.TrackException(context.Exception); 19 | } 20 | base.Log(context); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Controllers/AccountController.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System.Linq; 4 | using System.Web.Http; 5 | using XamarinCRM.Models; 6 | 7 | namespace XamarinCRMAppService.Controllers 8 | { 9 | public class AccountController : BaseController 10 | { 11 | // GET tables/Account 12 | public IQueryable GetAllAccount() 13 | { 14 | return Query(); 15 | } 16 | 17 | // GET tables/Account/48D68C86-6EA6-4C25-AA33-223FC9A27959 18 | public SingleResult GetAccount(string id) 19 | { 20 | return Lookup(id); 21 | } 22 | 23 | // PATCH tables/Account/48D68C86-6EA6-4C25-AA33-223FC9A27959 24 | // Omitted intentionally to prevent PATCH operations 25 | //public Task PatchAccount(string id, Delta patch) 26 | //{ 27 | // return UpdateAsync(id, patch); 28 | //} 29 | 30 | // POST tables/Account 31 | // Omitted intentionally to prevent POST operations 32 | //public async Task PostAccount(Account item) 33 | //{ 34 | // Account current = await InsertAsync(item); 35 | // return CreatedAtRoute("Tables", new { id = current.Id }, current); 36 | //} 37 | 38 | // DELETE tables/Account/48D68C86-6EA6-4C25-AA33-223FC9A27959 39 | // Omitted intentionally to prevent DELETE operations 40 | //public Task DeleteAccount(string id) 41 | //{ 42 | // return DeleteAsync(id); 43 | //} 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Controllers/BaseController.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System.Web.Http.Controllers; 4 | using Microsoft.Azure.Mobile.Server; 5 | using Microsoft.Azure.Mobile.Server.Config; 6 | using XamarinCRM.Models; 7 | using XamarinCRMAppService.Models; 8 | 9 | namespace XamarinCRMAppService.Controllers 10 | { 11 | [MobileAppController] 12 | public abstract class BaseController : TableController where T : BaseModel 13 | { 14 | protected override void Initialize(HttpControllerContext controllerContext) 15 | { 16 | base.Initialize(controllerContext); 17 | MobileServiceContext context = new MobileServiceContext(); 18 | DomainManager = new EntityDomainManager(context, Request); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Controllers/OrderController.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System.Linq; 4 | using System.Web.Http; 5 | using XamarinCRM.Models; 6 | 7 | namespace XamarinCRMAppService.Controllers 8 | { 9 | public class OrderController : BaseController 10 | { 11 | // GET tables/Order 12 | public IQueryable GetAllOrder() 13 | { 14 | return Query(); 15 | } 16 | 17 | // GET tables/Order/48D68C86-6EA6-4C25-AA33-223FC9A27959 18 | public SingleResult GetOrder(string id) 19 | { 20 | return Lookup(id); 21 | } 22 | 23 | // PATCH tables/Order/48D68C86-6EA6-4C25-AA33-223FC9A27959 24 | // Omitted intentionally to prevent PATCH operations 25 | //public Task PatchOrder(string id, Delta patch) 26 | //{ 27 | // return UpdateAsync(id, patch); 28 | //} 29 | 30 | // POST tables/Order 31 | // Omitted intentionally to prevent POST operations 32 | //public async Task PostOrder(Order item) 33 | //{ 34 | // Order current = await InsertAsync(item); 35 | // return CreatedAtRoute("Tables", new { id = current.Id }, current); 36 | //} 37 | 38 | // DELETE tables/Order/48D68C86-6EA6-4C25-AA33-223FC9A27959 39 | // Omitted intentionally to prevent DELETE operations 40 | //public Task DeleteOrder(string id) 41 | //{ 42 | // return DeleteAsync(id); 43 | //} 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Controllers/ProductController.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System.Linq; 4 | using System.Web.Http; 5 | using XamarinCRM.Models; 6 | 7 | namespace XamarinCRMAppService.Controllers 8 | { 9 | public class ProductController : BaseController 10 | { 11 | // GET tables/Product 12 | public IQueryable GetAllProduct() 13 | { 14 | return Query(); 15 | } 16 | 17 | // GET tables/Product/48D68C86-6EA6-4C25-AA33-223FC9A27959 18 | public SingleResult GetProduct(string id) 19 | { 20 | return Lookup(id); 21 | } 22 | 23 | // PATCH tables/Product/48D68C86-6EA6-4C25-AA33-223FC9A27959 24 | // Omitted intentionally to prevent PATCH operations 25 | //public Task PatchProduct(string id, Delta patch) 26 | //{ 27 | // return UpdateAsync(id, patch); 28 | //} 29 | 30 | // POST tables/Product 31 | // Omitted intentionally to prevent POST operations 32 | //public async Task PostProduct(Product item) 33 | //{ 34 | // Product current = await InsertAsync(item); 35 | // return CreatedAtRoute("Tables", new { id = current.Id }, current); 36 | //} 37 | 38 | // DELETE tables/Product/48D68C86-6EA6-4C25-AA33-223FC9A27959 39 | // Omitted intentionally to prevent DELETE operations 40 | //public Task DeleteProduct(string id) 41 | //{ 42 | // return DeleteAsync(id); 43 | //} 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("XamarinCRMAppService")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("XamarinCRMAppService")] 12 | [assembly: AssemblyCopyright("Copyright © 2015")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("9a107bc9-660a-4437-a1c4-8b4076c7867a")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Revision and Build Numbers 32 | // by using the '*' as shown below: 33 | [assembly: AssemblyVersion("1.0.0.0")] 34 | [assembly: AssemblyFileVersion("1.0.0.0")] 35 | -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Service References/Application Insights/ConnectedService.json: -------------------------------------------------------------------------------- 1 | { 2 | "ProviderId": "Microsoft.ApplicationInsights.ConnectedService.ConnectedServiceProvider", 3 | "Version": "4.0.0.0", 4 | "GettingStartedDocument": { 5 | "Uri": "http://go.microsoft.com/fwlink/?LinkID=613413" 6 | } 7 | } -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Startup.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using Microsoft.Owin; 4 | using Owin; 5 | 6 | [assembly: OwinStartup(typeof(XamarinCRMAppService.Startup))] 7 | 8 | namespace XamarinCRMAppService 9 | { 10 | public partial class Startup 11 | { 12 | public void Configuration(IAppBuilder app) 13 | { 14 | ConfigureMobileApp(app); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/DataService/XamarinCRMAppService/XamarinCRMAppService/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/MobileApp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2015 Xamarin Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | using System.Reflection; 16 | using System.Runtime.CompilerServices; 17 | 18 | // Information about this assembly is defined by the following attributes. 19 | // Change them to the values specific to your project. 20 | 21 | [assembly: AssemblyTitle("XamarinCRM.Models")] 22 | [assembly: AssemblyDescription("")] 23 | [assembly: AssemblyConfiguration("")] 24 | [assembly: AssemblyCompany("Xamarin Inc.")] 25 | [assembly: AssemblyProduct("")] 26 | [assembly: AssemblyCopyright("Xamarin Inc.")] 27 | [assembly: AssemblyTrademark("")] 28 | [assembly: AssemblyCulture("")] 29 | 30 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 31 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 32 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 33 | 34 | [assembly: AssemblyVersion("1.0.*")] 35 | 36 | // The following attributes are used to specify the signing key for the assembly, 37 | // if desired. See the Mono documentation for more information about signing. 38 | 39 | //[assembly: AssemblyDelaySign(false)] 40 | //[assembly: AssemblyKeyFile("")] 41 | 42 | -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/CustomerSalesPage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/CustomerSalesPage.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/CustomerWeeklySalesAverage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/CustomerWeeklySalesAverage.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/NuGet_VS_Azure.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/NuGet_VS_Azure.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/NuGet_VS_Xamarin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/NuGet_VS_Xamarin.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/VS_Integration_Debug_Breakpoint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/VS_Integration_Debug_Breakpoint.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/VS_Integration_Toolbar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/VS_Integration_Toolbar.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/XTC_Historical_Summary_XamCRM_Android.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/XTC_Historical_Summary_XamCRM_Android.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/XTC_Historical_Summary_XamCRM_iOS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/XTC_Historical_Summary_XamCRM_iOS.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/XTC_Test_Script.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/XTC_Test_Script.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/Xam_CRM_Login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/Xam_CRM_Login.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/Xamarin_Component_Store_VS_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/Xamarin_Component_Store_VS_1.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/Xamarin_Component_Store_VS_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/Xamarin_Component_Store_VS_2.jpg -------------------------------------------------------------------------------- /src/MobileApp/Screenshots/Xamarin_Component_Store_VS_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/Screenshots/Xamarin_Component_Store_VS_3.jpg -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Analysis/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Analysis/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("XamarinCRM.Analysis")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("XamarinCRM.Analysis")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4150a3db-6d61-4621-ab92-c83d6d538eb8")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Analysis/XamarinCRM.Analysis.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamarinCRM.Analysis", "XamarinCRM.Analysis.csproj", "{0466351D-9A60-488B-A93A-A8F8BC945E0C}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {0466351D-9A60-488B-A93A-A8F8BC945E0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {0466351D-9A60-488B-A93A-A8F8BC945E0C}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {0466351D-9A60-488B-A93A-A8F8BC945E0C}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {0466351D-9A60-488B-A93A-A8F8BC945E0C}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | EndGlobal 18 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Localization/Localize.cs: -------------------------------------------------------------------------------- 1 |  2 | using Xamarin.Forms; 3 | using XamarinCRM.Localization; 4 | using XamarinCRMAndroid.Localization; 5 | using System.Globalization; 6 | 7 | [assembly:Dependency(typeof(Localize))] 8 | 9 | namespace XamarinCRMAndroid.Localization 10 | { 11 | public class Localize : ILocalize 12 | { 13 | public CultureInfo GetCurrentCultureInfo () 14 | { 15 | var androidLocale = Java.Util.Locale.Default; 16 | var netLanguage = androidLocale.ToString().Replace ("_", "-"); // turns pt_BR into pt-BR 17 | return new CultureInfo(netLanguage); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content; 3 | using Android.Content.PM; 4 | using Android.OS; 5 | using ImageCircle.Forms.Plugin.Droid; 6 | using Microsoft.IdentityModel.Clients.ActiveDirectory; 7 | using Syncfusion.SfChart.XForms.Droid; 8 | using Xamarin; 9 | using Xamarin.Forms; 10 | using Xamarin.Forms.Platform.Android; 11 | using XamarinCRM; 12 | using HockeyApp.Android; 13 | 14 | namespace XamarinCRMAndroid 15 | { 16 | [Activity(Label = "XamarinCRM", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 17 | public class MainActivity : FormsAppCompatActivity 18 | { 19 | protected override void OnCreate(Bundle bundle) 20 | { 21 | base.OnCreate(bundle); 22 | 23 | // Set the HockeyApp App Id here: 24 | CrashManager.Register(this, "11111111222222223333333344444444"); // This is just a dummy value. Replace with your real HockeyApp App ID 25 | 26 | // Azure Mobile Services initilization 27 | Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); 28 | 29 | Forms.Init(this, bundle); 30 | 31 | FormsMaps.Init(this, bundle); 32 | FormsAppCompatActivity.ToolbarResource = Resource.Layout.toolbar; 33 | FormsAppCompatActivity.TabLayoutResource = Resource.Layout.tabs; 34 | new SfChartRenderer(); // This is necessary for initializing SyncFusion charts. 35 | ImageCircleRenderer.Init(); 36 | 37 | LoadApplication(new App()); 38 | } 39 | 40 | protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) 41 | { 42 | base.OnActivityResult(requestCode, resultCode, data); 43 | AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data); 44 | } 45 | } 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Reflection; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | [assembly: AssemblyTitle ("XamarinCRMAndroid")] 7 | [assembly: AssemblyDescription ("")] 8 | [assembly: AssemblyConfiguration ("")] 9 | [assembly: AssemblyCompany ("Xamarin")] 10 | [assembly: AssemblyProduct ("")] 11 | [assembly: AssemblyCopyright ("")] 12 | [assembly: AssemblyTrademark ("")] 13 | [assembly: AssemblyCulture ("")] 14 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 15 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 16 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 17 | [assembly: AssemblyVersion ("1.0.0")] 18 | // The following attributes are used to specify the signing key for the assembly, 19 | // if desired. See the Mono documentation for more information about signing. 20 | //[assembly: AssemblyDelaySign(false)] 21 | //[assembly: AssemblyKeyFile("")] 22 | 23 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/about.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/about_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/about_background.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/customers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/customers.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/exit.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/fab_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/fab_add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/info.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/products.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/products.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/sales.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/save.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/splash.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/splashSlice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-hdpi/splashSlice.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/about.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/about_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/about_background.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/customers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/customers.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/exit.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/fab_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/fab_add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/products.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/products.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/sales.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-mdpi/save.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/about.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/about_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/about_background.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/customers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/customers.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/exit.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/fab_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/fab_add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/info.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/products.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/products.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/sales.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/save.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/splash.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/splashSlice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xhdpi/splashSlice.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/about.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/about_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/about_background.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/customers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/customers.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/exit.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/fab_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/fab_add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/info.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/products.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/products.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/sales.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/save.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/splash.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/splashSlice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxhdpi/splashSlice.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/about.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/about_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/about_background.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/customers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/customers.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/exit.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/fab_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/fab_add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/info.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/products.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/products.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/sales.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/save.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/splash.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/splashSlice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable-xxxhdpi/splashSlice.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/about_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/about_background.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/add_android_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/add_android_blue.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/add_android_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/add_android_gray.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/back_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/back_android.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/bottom_up_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/bottom_up_gradient.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/icon.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/info.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/map_marker_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/map_marker_android.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/phone_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/phone_android.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/splash.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/splashSlice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/splashSlice.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/drawable/xamarin_logo_plus_name_inline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.Android/Resources/drawable/xamarin_logo_plus_name_inline.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/layout/tabs.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/layout/toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | #53ba9d 5 | #42947d 6 | #8de2d5 7 | #F5F5F5 8 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | 11 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Resources/valuesTemplate/api-keys.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Android/Services/ConfigFetcher.cs: -------------------------------------------------------------------------------- 1 |  2 | using XamarinCRM.Services; 3 | using System.IO; 4 | using System.Threading.Tasks; 5 | using System.Xml.Linq; 6 | using Xamarin.Forms; 7 | using XamarinCRMAndroid; 8 | 9 | [assembly:Dependency(typeof(ConfigFetcher))] 10 | 11 | namespace XamarinCRMAndroid 12 | { 13 | /// 14 | /// Fetches settings from embedded resources in the Android project. 15 | /// 16 | public class ConfigFetcher : IConfigFetcher 17 | { 18 | #region IConfigFetcher implementation 19 | 20 | public async Task GetAsync(string configElementName, bool readFromSensitiveConfig = false) 21 | { 22 | var fileName = (readFromSensitiveConfig) ? "config-sensitive.xml" : "config.xml"; 23 | 24 | var type = this.GetType(); 25 | var resource = type.Namespace + ".Config." + fileName; 26 | using (var stream = type.Assembly.GetManifestResourceStream(resource)) 27 | using (var reader = new StreamReader(stream)) 28 | { 29 | var doc = XDocument.Parse(await reader.ReadToEndAsync()); 30 | return doc.Element("config").Element(configElementName)?.Value; 31 | } 32 | } 33 | 34 | #endregion 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Models/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Reflection; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("XamarinCRM.Models")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("Xamarin Inc.")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("Xamarin Inc.")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.Models/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/AppInitializer.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | 3 | namespace XamarinCRM.UITest 4 | { 5 | public static class AppInitializer 6 | { 7 | const string apiKey = "YOUR_API_KEY"; 8 | const string apkPath = "../../../XamarinCRM.Android/bin/Release/com.xamarin.xamarincrm-Signed.apk"; 9 | const string appFile = "../../../XamarinCRM.iOS/bin/iPhoneSimulator/Debug/XamarinCRMiOS.app"; 10 | const string bundleId = "com.xamarin.xamarincrm"; 11 | 12 | 13 | public static IApp StartApp(Platform platform) 14 | { 15 | if (platform == Platform.Android) 16 | { 17 | return ConfigureApp 18 | .Android 19 | //.ApiKey(apiKey) 20 | .ApkFile(apkPath) 21 | .StartApp(); 22 | } 23 | 24 | return ConfigureApp 25 | .iOS 26 | //.ApiKey(apiKey) 27 | // .AppBundle(appFile) 28 | .InstalledApp(bundleId) 29 | .StartApp(); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/ABS3DPrinterKitsPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class ABS3DPrinterKitsPage : BasePage 7 | { 8 | public ABS3DPrinterKitsPage(IApp app, Platform platform) 9 | : base(app, platform, "ABS-CELL", "ABS 3D Printer Kits") 10 | { 11 | } 12 | 13 | public void SelectItem(string itemName) 14 | { 15 | var itemChosen = string.Format("ABS-{0}", itemName); 16 | app.ScrollTo(itemChosen); 17 | app.Tap(itemChosen); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/ABSFilamentPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class ABSFilamentPage : BasePage 7 | { 8 | public ABSFilamentPage(IApp app, Platform platform) 9 | : base(app, platform, "FIL-ABS-BLU", "ABS Filament") 10 | { 11 | } 12 | 13 | public void SelectColor(string color) 14 | { 15 | var colorChosen = string.Format("FIL-ABS-{0}", color); 16 | app.ScrollDownTo(colorChosen); 17 | app.Tap(colorChosen); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/BasePage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | using Xamarin.UITest; 4 | using Xamarin.UITest.Queries; 5 | 6 | namespace XamarinCRM.UITest 7 | { 8 | public class BasePage 9 | { 10 | protected readonly IApp app; 11 | protected readonly bool OnAndroid; 12 | protected readonly bool OniOS; 13 | 14 | protected BasePage(IApp app, Platform platform) 15 | { 16 | this.app = app; 17 | 18 | OnAndroid = platform == Platform.Android; 19 | OniOS = platform == Platform.iOS; 20 | } 21 | 22 | protected BasePage(IApp app, Platform platform, Func androidTrait, Func iOSTrait) 23 | : this(app, platform) 24 | { 25 | if (OnAndroid) 26 | Assert.DoesNotThrow(() => app.WaitForElement(androidTrait), "Unable to verify on page: " + this.GetType().Name); 27 | if (OniOS) 28 | Assert.DoesNotThrow(() => app.WaitForElement(iOSTrait), "Unable to verify on page: " + this.GetType().Name); 29 | 30 | app.Screenshot("On " + this.GetType().Name); 31 | } 32 | 33 | protected BasePage(IApp app, Platform platform, string androidTrait, string iOSTrait) 34 | : this(app, platform, x => x.Marked(androidTrait), x => x.Marked(iOSTrait)) 35 | { 36 | } 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/BuildPlatesPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class BuildPlatesPage : BasePage 7 | { 8 | public BuildPlatesPage(IApp app, Platform platform) 9 | : base(app, platform, "BLD-PLT-PLA", "Build Plates") 10 | { 11 | } 12 | 13 | public void SelectItem(string itemName) 14 | { 15 | app.Tap(itemName); 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/CoolingFansPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class CoolingFansPage : BasePage 7 | { 8 | public CoolingFansPage(IApp app, Platform platform) 9 | : base(app, platform, "FAN-003", "Cooling Fans") 10 | { 11 | } 12 | 13 | public void SelectItem(int itemNumber) 14 | { 15 | var itemChosen = string.Format("FAN-00{0}", itemNumber); 16 | app.ScrollTo(itemChosen); 17 | app.Tap(itemChosen); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/CustomerOrdersPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class CustomerOrdersPage : BasePage 7 | { 8 | readonly Query CustomerContact = x => x.Marked("Customer"); 9 | readonly Query CustomerSales = x => x.Marked("Sales"); 10 | readonly Query NewOrderButton; 11 | readonly Query SecondOrder; 12 | 13 | public CustomerOrdersPage(IApp app, Platform platform) 14 | : base(app, platform, "Open Orders", "Open Orders") 15 | { 16 | if (OnAndroid) 17 | { 18 | SecondOrder = x => x.Class("LabelRenderer").Index(1); 19 | NewOrderButton = x => x.Class("FloatingActionButton"); 20 | } 21 | if (OniOS) 22 | { 23 | SecondOrder = x => x.Class("UITableViewCellContentView").Index(1); 24 | NewOrderButton = x => x.Marked("add_ios_gray"); 25 | } 26 | } 27 | 28 | public void NavigateToCustomerContact() 29 | { 30 | app.Tap(CustomerContact); 31 | } 32 | 33 | public void NavigateToCustomerSales() 34 | { 35 | app.Tap(CustomerSales); 36 | } 37 | 38 | public void SelectFirstOrder() 39 | { 40 | app.Tap(SecondOrder); 41 | } 42 | 43 | public void AddNewOrder() 44 | { 45 | app.Tap(NewOrderButton); 46 | } 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/CustomerSalesPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.UITest; 3 | using Query = System.Func; 4 | 5 | namespace XamarinCRM.UITest 6 | { 7 | public class CustomerSalesPage : BasePage 8 | { 9 | readonly Query CustomerOrders = x => x.Marked("Orders"); 10 | readonly Query CustomerContact = x => x.Marked("Customer"); 11 | 12 | public CustomerSalesPage(IApp app, Platform platform) 13 | : base(app, platform) 14 | { 15 | if (OnAndroid) 16 | app.WaitForElement("WEEKLY AVERAGE", timeout: TimeSpan.FromMinutes(2)); 17 | if (OniOS) 18 | app.WaitForElement("WEEKLY AVERAGE"); 19 | 20 | app.Screenshot("On " + this.GetType().Name); 21 | } 22 | 23 | 24 | public void NavigateToCustomerOrders() 25 | { 26 | app.Tap(CustomerOrders); 27 | } 28 | 29 | public void NavigateToCustomerContact() 30 | { 31 | app.Tap(CustomerContact); 32 | } 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/CustomersPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class CustomersPage : BasePage 7 | { 8 | readonly Query FirstContact; 9 | 10 | public CustomersPage(IApp app, Platform platform) 11 | : base(app, platform, "Customers", "Customers") 12 | { 13 | if (OnAndroid) 14 | FirstContact = x => x.Class("LabelRenderer").Index(0).Child(0); 15 | if (OniOS) 16 | FirstContact = x => x.Class("UITableViewCellContentView").Index(0).Descendant(4); 17 | } 18 | 19 | public void ClickFirstContact() 20 | { 21 | app.Tap(FirstContact); 22 | } 23 | 24 | public void ClickContact(string contact) 25 | { 26 | app.Tap(contact); 27 | } 28 | 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/ExtrudersPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class ExtruderPage : BasePage 7 | { 8 | public ExtruderPage(IApp app, Platform platform) 9 | : base(app, platform, "EXTR-001", "Extruders") 10 | { 11 | } 12 | 13 | public void SelectItem(int itemNumber) 14 | { 15 | var itemChosen = string.Format("EXTR-00{0}", itemNumber); 16 | app.ScrollDownTo(itemChosen); 17 | app.Tap(itemChosen); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/PLA3DPrinterKitsPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | 3 | namespace XamarinCRM.UITest 4 | { 5 | public class PLA3DPrinterKitsPage : BasePage 6 | { 7 | public PLA3DPrinterKitsPage(IApp app, Platform platform) 8 | : base(app, platform, "PLA-JEWEL", "PLA 3D Printer Kits") 9 | { 10 | } 11 | 12 | public void SelectItem(string itemName) 13 | { 14 | var itemChosen = string.Format("PLA-{0}", itemName); 15 | app.ScrollDownTo(itemChosen); 16 | app.Tap(itemChosen); 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/PLAFilamentPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | 3 | namespace XamarinCRM.UITest 4 | { 5 | public class PLAFilamentPage : BasePage 6 | { 7 | public PLAFilamentPage(IApp app, Platform platform) 8 | : base(app, platform, "FIL-PLA-BLU", "PLA Filament") 9 | { 10 | } 11 | 12 | public void SelectColor(string color) 13 | { 14 | var colorChosen = string.Format("FIL-PLA-{0}", color); 15 | app.ScrollDownTo(colorChosen); 16 | app.Tap(colorChosen); 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/PartsPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class PartsPage : BasePage 7 | { 8 | public PartsPage(IApp app, Platform platform) 9 | : base(app, platform, "Build Plates", "Parts") 10 | { 11 | } 12 | 13 | public void SelectPart(string partName) 14 | { 15 | app.Tap(partName); 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/ProductDetailsPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class ProductDetailsPage : BasePage 7 | { 8 | readonly Query AddToOrderButton; 9 | 10 | public ProductDetailsPage(IApp app, Platform platform) 11 | : base(app, platform, "content", "Back") 12 | { 13 | if (OnAndroid) 14 | { 15 | AddToOrderButton = x => x.Marked("Add to Order").Parent(0).Sibling(); 16 | } 17 | if (OniOS) 18 | { 19 | AddToOrderButton = x => x.Id("add_ios_blue"); 20 | } 21 | } 22 | 23 | public void VerifyProduct() 24 | { 25 | //TODO Add logic 26 | app.Screenshot("Product Details Page"); 27 | } 28 | 29 | public void AddToOrder() 30 | { 31 | app.Tap(AddToOrderButton); 32 | } 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/ProductsPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | 3 | namespace XamarinCRM.UITest 4 | { 5 | public class ProductsPage : BasePage 6 | { 7 | public ProductsPage(IApp app, Platform platform) 8 | : base(app, platform, "Products", "Products") 9 | { 10 | } 11 | 12 | public void SelectProduct(string productName) 13 | { 14 | app.Tap(productName); 15 | 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/SplashScreenPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | 3 | namespace XamarinCRM.UITest 4 | { 5 | public class SplashScreenPage : BasePage 6 | { 7 | readonly string EnterSignInButton = "SIGN IN"; 8 | 9 | public SplashScreenPage(IApp app, Platform platform) 10 | : base(app, platform, "SIGN IN", "SIGN IN") 11 | { 12 | } 13 | 14 | public void ExitSplashScreen() 15 | { 16 | app.Tap(EnterSignInButton); 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/StepperMotorsPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | 3 | namespace XamarinCRM.UITest 4 | { 5 | public class StepperMotorsPage : BasePage 6 | { 7 | public StepperMotorsPage(IApp app, Platform platform) 8 | : base(app, platform, "MOT-12V", "Stepper Motors") 9 | { 10 | } 11 | 12 | public void SelectItem(int itemNumber) 13 | { 14 | var itemChosen = string.Format("MOT-{0}-V", itemNumber); 15 | app.ScrollTo(itemChosen); 16 | app.Tap(itemChosen); 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/ThreeDFilamentPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class ThreeDFilamentPage : BasePage 7 | { 8 | public ThreeDFilamentPage(IApp app, Platform platform) 9 | : base(app, platform, "PLA Filament", "3D Filament") 10 | { 11 | } 12 | 13 | public void SelectPart(string partName) 14 | { 15 | app.Tap(partName); 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Pages/ThreeDPrinterKitsPage.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.UITest; 2 | using Query = System.Func; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class ThreeDPrinterKitsPage : BasePage 7 | { 8 | public ThreeDPrinterKitsPage(IApp app, Platform platform) 9 | : base(app, platform, "ABS 3D Printer Kits", "3D Printer Kits") 10 | { 11 | } 12 | 13 | public void SelectPart(string partName) 14 | { 15 | app.Tap(partName); 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Tests/BasicTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Xamarin.UITest; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class BasicTests : AbstractSetup 7 | { 8 | public BasicTests(Platform platform) 9 | : base(platform) 10 | { 11 | } 12 | 13 | [Test] 14 | [Ignore] 15 | public void Repl() 16 | { 17 | app.Repl(); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/Tests/FilamentsTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Xamarin.UITest; 3 | 4 | namespace XamarinCRM.UITest 5 | { 6 | public class FilamentsTest : AbstractSetup 7 | { 8 | public FilamentsTest(Platform platform) 9 | : base(platform) 10 | { 11 | } 12 | 13 | [Category("sanity")] 14 | [Test] 15 | public void SelectingFilamentColor() 16 | { 17 | string color = "YLW"; 18 | 19 | new GlobalPage(app, platform) 20 | .NavigateToProducts(); 21 | 22 | new ProductsPage(app, platform) 23 | .SelectProduct("3D Filament"); 24 | 25 | new ThreeDFilamentPage(app, platform) 26 | .SelectPart("PLA Filament"); 27 | 28 | new PLAFilamentPage(app, platform) 29 | .SelectColor(color); 30 | 31 | new GlobalPage(app, platform) 32 | .GoBack(); 33 | 34 | new GlobalPage(app, platform) 35 | .GoBack(); 36 | 37 | new ThreeDFilamentPage(app, platform) 38 | .SelectPart("ABS Filament"); 39 | 40 | new ABSFilamentPage(app, platform) 41 | .SelectColor(color); 42 | } 43 | 44 | [Category("sanity")] 45 | [Test] 46 | public void AppLaunches() 47 | { 48 | app.Screenshot("App launches. XTC is up"); 49 | } 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/accounts.csv: -------------------------------------------------------------------------------- 1 | sally@xamcrm.onmicrosoft.com,P@ssword 2 | greg.baine@xamcrm.onmicrosoft.com,maaTisse1 3 | scott.rexroad@xamcrm.onmicrosoft.com,4286Nofa 4 | parker.rollins@xamcrm.onmicrosoft.com,3291Hulo 5 | jennifer.taylor@xamcrm.onmicrosoft.com,4124Magu 6 | wendy.reese@xamcrm.onmicrosoft.com,9833Gaca 7 | sandra.hamilton@xamcrm.onmicrosoft.com,9745Vaxa 8 | lyndon.lutz@xamcrm.onmicrosoft.com,1216Rahu 9 | julio.delgado@xamcrm.onmicrosoft.com,Sock0007 10 | diane.loftus@xamcrm.onmicrosoft.com,Pant6699 11 | samuel.hernandez@xamcrm.onmicrosoft.com,Shoe4242 12 | rosa.terry@xamcrm.onmicrosoft.com,Yoda1980 13 | dorothy.schumacher@xamcrm.onmicrosoft.com,Luke1983 14 | dustin.thompson@xamcrm.onmicrosoft.com,hanS1977 15 | mary.oldham@xamcrm.onmicrosoft.com,R2D2c3p0 16 | dean.mcgraw@xamcrm.onmicrosoft.com,Hovu9694 17 | melissa.wilson@xamcrm.onmicrosoft.com,Jofu2159 18 | thomas.polk@xamcrm.onmicrosoft.com,Zudu6672 19 | cynthia.belville@xamcrm.onmicrosoft.com,Quhu4707 20 | susanna.reilly@xamcrm.onmicrosoft.com,Laku8187 21 | carlos.martin@xamcrm.onmicrosoft.com,Poto2461 22 | serena.johnson@xamcrm.onmicrosoft.com,Rabu0360 23 | tina.shea@xamcrm.onmicrosoft.com,mzmzMr515 24 | lee.stanford@xamcrm.onmicrosoft.com,Toplqw12 25 | joyce.walsh@xamcrm.onmicrosoft.com,uhNijM32 26 | herbert.ramirez@xamcrm.onmicrosoft.com,Fghjjj09 27 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.UITest/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Localization/Localize.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Globalization; 3 | using XamarinCRM.Localization; 4 | using Foundation; 5 | using Xamarin.Forms; 6 | using XamarinCRM.iOS.Localize; 7 | 8 | [assembly:Dependency(typeof(Localize))] 9 | 10 | namespace XamarinCRM.iOS.Localize 11 | { 12 | public class Localize : ILocalize 13 | { 14 | public CultureInfo GetCurrentCultureInfo() 15 | { 16 | var netLanguage = "en"; 17 | if (NSLocale.PreferredLanguages.Length > 0) 18 | { 19 | var pref = NSLocale.PreferredLanguages[0]; 20 | netLanguage = pref.Replace("_", "-"); // turns es_ES into es-ES 21 | 22 | if (pref == "pt") 23 | pref = "pt-BR"; // get the correct Brazilian language strings from the PCL RESX 24 | //(note the local iOS folder is still "pt") 25 | } 26 | return new CultureInfo(netLanguage); 27 | } 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | using Xamarin; 3 | 4 | namespace XamarinCRM.iOS 5 | { 6 | public class Application 7 | { 8 | // This is the main entry point of the application. 9 | static void Main (string[] args) 10 | { 11 | // if you want to use a different Application Delegate class from "AppDelegate" 12 | // you can specify it here. 13 | UIApplication.Main (args, null, "AppDelegate"); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Renderers/StandardImageCellRenderer.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using Xamarin.Forms; 4 | using Xamarin.Forms.Platform.iOS; 5 | using System.Diagnostics; 6 | 7 | [assembly: ExportRenderer(typeof(ImageCell), typeof(XamarinCRM.iOS.StandardImageCellRenderer))] 8 | namespace XamarinCRM.iOS 9 | { 10 | public class StandardImageCellRenderer : ImageCellRenderer 11 | { 12 | public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) 13 | { 14 | var cell = base.GetCell (item, reusableCell, tv); 15 | Debug.WriteLine ("Style Id" + item.StyleId); 16 | switch (item.StyleId) 17 | { 18 | case "checkmark": 19 | cell.Accessory = UIKit.UITableViewCellAccessory.Checkmark; 20 | break; 21 | case "detail-button": 22 | cell.Accessory = UIKit.UITableViewCellAccessory.DetailButton; 23 | break; 24 | case "detail-disclosure-button": 25 | cell.Accessory = UIKit.UITableViewCellAccessory.DetailDisclosureButton; 26 | break; 27 | case "disclosure": 28 | cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator; 29 | break; 30 | default: 31 | cell.Accessory = UIKit.UITableViewCellAccessory.None; 32 | break; 33 | } 34 | return cell; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Renderers/StandardPickerRenderer.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System; 4 | using UIKit; 5 | using Xamarin.Forms; 6 | using Xamarin.Forms.Platform.iOS; 7 | 8 | [assembly: ExportRenderer (typeof (Picker), typeof (XamarinCRM.iOS.StandardPickerRenderer))] 9 | namespace XamarinCRM.iOS 10 | { 11 | public class StandardPickerRenderer : PickerRenderer 12 | { 13 | UIView paddingView; 14 | 15 | protected override void OnElementChanged (ElementChangedEventArgs e) 16 | { 17 | base.OnElementChanged (e); 18 | 19 | if (e.OldElement != null || Element == null) 20 | return; 21 | 22 | try { 23 | // Add left padding to UITextField 24 | paddingView = new UIView (new CoreGraphics.CGRect (0, 0, 15, Control.Frame.Height)); 25 | Control.LeftView = paddingView; 26 | Control.LeftViewMode = UITextFieldViewMode.Always; 27 | 28 | Control.BorderStyle = UITextBorderStyle.None; 29 | } catch (Exception ex) { 30 | // TODO: log error 31 | } 32 | } 33 | 34 | protected override void Dispose (bool disposing) 35 | { 36 | base.Dispose (disposing); 37 | 38 | paddingView.Dispose (); 39 | paddingView = null; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Renderers/StandardViewCellRenderer.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using Xamarin.Forms; 4 | using Xamarin.Forms.Platform.iOS; 5 | using System.Diagnostics; 6 | 7 | [assembly: ExportRenderer(typeof(ViewCell), typeof(XamarinCRM.iOS.StandardViewCellRenderer))] 8 | namespace XamarinCRM.iOS 9 | { 10 | public class StandardViewCellRenderer : ViewCellRenderer 11 | { 12 | public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) 13 | { 14 | var cell = base.GetCell (item, reusableCell, tv); 15 | Debug.WriteLine ("Style Id" + item.StyleId); 16 | switch (item.StyleId) 17 | { 18 | case "checkmark": 19 | cell.Accessory = UIKit.UITableViewCellAccessory.Checkmark; 20 | break; 21 | case "detail-button": 22 | cell.Accessory = UIKit.UITableViewCellAccessory.DetailButton; 23 | break; 24 | case "detail-disclosure-button": 25 | cell.Accessory = UIKit.UITableViewCellAccessory.DetailDisclosureButton; 26 | break; 27 | case "disclosure": 28 | cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator; 29 | break; 30 | default: 31 | cell.Accessory = UIKit.UITableViewCellAccessory.None; 32 | break; 33 | } 34 | return cell; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/CustomersTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/CustomersTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/Default.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/LeadContactDetailTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/LeadContactDetailTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/LeadDetailTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/LeadDetailTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/ProductsTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/ProductsTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/SalesTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/SalesTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/about.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/about@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/about@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/about@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/about@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/about_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/about_background.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/add.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/add@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/add@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/add@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/add@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/add_ios_blue@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/add_ios_blue@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/add_ios_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/add_ios_gray.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/add_ios_gray@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/add_ios_gray@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/add_ios_gray@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/add_ios_gray@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/back_ios@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/back_ios@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/bottom_up_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/bottom_up_gradient.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/bottom_up_gradient@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/bottom_up_gradient@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/bottom_up_gradient@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/bottom_up_gradient@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/customers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/customers.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/customers@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/customers@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/customers@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/customers@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_100.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_114.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_120.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_144.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_152.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_29.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_40.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_50.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_57.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_58.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_72.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_76.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/icon_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/icon_80.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/info.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/map_marker_ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/map_marker_ios.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/map_marker_ios@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/map_marker_ios@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/map_marker_ios@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/map_marker_ios@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/phone_ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/phone_ios.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/phone_ios@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/phone_ios@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/phone_ios@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/phone_ios@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/products.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/products.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/products@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/products@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/products@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/products@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/sales.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/sales@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/sales@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/sales@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/sales@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/save.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/save@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/save@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/save@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/save@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/slideout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/slideout.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/slideout@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/slideout@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/splash.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/splash@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/splash@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/splash@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/splash@3x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/splashSlice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/splashSlice.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Resources/xamarin_logo_plus_name_inline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/Resources/xamarin_logo_plus_name_inline.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/Services/ConfigFetcher.cs: -------------------------------------------------------------------------------- 1 |  2 | using XamarinCRM.Services; 3 | using System.IO; 4 | using System.Xml.Linq; 5 | using Xamarin.Forms; 6 | using System.Threading.Tasks; 7 | using XamarinCRM.iOS; 8 | 9 | [assembly:Dependency(typeof(ConfigFetcher))] 10 | 11 | namespace XamarinCRM.iOS 12 | { 13 | /// 14 | /// Fetches settings from embedded resources in the Android project. 15 | /// 16 | public class ConfigFetcher : IConfigFetcher 17 | { 18 | #region IConfigFetcher implementation 19 | 20 | public async Task GetAsync(string configElementName, bool readFromSensitiveConfig = false) 21 | { 22 | var fileName = (readFromSensitiveConfig) ? "config-sensitive.xml" : "config.xml"; 23 | 24 | var type = this.GetType(); 25 | var resource = type.Namespace + ".Config." + fileName; 26 | using (var stream = type.Assembly.GetManifestResourceStream(resource)) 27 | using (var reader = new StreamReader(stream)) 28 | { 29 | var doc = XDocument.Parse(await reader.ReadToEndAsync()); 30 | return doc.Element("config").Element(configElementName)?.Value; 31 | } 32 | } 33 | 34 | #endregion 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/iTunesArtwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/iTunesArtwork.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRM.iOS/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM.iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Cells/PickerCell.cs: -------------------------------------------------------------------------------- 1 |  2 | using Xamarin.Forms; 3 | 4 | namespace XamarinCRM.Cells 5 | { 6 | public class PickerCell : ViewCell 7 | { 8 | public Picker Picker { get; private set; } 9 | 10 | public Label Label { get; private set; } 11 | 12 | public ContentView PickerWrapper { get; private set; } 13 | 14 | public ContentView LabelWrapper { get; private set; } 15 | 16 | public PickerCell() 17 | { 18 | PickerWrapper = new ContentView() 19 | { 20 | Content = Picker = new Picker() 21 | { 22 | HorizontalOptions = LayoutOptions.FillAndExpand 23 | }, 24 | Padding = new Thickness(0, 0, 10, 0), 25 | HorizontalOptions = LayoutOptions.FillAndExpand 26 | }; 27 | 28 | LabelWrapper = new ContentView() 29 | { 30 | Content = Label = new Label() 31 | { 32 | VerticalTextAlignment = TextAlignment.Center, 33 | }, 34 | Padding = new Thickness(15, 0, 0, 0) 35 | }; 36 | 37 | Device.OnPlatform( 38 | iOS: () => 39 | { 40 | Label.WidthRequest = 75; 41 | } 42 | ); 43 | 44 | View = new StackLayout() 45 | { 46 | Orientation = StackOrientation.Horizontal, 47 | Children = 48 | { 49 | LabelWrapper, 50 | PickerWrapper 51 | } 52 | }; 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Config/config-sensitive.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 591ddccc-4dd3-46d8-af4e-7886eb674cb9 10 | 11 | 12 | c3561526-ca01-442d-8d4d-166a2bc0f743 13 | 14 | 15 | sally@xamcrm.onmicrosoft.com 16 | 17 | 18 | P@ssword 19 | 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Config/config.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | https://xamarincrmservice.azurewebsites.net/ 5 | 6 | 7 | https://login.windows.net/xamcrm.onmicrosoft.com/ 8 | 9 | 10 | http://localhost 11 | 12 | 13 | https://graph.windows.net 14 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/ConfigTemplate/config-sensitive.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/BoolToLabelOpacityConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Xamarin.Forms; 4 | using System.Globalization; 5 | 6 | namespace XamarinCRM.Converters 7 | { 8 | public class BoolToLabelOpacityConverter : IValueConverter 9 | { 10 | #region IValueConverter implementation 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | if ((bool)value) 14 | { 15 | return 0.5d; 16 | } 17 | else 18 | { 19 | return 1.0d; 20 | } 21 | } 22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | throw new NotImplementedException(); 25 | } 26 | #endregion 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/CategoryTitleConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Xamarin.Forms; 4 | using XamarinCRM.Models; 5 | 6 | namespace XamarinCRM.Converters 7 | { 8 | public class CategoryTitleConverter : IValueConverter 9 | { 10 | readonly string _Title; 11 | 12 | public CategoryTitleConverter(string title) 13 | { 14 | _Title = title; 15 | } 16 | 17 | #region IValueConverter implementation 18 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 19 | { 20 | if ((Category)value == null) 21 | { 22 | return _Title; 23 | } 24 | 25 | return ((Category)value).Name; 26 | } 27 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 28 | { 29 | throw new NotImplementedException(); 30 | } 31 | #endregion 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/CompanyLabelBooleanToColorConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Xamarin.Forms; 4 | using System.Globalization; 5 | 6 | namespace XamarinCRM.Converters 7 | { 8 | public class CompanyLabelBooleanToColorConverter : IValueConverter 9 | { 10 | #region IValueConverter implementation 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | if ((bool)value) 14 | { 15 | return Color.Black; 16 | } 17 | return Color.White; 18 | 19 | } 20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | #endregion 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/ConvertableConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Diagnostics; 4 | using System.Globalization; 5 | using XamarinCRM.Properties.Attributes; 6 | using Xamarin.Forms; 7 | 8 | namespace XamarinCRM.Converters 9 | { 10 | public class ConvertableConverter : IValueConverter 11 | { 12 | #region IValueConverter implementation 13 | 14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 15 | { 16 | Debug.WriteLine(value.ToString(), new []{ "ConvertableConverter.Convert" }); 17 | if ((parameter == null || !(parameter is CurrencyAttribute))) 18 | return System.Convert.ChangeType(value, targetType); 19 | 20 | return string.Format(culture.NumberFormat, "{0:C}", value); 21 | } 22 | 23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | Debug.WriteLine(value.ToString(), new []{ "ConvertableConverter.ConvertBack" }); 26 | 27 | 28 | // Handle money in a localization-aware manner. 29 | if (targetType == typeof(Decimal) && value is string && ((string)value).StartsWith(NumberFormatInfo.CurrentInfo.CurrencySymbol, StringComparison.CurrentCultureIgnoreCase)) 30 | { 31 | var val = Decimal.Parse((string)value, NumberStyles.Currency); 32 | return val; 33 | } 34 | var result = Convert(value, targetType, parameter, culture); 35 | return result; 36 | } 37 | 38 | #endregion 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/CurrencyDoubleConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Xamarin.Forms; 4 | using System.Globalization; 5 | using XamarinCRM.Localization; 6 | 7 | namespace XamarinCRM.Converters 8 | { 9 | public class CurrencyDoubleConverter : IValueConverter 10 | { 11 | readonly ILocalize _Localize; 12 | 13 | public CurrencyDoubleConverter() 14 | { 15 | _Localize = DependencyService.Get(); 16 | } 17 | 18 | #region IValueConverter implementation 19 | 20 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 21 | { 22 | if (value is double) 23 | return string.Format("{0:C}", (double)value); 24 | return value; 25 | 26 | } 27 | 28 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 29 | { 30 | double result; 31 | if (double.TryParse((value as string), NumberStyles.Currency, _Localize.GetCurrentCultureInfo(), out result)) 32 | return result; 33 | return value; 34 | } 35 | 36 | #endregion 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/IndustryLabelBooleanToColorConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Xamarin.Forms; 4 | using XamarinCRM.Statics; 5 | 6 | namespace XamarinCRM.Converters 7 | { 8 | public class IndustryLabelBooleanToColorConverter : IValueConverter 9 | { 10 | #region IValueConverter implementation 11 | 12 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 13 | { 14 | if ((bool)value) 15 | { 16 | return Palette._006; 17 | } 18 | return Palette._008; 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 22 | { 23 | throw new NotImplementedException(); 24 | } 25 | 26 | #endregion 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/InvertedBooleanConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Xamarin.Forms; 4 | using System.Globalization; 5 | 6 | namespace XamarinCRM.Converters 7 | { 8 | public class InverseBooleanConverter : IValueConverter 9 | { 10 | #region IValueConverter implementation 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | return !(bool)value; 14 | } 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | return !(bool)value; 18 | } 19 | #endregion 20 | 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/LoadingLabelHeightConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Xamarin.Forms; 4 | 5 | namespace XamarinCRM.Converters 6 | { 7 | public class LoadingLabelHeightConverter : IValueConverter 8 | { 9 | #region IValueConverter implementation 10 | 11 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 12 | { 13 | if ((bool)value) 14 | { 15 | return Device.GetNamedSize(NamedSize.Small, typeof(Label)); 16 | } 17 | return 0; 18 | } 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | 25 | #endregion 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/OrderListHeaderViewBackgroudColorConverter.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using Xamarin.Forms; 4 | using XamarinCRM.Statics; 5 | using XamarinCRM.Localization; 6 | 7 | namespace XamarinCRM.Converters 8 | { 9 | public class OrderListHeaderViewBackgroudColorConverter : IValueConverter 10 | { 11 | #region IValueConverter implementation 12 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 13 | { 14 | if ((string)value == TextResources.Customers_OrderOpen) 15 | return Palette._003; 16 | 17 | if ((string)value == TextResources.Customers_OrderClosed) 18 | return Palette._017; 19 | 20 | return Palette._008; 21 | 22 | } 23 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | #endregion 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/ShortDatePatternConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Xamarin.Forms; 4 | 5 | namespace XamarinCRM.Converters 6 | { 7 | public class ShortDatePatternConverter : IValueConverter 8 | { 9 | #region IValueConverter implementation 10 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 11 | { 12 | if (value == null) // handle nullable DateTime 13 | return string.Empty; 14 | return ((DateTime)value).ToLocalTime().ToString("d"); 15 | } 16 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 17 | { 18 | throw new NotImplementedException(); 19 | } 20 | #endregion 21 | 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/ToUpperConverter.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Globalization; 4 | using Xamarin.Forms; 5 | 6 | namespace XamarinCRM.Converters 7 | { 8 | public class ToUpperConverter : IValueConverter 9 | { 10 | #region IValueConverter implementation 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | return ((string)value).ToUpper(); 14 | } 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | #endregion 20 | 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Converters/WholePercentToDecimalPercent.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Globalization; 4 | using Xamarin.Forms; 5 | 6 | namespace XamarinCRM.Converters 7 | { 8 | public class WholePercentToDecimalPercent : IValueConverter 9 | { 10 | #region IValueConverter implementation 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | return (double)value / 100; 14 | } 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | return (double)value * 100; 18 | } 19 | #endregion 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Extensions/IEnumerableExtensions.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Collections.ObjectModel; 3 | using System.Collections.Generic; 4 | 5 | namespace XamarinCRM.Extensions 6 | { 7 | public static class IEnumerableExtensions 8 | { 9 | public static ObservableCollection ToObservableCollection(this IEnumerable items) 10 | { 11 | var result = new ObservableCollection(); 12 | result.AddRange(items); 13 | return result; 14 | } 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Extensions/IListExtensions.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Collections.Generic; 3 | 4 | namespace XamarinCRM 5 | { 6 | public static class IListExtensions 7 | { 8 | public static void AddRange(this IList collection, IEnumerable items) 9 | { 10 | foreach (var i in items) 11 | { 12 | collection.Add(i); 13 | } 14 | } 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Extensions/StringExtensions.cs: -------------------------------------------------------------------------------- 1 |  2 | using Xamarin.Forms; 3 | 4 | namespace XamarinCRM 5 | { 6 | public static class StringExtensions 7 | { 8 | public static string CapitalizeForAndroid(this string str) 9 | { 10 | return Device.OS == TargetPlatform.Android ? str.ToUpper() : str; 11 | } 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Localization/ILocalize.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System.Globalization; 4 | 5 | namespace XamarinCRM.Localization 6 | { 7 | public interface ILocalize 8 | { 9 | CultureInfo GetCurrentCultureInfo(); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Localization/TranslateExtension.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Globalization; 4 | using System.Reflection; 5 | using System.Resources; 6 | using Xamarin.Forms; 7 | using Xamarin.Forms.Xaml; 8 | 9 | namespace XamarinCRM.Localization 10 | { 11 | // You exclude the 'Extension' suffix when using in Xaml markup 12 | [ContentProperty ("Text")] 13 | public class TranslateExtension : IMarkupExtension 14 | { 15 | readonly CultureInfo ci; 16 | const string ResourceId = "XamarinCRM.TextResources"; 17 | 18 | public TranslateExtension() { 19 | ci = DependencyService.Get().GetCurrentCultureInfo (); 20 | } 21 | 22 | public string Text { get; set; } 23 | 24 | public object ProvideValue (IServiceProvider serviceProvider) 25 | { 26 | if (Text == null) 27 | return ""; 28 | 29 | ResourceManager resmgr = new ResourceManager(ResourceId, typeof(TranslateExtension).GetTypeInfo().Assembly); 30 | 31 | var translation = resmgr.GetString (Text, ci); 32 | 33 | if (translation == null) { 34 | #if DEBUG 35 | throw new ArgumentException ( 36 | String.Format ("Key '{0}' was not found in resources '{1}' for culture '{2}'.", Text, ResourceId, ci.Name), 37 | "Text"); 38 | #else 39 | translation = Text; // HACK: returns the key, which GETS DISPLAYED TO THE USER 40 | #endif 41 | } 42 | return translation; 43 | } 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Models/Local/CategorySalesDataPoint.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace XamarinCRM.Models.Local 3 | { 4 | public class CategorySalesDataPoint 5 | { 6 | public string CategoryName { get; set; } 7 | 8 | public double Amount { get; set; } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Models/Local/Grouping.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | 5 | namespace XamarinCRM.Models.Local 6 | { 7 | public class Grouping : ObservableCollection 8 | { 9 | public K Key { get; private set; } 10 | 11 | /// 12 | /// Initializes a new instance of the class. 13 | /// 14 | /// A collection of items of type T 15 | /// A key of type K. 16 | public Grouping(IEnumerable items, K key) 17 | { 18 | Key = key; 19 | Items.AddRange(items); 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Models/Local/OrderStatusOption.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | 23 | namespace XamarinCRM.Models.Local 24 | { 25 | public enum OrderStatusOption 26 | { 27 | Open, 28 | Closed, 29 | Both 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Models/Local/WeeklySalesData.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | 4 | namespace XamarinCRM.Models.Local 5 | { 6 | public class WeeklySalesDataPoint 7 | { 8 | public WeeklySalesDataPoint() 9 | { 10 | DateStart = DateTime.MinValue; 11 | DateEnd = DateTime.MaxValue; 12 | Amount = 0; 13 | } 14 | 15 | public DateTime DateStart { get; set; } 16 | 17 | public DateTime DateEnd { get; set; } 18 | 19 | public double Amount { get; set; } 20 | 21 | public string DateStartString 22 | { 23 | get { return DateStart.ToString("M/dd"); } 24 | } 25 | 26 | public string DateEndString 27 | { 28 | get { return DateEnd.ToString("M/dd"); } 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/About/AboutDetailPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/About/AboutDetailPage.xaml.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | using XamarinCRM.Pages.Base; 23 | 24 | namespace XamarinCRM.Pages.About 25 | { 26 | public partial class AboutDetailPage : AboutDetailPageXaml 27 | { 28 | public AboutDetailPage() 29 | { 30 | InitializeComponent(); 31 | } 32 | } 33 | 34 | public class AboutDetailPageXaml : ModelBoundContentPage {} 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/About/AboutItemListPage.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using Xamarin.Forms; 4 | using XamarinCRM.Pages.Base; 5 | using XamarinCRM.ViewModels; 6 | 7 | namespace XamarinCRM.Pages.About 8 | { 9 | public partial class AboutItemListPage : AboutItemListPageXaml 10 | { 11 | public AboutItemListPage() 12 | { 13 | InitializeComponent(); 14 | 15 | // This prevents the ugly default highlighting of the selected cell upon navigating back to a list view. 16 | // The side effect is that the list view will no longer be maintaining the most recently selected item (if you're into that kind of thing). 17 | // Probably not the best way to remove that default SelectedItem styling, but simple and straighforward. 18 | AboutItemList.ItemSelected += (sender, e) => AboutItemList.SelectedItem = null; 19 | } 20 | 21 | async void AboutItemTapped (object sender, ItemTappedEventArgs e) 22 | { 23 | AboutItemViewModel vm = ((AboutItemViewModel)e.Item); 24 | vm.Navigation = this.Navigation; 25 | await Navigation.PushAsync(new AboutDetailPage() { BindingContext = vm }); 26 | } 27 | } 28 | 29 | public class AboutItemListPageXaml : ModelBoundContentPage {} 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/About/AboutItemListPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 9 | 10 | 11 | 12 | 16 | 19 | 20 | 24 | 29 | 30 | 31 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/Base/ModelBoundContentPage.cs: -------------------------------------------------------------------------------- 1 |  2 | using Xamarin.Forms; 3 | using XamarinCRM.ViewModels.Base; 4 | 5 | namespace XamarinCRM.Pages.Base 6 | { 7 | /// 8 | /// A generically typed ContentPage that enforces the type of its BindingContext according to TViewModel. 9 | /// 10 | public abstract class ModelBoundContentPage : ContentPage where TViewModel : BaseViewModel 11 | { 12 | /// 13 | /// Gets the generically typed ViewModel from the underlying BindingContext. 14 | /// 15 | /// The generically typed ViewModel. 16 | protected TViewModel ViewModel 17 | { 18 | get { return base.BindingContext as TViewModel; } 19 | } 20 | 21 | /// 22 | /// Sets the underlying BindingContext as the defined generic type. 23 | /// 24 | /// The generically typed ViewModel. 25 | /// Enforces a generically typed BindingContext, instead of the underlying loosely object-typed BindingContext. 26 | public new TViewModel BindingContext 27 | { 28 | set 29 | { 30 | base.BindingContext = value; 31 | base.OnPropertyChanged("BindingContext"); 32 | } 33 | } 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/Customers/CustomerSalesPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/Customers/CustomersPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/MenuPage.xaml.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Collections.Generic; 4 | 5 | using Xamarin.Forms; 6 | using XamarinCRM.ViewModels.Base; 7 | using Xamarin.Forms.Xaml; 8 | 9 | 10 | 11 | namespace XamarinCRM.Pages 12 | { 13 | public partial class MenuPage : ContentPage 14 | { 15 | RootPage root; 16 | List menuItems; 17 | public MenuPage(RootPage root) 18 | { 19 | this.root = root; 20 | InitializeComponent(); 21 | BindingContext = new BaseViewModel(Navigation) 22 | { 23 | Title = "XamarinCRM", 24 | Subtitle="XamarinCRM", 25 | Icon = "slideout.png" 26 | }; 27 | 28 | ListViewMenu.ItemsSource = menuItems = new List 29 | { 30 | new HomeMenuItem { Title = "Sales", MenuType = MenuType.Sales, Icon ="sales.png" }, 31 | new HomeMenuItem { Title = "Customers", MenuType = MenuType.Customers, Icon = "customers.png" }, 32 | new HomeMenuItem { Title = "Products", MenuType = MenuType.Products, Icon = "products.png" }, 33 | new HomeMenuItem { Title = "About", MenuType = MenuType.About, Icon = "about.png" }, 34 | 35 | }; 36 | 37 | ListViewMenu.SelectedItem = menuItems[0]; 38 | 39 | ListViewMenu.ItemSelected += async (sender, e) => 40 | { 41 | if(ListViewMenu.SelectedItem == null) 42 | return; 43 | 44 | await this.root.NavigateAsync(((HomeMenuItem)e.SelectedItem).MenuType); 45 | }; 46 | } 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/Products/CategoryListPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Pages/Products/ProductListPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Reflection; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | using Xamarin.Forms.Xaml; 7 | 8 | [assembly: AssemblyTitle("XamarinCRM")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Xamarin Inc.")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright("Xamarin Inc.")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion("1.0.*")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | //[assembly: XamlCompilation (XamlCompilationOptions.Compile)] 29 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Properties/Attributes/CurrencyAttribute.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | 4 | namespace XamarinCRM.Properties.Attributes 5 | { 6 | public class CurrencyAttribute : Attribute { } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Properties/Attributes/DisplayAttribute.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | 4 | namespace XamarinCRM.Properties.Attributes 5 | { 6 | public class DisplayAttribute : Attribute 7 | { 8 | public string Name { get; private set; } 9 | 10 | public DisplayAttribute (string name) 11 | { 12 | Name = name; 13 | } 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Services/GeoCodingService.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using XamarinCRM.Services; 4 | using Xamarin.Forms.Maps; 5 | using System.Threading.Tasks; 6 | using System.Diagnostics; 7 | using System.Linq; 8 | using Xamarin.Forms; 9 | using Xamarin; 10 | 11 | [assembly: Dependency(typeof(GeoCodingService))] 12 | 13 | namespace XamarinCRM.Services 14 | { 15 | public class GeoCodingService : IGeoCodingService 16 | { 17 | readonly Geocoder _GeoCoder; 18 | 19 | public GeoCodingService() 20 | { 21 | _GeoCoder = new Geocoder(); 22 | } 23 | 24 | #region IGeoCodingService implementation 25 | 26 | public Position NullPosition 27 | { 28 | get { return new Position(0, 0); } 29 | } 30 | 31 | public async Task GeoCodeAddress(string addressString) 32 | { 33 | Position p = NullPosition; 34 | 35 | try 36 | { 37 | p = (await _GeoCoder.GetPositionsForAddressAsync(addressString)).FirstOrDefault(); 38 | 39 | } 40 | catch (Exception ex) 41 | { 42 | // TODO: log error 43 | } 44 | 45 | return p; 46 | } 47 | 48 | #endregion 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Services/IAuthenticationService.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Threading.Tasks; 3 | 4 | namespace XamarinCRM.Services 5 | { 6 | public interface IAuthenticationService 7 | { 8 | Task AuthenticateAsync(); 9 | 10 | Task LogoutAsync(); 11 | 12 | Task GetTokenAsync(); 13 | 14 | bool IsAuthenticated { get; } 15 | 16 | /// 17 | /// Used only for demo, to quickly bypass actual authentication 18 | /// 19 | /// Task 20 | void BypassAuthentication(); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Services/IAuthenticator.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Threading.Tasks; 3 | using Microsoft.IdentityModel.Clients.ActiveDirectory; 4 | 5 | namespace XamarinCRM.Services 6 | { 7 | public interface IAuthenticator 8 | { 9 | Task Authenticate(string authority, string resource, string clientId, string returnUri); 10 | 11 | Task DeAuthenticate(string authority); 12 | 13 | Task FetchToken(string authority); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Services/IChartDataService.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | using Syncfusion.SfChart.XForms; 5 | using XamarinCRM.Models; 6 | using XamarinCRM.Models.Local; 7 | using System.Linq; 8 | 9 | namespace XamarinCRM.Services 10 | { 11 | public interface IChartDataService 12 | { 13 | Task> GetWeeklySalesDataPointsAsync(IEnumerable orders, int numberOfWeeks = 6, OrderStatusOption statusOption = OrderStatusOption.Both); 14 | 15 | Task>> GetCategorySalesDataPointsAsync(IEnumerable orders, int numberOfWeeks = 6, OrderStatusOption statusOption = OrderStatusOption.Both); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Services/IConfigFetcher.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Threading.Tasks; 3 | 4 | namespace XamarinCRM.Services 5 | { 6 | /// 7 | /// An interface that fetches settings from embedded resources in a platform. 8 | /// 9 | public interface IConfigFetcher 10 | { 11 | /// 12 | /// Gets the specified config element value. 13 | /// 14 | /// The XML element name in the config file. 15 | /// If set to true, read the element from config-sensitive.xml. Otherwise, read from the config.xml. 16 | /// The config value for the specified element. 17 | Task GetAsync(string configElementName, bool readFromSensitiveConfig = false); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Services/IDataService.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Threading.Tasks; 3 | using System.Collections.Generic; 4 | using XamarinCRM.Models; 5 | 6 | namespace XamarinCRM.Services 7 | { 8 | public interface IDataService 9 | { 10 | Task SeedLocalDataAsync(); 11 | 12 | bool LocalDBExists { get; } 13 | 14 | bool IsSeeded { get; } 15 | 16 | Task SynchronizeAccountsAsync(); 17 | 18 | Task SynchronizeOrdersAsync(); 19 | 20 | Task SynchronizeCategoriesAsync(); 21 | 22 | Task SynchronizeProductsAsync(); 23 | 24 | Task SaveOrderAsync(Order item); 25 | 26 | Task DeleteOrderAsync(Order item); 27 | 28 | Task SaveAccountAsync(Account item); 29 | 30 | Task DeleteAccountAsync(Account item); 31 | 32 | Task> GetAccountsAsync(bool includeLeads = false); 33 | 34 | Task> GetOpenOrdersForAccountAsync(string accountId); 35 | 36 | Task> GetClosedOrdersForAccountAsync(string accountId); 37 | 38 | Task> GetAllOrdersAsync(); 39 | 40 | Task> GetCategoriesAsync(string parentCategoryId = null); 41 | 42 | Task> GetProductsAsync(string categoryId); 43 | 44 | Task> GetAllChildProductsAsync(string topLevelCategoryId); 45 | 46 | Task GetTopLevelCategory(string categoryId); 47 | 48 | Task GetProductByNameAsync(string productName); 49 | 50 | Task> SearchAsync(string searchTerm); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Services/IGeoCodingService.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Threading.Tasks; 3 | using Xamarin.Forms.Maps; 4 | 5 | namespace XamarinCRM.Services 6 | { 7 | public interface IGeoCodingService 8 | { 9 | Position NullPosition { get; } 10 | Task GeoCodeAddress(string addressString); 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Services/IHttpClientHandlerFactory.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using System.Net.Http; 23 | 24 | namespace XamarinCRM.Services 25 | { 26 | public interface IHttpClientHandlerFactory 27 | { 28 | HttpClientHandler GetHttpClientHandler(); 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Statics/FontSizes.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using Xamarin.Forms; 23 | 24 | namespace XamarinCRM.Statics 25 | { 26 | public static class FontSizes 27 | { 28 | public readonly static double _120PercentOfSmall = Device.GetNamedSize(NamedSize.Small, typeof(Label)) * 1.2; 29 | public readonly static double _150PercentOfLarge = Device.GetNamedSize(NamedSize.Large, typeof(Label)) * 1.5; 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Statics/MessagingServiceConstants.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace XamarinCRM.Statics 3 | { 4 | public static class MessagingServiceConstants 5 | { 6 | public const string AUTHENTICATED = "AUTHENTICATED"; 7 | 8 | public const string SAVE_CONTACT = "SAVE_CONTACT"; 9 | 10 | public const string SAVE_ACCOUNT = "SAVE_ACCOUNT"; 11 | 12 | public const string ACCOUNT = "ACCOUNT"; 13 | 14 | public const string SAVE_ORDER = "ORDER_UPDATE"; 15 | 16 | public const string ORDER_APPROVED = "ORDER_APPROVED"; 17 | 18 | public const string SPLASH_DOWN = "SPLASH_DOWN"; 19 | 20 | public const string SAVE_LEAD = "SAVE_LEAD"; 21 | public const string SAVE_LEAD_ERROR = "SAVE_LEAD_ERROR"; 22 | 23 | public const string UPDATE_ORDER_PRODUCT = "ADD_PRODUCT_TO_ORDER"; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Statics/RowSizes.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | namespace XamarinCRM.Statics 4 | { 5 | public static class RowSizes 6 | { 7 | public readonly static double LargeRowHeightDouble = 60; 8 | public readonly static double MediumRowHeightDouble = 44; 9 | public readonly static double SmallRowHeightDouble = 30; 10 | 11 | public static int LargeRowHeightInt { get { return (int)LargeRowHeightDouble; } } 12 | public static int MediumRowHeightInt { get { return (int)MediumRowHeightDouble; } } 13 | public static int SmallRowHeightInt { get { return (int)SmallRowHeightDouble; } } 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Statics/Thicknesses.cs: -------------------------------------------------------------------------------- 1 |  2 | using Xamarin.Forms; 3 | 4 | namespace XamarinCRM.Statics 5 | { 6 | public static class Thicknesses 7 | { 8 | public static Thickness Empty 9 | { 10 | get{ return new Thickness(0, 0, 0, 0); } 11 | } 12 | 13 | public static Thickness IosStatusBar 14 | { 15 | get{ return new Thickness(0, 20, 0, 0); } 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/ViewModels/About/AboutItemViewModel.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using XamarinCRM.ViewModels.Base; 23 | 24 | namespace XamarinCRM 25 | { 26 | public class AboutItemViewModel : BaseViewModel 27 | { 28 | public string Description { get; set; } 29 | public string Uri { get; set; } 30 | 31 | public bool UriIsPresent 32 | { 33 | get 34 | { 35 | return !String.IsNullOrWhiteSpace(Uri); 36 | } 37 | } 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/ViewModels/Customers/CustomerMapViewModel.cs: -------------------------------------------------------------------------------- 1 |  2 | using XamarinCRM.ViewModels.Base; 3 | using Xamarin.Forms.Maps; 4 | using XamarinCRM.Models; 5 | 6 | namespace XamarinCRM 7 | { 8 | public class CustomerMapViewModel : BaseViewModel 9 | { 10 | Geocoder _GeoCoder; 11 | 12 | public CustomerMapViewModel(Account account) 13 | { 14 | 15 | 16 | _GeoCoder = new Geocoder(); 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/ViewModels/Products/ProductDetailViewModel.cs: -------------------------------------------------------------------------------- 1 |  2 | using XamarinCRM.ViewModels.Base; 3 | using XamarinCRM.Models; 4 | using System.Windows.Input; 5 | using Xamarin.Forms; 6 | using XamarinCRM.Statics; 7 | 8 | namespace XamarinCRM 9 | { 10 | public class ProductDetailViewModel : BaseViewModel 11 | { 12 | public ProductDetailViewModel(Product catalogProduct, bool isPerformingProductSelection = false) 13 | { 14 | CatalogProduct = catalogProduct; 15 | 16 | _IsPerformingProductSelection = isPerformingProductSelection; 17 | 18 | AddToOrderCommand = new Command(async () => 19 | { 20 | MessagingCenter.Send(CatalogProduct, MessagingServiceConstants.UPDATE_ORDER_PRODUCT); 21 | await Navigation.PopModalAsync(); 22 | }); 23 | } 24 | 25 | readonly bool _IsPerformingProductSelection; 26 | public bool IsPerformingProductSelection 27 | { 28 | get { return _IsPerformingProductSelection; } 29 | } 30 | 31 | public ICommand AddToOrderCommand { protected set; get; } 32 | 33 | Product _CatalogProduct; 34 | 35 | public Product CatalogProduct 36 | { 37 | get { return _CatalogProduct; } 38 | set 39 | { 40 | _CatalogProduct = value; 41 | OnPropertyChanged("CatalogProduct"); 42 | } 43 | } 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/ViewModels/Splash/SplashViewModel.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Threading.Tasks; 3 | using XamarinCRM.Services; 4 | using XamarinCRM.ViewModels.Base; 5 | using Xamarin.Forms; 6 | 7 | namespace XamarinCRM.ViewModels.Splash 8 | { 9 | public class SplashViewModel : BaseViewModel 10 | { 11 | readonly IConfigFetcher _ConfigFetcher; 12 | 13 | public SplashViewModel(INavigation navigation = null) 14 | : base(navigation) 15 | { 16 | _ConfigFetcher = DependencyService.Get(); 17 | } 18 | 19 | bool _IsPresentingLoginUI; 20 | 21 | public bool IsPresentingLoginUI 22 | { 23 | get 24 | { 25 | return _IsPresentingLoginUI; 26 | } 27 | set 28 | { 29 | _IsPresentingLoginUI = value; 30 | OnPropertyChanged("IsPresentingLoginUI"); 31 | } 32 | } 33 | 34 | string _Username; 35 | 36 | public string Username 37 | { 38 | get { return _Username; } 39 | set 40 | { 41 | _Username = value; 42 | OnPropertyChanged("Username"); 43 | } 44 | } 45 | 46 | string _Password; 47 | 48 | public string Password 49 | { 50 | get { return _Password; } 51 | set 52 | { 53 | _Password = value; 54 | OnPropertyChanged("Password"); 55 | } 56 | } 57 | 58 | public async Task LoadDemoCredentials() 59 | { 60 | Username = await _ConfigFetcher.GetAsync("azureActiveDirectoryUsername", true); 61 | Password = await _ConfigFetcher.GetAsync("azureActiveDirectoryPassword", true); 62 | } 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Base/ModelBoundContentView.cs: -------------------------------------------------------------------------------- 1 |  2 | using Xamarin.Forms; 3 | using XamarinCRM.ViewModels.Base; 4 | 5 | namespace XamarinCRM.Views.Base 6 | { 7 | /// 8 | /// A generically typed ContentView that enforces the type of its BindingContext according to TViewModel. 9 | /// 10 | public abstract class ModelBoundContentView : ContentView where TViewModel : BaseViewModel 11 | { 12 | /// 13 | /// Gets the generically typed ViewModel from the underlying BindingContext. 14 | /// 15 | /// The generically typed ViewModel. 16 | protected TViewModel ViewModel 17 | { 18 | get { return base.BindingContext as TViewModel; } 19 | } 20 | 21 | /// 22 | /// Sets the underlying BindingContext as the defined generic type. 23 | /// 24 | /// The generically typed ViewModel. 25 | /// Enforces a generically typed BindingContext, instead of the underlying loosely object-typed BindingContext. 26 | public new TViewModel BindingContext 27 | { 28 | set 29 | { 30 | base.BindingContext = value; 31 | base.OnPropertyChanged("BindingContext"); 32 | } 33 | } 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Customers/CustomerDetailContactView.xaml: -------------------------------------------------------------------------------- 1 |  2 | 10 | 11 | 12 | 13 | 25 | 26 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Customers/CustomerDetailContactView.xaml.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using System.Collections.Generic; 23 | using Xamarin.Forms; 24 | using XamarinCRM.Views.Base; 25 | using XamarinCRM.ViewModels.Customers; 26 | 27 | namespace XamarinCRM.Views.Customers 28 | { 29 | public partial class CustomerDetailContactView : CustomerDetailContactViewXaml 30 | { 31 | public CustomerDetailContactView() 32 | { 33 | InitializeComponent(); 34 | } 35 | } 36 | 37 | public abstract class CustomerDetailContactViewXaml : ModelBoundContentView { } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Customers/CustomerDetailPhoneView.xaml.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using XamarinCRM.ViewModels.Customers; 22 | using XamarinCRM.Views.Base; 23 | 24 | namespace XamarinCRM.Views.Customers 25 | { 26 | public partial class CustomerDetailPhoneView : CustomerDetailPhoneViewXaml 27 | { 28 | public CustomerDetailPhoneView() 29 | { 30 | InitializeComponent(); 31 | } 32 | } 33 | 34 | public abstract class CustomerDetailPhoneViewXaml : ModelBoundContentView { } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Customers/CustomerListView.xaml.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using System.Collections.Generic; 23 | using Xamarin.Forms; 24 | using XamarinCRM.Views; 25 | 26 | namespace XamarinCRM.Views.Customers 27 | { 28 | public partial class CustomerListView : NonPersistentSelectedItemListView 29 | { 30 | public CustomerListView() 31 | { 32 | InitializeComponent(); 33 | } 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Customers/CustomerOrderListView.xaml.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using System.Collections.Generic; 23 | using Xamarin.Forms; 24 | using XamarinCRM.Views.Base; 25 | 26 | namespace XamarinCRM.Views.Customers 27 | { 28 | public partial class CustomerOrderListView : NonPersistentSelectedItemListView 29 | { 30 | public CustomerOrderListView() 31 | { 32 | InitializeComponent(); 33 | } 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Customers/CustomerWeeklySalesChartView.xaml.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using System.Collections.Generic; 23 | using Xamarin.Forms; 24 | using XamarinCRM.Views.Base; 25 | using Xamarin; 26 | 27 | namespace XamarinCRM.Views.Customers 28 | { 29 | public partial class CustomerWeeklySalesChartView : CustomerWeeklySalesChartViewXaml 30 | { 31 | public CustomerWeeklySalesChartView() 32 | { 33 | InitializeComponent(); 34 | } 35 | } 36 | 37 | public abstract class CustomerWeeklySalesChartViewXaml : ModelBoundContentView { } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/NonPersistentSelectedItemListView.xaml: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Products/CategoryListView.xaml.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using System.Collections.Generic; 23 | using Xamarin.Forms; 24 | using XamarinCRM.Views; 25 | 26 | namespace XamarinCRM.Views.Products 27 | { 28 | public partial class CategoryListView : NonPersistentSelectedItemListView 29 | { 30 | public CategoryListView() 31 | { 32 | InitializeComponent(); 33 | } 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Products/ProductListView.xaml.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Xamarin 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | // the Software, and to permit persons to whom the Software is furnished to do so, 10 | // subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | using System; 22 | using System.Collections.Generic; 23 | using Xamarin.Forms; 24 | using XamarinCRM.Views; 25 | 26 | namespace XamarinCRM.Views.Products 27 | { 28 | public partial class ProductListView : NonPersistentSelectedItemListView 29 | { 30 | public ProductListView() 31 | { 32 | InitializeComponent(); 33 | } 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/Views/Sales/LeadListView.cs: -------------------------------------------------------------------------------- 1 |  2 | using Xamarin.Forms; 3 | using XamarinCRM.Views.Base; 4 | using XamarinCRM.Statics; 5 | using XamarinCRM.Cells.Sales; 6 | 7 | namespace XamarinCRM.Views.Sales 8 | { 9 | public class LeadListView : NonPersistentSelectedItemListView 10 | { 11 | public LeadListView() 12 | { 13 | HasUnevenRows = false; // Circumvents calculating heights for each cell individually. The rows of this list view will have a static height. 14 | RowHeight = RowSizes.LargeRowHeightInt; // set the row height for the list view items 15 | SeparatorVisibility = SeparatorVisibility.None; // make the row separators invisible, per the intended design of this app 16 | ItemTemplate = new DataTemplate(typeof(LeadListItemCell)); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRM/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/MobileApp/XamarinCRMAndroid.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/XamarinCRMAndroid.keystore -------------------------------------------------------------------------------- /src/MobileApp/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/debug.keystore -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/android/Syncfusion.SfChart.Android.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/android/Syncfusion.SfChart.Android.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/android/Syncfusion.SfChart.XForms.Android.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/android/Syncfusion.SfChart.XForms.Android.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/android/Syncfusion.SfChart.XForms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/android/Syncfusion.SfChart.XForms.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/ios-unified/Syncfusion.SfChart.XForms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/ios-unified/Syncfusion.SfChart.XForms.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/ios-unified/Syncfusion.SfChart.XForms.iOS.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/ios-unified/Syncfusion.SfChart.XForms.iOS.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/ios-unified/Syncfusion.SfChart.iOS.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/ios-unified/Syncfusion.SfChart.iOS.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/ios/Syncfusion.SfChart.XForms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/ios/Syncfusion.SfChart.XForms.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/ios/Syncfusion.SfChart.XForms.iOS.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/ios/Syncfusion.SfChart.XForms.iOS.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/ios/Syncfusion.SfChart.iOS.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/ios/Syncfusion.SfChart.iOS.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/pcl/Syncfusion.SfChart.XForms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/pcl/Syncfusion.SfChart.XForms.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/wp8/Syncfusion.SfChart.WP8.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/wp8/Syncfusion.SfChart.WP8.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/wp8/Syncfusion.SfChart.XForms.WinPhone.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/wp8/Syncfusion.SfChart.XForms.WinPhone.dll -------------------------------------------------------------------------------- /src/MobileApp/lib/SyncFusion/wp8/Syncfusion.SfChart.XForms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/lib/SyncFusion/wp8/Syncfusion.SfChart.XForms.dll -------------------------------------------------------------------------------- /src/MobileApp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/CustomersTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/CustomersTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/Default-568h@2x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/Default-Portrait.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/Default.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/Default@2x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/LeadContactDetailTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/LeadContactDetailTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/LeadDetailTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/LeadDetailTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/ProductsTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/ProductsTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/SalesTab@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/SalesTab@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/about_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/about_background.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/add_android_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/add_android_blue.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/add_android_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/add_android_gray.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/add_ios_blue@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/add_ios_blue@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/add_ios_gray@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/add_ios_gray@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/back_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/back_android.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/back_ios@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/back_ios@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/bottom_up_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/bottom_up_gradient.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/bottom_up_gradient@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/bottom_up_gradient@2x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/bottom_up_gradient@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/bottom_up_gradient@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/crm-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/crm-icon.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_100.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_114.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_120.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_144.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_152.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_192.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_29.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_40.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_50.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_512.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_57.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_58.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_640.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_640.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_72.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_76.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/icon_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/icon_80.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/info.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/map_marker_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/map_marker_android.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/map_marker_ios@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/map_marker_ios@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/phone_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/phone_android.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/phone_ios@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/phone_ios@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/splash.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/splash@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/splash@2x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/splash@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/splash@3x.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/splash_max_resolution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/splash_max_resolution.png -------------------------------------------------------------------------------- /src/MobileApp/raw graphic resources/xamarin_logo_plus_name_inline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xamarin/app-crm/b94e5f94ea2b3290a0ee5283b09b2dd49e596bf7/src/MobileApp/raw graphic resources/xamarin_logo_plus_name_inline.png -------------------------------------------------------------------------------- /src/Models/BaseModel.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System; 4 | 5 | #if SERVICE 6 | using Microsoft.Azure.Mobile.Server.Tables; 7 | 8 | #endif 9 | 10 | namespace XamarinCRM.Models 11 | { 12 | // The model class files are shared between the mobile and service projects. 13 | // If ITableData were compatible with PCL profile 78, the models could be in a PCL. 14 | 15 | public class BaseModel 16 | #if SERVICE 17 | : ITableData 18 | #endif 19 | { 20 | public string Id { get; set; } 21 | 22 | public DateTimeOffset? CreatedAt { get; set; } 23 | 24 | public DateTimeOffset? UpdatedAt { get; set; } 25 | 26 | public bool Deleted { get; set; } 27 | 28 | public byte[] Version { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /src/Models/Category.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | // The model class files are shared between the mobile and service projects. 4 | // If EntityData were compatible with PCL profile 78, the models could be in a PCL. 5 | 6 | namespace XamarinCRM.Models 7 | { 8 | public class Category : BaseModel 9 | { 10 | public Category() 11 | { 12 | Name = Description = ImageUrl = ParentCategoryId = string.Empty; 13 | Sequence = 0; 14 | } 15 | 16 | public string Name { get; set; } 17 | 18 | public string Description { get; set; } 19 | 20 | public string ImageUrl { get; set; } 21 | 22 | public string ParentCategoryId { get; set; } 23 | 24 | public bool HasSubCategories { get; set; } 25 | 26 | public int Sequence { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Models/Order.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | using System; 4 | 5 | namespace XamarinCRM.Models 6 | { 7 | public class Order : BaseModel 8 | 9 | { 10 | public Order() 11 | { 12 | AccountId = string.Empty; 13 | 14 | var now = DateTime.UtcNow; 15 | 16 | //New orders default to open status. 17 | IsOpen = true; 18 | Item = string.Empty; 19 | OrderDate = DateTime.SpecifyKind(new DateTime(now.Year, now.Month, now.Day, 0, 0, 0), DateTimeKind.Utc); 20 | ClosedDate = null; // Is never shown unless order is closed, in which case this should have a sane value. 21 | DueDate = DateTime.UtcNow.AddDays(7); 22 | Price = 0; 23 | } 24 | 25 | public bool IsOpen { get; set; } 26 | public string AccountId { get; set; } 27 | public double Price { get; set; } 28 | public string Item { get; set; } 29 | public DateTime OrderDate { get; set; } 30 | public DateTime DueDate { get; set; } 31 | public DateTime? ClosedDate { get; set; } 32 | 33 | #if !SERVICE 34 | public string Status 35 | { 36 | get { return (IsOpen) ? "Open Orders" : "Delivered Orders"; } 37 | 38 | } 39 | #endif 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Models/Product.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | // The model class files are shared between the mobile and service projects. 4 | // If EntityData were compatible with PCL profile 78, the models could be in a PCL. 5 | 6 | namespace XamarinCRM.Models 7 | { 8 | public class Product : BaseModel 9 | { 10 | public Product() 11 | { 12 | Name = Description = ImageUrl = string.Empty; 13 | Price = 0; 14 | } 15 | 16 | public string Name { get; set; } 17 | 18 | public string Description { get; set; } 19 | 20 | public double Price { get; set; } 21 | 22 | public string ImageUrl { get; set; } 23 | 24 | public string CategoryId { get; set; } 25 | 26 | #if !SERVICE 27 | 28 | public string ThumbnailImageUrl 29 | { 30 | get 31 | { 32 | if (string.IsNullOrWhiteSpace(ImageUrl) || !ImageUrl.Contains(".")) 33 | return null; 34 | 35 | var index = ImageUrl.LastIndexOf('.'); 36 | var name = ImageUrl.Substring(0, index); 37 | var extension = ImageUrl.Substring(index); 38 | return string.Format("{0}-thumb{1}", name, extension); 39 | } 40 | } 41 | 42 | #endif 43 | } 44 | } 45 | --------------------------------------------------------------------------------