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
<ResourceDictionary | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Style x:Key="ScrollBarThumb" | |
TargetType="{x:Type Thumb}"> | |
<Setter Property="OverridesDefaultStyle" | |
Value="true"/> | |
<Setter Property="IsTabStop" | |
Value="false"/> |
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 Newtonsoft.Json; | |
using System.Collections.Generic; | |
namespace Bleroy | |
{ | |
public static class JsonHelpers | |
{ | |
/// <summary> | |
/// Advances the reader to the first child property with the provided name, | |
/// no matter how deep it is. |
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 | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Page.Resources> | |
<Style TargetType="ProgressBar" x:Key="Basic"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="ProgressBar" > | |
<Grid x:Name="Root"> | |
<Border |
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 NAudio.Wave; | |
using NAudio.Wave.SampleProviders; | |
namespace FireAndForgetAudioSample | |
{ | |
class AudioPlaybackEngine : IDisposable | |
{ | |
private readonly IWavePlayer outputDevice; | |
private readonly MixingSampleProvider mixer; |
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
// Define other methods and classes here | |
/// <summary> | |
/// Sample Provider to allow fading in and out | |
/// </summary> | |
public class DelayFadeOutSampleProvider : ISampleProvider | |
{ | |
enum FadeState | |
{ | |
Silence, | |
FadingIn, |
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 void Clone(object source, object destination, bool copyFields = true, bool copyProperties = true) | |
{ | |
if (copyFields) | |
foreach (System.Reflection.FieldInfo field in destination.GetType().GetFields()) | |
field.SetValue(destination, source.GetType().GetFields().First(n => n.Name == field.Name).GetValue(source)); | |
if (copyProperties) | |
foreach (System.Reflection.PropertyInfo property in destination.GetType().GetProperties().Where(n => n.CanWrite)) | |
property.SetValue(destination, source.GetType().GetProperties().First(n => n.Name == property.Name).GetValue(source, null), null); | |
} |
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
function Get-VisualChildren($item) { | |
for ($i = 0; $i -lt [System.Windows.Media.VisualTreeHelper]::GetChildrenCount($item); $i++) { | |
$child = [System.Windows.Media.VisualTreeHelper]::GetChild($item, $i) | |
Get-VisualChildren($child) | |
} | |
$item | |
} | |
function Get-TreeItems { | |
Get-VisualChildren $snoopui | ? { $_.GetType().Name -eq "ProperTreeViewItem" } |
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.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Text; | |
using System.Windows.Forms; | |
using NAudio.Wave; | |
using System.Net; | |
using System.Threading; |
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"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:exsl="http://exslt.org/common" | |
xmlns:func="http://exslt.org/functions" | |
xmlns:head="http://headjs.com" | |
extension-element-prefixes="exsl func head"> | |
<xsl:import href="../utilities/page-title.xsl"/> | |
<xsl:import href="../utilities/navigation.xsl"/> |