View HttpClientExtensions.cs
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 HttpClientExtensions | |
{ | |
/// <summary> | |
/// Helper method to POST binary image data to an API endpoint that expects the data to be accompanied by a parameter | |
/// </summary> | |
/// <param name="client">HttpClient instance</param> | |
/// <param name="imageFile">Valie StorageFile of the image</param> | |
/// <param name="apiUrl">The API's http or https endpoint</param> | |
/// <param name="parameterName">The name of the parameter the API expects the image data in</param> | |
/// <returns></returns> |
View GaussianBlurTool.cs
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 System.Diagnostics; | |
using System.Threading.Tasks; | |
using Windows.Storage.Streams; | |
using Windows.UI.Xaml.Media.Imaging; | |
using Microsoft.Graphics.Canvas; | |
using Microsoft.Graphics.Canvas.Effects; | |
using Telerik.UI.Xaml.Controls.Input.ImageEditor; | |
using System.Runtime.InteropServices.WindowsRuntime; | |
using Windows.ApplicationModel.Core; |
View JoeR.txt
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
create table newtable as select TOP 0 * from oldtable |
View ExceptionLogger.cs
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 class ExceptionLogger | |
{ | |
private static readonly int daysToKeepLog = 14; | |
private static ExceptionLogger current; | |
public static ExceptionLogger Current => current ?? (current = new ExceptionLogger()); | |
private ExceptionLogger() { } |
View VoiceCommandUtilites.cs
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 VoiceCommandUtilites | |
{ | |
private static int loadAttempts; | |
public static async Task InstallVoiceCommandFile() | |
{ | |
if (loadAttempts > 0) | |
{ | |
Debug.WriteLine($"-------Voice Commands load attempt max reached. loadAttempt: {loadAttempts}--------"); | |
return; |
View RadSideDrawerInXamForms
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
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:Hacked.Forms;assembly=Hacked.Forms" | |
x:Class="Hacked.Forms.Views.MainPage" | |
xmlns:telerik="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls" | |
xmlns:listView="clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls" | |
xmlns:primitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives" | |
xmlns:common="clr-namespace:Hacked.Forms.Common;assembly=Hacked.Forms" | |
xmlns:converters="clr-namespace:Hacked.Forms.Converters;assembly=Hacked.Forms" | |
BindingContext="{Binding Source={x:Static local:App.ViewModel}}"> |
View TaskHelpers.cs
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 TaskHelpers | |
{ | |
public static async Task RegisterTaskAsync(string taskFriendlyName, string taskEntryPoint, uint taskRunFrequency, SystemConditionType condition = SystemConditionType.InternetAvailable) | |
{ | |
try | |
{ | |
//if task already exists, unregister it before adding it | |
foreach (var task in BackgroundTaskRegistration.AllTasks.Where(cur => cur.Value.Name == taskFriendlyName)) | |
{ | |
task.Value.Unregister(true); |
View AddAndRemoveTask
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
#region Background Task management | |
private async Task<bool> ConfigureBackgroundTaskAsync() | |
{ | |
try | |
{ | |
vm.IsBusy = true; | |
vm.IsBusyMessage = "configuring Background Task"; | |
var accessStatus = await BackgroundExecutionManager.RequestAccessAsync(); |
View ParallaxWithOpacityBehavior.cs
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 class ParallaxWithOpacityBehavior : Behavior<FrameworkElement> | |
{ | |
#region DependencyProperties | |
/// <summary> | |
/// Gets or sets the element that will parallax while scrolling. | |
/// </summary> | |
public UIElement ParallaxContent | |
{ | |
get { return (UIElement)GetValue(ParallaxContentProperty); } |
View OnTargetPlatform
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 class OnTargetPlatform<T> : OnPlatform<T> | |
{ | |
public T Windows { get; set; } | |
public static implicit operator T(OnTargetPlatform<T> onPlatform) => Device.OS == TargetPlatform.Windows ? onPlatform.Windows : (OnPlatform<T>) onPlatform; | |
} |
OlderNewer