This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Android: | |
[assembly: Dependency(typeof(SQLConnection))] | |
namespace MyProject.Droid | |
{ | |
public class SQLConnection : ISqliteConnectionFactory | |
{ | |
readonly string Filename = "db_name.db"; | |
public SQLiteConnection GetConnection() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I fire up my forms app with the following | |
(From https://github.com/CrossGeeks/SocialMediaAuthenticationSample - the services etc are implemented on the platform) | |
LoadApplication(new App(new OAuth2Service())); | |
My app.xaml.cs looks like this | |
public App(IOAuth2Service oAuth2Service) | |
{ |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task "ApplyImplicitVersions" | |
Done executing task "ApplyImplicitVersions". | |
Done building target "ApplyImplicitVersions" in project "mvvm.csproj". | |
Target "CheckForImplicitPackageReferenceOverrides" skipped. Previously built successfully. | |
Target "ProcessFrameworkReferences" in file "/usr/local/share/dotnet/sdk/3.1.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets": | |
Using "CheckForDuplicateFrameworkReferences" task from assembly "/usr/local/share/dotnet/sdk/3.1.100/Sdks/Microsoft.NET.Sdk/targets/../tools/net472/Microsoft.NET.Build.Tasks.dll". | |
Task "CheckForDuplicateFrameworkReferences" | |
Done executing task "CheckForDuplicateFrameworkReferences". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IterateView | |
{ | |
readonly StringBuilder sb = new StringBuilder(); | |
const string PADDING_STRING = " "; | |
string sPadding = ""; | |
public string OutputString { get; private set; } | |
public int NumberOfType { get; private set; } | |
public List<string> GetText { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* you need the xamarin permissions to use this /* | |
static readonly int REQUEST_WRITESETTINGS = 2, REQUEST_EXTERNAL = 4, REQUEST_WIFI = 5, REQUEST_WAKELOCK = 6, REQUEST_CONTACTS; | |
static string[] PERMISSIONS_SETTINGS = { Manifest.Permission.WriteSettings }; | |
static string[] PERMISSIONS_STORAGE = { Manifest.Permission_group.Storage }; | |
static string[] PERMISSIONS_WIFISTATE = { Manifest.Permission.AccessWifiState }; | |
static string[] PERMISSIONS_WAKELOCK = { Manifest.Permission.WakeLock }; | |
static string[] PERMISSIONS_CONTACTS = { Manifest.Permission.ReadContacts }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NavigationService : INavigationService | |
{ | |
readonly Dictionary<string, Type> _pagesByKey = new Dictionary<string, Type>(); | |
NavigationPage _navigation; | |
public string CurrentPageKey | |
{ | |
get | |
{ | |
lock (_pagesByKey) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_GET['url'])) | |
{ | |
echo "in"; | |
$url = $_GET['url']; | |
echo $url; | |
$images = glob($url."*.{jpg,jpeg,png,gif}", GLOB_BRACE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:orientation="vertical" | |
style="@style/lightbox_dialog"> | |
<LinearLayout | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:gravity="center_vertical|center_horizontal"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async Task Scroller(StackLayout layout, ScrollView scroll, int position) | |
{ | |
await Task.Delay(layout.Children.Count * 10).ContinueWith((y) => | |
{ | |
if (y.IsCompleted) | |
{ | |
var selected = layout.Children[position]; | |
Device.BeginInvokeOnMainThread(async () => await scroll.ScrollToAsync((StackLayout)selected, ScrollToPosition.Center, true)); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yourPCLNamespace.App.ScreenSize = new Size(bounds.Width, bounds.Height); |
NewerOlder