This file contains 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
using System; | |
namespace InTheHand | |
{ | |
/// <summary> | |
/// Helper class for DateTimeOffset. | |
/// </summary> | |
public static class DateTimeOffsetHelper | |
{ | |
private static DateTimeOffset dt = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero); |
This file contains 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
namespace InTheHand.Net | |
{ | |
/// <summary> | |
/// Helper network-order conversion functions for the Universal Windows Platform. | |
/// </summary> | |
public static class IPAddress | |
{ | |
/// <summary> | |
/// Converts a short value from network byte order to host byte order. | |
/// </summary> |
This file contains 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
namespace InTheHand.Forms | |
{ | |
/// <summary> | |
/// Replacement for Xamarin.Forms.OnPlatform which supports the Windows (WinRT) platforms. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
public sealed class OnPlatform2<T> | |
{ | |
public OnPlatform2() | |
{ |
This file contains 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
using System; | |
namespace Xamarin.Forms.Platform.WinRT | |
{ | |
public static class ColorExtensions | |
{ | |
public static Windows.UI.Color ToWindows(this Xamarin.Forms.Color color) | |
{ | |
return Windows.UI.Color.FromArgb(Convert.ToByte(color.A * 255), Convert.ToByte(color.R * 255), Convert.ToByte(color.G * 255), Convert.ToByte(color.B * 255)); | |
} |
This file contains 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
<Page | |
x:Class="DialASketch.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:DialASketch" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d"> | |
<Page.TopAppBar> | |
<CommandBar> |
This file contains 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" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:MediaPlayerSample" | |
xmlns:forms="clr-namespace:InTheHand.Forms;assembly=InTheHand.Forms" | |
x:Class="MediaPlayerSample.MainPage"> | |
<StackLayout> | |
<forms:MediaElement HorizontalOptions="Fill" VerticalOptions="Center" HeightRequest="240" x:Name="Media" AreTransportControlsEnabled="true" Source="http://video.ch9.ms/ch9/334f/891b78a5-642d-40b4-8d02-ff40ffdd334f/LoginToLinkedinUSingXamarinAuth_mid.mp4"/> | |
</StackLayout> | |
</ContentPage> |
This file contains 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
using System; | |
using Windows.Devices.Bluetooth; | |
namespace InTheHand.Devices.Bluetooth | |
{ | |
/// <summary> | |
/// Defines missing values in the <see cref="BluetoothMinorClass"/> enumeration for devices with a <see cref="BluetoothClassOfDevice.MajorClass"/> of Imaging. | |
/// </summary> | |
[Flags] | |
public enum BluetoothImagingMinorClass |
This file contains 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 static class BrightnessHelper | |
{ | |
public static void SetBrightness(uint brightness) | |
{ | |
if (brightness > 100) | |
{ | |
throw new ArgumentOutOfRangeException("brightness"); | |
} | |
// get handle to primary display |
This file contains 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 App() | |
{ | |
this.InitializeComponent(); | |
this.Suspending += OnSuspending; | |
_watcher = new BluetoothLEAdvertisementWatcher(); | |
_watcher.Received += _watcher_Received; | |
_watcher.Start(); | |
} |
OlderNewer