├── .gitignore
├── .nuget
├── NuGet.Config
├── NuGet.exe
└── NuGet.targets
├── LICENSE
├── TwinTechsForms.NControl.SvgImageView.nuspec
├── TwinTechsForms.SvgImage.nuspec
├── TwinTechsForms
├── .gitignore
├── Components
│ ├── sdwebimage-3.7.1.4.info
│ ├── sdwebimage-3.7.1.4.png
│ └── sdwebimage-3.7.1.4
│ │ ├── component
│ │ ├── Details.md
│ │ ├── GettingStarted.md
│ │ ├── License.md
│ │ ├── Manifest.xml
│ │ └── icons
│ │ │ ├── sdwebimage_128x128.png
│ │ │ └── sdwebimage_512x512.png
│ │ ├── lib
│ │ ├── ios-unified
│ │ │ └── SDWebImage.dll
│ │ └── ios
│ │ │ └── SDWebImage.dll
│ │ └── samples
│ │ ├── SDWebImageMTDialogSample-Classic
│ │ ├── SDWebImageMTDialogSample-Classic.sln
│ │ └── SDWebImageMTDialogSample
│ │ │ ├── AppDelegate.cs
│ │ │ ├── DetailViewController.cs
│ │ │ ├── ImageLoaderElement.cs
│ │ │ ├── Info.plist
│ │ │ ├── Main.cs
│ │ │ ├── Resources
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── placeholder.png
│ │ │ └── placeholder@2x.png
│ │ │ └── SDWebImageMTDialogSample-Classic.csproj
│ │ ├── SDWebImageMTDialogSample
│ │ ├── SDWebImageMTDialogSample.sln
│ │ └── SDWebImageMTDialogSample
│ │ │ ├── AppDelegate.cs
│ │ │ ├── DetailViewController.cs
│ │ │ ├── ImageLoaderElement.cs
│ │ │ ├── Info.plist
│ │ │ ├── Main.cs
│ │ │ ├── Resources
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── placeholder.png
│ │ │ └── placeholder@2x.png
│ │ │ └── SDWebImageMTDialogSample.csproj
│ │ ├── SDWebImageSample-Classic
│ │ ├── SDWebImageSample-Classic.sln
│ │ └── SDWebImageSample-Classic
│ │ │ ├── AppDelegate.cs
│ │ │ ├── DetailViewController.cs
│ │ │ ├── DetailViewController.designer.cs
│ │ │ ├── DetailViewController.xib
│ │ │ ├── Info.plist
│ │ │ ├── Main.cs
│ │ │ ├── MasterViewController.cs
│ │ │ ├── MasterViewController.designer.cs
│ │ │ ├── MasterViewController.xib
│ │ │ ├── Resources
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── placeholder.png
│ │ │ └── placeholder@2x.png
│ │ │ └── SDWebImageSample-Classic.csproj
│ │ ├── SDWebImageSample
│ │ ├── SDWebImageSample.sln
│ │ └── SDWebImageSample
│ │ │ ├── AppDelegate.cs
│ │ │ ├── DetailViewController.cs
│ │ │ ├── DetailViewController.designer.cs
│ │ │ ├── DetailViewController.xib
│ │ │ ├── Info.plist
│ │ │ ├── Main.cs
│ │ │ ├── MasterViewController.cs
│ │ │ ├── MasterViewController.designer.cs
│ │ │ ├── MasterViewController.xib
│ │ │ ├── Resources
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── placeholder.png
│ │ │ └── placeholder@2x.png
│ │ │ └── SDWebImageSample.csproj
│ │ ├── SDWebImageSimpleSample-Classic
│ │ ├── SDWebImageSimpleSample-Classic.sln
│ │ └── SDWebImageSimpleSample-Classic
│ │ │ ├── AppDelegate.cs
│ │ │ ├── Info.plist
│ │ │ ├── Main.cs
│ │ │ ├── Resources
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── placeholder.png
│ │ │ └── placeholder@2x.png
│ │ │ ├── SDWebImageSimpleSample-Classic.csproj
│ │ │ ├── SampleViewController.cs
│ │ │ ├── SampleViewController.designer.cs
│ │ │ └── SampleViewController.xib
│ │ └── SDWebImageSimpleSample
│ │ ├── SDWebImageSimpleSample.sln
│ │ └── SDWebImageSimpleSample
│ │ ├── AppDelegate.cs
│ │ ├── Info.plist
│ │ ├── Main.cs
│ │ ├── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── placeholder.png
│ │ └── placeholder@2x.png
│ │ ├── SDWebImageSimpleSample.csproj
│ │ ├── SampleViewController.cs
│ │ ├── SampleViewController.designer.cs
│ │ └── SampleViewController.xib
├── Droid
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── DummyIncludes.cs
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Resource.designer.cs
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ └── drawable
│ │ │ └── icon.png
│ ├── TwinTechsFormsExample.Droid.csproj
│ └── packages.config
├── TwinTechsForms.Core
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── TwinTechs
│ │ ├── Controls
│ │ │ ├── FastCell.cs
│ │ │ ├── FastImage.cs
│ │ │ ├── IFastCellCache.cs
│ │ │ ├── IScrollAwareElement.cs
│ │ │ ├── PageViewContainer.cs
│ │ │ └── ViewEffectExtensions.cs
│ │ ├── Extensions
│ │ │ ├── PointExtensions.cs
│ │ │ └── ViewExtensions.cs
│ │ └── Gestures
│ │ │ ├── BaseGestureRecognizer.cs
│ │ │ ├── Converters
│ │ │ └── SwipeGestureRecognizerDirectonConverter.cs
│ │ │ ├── GestureRecognizerExtensions.cs
│ │ │ ├── INativeGestureRecognizer.cs
│ │ │ ├── INativeGestureRecognizerCoordinator.cs
│ │ │ ├── INativeGestureRecognizerFactory.cs
│ │ │ ├── LongPressGestureRecognizer.cs
│ │ │ ├── PanGestureRecognizer.cs
│ │ │ ├── PinchGestureRecognizer.cs
│ │ │ ├── SwipeGestureRecognizer.cs
│ │ │ └── TapGestureRecognizer.cs
│ ├── TwinTechsForms.Core.csproj
│ ├── XLabs
│ │ ├── Forms
│ │ │ └── Controls
│ │ │ │ ├── FastGridCell.cs
│ │ │ │ └── GridView.cs
│ │ └── GridEventArgs{T}.cs
│ └── packages.config
├── TwinTechsForms.Droid
│ ├── MonoDroidToolkit
│ │ └── ImageLoader
│ │ │ ├── FileCache.cs
│ │ │ ├── ImageLoader.cs
│ │ │ └── MemoryCache.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Resource.designer.cs
│ │ └── values
│ │ │ └── Strings.xml
│ ├── TwinTechs
│ │ ├── Droid
│ │ │ ├── Controls
│ │ │ │ ├── FastCellCache.cs
│ │ │ │ ├── FastCellRenderer.cs
│ │ │ │ ├── FastGridCellCache.cs
│ │ │ │ ├── FastImageRenderer.cs
│ │ │ │ ├── ImageLoaderCache.cs
│ │ │ │ ├── PageViewContainerRenderer.cs
│ │ │ │ └── ViewMaskExtensionProvider.cs
│ │ │ └── Extensions
│ │ │ │ └── ViewExtensions.cs
│ │ └── Gestures
│ │ │ ├── BaseNativeGestureRecognizer.cs
│ │ │ ├── GestureMotionEvent.cs
│ │ │ ├── GestureTouchDispatcher.cs
│ │ │ ├── NativeGestureCoordinator.cs
│ │ │ ├── NativeGestureRecognizerFactory.cs
│ │ │ ├── NativeLongPressGestureRecognizer.cs
│ │ │ ├── NativePanGestureRecognizer.cs
│ │ │ ├── NativePinchGestureRecgonizer.cs
│ │ │ ├── NativeSwipeGestureRecognizer.cs
│ │ │ └── NativeTapGestureRecognizer.cs
│ ├── TwinTechsForms.Droid.csproj
│ ├── XLabs
│ │ └── Controls
│ │ │ └── GridView
│ │ │ ├── GridViewAdapter.cs
│ │ │ ├── GridViewCellContainer.cs
│ │ │ └── GridViewRenderer.cs
│ └── packages.config
├── TwinTechsForms.NControl.SvgImageView
│ ├── Extensions
│ │ └── SizeExtensions.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ResizableSvgInsets.cs
│ ├── SvgImageView.cs
│ ├── TwinTechsForms.NControl.SvgImageView.Android
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resources
│ │ │ ├── AboutResources.txt
│ │ │ ├── Resource.designer.cs
│ │ │ └── values
│ │ │ │ └── Strings.xml
│ │ ├── SvgImageViewRenderer.cs
│ │ ├── TwinTechsForms.NControl.SvgImageView.Android.csproj
│ │ └── packages.config
│ ├── TwinTechsForms.NControl.SvgImageView.csproj
│ ├── TwinTechsForms.NControl.SvgImageView.iOS
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── SvgImageViewRenderer.cs
│ │ ├── TwinTechsForms.NControl.SvgImageView.iOS.csproj
│ │ └── packages.config
│ └── packages.config
├── TwinTechsForms.SvgImage
│ ├── Extensions
│ │ └── SizeExtensions.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SvgImage.cs
│ ├── TwinTechsForms.SvgImage.Droid
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resources
│ │ │ ├── AboutResources.txt
│ │ │ ├── Resource.designer.cs
│ │ │ └── values
│ │ │ │ └── Strings.xml
│ │ ├── SvgImageRenderer.cs
│ │ ├── TwinTechsForms.SvgImage.Droid.csproj
│ │ └── packages.config
│ ├── TwinTechsForms.SvgImage.csproj
│ ├── TwinTechsForms.SvgImage.iOS
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── SvgImageRenderer.cs
│ │ ├── TwinTechsForms.SvgImage.iOS.csproj
│ │ └── packages.config
│ ├── packages.config
│ └── readme.md
├── TwinTechsForms.iOS
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── TwinTechs
│ │ ├── Gestures
│ │ │ ├── BaseNativeGestureRecognizer.cs
│ │ │ ├── NativeGestureRecognizerFactory.cs
│ │ │ ├── NativeLongPressGestureRecgonizer.cs
│ │ │ ├── NativePanGestureRecognizer.cs
│ │ │ ├── NativePinchGestureRecognizer.cs
│ │ │ ├── NativeSwipeGestureRecognizer.cs
│ │ │ └── NativeTapGestureRecognizer.cs
│ │ └── Ios
│ │ │ ├── Controls
│ │ │ ├── FastCellCache.cs
│ │ │ ├── FastCellRenderer.cs
│ │ │ ├── FastImageRenderer.cs
│ │ │ ├── PageViewContainerRenderer.cs
│ │ │ ├── ViewControllerContainer.cs
│ │ │ └── ViewMaskExtensionProvider.cs
│ │ │ └── Extensions
│ │ │ ├── UIViewControllerExtensions.cs
│ │ │ └── ViewExtensions.cs
│ ├── TwinTechsForms.iOS.csproj
│ ├── XLabs
│ │ └── Forms
│ │ │ └── Controls
│ │ │ └── GridView
│ │ │ ├── GridCollectionView.cs
│ │ │ ├── GridDataSource.cs
│ │ │ ├── GridViewCell.cs
│ │ │ ├── GridViewDelegate.cs
│ │ │ └── GridViewRenderer.cs
│ └── packages.config
├── TwinTechsForms.sln
├── TwinTechsFormsExample
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── TwinTechs
│ │ └── Example
│ │ │ ├── About.xaml
│ │ │ ├── About.xaml.cs
│ │ │ ├── AppHelper.cs
│ │ │ ├── CircleView
│ │ │ ├── CircleViewSamplePage.xaml
│ │ │ └── CircleViewSamplePage.xaml.cs
│ │ │ ├── DataProvider.cs
│ │ │ ├── FastCells
│ │ │ ├── Cells
│ │ │ │ ├── ComplexFastCell.xaml
│ │ │ │ ├── ComplexFastCell.xaml.cs
│ │ │ │ ├── ComplexViewCell.xaml
│ │ │ │ ├── ComplexViewCell.xaml.cs
│ │ │ │ ├── SimpleFastCell.xaml
│ │ │ │ ├── SimpleFastCell.xaml.cs
│ │ │ │ ├── SimpleViewCell.xaml
│ │ │ │ ├── SimpleViewCell.xaml.cs
│ │ │ │ ├── SmallSimpleFastCell.xaml
│ │ │ │ ├── SmallSimpleFastCell.xaml.cs
│ │ │ │ ├── UnevenFastCell.xaml
│ │ │ │ └── UnevenFastCell.xaml.cs
│ │ │ ├── FastCellComplexSamplePage.xaml
│ │ │ ├── FastCellComplexSamplePage.xaml.cs
│ │ │ ├── FastCellSamplePage.xaml
│ │ │ ├── FastCellSamplePage.xaml.cs
│ │ │ ├── FastSimpleCellLots.xaml
│ │ │ ├── FastSimpleCellLots.xaml.cs
│ │ │ ├── FastSimpleCellUnevenHeight.xaml
│ │ │ ├── FastSimpleCellUnevenHeight.xaml.cs
│ │ │ ├── ViewCellComplexSamplePage.xaml
│ │ │ ├── ViewCellComplexSamplePage.xaml.cs
│ │ │ ├── ViewCellSimple.xaml
│ │ │ └── ViewCellSimple.xaml.cs
│ │ │ ├── Gestures
│ │ │ ├── Cells
│ │ │ │ ├── SwipeListCell.xaml
│ │ │ │ ├── SwipeListCell.xaml.cs
│ │ │ │ ├── VideoCell.xaml
│ │ │ │ └── VideoCell.xaml.cs
│ │ │ ├── GestureRecognizingAbsoluteLayout.cs
│ │ │ ├── GestureScrollListExample.xaml
│ │ │ ├── GestureScrollListExample.xaml.cs
│ │ │ ├── GestureYoutubeLikeExample.xaml
│ │ │ ├── GestureYoutubeLikeExample.xaml.cs
│ │ │ ├── GesturesInChildViewsExample.cs
│ │ │ ├── GesturesInChildViewsExample.xaml
│ │ │ ├── LongPressGestureExample.cs
│ │ │ ├── LongPressGestureExample.xaml
│ │ │ ├── MultiGestureExample.cs
│ │ │ ├── MultiGestureExample.xaml
│ │ │ ├── PageScrollerControl.cs
│ │ │ ├── PanGestureAlternateRouting.xaml
│ │ │ ├── PanGestureAlternateRouting.xaml.cs
│ │ │ ├── PanGestureAlternateRoutingDelayAndDelegate.xaml
│ │ │ ├── PanGestureAlternateRoutingDelayAndDelegate.xaml.cs
│ │ │ ├── PanGestureExample.xaml
│ │ │ ├── PanGestureExample.xaml.cs
│ │ │ ├── PanGestureExample2.xaml
│ │ │ ├── PanGestureExample2.xaml.cs
│ │ │ ├── PanGestureExample3.xaml
│ │ │ ├── PanGestureExample3.xaml.cs
│ │ │ ├── SimpleLayout.cs
│ │ │ ├── SwipeGestureExample.xaml
│ │ │ ├── SwipeGestureExample.xaml.cs
│ │ │ ├── SwipeyListExample.xaml
│ │ │ ├── SwipeyListExample.xaml.cs
│ │ │ ├── TapGestureExample.xaml
│ │ │ ├── TapGestureExample.xaml.cs
│ │ │ ├── ViewScrollerExample.xaml
│ │ │ ├── ViewScrollerExample.xaml.cs
│ │ │ ├── YoutubeStyleContentPage.cs
│ │ │ └── YoutubeStyleContentPage.xaml
│ │ │ ├── GridView
│ │ │ ├── Cells
│ │ │ │ ├── EmbeddedGridViewCell.xaml
│ │ │ │ ├── EmbeddedGridViewCell.xaml.cs
│ │ │ │ ├── GridViewThumbnailCell.cs
│ │ │ │ ├── GridViewXamlCell.xaml
│ │ │ │ ├── GridViewXamlCell.xaml.cs
│ │ │ │ └── InnerGridViewThumbnailCell.cs
│ │ │ ├── GridViewOptions.xaml
│ │ │ ├── GridViewOptions.xaml.cs
│ │ │ ├── GridViewPerformance.xaml
│ │ │ ├── GridViewPerformance.xaml.cs
│ │ │ ├── GridViewPerformance2.xaml
│ │ │ ├── GridViewPerformance2.xaml.cs
│ │ │ ├── GridViewXamlPerformance.xaml
│ │ │ └── GridViewXamlPerformance.xaml.cs
│ │ │ ├── MediaItem.cs
│ │ │ ├── PageInPage
│ │ │ ├── NavigationPageInPage.xaml
│ │ │ ├── NavigationPageInPage.xaml.cs
│ │ │ ├── PageInPageSample.xaml
│ │ │ └── PageInPageSample.xaml.cs
│ │ │ ├── SampleMenu.xaml
│ │ │ ├── SampleMenu.xaml.cs
│ │ │ ├── SvgImageSample
│ │ │ ├── Assets
│ │ │ │ ├── ErulisseuiinSpaceshipPack.svg
│ │ │ │ ├── MocastIcon.svg
│ │ │ │ ├── Smile.svg
│ │ │ │ ├── SunAtNight.svg
│ │ │ │ ├── TextVariations.svg
│ │ │ │ ├── funky-border.svg
│ │ │ │ ├── mozilla
│ │ │ │ │ ├── BezierCurves1.svg
│ │ │ │ │ ├── BezierCurves2.svg
│ │ │ │ │ ├── Text1.svg
│ │ │ │ │ ├── Text2.svg
│ │ │ │ │ ├── Text3.svg
│ │ │ │ │ ├── Text4.svg
│ │ │ │ │ ├── ellipse.svg
│ │ │ │ │ ├── path.svg
│ │ │ │ │ └── transform.svg
│ │ │ │ ├── repeat.svg
│ │ │ │ ├── sliderThumb.svg
│ │ │ │ ├── test-button.svg
│ │ │ │ └── twintechs-logo.svg
│ │ │ ├── SvgImageSamplePage.cs
│ │ │ └── SvgImageSamplePageViewModel.cs
│ │ │ └── UnevenSizedMediaItem.cs
│ ├── TwinTechsFormsExample.cs
│ ├── TwinTechsFormsExample.csproj
│ ├── TwinTechsFormsExample.sln
│ └── packages.config
└── iOS
│ ├── AppDelegate.cs
│ ├── Entitlements.plist
│ ├── ITunesArtwork
│ ├── ITunesArtwork@2x
│ ├── Info.plist
│ ├── Main.cs
│ ├── Resources
│ ├── Default-568h@2x.png
│ ├── Default-Portrait.png
│ ├── Default-Portrait@2x.png
│ ├── Default.png
│ ├── Default@2x.png
│ ├── Icon-60@2x.png
│ ├── Icon-60@3x.png
│ ├── Icon-76.png
│ ├── Icon-76@2x.png
│ ├── Icon-Small-40.png
│ ├── Icon-Small-40@2x.png
│ ├── Icon-Small-40@3x.png
│ ├── Icon-Small.png
│ ├── Icon-Small@2x.png
│ ├── Icon-Small@3x.png
│ └── LaunchScreen.storyboard
│ ├── TwinTechsFormsExample.iOS.csproj
│ └── packages.config
└── readme.md
/.gitignore:
--------------------------------------------------------------------------------
1 | #Autosave files
2 | *~
3 |
4 | #build
5 | [Oo]bj/
6 | [Bb]in/
7 | packages/
8 | TestResults/
9 |
10 | # globs
11 | Makefile.in
12 | *.DS_Store
13 | *.sln.cache
14 | *.suo
15 | *.cache
16 | *.pidb
17 | *.userprefs
18 | *.usertasks
19 | config.log
20 | config.make
21 | config.status
22 | aclocal.m4
23 | install-sh
24 | autom4te.cache/
25 | *.user
26 | *.tar.gz
27 | tarballs/
28 | test-results/
29 | Thumbs.db
30 |
31 | #Mac bundle stuff
32 | *.dmg
33 | *.app
34 |
35 | #resharper
36 | *_Resharper.*
37 | *.Resharper
38 |
39 | #dotCover
40 | *.dotCover
41 |
--------------------------------------------------------------------------------
/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/.nuget/NuGet.exe
--------------------------------------------------------------------------------
/TwinTechsForms/.gitignore:
--------------------------------------------------------------------------------
1 | #Autosave files
2 | *~
3 |
4 | #build
5 | [Oo]bj/
6 | [Bb]in/
7 | packages/
8 | TestResults/
9 |
10 | # globs
11 | Makefile.in
12 | *.DS_Store
13 | *.sln.cache
14 | *.suo
15 | *.cache
16 | *.pidb
17 | *.userprefs
18 | *.usertasks
19 | config.log
20 | config.make
21 | config.status
22 | aclocal.m4
23 | install-sh
24 | autom4te.cache/
25 | *.user
26 | *.tar.gz
27 | tarballs/
28 | test-results/
29 | Thumbs.db
30 |
31 | #Mac bundle stuff
32 | *.dmg
33 | *.app
34 |
35 | #resharper
36 | *_Resharper.*
37 | *.Resharper
38 |
39 | #dotCover
40 | *.dotCover
41 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/component/Details.md:
--------------------------------------------------------------------------------
1 | Adds methods to `UIImageView` supporting asynchronous web image loading:
2 |
3 | ```csharp
4 | using SDWebImage;
5 | ...
6 |
7 | const string CellIdentifier = "Cell";
8 |
9 | public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
10 | {
11 | UITableViewCell cell = tableView.DequeueReusableCell (CellIdentifier) ??
12 | new UITableViewCell (UITableViewCellStyle.Default, CellIdentifier);
13 |
14 | // Use the SetImage extension method to load the web image:
15 | cell.ImageView.SetImage (
16 | url: new NSUrl ("http://db.tt/ayAqtbFy"),
17 | placeholder: UIImage.FromBundle ("placeholder.png")
18 | );
19 |
20 | return cell;
21 | }
22 | ```
23 |
24 | It provides:
25 |
26 | * `UIImageView` and `UIButton` extension methods adding web image loading and cache management.
27 | * An asynchronous image downloader
28 | * An asynchronous memory + disk image caching with automatic cache expiration handling
29 | * Animated GIF support
30 | * WebP format support
31 | * A background image decompression
32 | * A guarantee that the same URL won't be downloaded several times
33 | * A guarantee that bogus URLs won't be retried again and again
34 | * A guarantee that main thread will never be blocked
35 | * Performances!
36 | * Use GCD and ARC
37 | * Arm64 support
38 |
39 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/component/License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 Olivier Poitrey
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/component/Manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | SDWebImage
4 | Xamarin Inc
5 | https://xamarin.com/
6 | https://github.com/rs/SDWebImage
7 | 3.7.1.4
8 | Extensions for UIImageView allowing you to asynchronously load web images.
9 |
10 |
11 | iOS Unified Sample Load Image
12 | iOS Unified Sample Load Image
13 |
14 |
15 | iOS Unified Sample MTD
16 | iOS Unified Sample MTD
17 |
18 |
19 | iOS Classic Sample MTD
20 | iOS Classic Sample MTD
21 |
22 |
23 | iOS Classic Sample TableView
24 | iOS Classic Sample TableView
25 |
26 |
27 | iOS Classic Sample Load Image
28 | iOS Classic Sample Load Image
29 |
30 |
31 | iOS Unified Sample TableView
32 | iOS Unified Sample TableView
33 |
34 |
35 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/component/icons/sdwebimage_128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/component/icons/sdwebimage_128x128.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/component/icons/sdwebimage_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/component/icons/sdwebimage_512x512.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/lib/ios-unified/SDWebImage.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/lib/ios-unified/SDWebImage.dll
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/lib/ios/SDWebImage.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/lib/ios/SDWebImage.dll
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample-Classic/SDWebImageMTDialogSample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UISupportedInterfaceOrientations
6 |
7 | UIInterfaceOrientationPortrait
8 | UIInterfaceOrientationLandscapeLeft
9 | UIInterfaceOrientationLandscapeRight
10 |
11 | MinimumOSVersion
12 | 6.1
13 |
14 |
15 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample-Classic/SDWebImageMTDialogSample/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | #if __UNIFIED__
6 | using Foundation;
7 | using UIKit;
8 | #else
9 | using MonoTouch.Foundation;
10 | using MonoTouch.UIKit;
11 | #endif
12 |
13 | namespace SDWebImageMTDialogSample
14 | {
15 | public class Application
16 | {
17 | // This is the main entry point of the application.
18 | static void Main (string[] args)
19 | {
20 | // if you want to use a different Application Delegate class from "AppDelegate"
21 | // you can specify it here.
22 | UIApplication.Main (args, null, "AppDelegate");
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample-Classic/SDWebImageMTDialogSample/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample-Classic/SDWebImageMTDialogSample/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample-Classic/SDWebImageMTDialogSample/Resources/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample-Classic/SDWebImageMTDialogSample/Resources/placeholder.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample-Classic/SDWebImageMTDialogSample/Resources/placeholder@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample-Classic/SDWebImageMTDialogSample/Resources/placeholder@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDWebImageMTDialogSample", "SDWebImageMTDialogSample\SDWebImageMTDialogSample.csproj", "{18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
9 | Release|iPhoneSimulator = Release|iPhoneSimulator
10 | Debug|iPhone = Debug|iPhone
11 | Release|iPhone = Release|iPhone
12 | Ad-Hoc|iPhone = Ad-Hoc|iPhone
13 | AppStore|iPhone = AppStore|iPhone
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.AppStore|iPhone.Build.0 = AppStore|iPhone
20 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Debug|iPhone.ActiveCfg = Debug|iPhone
21 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Debug|iPhone.Build.0 = Debug|iPhone
22 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Release|iPhone.ActiveCfg = Release|iPhone
25 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Release|iPhone.Build.0 = Release|iPhone
26 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27 | {18D564E0-83E2-4A4B-BDA0-BF2E614A1F41}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
28 | EndGlobalSection
29 | EndGlobal
30 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UISupportedInterfaceOrientations
6 |
7 | UIInterfaceOrientationPortrait
8 | UIInterfaceOrientationLandscapeLeft
9 | UIInterfaceOrientationLandscapeRight
10 |
11 | MinimumOSVersion
12 | 6.1
13 |
14 |
15 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | #if __UNIFIED__
6 | using Foundation;
7 | using UIKit;
8 | #else
9 | using MonoTouch.Foundation;
10 | using MonoTouch.UIKit;
11 | #endif
12 |
13 | namespace SDWebImageMTDialogSample
14 | {
15 | public class Application
16 | {
17 | // This is the main entry point of the application.
18 | static void Main (string[] args)
19 | {
20 | // if you want to use a different Application Delegate class from "AppDelegate"
21 | // you can specify it here.
22 | UIApplication.Main (args, null, "AppDelegate");
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample/Resources/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample/Resources/placeholder.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample/Resources/placeholder@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageMTDialogSample/SDWebImageMTDialogSample/Resources/placeholder@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDWebImageSampleClassic", "SDWebImageSample-Classic\SDWebImageSample-Classic.csproj", "{EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
9 | Release|iPhoneSimulator = Release|iPhoneSimulator
10 | Debug|iPhone = Debug|iPhone
11 | Release|iPhone = Release|iPhone
12 | Ad-Hoc|iPhone = Ad-Hoc|iPhone
13 | AppStore|iPhone = AppStore|iPhone
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.AppStore|iPhone.Build.0 = AppStore|iPhone
20 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Debug|iPhone.ActiveCfg = Debug|iPhone
21 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Debug|iPhone.Build.0 = Debug|iPhone
22 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Release|iPhone.ActiveCfg = Release|iPhone
25 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Release|iPhone.Build.0 = Release|iPhone
26 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27 | {EC9E7D4E-F9E9-4C8A-96AF-734852B6F872}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
28 | EndGlobalSection
29 | GlobalSection(MonoDevelopProperties) = preSolution
30 | StartupItem = SDWebImageSample\SDWebImageSample.csproj
31 | EndGlobalSection
32 | EndGlobal
33 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using MonoTouch.Foundation;
6 | using MonoTouch.UIKit;
7 |
8 | namespace SDWebImageSample
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register ("AppDelegate")]
14 | public partial class AppDelegate : UIApplicationDelegate
15 | {
16 | // class-level declarations
17 | UIWindow window;
18 | MasterViewController masterViewController;
19 | UINavigationController navController;
20 |
21 | //
22 | // This method is invoked when the application has loaded and is ready to run. In this
23 | // method you should instantiate the window, load the UI into it and then make the window
24 | // visible.
25 | //
26 | // You have 17 seconds to return from this method, or iOS will terminate your application.
27 | //
28 | public override bool FinishedLaunching (UIApplication app, NSDictionary options)
29 | {
30 | window = new UIWindow (UIScreen.MainScreen.Bounds);
31 |
32 | masterViewController = new MasterViewController ();
33 | navController = new UINavigationController (masterViewController);
34 |
35 | window.RootViewController = navController;
36 | window.MakeKeyAndVisible ();
37 |
38 | return true;
39 | }
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/DetailViewController.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Drawing;
4 |
5 | using MonoTouch.Foundation;
6 | using MonoTouch.UIKit;
7 |
8 | using CGRect = global::System.Drawing.RectangleF;
9 | using CGSize = global::System.Drawing.SizeF;
10 | using CGPoint = global::System.Drawing.PointF;
11 |
12 | using SDWebImage;
13 |
14 | namespace SDWebImageSample
15 | {
16 | public partial class DetailViewController : UIViewController
17 | {
18 | public NSUrl ImageUrl { get; set; }
19 |
20 | UIActivityIndicatorView activityIndicator;
21 |
22 | public DetailViewController () : base ("DetailViewController", null)
23 | {
24 |
25 | }
26 |
27 | public override void DidReceiveMemoryWarning ()
28 | {
29 | // Releases the view if it doesn't have a superview.
30 | base.DidReceiveMemoryWarning ();
31 |
32 | // Release any cached data, images, etc that aren't in use.
33 | }
34 |
35 | public override void ViewDidLoad ()
36 | {
37 | base.ViewDidLoad ();
38 |
39 | configureView ();
40 | }
41 |
42 | void configureView ()
43 | {
44 | if (ImageUrl != null) {
45 | ImageView.SetImage (ImageUrl, null, SDWebImageOptions.ProgressiveDownload, ProgressHandler, CompletedHandler);
46 | }
47 | }
48 |
49 | void ProgressHandler (int receivedSize, int expectedSize)
50 | {
51 | if (activityIndicator == null) {
52 | InvokeOnMainThread (() => {
53 | activityIndicator = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.Gray);
54 | ImageView.AddSubview (activityIndicator);
55 | activityIndicator.Center = ImageView.Center;
56 | activityIndicator.StartAnimating ();
57 | });
58 | }
59 | }
60 |
61 | void CompletedHandler (UIImage image, NSError error, SDImageCacheType cacheType, NSUrl url)
62 | {
63 | if (activityIndicator != null) {
64 | InvokeOnMainThread (() => {
65 | activityIndicator.RemoveFromSuperview ();
66 | activityIndicator = null;
67 | });
68 | }
69 | }
70 | }
71 | }
72 |
73 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/DetailViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Xamarin Studio to store outlets and
4 | // actions made in the UI designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 | using MonoTouch.Foundation;
8 |
9 | namespace SDWebImageSample
10 | {
11 | [Register ("DetailViewController")]
12 | partial class DetailViewController
13 | {
14 | [Outlet]
15 | MonoTouch.UIKit.UIButton btnTest { get; set; }
16 |
17 | [Outlet]
18 | MonoTouch.UIKit.UIImageView ImageView { get; set; }
19 |
20 | void ReleaseDesignerOutlets ()
21 | {
22 | if (ImageView != null) {
23 | ImageView.Dispose ();
24 | ImageView = null;
25 | }
26 |
27 | if (btnTest != null) {
28 | btnTest.Dispose ();
29 | btnTest = null;
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UISupportedInterfaceOrientations
6 |
7 | UIInterfaceOrientationPortrait
8 | UIInterfaceOrientationLandscapeLeft
9 | UIInterfaceOrientationLandscapeRight
10 |
11 | MinimumOSVersion
12 | 6.1
13 |
14 |
15 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using MonoTouch.Foundation;
6 | using MonoTouch.UIKit;
7 |
8 | namespace SDWebImageSample
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main (string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main (args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/MasterViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by MonoDevelop to store outlets and
4 | // actions made in the Xcode designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 |
8 | using MonoTouch.Foundation;
9 |
10 | namespace SDWebImageSample
11 | {
12 | [Register ("MasterViewController")]
13 | partial class MasterViewController
14 | {
15 | void ReleaseDesignerOutlets ()
16 | {
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/MasterViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/Resources/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/Resources/placeholder.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/Resources/placeholder@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample-Classic/SDWebImageSample-Classic/Resources/placeholder@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDWebImageSample", "SDWebImageSample\SDWebImageSample.csproj", "{5DC02635-EFC4-420E-9FFE-250CF0E29525}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
9 | Release|iPhoneSimulator = Release|iPhoneSimulator
10 | Debug|iPhone = Debug|iPhone
11 | Release|iPhone = Release|iPhone
12 | Ad-Hoc|iPhone = Ad-Hoc|iPhone
13 | AppStore|iPhone = AppStore|iPhone
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.AppStore|iPhone.Build.0 = AppStore|iPhone
20 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Debug|iPhone.ActiveCfg = Debug|iPhone
21 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Debug|iPhone.Build.0 = Debug|iPhone
22 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Release|iPhone.ActiveCfg = Release|iPhone
25 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Release|iPhone.Build.0 = Release|iPhone
26 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27 | {5DC02635-EFC4-420E-9FFE-250CF0E29525}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
28 | EndGlobalSection
29 | GlobalSection(MonoDevelopProperties) = preSolution
30 | StartupItem = SDWebImageSample\SDWebImageSample.csproj
31 | EndGlobalSection
32 | EndGlobal
33 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace SDWebImageSample
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register ("AppDelegate")]
14 | public partial class AppDelegate : UIApplicationDelegate
15 | {
16 | // class-level declarations
17 | UIWindow window;
18 | MasterViewController masterViewController;
19 | UINavigationController navController;
20 |
21 | //
22 | // This method is invoked when the application has loaded and is ready to run. In this
23 | // method you should instantiate the window, load the UI into it and then make the window
24 | // visible.
25 | //
26 | // You have 17 seconds to return from this method, or iOS will terminate your application.
27 | //
28 | public override bool FinishedLaunching (UIApplication app, NSDictionary options)
29 | {
30 | window = new UIWindow (UIScreen.MainScreen.Bounds);
31 |
32 | masterViewController = new MasterViewController ();
33 | navController = new UINavigationController (masterViewController);
34 |
35 | window.RootViewController = navController;
36 | window.MakeKeyAndVisible ();
37 |
38 | return true;
39 | }
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/DetailViewController.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Drawing;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | using SDWebImage;
9 |
10 | namespace SDWebImageSample
11 | {
12 | public partial class DetailViewController : UIViewController
13 | {
14 | public NSUrl ImageUrl { get; set; }
15 |
16 | UIActivityIndicatorView activityIndicator;
17 |
18 | public DetailViewController () : base ("DetailViewController", null)
19 | {
20 |
21 | }
22 |
23 | public override void DidReceiveMemoryWarning ()
24 | {
25 | // Releases the view if it doesn't have a superview.
26 | base.DidReceiveMemoryWarning ();
27 |
28 | // Release any cached data, images, etc that aren't in use.
29 | }
30 |
31 | public override void ViewDidLoad ()
32 | {
33 | base.ViewDidLoad ();
34 |
35 | configureView ();
36 | }
37 |
38 | void configureView ()
39 | {
40 | if (ImageUrl != null) {
41 | ImageView.SetImage (ImageUrl, null, SDWebImageOptions.ProgressiveDownload, ProgressHandler, CompletedHandler);
42 | }
43 | }
44 |
45 | void ProgressHandler (nint receivedSize, nint expectedSize)
46 | {
47 | if (activityIndicator == null) {
48 | InvokeOnMainThread (() => {
49 | activityIndicator = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.Gray);
50 | ImageView.AddSubview (activityIndicator);
51 | activityIndicator.Center = ImageView.Center;
52 | activityIndicator.StartAnimating ();
53 | });
54 | }
55 | }
56 |
57 | void CompletedHandler (UIImage image, NSError error, SDImageCacheType cacheType, NSUrl url)
58 | {
59 | if (activityIndicator != null) {
60 | InvokeOnMainThread (() => {
61 | activityIndicator.RemoveFromSuperview ();
62 | activityIndicator = null;
63 | });
64 | }
65 | }
66 | }
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/DetailViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Xamarin Studio to store outlets and
4 | // actions made in the UI designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 | using Foundation;
8 | using System.CodeDom.Compiler;
9 |
10 | namespace SDWebImageSample
11 | {
12 | [Register ("DetailViewController")]
13 | partial class DetailViewController
14 | {
15 | [Outlet]
16 | UIKit.UIImageView ImageView { get; set; }
17 |
18 | void ReleaseDesignerOutlets ()
19 | {
20 | if (ImageView != null) {
21 | ImageView.Dispose ();
22 | ImageView = null;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UISupportedInterfaceOrientations
6 |
7 | UIInterfaceOrientationPortrait
8 | UIInterfaceOrientationLandscapeLeft
9 | UIInterfaceOrientationLandscapeRight
10 |
11 | MinimumOSVersion
12 | 6.1
13 |
14 |
15 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace SDWebImageSample
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main (string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main (args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/MasterViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by MonoDevelop to store outlets and
4 | // actions made in the Xcode designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 |
8 | using Foundation;
9 | using System.CodeDom.Compiler;
10 |
11 | namespace SDWebImageSample
12 | {
13 | [Register ("MasterViewController")]
14 | partial class MasterViewController
15 | {
16 | void ReleaseDesignerOutlets ()
17 | {
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/MasterViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/Resources/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/Resources/placeholder.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/Resources/placeholder@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSample/SDWebImageSample/Resources/placeholder@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDWebImageSimpleSampleClassic", "SDWebImageSimpleSample-Classic\SDWebImageSimpleSample-Classic.csproj", "{419000F9-6AD9-4ECE-B742-1C374C7DE9A2}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
9 | Release|iPhoneSimulator = Release|iPhoneSimulator
10 | Debug|iPhone = Debug|iPhone
11 | Release|iPhone = Release|iPhone
12 | Ad-Hoc|iPhone = Ad-Hoc|iPhone
13 | AppStore|iPhone = AppStore|iPhone
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.AppStore|iPhone.Build.0 = AppStore|iPhone
20 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Debug|iPhone.ActiveCfg = Debug|iPhone
21 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Debug|iPhone.Build.0 = Debug|iPhone
22 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Release|iPhone.ActiveCfg = Release|iPhone
25 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Release|iPhone.Build.0 = Release|iPhone
26 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27 | {419000F9-6AD9-4ECE-B742-1C374C7DE9A2}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
28 | EndGlobalSection
29 | GlobalSection(MonoDevelopProperties) = preSolution
30 | StartupItem = SDWebImageSimpleSample\SDWebImageSimpleSample.csproj
31 | EndGlobalSection
32 | EndGlobal
33 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using MonoTouch.Foundation;
6 | using MonoTouch.UIKit;
7 |
8 | namespace SDWebImageSimpleSample
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register ("AppDelegate")]
14 | public partial class AppDelegate : UIApplicationDelegate
15 | {
16 | // class-level declarations
17 | UIWindow window;
18 | SampleViewController viewController;
19 |
20 | //
21 | // This method is invoked when the application has loaded and is ready to run. In this
22 | // method you should instantiate the window, load the UI into it and then make the window
23 | // visible.
24 | //
25 | // You have 17 seconds to return from this method, or iOS will terminate your application.
26 | //
27 | public override bool FinishedLaunching (UIApplication app, NSDictionary options)
28 | {
29 | window = new UIWindow (UIScreen.MainScreen.Bounds);
30 |
31 | viewController = new SampleViewController ();
32 | window.RootViewController = viewController;
33 | window.MakeKeyAndVisible ();
34 |
35 | return true;
36 | }
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UISupportedInterfaceOrientations
6 |
7 | UIInterfaceOrientationPortrait
8 | UIInterfaceOrientationLandscapeLeft
9 | UIInterfaceOrientationLandscapeRight
10 |
11 | MinimumOSVersion
12 | 5.0
13 |
14 |
15 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using MonoTouch.Foundation;
6 | using MonoTouch.UIKit;
7 |
8 | namespace SDWebImageSimpleSample
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main (string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main (args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/Resources/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/Resources/placeholder.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/Resources/placeholder@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/Resources/placeholder@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/SampleViewController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 |
4 | using MonoTouch.Foundation;
5 | using MonoTouch.UIKit;
6 |
7 | using SDWebImage;
8 |
9 | namespace SDWebImageSimpleSample
10 | {
11 | public partial class SampleViewController : UIViewController
12 | {
13 | public SampleViewController () : base ("SampleViewController", null)
14 | {
15 | }
16 |
17 | public override void DidReceiveMemoryWarning ()
18 | {
19 | // Releases the view if it doesn't have a superview.
20 | base.DidReceiveMemoryWarning ();
21 |
22 | // Release any cached data, images, etc that aren't in use.
23 | }
24 |
25 | public override void ViewDidLoad ()
26 | {
27 | base.ViewDidLoad ();
28 |
29 | btnDownload.TouchUpInside += (sender, e) => imageView.SetImage (
30 | new NSUrl ("http://goo.gl/1g7jP"), null, SDWebImageOptions.ProgressiveDownload,
31 | ProgressHandler, CompletedHandler
32 | );
33 | }
34 |
35 | void ProgressHandler (int receivedSize, int expectedSize)
36 | {
37 | if (expectedSize > 0) {
38 | InvokeOnMainThread (()=> {
39 | float progress = (float)receivedSize / (float)expectedSize;
40 | progressBar.SetProgress (progress, true);
41 | lblPercent.Text = "Downloading...";
42 | });
43 | }
44 | }
45 |
46 | void CompletedHandler (UIImage image, NSError error, SDImageCacheType cacheType, NSUrl url)
47 | {
48 | InvokeOnMainThread (()=> lblPercent.Text = "Download Completed");
49 | }
50 | }
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample-Classic/SDWebImageSimpleSample-Classic/SampleViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Xamarin Studio to store outlets and
4 | // actions made in the Xcode designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 | using MonoTouch.Foundation;
8 |
9 | namespace SDWebImageSimpleSample
10 | {
11 | [Register ("SampleViewController")]
12 | partial class SampleViewController
13 | {
14 | [Outlet]
15 | MonoTouch.UIKit.UIImageView imageView { get; set; }
16 |
17 | [Outlet]
18 | MonoTouch.UIKit.UIProgressView progressBar { get; set; }
19 |
20 | [Outlet]
21 | MonoTouch.UIKit.UILabel lblPercent { get; set; }
22 |
23 | [Outlet]
24 | MonoTouch.UIKit.UIButton btnDownload { get; set; }
25 |
26 | void ReleaseDesignerOutlets ()
27 | {
28 | if (imageView != null) {
29 | imageView.Dispose ();
30 | imageView = null;
31 | }
32 |
33 | if (progressBar != null) {
34 | progressBar.Dispose ();
35 | progressBar = null;
36 | }
37 |
38 | if (lblPercent != null) {
39 | lblPercent.Dispose ();
40 | lblPercent = null;
41 | }
42 |
43 | if (btnDownload != null) {
44 | btnDownload.Dispose ();
45 | btnDownload = null;
46 | }
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDWebImageSimpleSample", "SDWebImageSimpleSample\SDWebImageSimpleSample.csproj", "{5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
9 | Release|iPhoneSimulator = Release|iPhoneSimulator
10 | Debug|iPhone = Debug|iPhone
11 | Release|iPhone = Release|iPhone
12 | Ad-Hoc|iPhone = Ad-Hoc|iPhone
13 | AppStore|iPhone = AppStore|iPhone
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.AppStore|iPhone.Build.0 = AppStore|iPhone
20 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Debug|iPhone.ActiveCfg = Debug|iPhone
21 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Debug|iPhone.Build.0 = Debug|iPhone
22 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Release|iPhone.ActiveCfg = Release|iPhone
25 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Release|iPhone.Build.0 = Release|iPhone
26 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27 | {5B29B8CA-FB4F-4E93-9FE6-A9E41CA20D75}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
28 | EndGlobalSection
29 | GlobalSection(MonoDevelopProperties) = preSolution
30 | StartupItem = SDWebImageSimpleSample\SDWebImageSimpleSample.csproj
31 | EndGlobalSection
32 | EndGlobal
33 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace SDWebImageSimpleSample
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register ("AppDelegate")]
14 | public partial class AppDelegate : UIApplicationDelegate
15 | {
16 | // class-level declarations
17 | UIWindow window;
18 | SampleViewController viewController;
19 |
20 | //
21 | // This method is invoked when the application has loaded and is ready to run. In this
22 | // method you should instantiate the window, load the UI into it and then make the window
23 | // visible.
24 | //
25 | // You have 17 seconds to return from this method, or iOS will terminate your application.
26 | //
27 | public override bool FinishedLaunching (UIApplication app, NSDictionary options)
28 | {
29 | window = new UIWindow (UIScreen.MainScreen.Bounds);
30 |
31 | viewController = new SampleViewController ();
32 | window.RootViewController = viewController;
33 | window.MakeKeyAndVisible ();
34 |
35 | return true;
36 | }
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UISupportedInterfaceOrientations
6 |
7 | UIInterfaceOrientationPortrait
8 | UIInterfaceOrientationLandscapeLeft
9 | UIInterfaceOrientationLandscapeRight
10 |
11 | MinimumOSVersion
12 | 6.1
13 |
14 |
15 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace SDWebImageSimpleSample
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main (string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main (args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/Resources/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/Resources/placeholder.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/Resources/placeholder@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/Resources/placeholder@2x.png
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/SampleViewController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 |
4 | using Foundation;
5 | using UIKit;
6 |
7 | using SDWebImage;
8 |
9 | namespace SDWebImageSimpleSample
10 | {
11 | public partial class SampleViewController : UIViewController
12 | {
13 | public SampleViewController () : base ("SampleViewController", null)
14 | {
15 | }
16 |
17 | public override void DidReceiveMemoryWarning ()
18 | {
19 | // Releases the view if it doesn't have a superview.
20 | base.DidReceiveMemoryWarning ();
21 |
22 | // Release any cached data, images, etc that aren't in use.
23 | }
24 |
25 | public override void ViewDidLoad ()
26 | {
27 | base.ViewDidLoad ();
28 |
29 | btnDownload.TouchUpInside += (sender, e) => imageView.SetImage (
30 | new NSUrl ("http://goo.gl/1g7jP"), null, SDWebImageOptions.ProgressiveDownload,
31 | ProgressHandler, CompletedHandler
32 | );
33 | }
34 |
35 | void ProgressHandler (nint receivedSize, nint expectedSize)
36 | {
37 | if (expectedSize > 0) {
38 | InvokeOnMainThread (()=> {
39 | float progress = (float)receivedSize / (float)expectedSize;
40 | progressBar.SetProgress (progress, true);
41 | lblPercent.Text = "Downloading...";
42 | });
43 | }
44 | }
45 |
46 | void CompletedHandler (UIImage image, NSError error, SDImageCacheType cacheType, NSUrl url)
47 | {
48 | InvokeOnMainThread (()=> lblPercent.Text = "Download Completed");
49 | }
50 | }
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/TwinTechsForms/Components/sdwebimage-3.7.1.4/samples/SDWebImageSimpleSample/SDWebImageSimpleSample/SampleViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Xamarin Studio to store outlets and
4 | // actions made in the Xcode designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 | using Foundation;
8 | using System.CodeDom.Compiler;
9 |
10 | namespace SDWebImageSimpleSample
11 | {
12 | [Register ("SampleViewController")]
13 | partial class SampleViewController
14 | {
15 | [Outlet]
16 | UIKit.UIImageView imageView { get; set; }
17 |
18 | [Outlet]
19 | UIKit.UIProgressView progressBar { get; set; }
20 |
21 | [Outlet]
22 | UIKit.UILabel lblPercent { get; set; }
23 |
24 | [Outlet]
25 | UIKit.UIButton btnDownload { get; set; }
26 |
27 | void ReleaseDesignerOutlets ()
28 | {
29 | if (imageView != null) {
30 | imageView.Dispose ();
31 | imageView = null;
32 | }
33 |
34 | if (progressBar != null) {
35 | progressBar.Dispose ();
36 | progressBar = null;
37 | }
38 |
39 | if (lblPercent != null) {
40 | lblPercent.Dispose ();
41 | lblPercent = null;
42 | }
43 |
44 | if (btnDownload != null) {
45 | btnDownload.Dispose ();
46 | btnDownload = null;
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/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 |
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/DummyIncludes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content;
5 | using Android.Content.PM;
6 | using Android.Runtime;
7 | using Android.Views;
8 | using Android.Widget;
9 | using Android.OS;
10 | using TwinTechs.Example;
11 | using TwinTechs.Droid.Controls;
12 | using TwinTechs;
13 | using Android.Util;
14 | using System.Runtime.InteropServices;
15 | using XLabs.Forms.Controls;
16 |
17 | namespace TwinTechsFormsExample.Droid
18 | {
19 | class DummyIncludes
20 | {
21 | public PageViewContainerRenderer _PageViewContainerRenderer;
22 | public GridViewRenderer _GridViewRenderer;
23 | }
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using Android.App;
4 |
5 | // Information about this assembly is defined by the following attributes.
6 | // Change them to the values specific to your project.
7 |
8 | [assembly: AssemblyTitle ("TwinTechsFormsExample.Droid")]
9 | [assembly: AssemblyDescription ("")]
10 | [assembly: AssemblyConfiguration ("")]
11 | [assembly: AssemblyCompany ("")]
12 | [assembly: AssemblyProduct ("")]
13 | [assembly: AssemblyCopyright ("georgecook")]
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.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 |
29 |
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/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 |
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twintechs/TwinTechsFormsLib/b9ebe9a1b8cd78e85c2b075ec5b4b5a1df9c860d/TwinTechsForms/Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/TwinTechsForms/Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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 ("TwinTechsLib")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("georgecook")]
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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Controls/FastCell.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using System.Runtime.CompilerServices;
4 |
5 | [assembly: InternalsVisibleTo ("TwinTechsLib.iOS")]
6 | [assembly: InternalsVisibleTo ("TwinTechsLib.Droid")]
7 | namespace TwinTechs.Controls
8 | {
9 | /*
10 | * a view which can be used as a cell in order to get optimum performance
11 | */
12 | public abstract class FastCell : ViewCell
13 | {
14 | public bool IsInitialized {
15 | get;
16 | private set;
17 | }
18 |
19 | // public Layout Content { get; set; }
20 |
21 | ///
22 | /// Initializes the cell.
23 | ///
24 | public void PrepareCell ()
25 | {
26 | InitializeCell ();
27 | if (BindingContext != null) {
28 | SetupCell (false);
29 | }
30 | IsInitialized = true;
31 | }
32 |
33 | protected override void OnBindingContextChanged ()
34 | {
35 | base.OnBindingContextChanged ();
36 | if (IsInitialized) {
37 | SetupCell (true);
38 | }
39 | }
40 |
41 | ///
42 | /// Setups the cell. You should call InitializeComponent in here
43 | ///
44 | protected abstract void InitializeCell ();
45 |
46 | ///
47 | /// Do your cell setup using the binding context in here.
48 | ///
49 | /// If set to true is recycled.
50 | protected abstract void SetupCell (bool isRecycled);
51 |
52 | internal object OriginalBindingContext;
53 | }
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Controls/FastImage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using System.Diagnostics;
5 |
6 | namespace TwinTechs.Controls
7 | {
8 | public interface IFastImageProvider
9 | {
10 | void SetImageUrl (string imageUrl);
11 | }
12 |
13 | public class FastImage : Image
14 | {
15 |
16 | public FastImage ()
17 | {
18 |
19 | }
20 |
21 | public static readonly BindableProperty ImageUrlProperty = BindableProperty.Create (w => w.ImageUrl, null);
22 |
23 | ///
24 | /// sets the image URL.
25 | ///
26 | /// The image URL.
27 | public string ImageUrl {
28 | get { return (string)GetValue (ImageUrlProperty); }
29 | set {
30 | SetValue (ImageUrlProperty, value);
31 | }
32 | }
33 | }
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Controls/IFastCellCache.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace TwinTechs.Controls
5 | {
6 | public interface IFastCellCache
7 | {
8 | ///
9 | /// Flushs all caches.
10 | ///
11 | void FlushAllCaches ();
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Controls/IScrollAwareElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TwinTechs.Controls
4 | {
5 | public class ControlScrollEventArgs : EventArgs
6 | {
7 | public float Delta { get; set; }
8 |
9 | public float CurrentY { get; set; }
10 |
11 | public ControlScrollEventArgs (float delta, float currentY)
12 | {
13 | this.Delta = delta;
14 | this.CurrentY = currentY;
15 | }
16 |
17 | }
18 |
19 | public interface IScrollAwareElement
20 | {
21 | event EventHandler OnStartScroll;
22 | event EventHandler OnStopScroll;
23 | event EventHandler OnScroll;
24 |
25 | void RaiseOnScroll (float delta, float currentY);
26 |
27 | void RaiseOnStartScroll ();
28 |
29 | void RaiseOnStopScroll ();
30 | }
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Controls/PageViewContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace TwinTechs.Controls
5 | {
6 | //specialized class for showing a page within a page
7 | public class PageViewContainer : View
8 | {
9 | public PageViewContainer ()
10 | {
11 | }
12 |
13 | public static readonly BindableProperty ContentProperty = BindableProperty.Create (s => s.Content, null);
14 |
15 | public Page Content {
16 | get{ return (Page)GetValue (ContentProperty); }
17 | set{ SetValue (ContentProperty, value); }
18 | }
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Controls/ViewEffectExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TwinTechs.Controls
4 | {
5 | public enum ViewMaskerType
6 | {
7 | None = 0,
8 | Circle = 1,
9 | Triangle = 2,
10 | Square = 3
11 | }
12 |
13 | public interface IViewEffectExtensionProvider
14 | {
15 | void ApplyMaskToView (Xamarin.Forms.View view, ViewMaskerType maskType);
16 |
17 | void ToggleViewShadow (Xamarin.Forms.View view, bool isOn);
18 | }
19 |
20 | public static class ViewEffectExtensions
21 | {
22 | public static IViewEffectExtensionProvider ViewExtensionProvider { get; set; }
23 |
24 | public static void ApplyMask (this Xamarin.Forms.View view, ViewMaskerType maskType)
25 | {
26 | ViewExtensionProvider.ApplyMaskToView (view, maskType);
27 | }
28 |
29 | public static void ToggleShadow (this Xamarin.Forms.View view, bool isOn)
30 | {
31 | ViewExtensionProvider.ToggleViewShadow (view, isOn);
32 | }
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Extensions/PointExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace TwinTechs.Extensions
5 | {
6 | public static class PointExtensions
7 | {
8 | ///
9 | /// more readable point for debugging
10 | ///
11 | /// point with 2 decimal places.
12 | /// Point.
13 | public static string PrettyPrint (this Point point)
14 | {
15 | return string.Format ("[{0:0.0},{1:0.0}]", point.X, point.Y);
16 | }
17 |
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Extensions/ViewExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace TwinTechs.Extensions
5 | {
6 | public static class ViewExtensions
7 | {
8 | ///
9 | /// Gets the page to which an element belongs
10 | ///
11 | /// The page.
12 | /// Element.
13 | public static Page GetParentPage (this VisualElement element)
14 | {
15 | if (element != null) {
16 | var parent = element.Parent;
17 | while (parent != null) {
18 | if (parent is Page) {
19 | return parent as Page;
20 | }
21 | parent = parent.Parent;
22 | }
23 | }
24 | return null;
25 | }
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/Converters/SwipeGestureRecognizerDirectonConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using System.Globalization;
4 |
5 | namespace TwinTechs.Gestures.Converters
6 | {
7 | public class SwipeGestureRecognizerDirectonConverter :IValueConverter
8 | {
9 | public SwipeGestureRecognizerDirectonConverter ()
10 | {
11 | }
12 |
13 | #region IValueConverter implementation
14 |
15 | public object Convert (object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | var directionName = value as string;
18 | switch (directionName) {
19 | case "Left":
20 | return SwipeGestureRecognizerDirection.Left;
21 | case "Right":
22 | return SwipeGestureRecognizerDirection.Right;
23 | case "Up":
24 | return SwipeGestureRecognizerDirection.Up;
25 | case "Down":
26 | return SwipeGestureRecognizerDirection.Down;
27 | default:
28 | throw new ArgumentException ("unsupported direction " + directionName);
29 | }
30 | }
31 |
32 | public object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture)
33 | {
34 | throw new NotImplementedException ();
35 | }
36 |
37 | #endregion
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/INativeGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace TwinTechs.Gestures
5 | {
6 | public interface INativeGestureRecognizer
7 | {
8 | int NumberOfTouches { get; }
9 |
10 | Point LocationInView (VisualElement view);
11 |
12 | Point LocationOfTouch (int touchIndex, VisualElement view);
13 |
14 | GestureRecognizerState State { get; }
15 |
16 | void UpdateCancelsTouchesInView (bool _cancelsTouchesInView);
17 |
18 | void UpdateDelaysTouches (bool _delaysTouches);
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/INativeGestureRecognizerCoordinator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TwinTechs.Gestures
4 | {
5 | ///
6 | /// Interface for providing orchestration of multiple gestures on a view.
7 | /// Currently only used by Android.
8 | ///
9 | public interface INativeGestureRecognizerCoordinator
10 | {
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/INativeGestureRecognizerFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TwinTechs.Gestures
4 | {
5 | public interface INativeGestureRecognizerFactory
6 | {
7 | ///
8 | /// Creates the native gesture recognizer.
9 | ///
10 | /// Recognizer.
11 | /// The 1st type parameter.
12 | void AddNativeGestureRecognizerToRecgonizer (T recognizer) where T : BaseGestureRecognizer;
13 |
14 | ///
15 | /// Removes the recognizer.
16 | ///
17 | /// Recognizer.
18 | void RemoveRecognizer (BaseGestureRecognizer recognizer);
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/LongPressGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TwinTechs.Gestures
4 | {
5 | public class LongPressGestureRecognizer : BaseGestureRecognizer
6 | {
7 | ///
8 | /// Gets or sets the minimum duration of the press.
9 | ///
10 | /// The minimum duration of the press.
11 | public double MinimumPressDuration { get; set; }
12 |
13 | ///
14 | /// Gets or sets the number of touches required.
15 | ///
16 | /// The number of touches required.
17 | public int NumberOfTouchesRequired { get; set; }
18 |
19 | ///
20 | /// Gets or sets the max distance a finger can move before failing a long press.
21 | ///
22 | /// The max distance before fail.
23 | public int MaxDistanceTolerance { get; set; }
24 |
25 |
26 | public LongPressGestureRecognizer ()
27 | {
28 | MinimumPressDuration = 1;
29 | NumberOfTouchesRequired = 1;
30 | MaxDistanceTolerance = 5;
31 | }
32 |
33 | public override string ToString ()
34 | {
35 | return string.Format ("[LongPressGestureRecognizer: MinimumPressDuration={0}, NumberOfTouchesRequired={1}, MaxDistanceTolerance={2}, State={2}]", MinimumPressDuration, NumberOfTouchesRequired, MaxDistanceTolerance, State);
36 | }
37 |
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/PanGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace TwinTechs.Gestures
5 | {
6 | public interface INativePanGestureRecognizer : INativeGestureRecognizer
7 | {
8 | Point GetVelocityInView (VisualElement view);
9 |
10 | void SetTranslationInView (Point translation, VisualElement view);
11 |
12 | Point GetTranslationInView (VisualElement view);
13 | }
14 |
15 | public class PanGestureRecognizer : BaseGestureRecognizer
16 | {
17 | public int MinimumNumberOfTouches { get; set; }
18 |
19 | public int MaximumNumberOfTouches { get; set; }
20 |
21 |
22 | public Point GetVelocityInView (VisualElement view)
23 | {
24 | return (NativeGestureRecognizer as INativePanGestureRecognizer).GetVelocityInView (view);
25 | }
26 |
27 | public void SetTranslationInView (Point translation, VisualElement view)
28 | {
29 | (NativeGestureRecognizer as INativePanGestureRecognizer).SetTranslationInView (translation, view);
30 | }
31 |
32 | public Point GetTranslationInView (VisualElement view)
33 | {
34 | return (NativeGestureRecognizer as INativePanGestureRecognizer).GetTranslationInView (view);
35 | }
36 |
37 | public PanGestureRecognizer ()
38 | {
39 | MinimumNumberOfTouches = 1;
40 | MaximumNumberOfTouches = 1;
41 | }
42 |
43 | public override string ToString ()
44 | {
45 | return string.Format ("[PanGestureRecognizer: MinimumNumberOfTouches={0}, MaximumNumberOfTouches={1}, State={2}]", MinimumNumberOfTouches, MaximumNumberOfTouches, State);
46 | }
47 |
48 | }
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/PinchGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace TwinTechs.Gestures
5 | {
6 |
7 | public interface INativePinchGestureRecognizer : INativeGestureRecognizer
8 | {
9 | float Scale ();
10 |
11 | float Velocity ();
12 | }
13 |
14 |
15 | public class PinchGestureRecognizer : BaseGestureRecognizer
16 | {
17 | public float Scale ()
18 | {
19 | return (NativeGestureRecognizer as INativePinchGestureRecognizer).Scale ();
20 | }
21 |
22 | public float Velocity ()
23 | {
24 | return (NativeGestureRecognizer as INativePinchGestureRecognizer).Velocity ();
25 | }
26 |
27 | public PinchGestureRecognizer ()
28 | {
29 | }
30 |
31 |
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/SwipeGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using System.ComponentModel;
4 | using System.Diagnostics;
5 | using System.Runtime.CompilerServices;
6 | using TwinTechs.Gestures.Converters;
7 |
8 |
9 | [assembly:
10 | InternalsVisibleTo ("TwinTechsLib.iOS"),
11 | InternalsVisibleTo ("TwinTechsLib.Droid")]
12 | namespace TwinTechs.Gestures
13 | {
14 | public enum SwipeGestureRecognizerDirection
15 | {
16 | Right = 1,
17 | Left = 2,
18 | Up = 4,
19 | Down = 8
20 | }
21 |
22 | public class SwipeGestureRecognizer : BaseGestureRecognizer
23 | {
24 |
25 | public int NumberOfTouchesRequired { get; set; }
26 |
27 | public SwipeGestureRecognizerDirection Direction { get; set; }
28 |
29 | public SwipeGestureRecognizer ()
30 | {
31 | NumberOfTouchesRequired = 1;
32 | }
33 |
34 | public override string ToString ()
35 | {
36 | return string.Format ("[SwipeGestureRecognizer: NumberOfTouchesRequired={0}, Direction={1} State={2}]", NumberOfTouchesRequired, Direction, State);
37 | }
38 |
39 |
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/TwinTechs/Gestures/TapGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 |
5 | namespace TwinTechs.Gestures
6 | {
7 | public interface ITapGestureRecognizer : INativeGestureRecognizer
8 | {
9 | }
10 |
11 | public class TapGestureRecognizer : BaseGestureRecognizer
12 | {
13 | public TapGestureRecognizer ()
14 | {
15 | NumberOfTapsRequired = 1;
16 | NumberOfTouchesRequired = 1;
17 | }
18 |
19 | public int NumberOfTapsRequired { get; set; }
20 |
21 | public int NumberOfTouchesRequired { get; set; }
22 |
23 | public override string ToString ()
24 | {
25 | return string.Format ("[TapGestureRecognizer: NumberOfTapsRequired={0}, NumberOfTouchesRequired={1}, State={2}]", NumberOfTapsRequired, NumberOfTouchesRequired, State);
26 | }
27 |
28 | }
29 | }
30 |
31 |
32 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/XLabs/Forms/Controls/FastGridCell.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace XLabs.Forms.Controls
5 | {
6 | public abstract class FastGridCell : ViewCell
7 | {
8 | public bool IsInitialized {
9 | get;
10 | private set;
11 | }
12 |
13 | public Size CellSize { get; private set; }
14 |
15 | ///
16 | /// passes in the cell size as a convenience
17 | ///
18 | /// Cell size.
19 | public void PrepareCell (Size cellSize)
20 | {
21 | CellSize = cellSize;
22 | InitializeCell ();
23 | if (BindingContext != null) {
24 | SetupCell (false);
25 | }
26 | IsInitialized = true;
27 | }
28 |
29 | protected override void OnBindingContextChanged ()
30 | {
31 | base.OnBindingContextChanged ();
32 | if (IsInitialized) {
33 | SetupCell (true);
34 | }
35 | }
36 |
37 | ///
38 | /// Setups the cell. You should call InitializeComponent in here
39 | ///
40 | protected abstract void InitializeCell ();
41 |
42 | ///
43 | /// Do your cell setup using the binding context in here.
44 | ///
45 | /// If set to true is recycled.
46 | protected abstract void SetupCell (bool isRecycled);
47 |
48 | ///
49 | /// Called when the size of the view changes. Override to do layout task if required
50 | ///
51 | /// Size.
52 | public virtual void OnSizeChanged (Size size)
53 | {
54 |
55 | }
56 |
57 | ///
58 | /// Override if you are intereted in when a cell moves (for parallaxe effects etc)
59 | ///
60 | /// Content offset.
61 | /// Cell location.
62 | public virtual void OnScroll (Point contentOffset, Point cellLocation)
63 | {
64 |
65 | }
66 | }
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/XLabs/GridEventArgs{T}.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace XLabs
4 | {
5 | ///
6 | /// Generic event argument class
7 | ///
8 | /// Type of the argument
9 | public class GridEventArgs : EventArgs
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// Value of the argument
15 | public GridEventArgs (T value)
16 | {
17 | this.Value = value;
18 | }
19 |
20 | ///
21 | /// Gets the value of the event argument
22 | ///
23 | public T Value { get; private set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Core/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Droid/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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Droid/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | TwinTechsLib.Droid
4 |
5 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Droid/TwinTechs/Droid/Controls/FastImageRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using TwinTechs.Controls;
4 | using Xamarin.Forms.Platform.Android;
5 | using MonoDroidToolkit.ImageLoader;
6 | using TwinTechs.Droid.Controls;
7 |
8 |
9 | [assembly: ExportRenderer (typeof(FastImage), typeof(FastImageRenderer))]
10 | namespace TwinTechs.Droid.Controls
11 | {
12 | public class FastImageRenderer : ImageRenderer
13 | {
14 | ImageLoader _imageLoader;
15 |
16 | protected override void OnElementChanged (ElementChangedEventArgs e)
17 | {
18 | base.OnElementChanged (e);
19 | // if (e.OldElement != null) {
20 | // ((FastImage)e.OldElement).ImageProvider = null;
21 | // }
22 | if (e.NewElement != null) {
23 | var fastImage = e.NewElement as FastImage;
24 | _imageLoader = ImageLoaderCache.GetImageLoader (this);
25 | SetImageUrl (fastImage.ImageUrl);
26 | }
27 | }
28 |
29 | protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
30 | {
31 | base.OnElementPropertyChanged (sender, e);
32 | if (e.PropertyName == "ImageUrl") {
33 | var fastImage = Element as FastImage;
34 | SetImageUrl (fastImage.ImageUrl);
35 | }
36 | }
37 |
38 |
39 | public void SetImageUrl (string imageUrl)
40 | {
41 | if (Control == null) {
42 | return;
43 | }
44 | if (imageUrl != null) {
45 | _imageLoader.DisplayImage (imageUrl, Control, -1);
46 |
47 | }
48 | }
49 | }
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Droid/TwinTechs/Droid/Controls/ImageLoaderCache.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using MonoDroidToolkit.ImageLoader;
3 |
4 | namespace TwinTechs.Droid.Controls
5 | {
6 | /**
7 | * caches available image loaders.
8 | * TODO this needs to be written
9 | */
10 | public static class ImageLoaderCache
11 | {
12 | //TODO change to a proper dictionary
13 | static ImageLoader _onlyLoader;
14 |
15 | public static ImageLoader GetImageLoader (FastImageRenderer imageRenderer)
16 | {
17 | //TODO
18 | if (_onlyLoader == null) {
19 | _onlyLoader = new ImageLoader (Android.App.Application.Context, 64, 40);
20 | }
21 | return _onlyLoader;
22 | }
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Droid/TwinTechs/Gestures/NativePinchGestureRecgonizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.Views;
3 |
4 | namespace TwinTechs.Gestures
5 | {
6 | public class NativePinchGestureRecgonizer: BaseNativeGestureRecognizer, INativePinchGestureRecognizer
7 | {
8 | public NativePinchGestureRecgonizer ()
9 | {
10 | }
11 |
12 | float _scale = 1.0f;
13 | float _velocity = 0.0f;
14 |
15 | #region implemented abstract members of BaseNativeGestureRecognizer
16 |
17 | internal override void ProcessMotionEvent (GestureMotionEvent e)
18 | {
19 | }
20 |
21 | #endregion
22 |
23 | public float Scale ()
24 | {
25 | return _scale;
26 | }
27 |
28 | public float Velocity ()
29 | {
30 | return _velocity;
31 | }
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/Extensions/SizeExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NGraphics;
3 |
4 | namespace TwinTechsForms.NControl {
5 | public static class SizeExtensions
6 | {
7 | public static double ScaleThatFits (this Size size, Size max)
8 | {
9 | if (size == max || max.Width == 0 || max.Height == 0 || size.Width == 0 || size.Height == 0) {
10 | return 1;
11 | }
12 |
13 | double widthScale = max.Width / size.Width;
14 | double heightScale = max.Height / size.Height;
15 | double fitScale = (double)Math.Min (widthScale, heightScale);
16 | return fitScale;
17 | }
18 |
19 | public static Size ScaleProportional (this Size size, Size max)
20 | {
21 | double fitScale = size.ScaleThatFits (max);
22 | if (fitScale == 1) {
23 | return size;
24 | }
25 |
26 | Size scaledSize = new Size (size.Width * fitScale, size.Height * fitScale);
27 | return scaledSize;
28 | }
29 |
30 | public static Size ScaleDownProportional (this Size size, Size max)
31 | {
32 | if (size.Width <= max.Width && size.Height <= max.Height) {
33 | return size;
34 | }
35 | return size.ScaleProportional (max);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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 ("TwinTechsForms.NControl.SvgImageView")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("Twin Technologies, Inc.")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("")]
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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/TwinTechsForms.NControl.SvgImageView.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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("TwinTechsForms.NControl.SvgImageView.Android")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("Twin Technologies, Inc.")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("")]
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.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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/TwinTechsForms.NControl.SvgImageView.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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/TwinTechsForms.NControl.SvgImageView.Android/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | NControl.Control.SvgImageView.Android
4 |
5 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/TwinTechsForms.NControl.SvgImageView.Android/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/TwinTechsForms.NControl.SvgImageView.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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 ("TwinTechsForms.NControl.SvgImageView.iOS")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("Twin Technologies, Inc.")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("")]
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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/TwinTechsForms.NControl.SvgImageView.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.NControl.SvgImageView/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/Extensions/SizeExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NGraphics;
3 |
4 | namespace TwinTechs.Extensions
5 | {
6 | public static class SizeExtensions
7 | {
8 | public static double ScaleThatFits (this Size size, Size max)
9 | {
10 | if (size == max || max.Width == 0 || max.Height == 0 || size.Width == 0 || size.Height == 0) {
11 | return 1;
12 | }
13 |
14 | double widthScale = max.Width / size.Width;
15 | double heightScale = max.Height / size.Height;
16 | double fitScale = (double)Math.Min (widthScale, heightScale);
17 | return fitScale;
18 | }
19 |
20 | public static Size ScaleProportional (this Size size, Size max)
21 | {
22 | double fitScale = size.ScaleThatFits (max);
23 | if (fitScale == 1) {
24 | return size;
25 | }
26 |
27 | Size scaledSize = new Size (size.Width * fitScale, size.Height * fitScale);
28 | return scaledSize;
29 | }
30 |
31 | public static Size ScaleDownProportional (this Size size, Size max)
32 | {
33 | if (size.Width <= max.Width && size.Height <= max.Height) {
34 | return size;
35 | }
36 | return size.ScaleProportional (max);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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 ("TwinTechsForms.Core.SvgImage")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("Twin Technologies, Inc.")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("")]
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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/TwinTechsForms.SvgImage.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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 ("TwinTechsForms.SvgImage.Droid")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("Twin Technologies, Inc.")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("")]
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.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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/TwinTechsForms.SvgImage.Droid/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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/TwinTechsForms.SvgImage.Droid/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | TwinTechsForms.SvgImage.Droid
4 |
5 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/TwinTechsForms.SvgImage.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/TwinTechsForms.SvgImage.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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 ("TwinTechsForms.SvgImage.iOS")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("Twin Technologies, Inc.")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("")]
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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/TwinTechsForms.SvgImage.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.SvgImage/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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 ("TwinTechsLib.iOS")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("georgecook")]
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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Gestures/NativeGestureRecognizerFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace TwinTechs.Gestures
5 | {
6 | ///
7 | /// Creates gesture recognizers
8 | ///
9 | public class NativeGestureRecognizerFactory : INativeGestureRecognizerFactory
10 | {
11 | #region INativeGestureRecognizerFactory implementation
12 |
13 | Dictionary TypeDictionary = new Dictionary () {
14 | { typeof(SwipeGestureRecognizer) , typeof(NativeSwipeGestureRecognizer) },
15 | { typeof(PanGestureRecognizer) , typeof(NativePanGestureRecognizer) },
16 | { typeof(PinchGestureRecognizer) , typeof(NativePinchGestureRecognizer) },
17 | { typeof(LongPressGestureRecognizer) , typeof(NativeLongPressGestureRecgonizer) },
18 | { typeof(TwinTechs.Gestures.TapGestureRecognizer) , typeof(NativeTapPressGestureRecgonizer) },
19 | };
20 |
21 | public void AddNativeGestureRecognizerToRecgonizer (T recognizer) where T : BaseGestureRecognizer
22 | {
23 | if (!TypeDictionary.ContainsKey (recognizer.GetType ())) {
24 | throw new ArgumentException ("no native gesture recognizer for this forms recognizer " + recognizer.GetType ());
25 | }
26 | var targetType = TypeDictionary [recognizer.GetType ()];
27 | var nativeRecongizer = (IBaseNativeGestureRecognizerImpl)Activator.CreateInstance (targetType);
28 | nativeRecongizer.AddRecognizer (recognizer);
29 | recognizer.NativeGestureRecognizer = nativeRecongizer;
30 | }
31 |
32 |
33 | public INativeGestureRecognizerCoordinator CreateNativeGestureCoordinator ()
34 | {
35 | throw new InvalidOperationException ("iOS does not use the native gesture coordinator.");
36 | }
37 |
38 |
39 | public void RemoveRecognizer (BaseGestureRecognizer recognizer)
40 | {
41 | var nativeRecognizer = recognizer.NativeGestureRecognizer as IBaseNativeGestureRecognizerImpl;
42 | nativeRecognizer.RemoveRecognizer (recognizer);
43 | }
44 |
45 | #endregion
46 |
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Gestures/NativeLongPressGestureRecgonizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 |
4 | namespace TwinTechs.Gestures
5 | {
6 | public class NativeLongPressGestureRecgonizer : BaseNativeGestureRecognizer
7 | {
8 | public NativeLongPressGestureRecgonizer ()
9 | {
10 | }
11 |
12 | protected override void ConfigureNativeGestureRecognizer ()
13 | {
14 | base.ConfigureNativeGestureRecognizer ();
15 | NativeRecognizer.MinimumPressDuration = Recognizer.MinimumPressDuration;
16 | }
17 | }
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Gestures/NativePanGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 | using System.Drawing;
4 | using Xamarin.Forms;
5 | using Xamarin.Forms.Platform.iOS;
6 | using TwinTechs.Ios.Extensions;
7 | using CoreGraphics;
8 |
9 | namespace TwinTechs.Gestures
10 | {
11 | public class NativePanGestureRecognizer : BaseNativeGestureRecognizer
12 | , INativePanGestureRecognizer
13 | {
14 | public NativePanGestureRecognizer ()
15 | {
16 | }
17 |
18 | #region overridden
19 |
20 | protected override void ConfigureNativeGestureRecognizer ()
21 | {
22 | base.ConfigureNativeGestureRecognizer ();
23 | NativeRecognizer.MinimumNumberOfTouches = (nuint)Recognizer.MinimumNumberOfTouches;
24 | NativeRecognizer.MaximumNumberOfTouches = (nuint)Recognizer.MaximumNumberOfTouches;
25 | }
26 |
27 | #endregion
28 |
29 | #region INativePanGestureRecognizer impl
30 |
31 | public Xamarin.Forms.Point GetVelocityInView (VisualElement view)
32 | {
33 | var renderer = view.GetRenderer ();
34 | return NativeRecognizer.VelocityInView (renderer.NativeView).ToPoint ();
35 | }
36 |
37 | public Xamarin.Forms.Point GetTranslationInView (VisualElement view)
38 | {
39 | var renderer = view.GetRenderer ();
40 | if (renderer == null || renderer.NativeView == null) {
41 | //TODO -not sure why this isn't working on iOS. very weird.
42 | return new Xamarin.Forms.Point (0, 0);
43 | }
44 | return NativeRecognizer.TranslationInView (renderer.NativeView).ToPoint ();
45 | }
46 |
47 | public void SetTranslationInView (Xamarin.Forms.Point translation, VisualElement view)
48 | {
49 | var renderer = view.GetRenderer ();
50 | NativeRecognizer.SetTranslation (new CGPoint (translation.X, translation.Y), renderer.NativeView);
51 | }
52 |
53 | #endregion
54 |
55 |
56 | }
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Gestures/NativePinchGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 | using Xamarin.Forms;
4 |
5 | namespace TwinTechs.Gestures
6 | {
7 | public class NativePinchGestureRecognizer : BaseNativeGestureRecognizer
8 | , INativePinchGestureRecognizer
9 | {
10 | public Xamarin.Forms.Point GetVelocityInView (Xamarin.Forms.VisualElement view)
11 | {
12 | throw new NotImplementedException ();
13 | }
14 |
15 | public Xamarin.Forms.Point GetTranslationInView (Xamarin.Forms.VisualElement view)
16 | {
17 | throw new NotImplementedException ();
18 | }
19 |
20 |
21 |
22 |
23 | public NativePinchGestureRecognizer ()
24 | {
25 | }
26 |
27 | public float Velocity ()
28 | {
29 | return (float)NativeRecognizer.Velocity;
30 | }
31 |
32 |
33 | public float Scale ()
34 | {
35 | return (float)NativeRecognizer.Scale;
36 | }
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Gestures/NativeSwipeGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Platform.iOS;
4 | using UIKit;
5 | using CoreImage;
6 | using Foundation;
7 |
8 | namespace TwinTechs.Gestures
9 | {
10 | public class NativeSwipeGestureRecognizer : BaseNativeGestureRecognizer
11 | {
12 | public NativeSwipeGestureRecognizer ()
13 | {
14 | }
15 |
16 | #region abstract impl
17 |
18 | protected override void ConfigureNativeGestureRecognizer ()
19 | {
20 | base.ConfigureNativeGestureRecognizer ();
21 | NativeRecognizer.Direction = (UISwipeGestureRecognizerDirection)Recognizer.Direction;
22 | NativeRecognizer.NumberOfTouchesRequired = (nuint)Recognizer.NumberOfTouchesRequired;
23 | }
24 |
25 | #endregion
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Gestures/NativeTapGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 |
4 | namespace TwinTechs.Gestures
5 | {
6 | public class NativeTapPressGestureRecgonizer : BaseNativeGestureRecognizer, ITapGestureRecognizer
7 | {
8 | public NativeTapPressGestureRecgonizer ()
9 | {
10 | }
11 |
12 | protected override void ConfigureNativeGestureRecognizer ()
13 | {
14 | base.ConfigureNativeGestureRecognizer ();
15 | NativeRecognizer.NumberOfTouchesRequired = (nuint)Recognizer.NumberOfTouchesRequired;
16 | NativeRecognizer.NumberOfTapsRequired = (nuint)Recognizer.NumberOfTapsRequired;
17 | }
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Ios/Controls/FastImageRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms.Platform.iOS;
3 | using UIKit;
4 | using SDWebImage;
5 | using Foundation;
6 | using TwinTechs.Controls;
7 | using Xamarin.Forms;
8 | using TwinTechs.Ios.Controls;
9 |
10 | [assembly: ExportRenderer (typeof(FastImage), typeof(FastImageRenderer))]
11 | namespace TwinTechs.Ios.Controls
12 | {
13 | public class FastImageRenderer : ImageRenderer, IFastImageProvider
14 | {
15 | public FastImageRenderer ()
16 | {
17 | }
18 |
19 | protected override void OnElementChanged (ElementChangedEventArgs e)
20 | {
21 | base.OnElementChanged (e);
22 | // if (e.OldElement != null) {
23 | // ((FastImage)e.OldElement).ImageProvider = null;
24 | // }
25 | if (e.NewElement != null) {
26 | var fastImage = e.NewElement as FastImage;
27 | SetImageUrl (fastImage.ImageUrl);
28 | }
29 | }
30 |
31 | protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
32 | {
33 | base.OnElementPropertyChanged (sender, e);
34 | if (e.PropertyName == "ImageUrl") {
35 | var fastImage = Element as FastImage;
36 | SetImageUrl (fastImage.ImageUrl);
37 | }
38 | }
39 |
40 | #region FastImageProvider implementation
41 |
42 | public void SetImageUrl (string imageUrl)
43 | {
44 | if (Control == null) {
45 | return;
46 | }
47 | if (imageUrl != null) {
48 | Control.SetImage (
49 | url: new NSUrl (imageUrl),
50 | placeholder: UIImage.FromBundle ("placeholder.png")
51 | );
52 | } else {
53 | // Control.Image = UIImage.FromBundle ("placeholder.png");
54 | }
55 | }
56 |
57 | #endregion
58 | }
59 | }
60 |
61 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Ios/Extensions/UIViewControllerExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 |
4 | namespace TwinTechs.Ios.Extensions
5 | {
6 | public static class UIViewControllerExtensions
7 | {
8 | public static UIViewController GetViewController (this UIView view)
9 | {
10 | var responder = (UIResponder)view;
11 | while (responder != null && !(responder is UIViewController)) {
12 | responder = responder.NextResponder;
13 | }
14 |
15 | return (UIViewController)responder;
16 | }
17 | }
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/TwinTechs/Ios/Extensions/ViewExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms.Platform.iOS;
3 | using Xamarin.Forms;
4 |
5 | namespace TwinTechs.Ios.Extensions
6 | {
7 | public static class ViewExtensions
8 | {
9 |
10 | /***
11 | * Thanks to Adam Kemp for generously making this code available.
12 | * If you are reading this, please petition Xamarin to give us public access to the GetRenderer method:
13 | * https://bugzilla.xamarin.com/show_bug.cgi?id=30467
14 | */
15 |
16 | #region GetRenderer Hack
17 |
18 | private delegate IVisualElementRenderer GetRendererDelegate (BindableObject bindable);
19 |
20 | private static GetRendererDelegate _getRendererDelegate;
21 |
22 | public static IVisualElementRenderer GetRenderer (this BindableObject bindable)
23 | {
24 | if (bindable == null) {
25 | return null;
26 | }
27 |
28 | if (_getRendererDelegate == null) {
29 | var assembly = typeof(EntryRenderer).Assembly;
30 | var platformType = assembly.GetType ("Xamarin.Forms.Platform.iOS.Platform");
31 | var method = platformType.GetMethod ("GetRenderer");
32 | _getRendererDelegate = (GetRendererDelegate)method.CreateDelegate (typeof(GetRendererDelegate));
33 | }
34 |
35 | var value = _getRendererDelegate (bindable);
36 |
37 | return value;
38 | }
39 |
40 | #endregion
41 | }
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/XLabs/Forms/Controls/GridView/GridViewDelegate.cs:
--------------------------------------------------------------------------------
1 | using CoreGraphics;
2 |
3 | namespace XLabs.Forms.Controls
4 | {
5 | using Foundation;
6 | using UIKit;
7 |
8 | ///
9 | /// Class GridViewDelegate.
10 | ///
11 | public class GridViewDelegate: UICollectionViewDelegate
12 | {
13 | ///
14 | /// Delegate OnItemSelected
15 | ///
16 | /// The table view.
17 | /// The index path.
18 | public delegate void OnItemSelected (UICollectionView tableView, NSIndexPath indexPath);
19 |
20 | public delegate void OnScrolled (CGPoint contentOffset);
21 |
22 | ///
23 | /// The _on item selected
24 | ///
25 | private readonly OnItemSelected _onItemSelected;
26 | private readonly OnScrolled _onScrolled;
27 |
28 |
29 | ///
30 | /// Initializes a new instance of the class.
31 | ///
32 | /// The on item selected.
33 | public GridViewDelegate (OnItemSelected onItemSelected, OnScrolled onScrolled)
34 | {
35 | _onItemSelected = onItemSelected;
36 | _onScrolled = onScrolled;
37 | }
38 |
39 | ///
40 | /// Items the selected.
41 | ///
42 | /// The collection view.
43 | /// The index path.
44 | public override void ItemSelected (UICollectionView collectionView, NSIndexPath indexPath)
45 | {
46 | _onItemSelected (collectionView, indexPath);
47 | }
48 |
49 | ///
50 | /// Items the highlighted.
51 | ///
52 | /// The collection view.
53 | /// The index path.
54 | public override void ItemHighlighted (UICollectionView collectionView, NSIndexPath indexPath)
55 | {
56 | }
57 |
58 | public override void Scrolled (UIScrollView scrollView)
59 | {
60 | _onScrolled (scrollView.ContentOffset);
61 | }
62 |
63 | }
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsForms.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
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 ("TwinTechsFormsExample")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("georgecook")]
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 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/About.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
13 |
14 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/About.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace TwinTechs.Example
7 | {
8 | public partial class About : ContentPage
9 | {
10 | public About ()
11 | {
12 | InitializeComponent ();
13 | }
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/AppHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using TwinTechs.Controls;
4 |
5 | namespace TwinTechs.Example
6 | {
7 | public static class AppHelper
8 | {
9 | public static IFastCellCache FastCellCache { get; set; }
10 |
11 | public static Size ScreenSize { get; set; }
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/CircleView/CircleViewSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 | using TwinTechs.Controls;
6 | using TwinTechs.Example.FastCells;
7 |
8 | namespace TwinTechs.Example.CircleView
9 | {
10 | public partial class CircleViewSamplePage : ContentPage
11 | {
12 | bool _isShadowOn = false;
13 | bool _applyToLayout = false;
14 |
15 | public CircleViewSamplePage ()
16 | {
17 | InitializeComponent ();
18 | }
19 |
20 | void OnClickedToggleButton (object sender, EventArgs ev)
21 | {
22 | _applyToLayout = !_applyToLayout;
23 | ApplyToLayoutButton.Text = _applyToLayout ? "Apply To Layout" : "Apply To Children";
24 | }
25 |
26 | void OnToggleShadow (object sender, EventArgs ev)
27 | {
28 | _isShadowOn = !_isShadowOn;
29 | ExampleBoxView.ToggleShadow (_isShadowOn);
30 | ButtonView.ToggleShadow (_isShadowOn);
31 | LabelView.ToggleShadow (_isShadowOn);
32 | ExampleImageview.ToggleShadow (_isShadowOn);
33 | }
34 |
35 | void OnClickedSelectionButton (object sender, EventArgs ev)
36 | {
37 | var index = Array.IndexOf (new Button[]{ NoneButton, CircleButton, TriangleButton, SquareButton }, sender);
38 | var type = (ViewMaskerType)index;
39 | if (_applyToLayout) {
40 | Stack.ApplyMask (type);
41 | } else {
42 | ExampleBoxView.ApplyMask (type);
43 | ButtonView.ApplyMask (type);
44 | LabelView.ApplyMask (type);
45 | ExampleImageview.ApplyMask (type);
46 | }
47 | }
48 |
49 | }
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using TwinTechs.Controls;
5 |
6 | namespace TwinTechs.Example.FastCells.Cells
7 | {
8 | public partial class ComplexFastCell : FastCell
9 | {
10 |
11 | protected override void InitializeCell ()
12 | {
13 | InitializeComponent ();
14 | }
15 |
16 | protected override void SetupCell (bool isRecycled)
17 | {
18 | var mediaItem = BindingContext as MediaItem;
19 | if (mediaItem != null) {
20 | UserThumbnailView.ImageUrl = mediaItem.ImagePath ?? "";
21 | ImageView.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
22 | NameLabel.Text = mediaItem.Name;
23 | DescriptionLabel.Text = mediaItem.Description;
24 | UserThumbnailView2.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
25 | UserThumbnailView3.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
26 | UserThumbnailView4.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
27 | UserThumbnailView5.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
28 | UserThumbnailView6.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
29 | UserThumbnailView7.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
30 | }
31 | }
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexViewCell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 |
5 | namespace TwinTechs.Example.FastCells.Cells
6 | {
7 | public partial class ComplexViewCell : ViewCell
8 | {
9 | public ComplexViewCell ()
10 | {
11 | InitializeComponent ();
12 | }
13 |
14 | protected override void OnBindingContextChanged ()
15 | {
16 | base.OnBindingContextChanged ();
17 | var mediaItem = BindingContext as MediaItem;
18 | if (mediaItem != null) {
19 | UserThumbnailView.ImageUrl = mediaItem.ImagePath ?? "";
20 | ImageView.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
21 | NameLabel.Text = mediaItem.Name;
22 | DescriptionLabel.Text = mediaItem.Description;
23 | UserThumbnailView2.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
24 | UserThumbnailView3.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
25 | UserThumbnailView4.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
26 | UserThumbnailView5.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
27 | UserThumbnailView6.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
28 | UserThumbnailView7.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
29 | }
30 | }
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/SimpleFastCell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
10 |
11 |
15 |
16 |
20 |
21 |
28 |
29 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/SimpleFastCell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using TwinTechs.Controls;
5 |
6 | namespace TwinTechs.Example.FastCells.Cells
7 | {
8 | public partial class SimpleFastCell : FastCell
9 | {
10 |
11 | protected override void InitializeCell ()
12 | {
13 | InitializeComponent ();
14 | }
15 |
16 | protected override void SetupCell (bool isRecycled)
17 | {
18 | var mediaItem = BindingContext as MediaItem;
19 | if (mediaItem != null) {
20 | UserThumbnailView.ImageUrl = mediaItem.ImagePath ?? "";
21 | ImageView.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
22 | NameLabel.Text = mediaItem.Name;
23 | DescriptionLabel.Text = mediaItem.Description;
24 | }
25 | }
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/SimpleViewCell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
11 |
12 |
16 |
17 |
21 |
22 |
29 |
30 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/SimpleViewCell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 |
5 | namespace TwinTechs.Example.FastCells.Cells
6 | {
7 | public partial class SimpleViewCell : ViewCell
8 | {
9 | public SimpleViewCell ()
10 | {
11 | InitializeComponent ();
12 | }
13 |
14 | protected override void OnBindingContextChanged ()
15 | {
16 | base.OnBindingContextChanged ();
17 | var mediaItem = BindingContext as MediaItem;
18 | if (mediaItem != null) {
19 | UserThumbnailView.ImageUrl = mediaItem.ImagePath ?? "";
20 | ImageView.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
21 | NameLabel.Text = mediaItem.Name;
22 | DescriptionLabel.Text = mediaItem.Description;
23 | }
24 | }
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/SmallSimpleFastCell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
11 |
12 |
19 |
20 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/SmallSimpleFastCell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using TwinTechs.Controls;
5 |
6 | namespace TwinTechs.Example.FastCells.Cells
7 | {
8 | public partial class SmallSimpleFastCell : FastCell
9 | {
10 |
11 | protected override void InitializeCell ()
12 | {
13 | InitializeComponent ();
14 | }
15 |
16 | protected override void SetupCell (bool isRecycled)
17 | {
18 | var mediaItem = BindingContext as MediaItem;
19 | if (mediaItem != null) {
20 | NameLabel.Text = mediaItem.Name;
21 | DescriptionLabel.Text = mediaItem.Description;
22 | }
23 | }
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/UnevenFastCell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
12 |
13 |
21 |
22 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/UnevenFastCell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using TwinTechs.Controls;
5 |
6 | namespace TwinTechs.Example.FastCells.Cells
7 | {
8 | public partial class UnevenFastCell : FastCell
9 | {
10 |
11 | protected override void InitializeCell ()
12 | {
13 | InitializeComponent ();
14 | }
15 |
16 | protected override void SetupCell (bool isRecycled)
17 | {
18 | var mediaItem = BindingContext as UnevenSizedMediaItem;
19 | if (mediaItem != null) {
20 | NameLabel.Text = mediaItem.Name;
21 | DescriptionLabel.Text = " ROW HEIGHT " + mediaItem.RowHeight;
22 |
23 | //terrible hack to see if I can fudge in the height.
24 | //and no- I can not.. :(
25 | View.HeightRequest = mediaItem.RowHeight;
26 | var tableView = Parent as ListView;
27 | tableView.RowHeight = (int)mediaItem.RowHeight;
28 | }
29 | }
30 | }
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 | using TwinTechs.Controls;
6 |
7 | namespace TwinTechs.Example.FastCells
8 | {
9 | public partial class FastCellComplexSamplePage : ContentPage
10 | {
11 | public FastCellComplexSamplePage ()
12 | {
13 | InitializeComponent ();
14 | MediaItemsListView.ItemsSource = DataProvider.GetMediaItems ();
15 | }
16 |
17 |
18 | void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
19 | {
20 | var item = e.SelectedItem as MediaItem;
21 | DisplayAlert ("you selected an item", item.Name, "Ok");
22 | }
23 |
24 | protected override void OnDisappearing ()
25 | {
26 | base.OnDisappearing ();
27 | AppHelper.FastCellCache.FlushAllCaches ();
28 | }
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace TwinTechs.Example.FastCells
7 | {
8 | public partial class FastCellSamplePage : ContentPage
9 | {
10 | public FastCellSamplePage ()
11 | {
12 | InitializeComponent ();
13 | MediaItemsListView.ItemsSource = DataProvider.GetMediaItems ();
14 | }
15 |
16 | void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
17 | {
18 | var item = e.SelectedItem as MediaItem;
19 | DisplayAlert ("you selected an item", item.Name, "Ok");
20 | }
21 |
22 | protected override void OnDisappearing ()
23 | {
24 | base.OnDisappearing ();
25 | AppHelper.FastCellCache.FlushAllCaches ();
26 | }
27 |
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastSimpleCellLots.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastSimpleCellLots.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace TwinTechs.Example.FastCells
7 | {
8 | public partial class FastSimpleCellLots : ContentPage
9 | {
10 | public FastSimpleCellLots ()
11 | {
12 | InitializeComponent ();
13 | MediaItemsListView.ItemsSource = DataProvider.GetMediaItems ();
14 | }
15 |
16 | void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
17 | {
18 | var item = e.SelectedItem as MediaItem;
19 | DisplayAlert ("you selected an item", item.Name, "Ok");
20 | }
21 |
22 | protected override void OnDisappearing ()
23 | {
24 | base.OnDisappearing ();
25 | AppHelper.FastCellCache.FlushAllCaches ();
26 | }
27 |
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastSimpleCellUnevenHeight.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastSimpleCellUnevenHeight.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace TwinTechs.Example.FastCells
7 | {
8 | public partial class FastSimpleCellUnevenHeight : ContentPage
9 | {
10 | public FastSimpleCellUnevenHeight ()
11 | {
12 | InitializeComponent ();
13 | var items = DataProvider.GetMediaItems ();
14 | var unevenHeightItems = new List ();
15 | var random = new Random ();
16 | foreach (var item in items) {
17 | var unevenItem = new UnevenSizedMediaItem (item.Name, item.ImageName, item.UserName, item.Description, item.ImagePath, item.ThumbnailImagePath, item.Index);
18 | unevenItem.RowHeight = random.Next (40, 200);
19 | unevenHeightItems.Add (unevenItem);
20 | }
21 | MediaItemsListView.ItemsSource = unevenHeightItems;
22 | }
23 |
24 | void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
25 | {
26 | var item = e.SelectedItem as MediaItem;
27 | DisplayAlert ("you selected an item", item.Name, "Ok");
28 | }
29 |
30 | protected override void OnDisappearing ()
31 | {
32 | base.OnDisappearing ();
33 | AppHelper.FastCellCache.FlushAllCaches ();
34 | }
35 |
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/ViewCellComplexSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/ViewCellComplexSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace TwinTechs.Example.FastCells
7 | {
8 | public partial class ViewCellComplexSamplePage : ContentPage
9 | {
10 | public ViewCellComplexSamplePage ()
11 | {
12 | InitializeComponent ();
13 | MediaItemsListView.ItemsSource = DataProvider.GetMediaItems ();
14 | }
15 |
16 |
17 | void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
18 | {
19 | var item = e.SelectedItem as MediaItem;
20 | DisplayAlert ("you selected an item", item.Name, "Ok");
21 | }
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/ViewCellSimple.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/ViewCellSimple.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace TwinTechs.Example.FastCells
7 | {
8 | public partial class ViewCellSimple : ContentPage
9 | {
10 | public ViewCellSimple ()
11 | {
12 | InitializeComponent ();
13 | MediaItemsListView.ItemsSource = DataProvider.GetMediaItems ();
14 | }
15 |
16 |
17 | void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
18 | {
19 | var item = e.SelectedItem as MediaItem;
20 | DisplayAlert ("you selected an item", item.Name, "Ok");
21 | }
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/Cells/SwipeListCell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
15 |
16 |
22 |
23 |
27 |
28 |
32 |
33 |
34 |
35 |
36 |
42 |
43 |
48 |
54 |
55 |
56 |
57 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/Cells/VideoCell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
18 |
19 |
24 |
25 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/Cells/VideoCell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using TwinTechs.Controls;
5 | using TwinTechs.Gestures;
6 | using System.Diagnostics;
7 |
8 | namespace TwinTechs.Example.Gestures.Cells
9 | {
10 | public partial class VideoCell : FastCell
11 | {
12 | protected override void InitializeCell ()
13 | {
14 | InitializeComponent ();
15 | ForegroundContent.ProcessGestureRecognizers ();
16 | }
17 |
18 | protected override void SetupCell (bool isRecycled)
19 | {
20 | var mediaItem = BindingContext as MediaItem;
21 | if (mediaItem != null) {
22 | UserThumbnailView.ImageUrl = mediaItem.ImagePath ?? "";
23 | NameLabel.Text = mediaItem.Name + " An item with a pannable content overlay";
24 | }
25 | }
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/GestureRecognizingAbsoluteLayout.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 |
5 | namespace TwinTechs.Example.Gestures
6 | {
7 | public class GestureRecognizingAbsoluteLayout : Layout
8 | {
9 | public event LayoutChildrenDelegate OnLayoutChildren;
10 |
11 | public bool IsHandlingLayoutManually = false;
12 | Rectangle oldSize;
13 |
14 | public GestureRecognizingAbsoluteLayout ()
15 | {
16 | }
17 |
18 | protected override void LayoutChildren (double x, double y, double width, double height)
19 | {
20 | foreach (var child in Children) {
21 | child.Layout (child.Bounds);
22 | var layout = child as Layout;
23 | if (layout != null) {
24 | layout.ForceLayout ();
25 | }
26 |
27 | }
28 | // if (!IsHandlingLayoutManually) {
29 | // base.LayoutChildren (x, y, width, height);
30 | // }
31 | // //TODO optimize this
32 | // // var newSize = new Rectangle (x, y, width, height);
33 | // // if (oldSize != newSize) {
34 | // // oldSize = newSize;
35 | // if (OnLayoutChildren != null) {
36 | // OnLayoutChildren (x, y, width, height);
37 | // }
38 | // }
39 |
40 | }
41 | }
42 | }
43 |
44 |
45 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/GestureYoutubeLikeExample.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
18 |
19 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/MultiGestureExample.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 | using TwinTechs.Gestures;
6 | using System.Diagnostics;
7 | using System.Text;
8 |
9 | namespace TwinTechs.Example.Gestures
10 | {
11 | public partial class MultiGestureExample : ContentPage
12 | {
13 | public MultiGestureExample ()
14 | {
15 | InitializeComponent ();
16 |
17 | //the following is only necessary until Xamarin give us a hook into this I've filed a bugzilla about it
18 | //https://bugzilla.xamarin.com/show_bug.cgi?id=30467
19 | //if you don't want to write the following lines of code, then MAKE YOUR VOICE HEARD ON THAT BUG PLEASE! :)
20 | FixGesturesUsingXaml ();
21 | }
22 |
23 | void FixGesturesUsingXaml ()
24 | {
25 | Label1.ProcessGestureRecognizers ();
26 | Label2.ProcessGestureRecognizers ();
27 | }
28 |
29 | void OnAction (BaseGestureRecognizer recognizer, GestureRecognizerState state)
30 | {
31 | var tapRecognizer = recognizer as TwinTechs.Gestures.LongPressGestureRecognizer;
32 | var view = recognizer.View;
33 | var message = recognizer + "\n";
34 | message += "POS: " + recognizer.LocationInView (view);
35 | message += "PARENT POS: " + recognizer.LocationInView (view.ParentView);
36 | message += "touches: " + recognizer.NumberOfTouches;// + ", taps required: " + tapRecognizer.NumberOfTapsRequired;
37 | OutputLabel.Text = message;
38 | }
39 |
40 | protected override void OnDisappearing ()
41 | {
42 | base.OnDisappearing ();
43 | Label1.RemoveAllGestureRecognizers ();
44 | Label2.RemoveAllGestureRecognizers ();
45 | }
46 | }
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/PanGestureExample2.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
15 |
16 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/PanGestureExample3.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
15 |
16 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/SimpleLayout.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace TwinTechs.Example.Gestures
5 | {
6 | public delegate void LayoutChildrenDelegate (double x, double y, double width, double height);
7 |
8 | //utility class to allow composing of layout behaviour
9 | public class SimpleLayout : AbsoluteLayout
10 | {
11 | public event LayoutChildrenDelegate OnLayoutChildren;
12 |
13 | public bool IsHandlingLayoutManually { get; set; }
14 |
15 | Rectangle oldSize;
16 |
17 | public SimpleLayout ()
18 | {
19 | }
20 |
21 | protected override void LayoutChildren (double x, double y, double width, double height)
22 | {
23 | if (!IsHandlingLayoutManually) {
24 | base.LayoutChildren (x, y, width, height);
25 | }
26 | //TODO optimize this
27 | // var newSize = new Rectangle (x, y, width, height);
28 | // if (oldSize != newSize) {
29 | // oldSize = newSize;
30 | if (OnLayoutChildren != null) {
31 | OnLayoutChildren (x, y, width, height);
32 | }
33 | // }
34 |
35 | }
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/SwipeGestureExample.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 | using TwinTechs.Gestures;
6 |
7 | namespace TwinTechs.Example.Gestures
8 | {
9 | public partial class SwipeGestureExample : ContentPage
10 | {
11 | public SwipeGestureExample ()
12 | {
13 | InitializeComponent ();
14 |
15 | FixGesturesUsingXaml ();
16 | }
17 |
18 | void FixGesturesUsingXaml ()
19 | {
20 |
21 | //the following is only necessary until Xamarin give us a hook into this I've filed a bugzilla about it
22 | //https://bugzilla.xamarin.com/show_bug.cgi?id=30467
23 | //if you don't want to write the following lines of code, then MAKE YOUR VOICE HEARD ON THAT BUG PLEASE! :)
24 | Label1.ProcessGestureRecognizers ();
25 | Label2.ProcessGestureRecognizers ();
26 | Label3.ProcessGestureRecognizers ();
27 | Label4.ProcessGestureRecognizers ();
28 | Label5.ProcessGestureRecognizers ();
29 | Label6.ProcessGestureRecognizers ();
30 | }
31 |
32 | void OnAction (BaseGestureRecognizer recognizer, GestureRecognizerState state)
33 | {
34 | var swipeRecognizer = recognizer as SwipeGestureRecognizer;
35 | var view = recognizer.View;
36 | var message = "SWIPE " + recognizer + "\n";
37 | message += "POS: " + recognizer.LocationInView (view.ParentView);
38 | message += "touches: " + recognizer.NumberOfTouches + ", direction: " + swipeRecognizer.Direction;
39 | OutputLabel.Text = message;
40 | }
41 |
42 |
43 | protected override void OnDisappearing ()
44 | {
45 | base.OnDisappearing ();
46 |
47 | Label1.RemoveAllGestureRecognizers ();
48 | Label2.RemoveAllGestureRecognizers ();
49 | Label3.RemoveAllGestureRecognizers ();
50 | Label4.RemoveAllGestureRecognizers ();
51 | Label5.RemoveAllGestureRecognizers ();
52 | Label6.RemoveAllGestureRecognizers ();
53 | }
54 |
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/SwipeyListExample.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/SwipeyListExample.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 | using TwinTechs.Gestures;
6 | using System.Diagnostics;
7 |
8 | namespace TwinTechs.Example.Gestures
9 | {
10 | public partial class SwipeyListExample : ContentPage
11 | {
12 | Rectangle _boxBounds = new Rectangle (200, 400, 200, 200);
13 | Rectangle _box2Bounds = new Rectangle (100, 200, 150, 150);
14 | BoxView Box;
15 | BoxView Box2;
16 |
17 | public SwipeyListExample ()
18 | {
19 | InitializeComponent ();
20 | MediaItemsListView.ItemsSource = DataProvider.GetMediaItems ();
21 | MediaItemsListView.ItemSelected += (object sender, SelectedItemChangedEventArgs e) => {
22 | if (e.SelectedItem == null)
23 | return; // don't do anything if we just de-selected the row
24 | ((ListView)sender).SelectedItem = null;
25 | };
26 | }
27 |
28 |
29 | protected override void OnDisappearing ()
30 | {
31 | base.OnDisappearing ();
32 | //TODO get rid of all gestures!
33 | }
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/ViewScrollerExample.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace TwinTechs.Example.Gestures
7 | {
8 | public partial class ViewScrollerExample : ContentPage
9 | {
10 | public ViewScrollerExample ()
11 | {
12 | InitializeComponent ();
13 | }
14 |
15 | void OnClicked (object o, EventArgs e)
16 | {
17 | PagerView.CurrentPageIndex++;
18 | }
19 |
20 | protected override void OnDisappearing ()
21 | {
22 | base.OnDisappearing ();
23 | PagerView.Cleanup ();
24 | }
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/YoutubeStyleContentPage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 | using TwinTechs.Gestures;
6 | using System.Diagnostics;
7 | using TwinTechs.Example;
8 |
9 | namespace TwinTechs.Example.Gestures
10 | {
11 | public partial class YoutubeStyleContentPage : ContentPage
12 | {
13 | public double ParentHeight { get; set; }
14 |
15 |
16 | public YoutubeStyleContentPage ()
17 | {
18 | InitializeComponent ();
19 | MinimumHeightRequest = 100;
20 | MinimumWidthRequest = 160;
21 | MediaItemsListView.ItemsSource = DataProvider.GetMediaItems ();
22 | }
23 |
24 |
25 | protected override void OnDisappearing ()
26 | {
27 | base.OnDisappearing ();
28 | }
29 |
30 | protected override void LayoutChildren (double x, double y, double width, double height)
31 | {
32 | var complete = Math.Min (1, height / (ParentHeight));
33 | MediaItemsListView.Opacity = complete;
34 | TitleLabel.Opacity = complete;
35 | MainLayout.RowDefinitions [0].Height = 40 * complete;
36 | MainLayout.RowDefinitions [1].Height = MinimumHeightRequest + (160 * complete);
37 | // Debug.WriteLine ("complete {0} height {1} ph{2}", complete, height, ParentHeight);
38 | base.LayoutChildren (x, y, width, height);
39 | MediaItemsListView.Layout (new Rectangle (0, MediaItemsListView.Bounds.Y, width, MediaItemsListView.Bounds.Height));
40 | }
41 |
42 | protected override void OnSizeAllocated (double width, double height)
43 | {
44 | base.OnSizeAllocated (width, height);
45 |
46 | }
47 |
48 | public View VideoPlayerView { get { return VideoPlayer; } }
49 |
50 | public MediaItem Item { get; set; }
51 |
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/Gestures/YoutubeStyleContentPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
15 |
16 |
17 |
18 |
20 |
21 |
23 |
24 |
26 |
27 |
28 |
29 |
36 |
37 |
41 |
42 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/GridView/Cells/EmbeddedGridViewCell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/GridView/Cells/EmbeddedGridViewCell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 | using TwinTechs.Example;
6 | using System.Collections.ObjectModel;
7 | using XLabs.Forms.Controls;
8 | using TwinTechs.Extensions;
9 |
10 | namespace TwinTechs.Example.GridView.Cells
11 | {
12 | public partial class EmbeddedGridViewCell : FastGridCell
13 | {
14 | public EmbeddedGridViewCell ()
15 | {
16 | }
17 |
18 | protected override void InitializeCell ()
19 | {
20 | InitializeComponent ();
21 | }
22 |
23 | protected override void SetupCell (bool isRecycled)
24 | {
25 | var items = BindingContext as ObservableCollection;
26 | ItemsGrid.Layout (new Rectangle (0, 0, CellSize.Width, CellSize.Height));
27 | ItemsGrid.ScrollToItemWithIndex (0, false);
28 | ItemsGrid.ItemsSource = items;
29 | }
30 |
31 |
32 | void OnItemSelected (object sender, XLabs.GridEventArgs