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
<UserControl x:Class="OS.NET.Widgets.Window" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Height="300" Width="300"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="24" /> | |
<RowDefinition /> | |
</Grid.RowDefinitions> | |
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.Runtime.InteropServices; | |
namespace ConsoleTest | |
{ | |
class Program | |
{ | |
public const int STD_OUTPUT_HANDLE = -11; | |
public struct COORD |
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.Diagnostics; | |
using System.Reflection; | |
public class EventLogger | |
{ | |
#region Constants | |
private const string DEFAULT_TYPE = "Application"; | |
#endregion |
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
<Application x:Class="Application" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:vm="clr-namespace:MyMvvmApplication.ViewModel" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
d1p1:Ignorable="d" | |
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
StartupUri="MainWindow.xaml"> | |
<Application.Resources> | |
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" /> |
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
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> | |
<Button Command="{Binding GotoFirstPageCommand}" Margin="4" Padding="2" ToolTip="Go to the first page."> | |
<Button.Content> | |
<Path HorizontalAlignment="Center" Stroke="Black" StrokeThickness="1" StrokeLineJoin="Round" Fill="Green" Data="M 0,0 L 2,0 2,8 0,8 Z M 2,4 L 8,8 8,0 Z" /> | |
</Button.Content> | |
</Button> | |
<Button Command="{Binding GotoPreviousPageCommand}" Margin="4" Padding="2" ToolTip="Go to the previous page."> | |
<Button.Content> | |
<Path HorizontalAlignment="Center" Stroke="Black" StrokeThickness="1" StrokeLineJoin="Round" Fill="Green" Data="M 0,4 L 8,8 8,0 Z" /> | |
</Button.Content> |
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
Imports System.Globalization | |
Namespace Utility | |
Public Class InverseBooleanConverter | |
Implements IValueConverter | |
Public Function Convert(pValue As Object, pTargetType As Type, pParameter As Object, pCulture As CultureInfo) As Object Implements IValueConverter.Convert | |
Return Not DirectCast(pValue, Boolean) | |
End Function |
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
Imports System.IO | |
Imports System.Runtime.InteropServices | |
''' <remarks> | |
''' I don't think this is actually faster than the .NET Directory functions. | |
''' </remarks> | |
Public Class FileSystemHelper | |
Private Shared ReadOnly conInvalidHandleValue As IntPtr = New IntPtr(-1) | |
<Flags> |
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
Imports Microsoft.Practices.ServiceLocation | |
Imports StructureMap | |
Public Class StructureMapServiceLocator | |
Inherits ServiceLocatorImplBase | |
Private _Container As IContainer | |
Public Sub New(pContainer As IContainer) | |
_Container = pContainer |
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
-- Convert an html color in the format of #RRGGBB into red, green, and blue values on the range of [0..255]. | |
local function hex_to_rgb(html_color) | |
html_color = html_color:gsub("#", "") | |
return tonumber("0x"..html_color:sub(1, 2)), tonumber("0x"..html_color:sub(3, 4)), tonumber("0x"..html_color:sub(5, 6)) | |
end | |
-- Convert the red, green, and blue color components back into an html color string. | |
local function rgb_to_hex(red, green, blue) | |
return string.format("#%02X%02X%02X", red, green, blue) |
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.Linq; | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
[System.Serializable] | |
public class PerfectOverride | |
{ | |
public int referenceOrthographicSize; |
OlderNewer