Converted file line endings to Windows CRLF.

--HG--
extra : convert_revision : svn%3Affd33b8c-2492-42e0-bdc5-587b920b7d6d/trunk%4050814
This commit is contained in:
Sean Fausett 2010-08-28 12:02:37 +00:00
parent 365e5723c1
commit 1221690d97
17 changed files with 496 additions and 496 deletions

View File

@ -1,15 +1,15 @@
using System; using System;
namespace Jellyfish.Library namespace Jellyfish.Library
{ {
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
public sealed class AssemblyCommentAttribute : Attribute public sealed class AssemblyCommentAttribute : Attribute
{ {
public AssemblyCommentAttribute(string comment) public AssemblyCommentAttribute(string comment)
{ {
Comment = comment; Comment = comment;
} }
public string Comment { get; private set; } public string Comment { get; private set; }
} }
} }

View File

@ -1,9 +1,9 @@
<UserControl x:Class="Jellyfish.Library.FrameRateCounter" x:Name="frameRateControl" <UserControl x:Class="Jellyfish.Library.FrameRateCounter" x:Name="frameRateControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextBlock FontFamily="Consolas" FontSize="12" Foreground="White"> <TextBlock FontFamily="Consolas" FontSize="12" Foreground="White">
<TextBlock.Text> <TextBlock.Text>
<Binding Path="FrameRate" ElementName="frameRateControl" StringFormat="{}{0:D} fps"/> <Binding Path="FrameRate" ElementName="frameRateControl" StringFormat="{}{0:D} fps"/>
</TextBlock.Text> </TextBlock.Text>
</TextBlock> </TextBlock>
</UserControl> </UserControl>

View File

@ -1,42 +1,42 @@
using System; using System;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media; using System.Windows.Media;
namespace Jellyfish.Library namespace Jellyfish.Library
{ {
public sealed partial class FrameRateCounter : UserControl public sealed partial class FrameRateCounter : UserControl
{ {
public FrameRateCounter() public FrameRateCounter()
{ {
InitializeComponent(); InitializeComponent();
CompositionTarget.Rendering += OnCompositionTargetRendering; CompositionTarget.Rendering += OnCompositionTargetRendering;
} }
private void OnCompositionTargetRendering(object sender, EventArgs e) private void OnCompositionTargetRendering(object sender, EventArgs e)
{ {
_frameCount++; _frameCount++;
long time = DateTime.UtcNow.Ticks; long time = DateTime.UtcNow.Ticks;
if (time - _lastTime >= TimeSpan.TicksPerSecond) if (time - _lastTime >= TimeSpan.TicksPerSecond)
{ {
_lastTime = time; _lastTime = time;
FrameRate = _frameCount; FrameRate = _frameCount;
_frameCount = 0; _frameCount = 0;
} }
} }
public static readonly DependencyProperty FrameRateProperty = DependencyProperty.Register("FrameRate", typeof(int), typeof(FrameRateCounter), public static readonly DependencyProperty FrameRateProperty = DependencyProperty.Register("FrameRate", typeof(int), typeof(FrameRateCounter),
new PropertyMetadata(0)); new PropertyMetadata(0));
public int FrameRate public int FrameRate
{ {
get { return (int)GetValue(FrameRateProperty); } get { return (int)GetValue(FrameRateProperty); }
set { SetValue(FrameRateProperty, value); } set { SetValue(FrameRateProperty, value); }
} }
private int _frameCount; private int _frameCount;
private long _lastTime; private long _lastTime;
} }
} }

View File

@ -1,4 +1,4 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames")] [assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames")]
[assembly: SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Scope = "member", Target = "Jellyfish.Library.FrameRateCounter.#frameRateControl")] [assembly: SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Scope = "member", Target = "Jellyfish.Library.FrameRateCounter.#frameRateControl")]

View File

@ -1,13 +1,13 @@
<UserControl x:Class="Jellyfish.Library.FrameRateCounter" x:Name="frameRateControl" <UserControl x:Class="Jellyfish.Library.FrameRateCounter" x:Name="frameRateControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:jl="clr-namespace:Jellyfish.Library;assembly=Jellyfish.Library"> xmlns:jl="clr-namespace:Jellyfish.Library;assembly=Jellyfish.Library">
<UserControl.Resources> <UserControl.Resources>
<jl:StringFormatConverter x:Key="StringFormatConverter"/> <jl:StringFormatConverter x:Key="StringFormatConverter"/>
</UserControl.Resources> </UserControl.Resources>
<TextBlock FontFamily="Consolas" FontSize="12" Foreground="White"> <TextBlock FontFamily="Consolas" FontSize="12" Foreground="White">
<TextBlock.Text> <TextBlock.Text>
<Binding Path="FrameRate" ElementName="frameRateControl" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0:D} fps"/> <Binding Path="FrameRate" ElementName="frameRateControl" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0:D} fps"/>
</TextBlock.Text> </TextBlock.Text>
</TextBlock> </TextBlock>
</UserControl> </UserControl>

View File

@ -1,42 +1,42 @@
using System; using System;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media; using System.Windows.Media;
namespace Jellyfish.Library namespace Jellyfish.Library
{ {
public sealed partial class FrameRateCounter : UserControl public sealed partial class FrameRateCounter : UserControl
{ {
public FrameRateCounter() public FrameRateCounter()
{ {
InitializeComponent(); InitializeComponent();
CompositionTarget.Rendering += OnCompositionTargetRendering; CompositionTarget.Rendering += OnCompositionTargetRendering;
} }
private void OnCompositionTargetRendering(object sender, EventArgs e) private void OnCompositionTargetRendering(object sender, EventArgs e)
{ {
_frameCount++; _frameCount++;
long time = DateTime.UtcNow.Ticks; long time = DateTime.UtcNow.Ticks;
if (time - _lastTime >= TimeSpan.TicksPerSecond) if (time - _lastTime >= TimeSpan.TicksPerSecond)
{ {
_lastTime = time; _lastTime = time;
FrameRate = _frameCount; FrameRate = _frameCount;
_frameCount = 0; _frameCount = 0;
} }
} }
public static readonly DependencyProperty FrameRateProperty = DependencyProperty.Register("FrameRate", typeof(int), typeof(FrameRateCounter), public static readonly DependencyProperty FrameRateProperty = DependencyProperty.Register("FrameRate", typeof(int), typeof(FrameRateCounter),
new PropertyMetadata(0)); new PropertyMetadata(0));
public int FrameRate public int FrameRate
{ {
get { return (int)GetValue(FrameRateProperty); } get { return (int)GetValue(FrameRateProperty); }
set { SetValue(FrameRateProperty, value); } set { SetValue(FrameRateProperty, value); }
} }
private int _frameCount; private int _frameCount;
private long _lastTime; private long _lastTime;
} }
} }

View File

@ -1,41 +1,41 @@
using System; using System;
using System.Globalization; using System.Globalization;
using System.Windows; using System.Windows;
using System.Windows.Data; using System.Windows.Data;
namespace Jellyfish.Library namespace Jellyfish.Library
{ {
public sealed class StringFormatConverter : IValueConverter // SL is missing Binding.StringFormat public sealed class StringFormatConverter : IValueConverter // SL is missing Binding.StringFormat
{ {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (targetType != typeof(string)) if (targetType != typeof(string))
{ {
return DependencyProperty.UnsetValue; return DependencyProperty.UnsetValue;
} }
if (value == null) if (value == null)
{ {
return string.Empty; return string.Empty;
} }
string format = parameter as string; string format = parameter as string;
if (!string.IsNullOrEmpty(format)) if (!string.IsNullOrEmpty(format))
{ {
if (format.IndexOf('{') < 0) if (format.IndexOf('{') < 0)
{ {
format = "{0:" + format + "}"; format = "{0:" + format + "}";
} }
return string.Format(culture, format, value); return string.Format(culture, format, value);
} }
return value.ToString(); return value.ToString();
} }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{ {
return DependencyProperty.UnsetValue; // one way only return DependencyProperty.UnsetValue; // one way only
} }
} }
} }

View File

@ -1,4 +1,4 @@
GNU GENERAL PUBLIC LICENSE  GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., Copyright (C) 1989, 1991 Free Software Foundation, Inc.,

View File

@ -1,3 +1,3 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames")] [assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames")]

View File

@ -1,4 +1,4 @@
namespace Jellyfish.Virtu namespace Jellyfish.Virtu
{ {
public sealed class NoSlotClock public sealed class NoSlotClock
{ {

View File

@ -1,99 +1,99 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.1 // Runtime Version:4.0.30319.1
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace Jellyfish.Virtu.Properties { namespace Jellyfish.Virtu.Properties {
using System; using System;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder // This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Strings { internal class Strings {
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Strings() { internal Strings() {
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Jellyfish.Virtu.Properties.Strings", typeof(Strings).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Jellyfish.Virtu.Properties.Strings", typeof(Strings).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
} }
} }
/// <summary> /// <summary>
/// Overrides the current thread's CurrentUICulture property for all /// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture { internal static global::System.Globalization.CultureInfo Culture {
get { get {
return resourceCulture; return resourceCulture;
} }
set { set {
resourceCulture = value; resourceCulture = value;
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Resource &apos;{0}&apos; invalid.. /// Looks up a localized string similar to Resource &apos;{0}&apos; invalid..
/// </summary> /// </summary>
internal static string ResourceInvalid { internal static string ResourceInvalid {
get { get {
return ResourceManager.GetString("ResourceInvalid", resourceCulture); return ResourceManager.GetString("ResourceInvalid", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Resource &apos;{0}&apos; not found.. /// Looks up a localized string similar to Resource &apos;{0}&apos; not found..
/// </summary> /// </summary>
internal static string ResourceNotFound { internal static string ResourceNotFound {
get { get {
return ResourceManager.GetString("ResourceNotFound", resourceCulture); return ResourceManager.GetString("ResourceNotFound", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Service type &apos;{0}&apos; already present.. /// Looks up a localized string similar to Service type &apos;{0}&apos; already present..
/// </summary> /// </summary>
internal static string ServiceAlreadyPresent { internal static string ServiceAlreadyPresent {
get { get {
return ResourceManager.GetString("ServiceAlreadyPresent", resourceCulture); return ResourceManager.GetString("ServiceAlreadyPresent", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Service type &apos;{0}&apos; must be assignable from service provider &apos;{1}&apos;.. /// Looks up a localized string similar to Service type &apos;{0}&apos; must be assignable from service provider &apos;{1}&apos;..
/// </summary> /// </summary>
internal static string ServiceMustBeAssignable { internal static string ServiceMustBeAssignable {
get { get {
return ResourceManager.GetString("ServiceMustBeAssignable", resourceCulture); return ResourceManager.GetString("ServiceMustBeAssignable", resourceCulture);
} }
} }
} }
} }

View File

@ -1,132 +1,132 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata"> <xsd:element name="metadata">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
<xsd:complexType> <xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="data"> <xsd:element name="data">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" /> <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:choice> </xsd:choice>
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:schema> </xsd:schema>
<resheader name="resmimetype"> <resheader name="resmimetype">
<value>text/microsoft-resx</value> <value>text/microsoft-resx</value>
</resheader> </resheader>
<resheader name="version"> <resheader name="version">
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="ResourceNotFound" xml:space="preserve"> <data name="ResourceNotFound" xml:space="preserve">
<value>Resource '{0}' not found.</value> <value>Resource '{0}' not found.</value>
</data> </data>
<data name="ResourceInvalid" xml:space="preserve"> <data name="ResourceInvalid" xml:space="preserve">
<value>Resource '{0}' invalid.</value> <value>Resource '{0}' invalid.</value>
</data> </data>
<data name="ServiceAlreadyPresent" xml:space="preserve"> <data name="ServiceAlreadyPresent" xml:space="preserve">
<value>Service type '{0}' already present.</value> <value>Service type '{0}' already present.</value>
</data> </data>
<data name="ServiceMustBeAssignable" xml:space="preserve"> <data name="ServiceMustBeAssignable" xml:space="preserve">
<value>Service type '{0}' must be assignable from service provider '{1}'.</value> <value>Service type '{0}' must be assignable from service provider '{1}'.</value>
</data> </data>
</root> </root>

View File

@ -1,68 +1,68 @@
using System; using System;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.IO; using System.IO;
using System.IO.IsolatedStorage; using System.IO.IsolatedStorage;
namespace Jellyfish.Virtu.Services namespace Jellyfish.Virtu.Services
{ {
public class IsolatedStorageService : StorageService public class IsolatedStorageService : StorageService
{ {
public IsolatedStorageService(Machine machine) : public IsolatedStorageService(Machine machine) :
base(machine) base(machine)
{ {
} }
public override void Load(string path, Action<Stream> reader) public override void Load(string path, Action<Stream> reader)
{ {
if (reader == null) if (reader == null)
{ {
throw new ArgumentNullException("reader"); throw new ArgumentNullException("reader");
} }
try try
{ {
using (var store = GetStore()) using (var store = GetStore())
{ {
using (var stream = new IsolatedStorageFileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, store)) using (var stream = new IsolatedStorageFileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, store))
{ {
reader(stream); reader(stream);
} }
} }
} }
catch (FileNotFoundException) catch (FileNotFoundException)
{ {
} }
catch (IsolatedStorageException) catch (IsolatedStorageException)
{ {
} }
} }
public override void Save(string path, Action<Stream> writer) public override void Save(string path, Action<Stream> writer)
{ {
if (writer == null) if (writer == null)
{ {
throw new ArgumentNullException("writer"); throw new ArgumentNullException("writer");
} }
try try
{ {
using (var store = GetStore()) using (var store = GetStore())
{ {
using (var stream = new IsolatedStorageFileStream(path, FileMode.Create, FileAccess.Write, FileShare.None, store)) using (var stream = new IsolatedStorageFileStream(path, FileMode.Create, FileAccess.Write, FileShare.None, store))
{ {
writer(stream); writer(stream);
} }
} }
} }
catch (IsolatedStorageException) catch (IsolatedStorageException)
{ {
} }
} }
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
protected virtual IsolatedStorageFile GetStore() protected virtual IsolatedStorageFile GetStore()
{ {
return IsolatedStorageFile.GetUserStoreForApplication(); return IsolatedStorageFile.GetUserStoreForApplication();
} }
} }
} }

View File

@ -1,4 +1,4 @@
<OutOfBrowserSettings ShortName="Virtu" EnableGPUAcceleration="False" ShowInstallMenuItem="True"> <OutOfBrowserSettings ShortName="Virtu" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
<OutOfBrowserSettings.Blurb>Apple IIe Emulator</OutOfBrowserSettings.Blurb> <OutOfBrowserSettings.Blurb>Apple IIe Emulator</OutOfBrowserSettings.Blurb>
<OutOfBrowserSettings.WindowSettings> <OutOfBrowserSettings.WindowSettings>
<WindowSettings Title="Virtu" /> <WindowSettings Title="Virtu" />

View File

@ -1,4 +1,4 @@
namespace Jellyfish.Virtu namespace Jellyfish.Virtu
{ {
#if WINDOWS || XBOX #if WINDOWS || XBOX
static class MainApp static class MainApp

View File

@ -1,4 +1,4 @@
using Jellyfish.Library; using Jellyfish.Library;
using Jellyfish.Virtu.Services; using Jellyfish.Virtu.Services;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;

View File

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.0"> <Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.0">
<App xmlns="" ProductID="{89a50370-1ed9-4cf1-ad08-043b6e6f3c90}" Title="Virtu" RuntimeType="XNA" Version="1.0.0.0" Genre="Apps.Games" Author="Sean Fausett &amp; Nick Westgate" Description="Apple IIe Emulator" Publisher="Digital Jellyfish Design Ltd"> <App xmlns="" ProductID="{89a50370-1ed9-4cf1-ad08-043b6e6f3c90}" Title="Virtu" RuntimeType="XNA" Version="1.0.0.0" Genre="Apps.Games" Author="Sean Fausett &amp; Nick Westgate" Description="Apple IIe Emulator" Publisher="Digital Jellyfish Design Ltd">
<IconPath IsRelative="true" IsResource="false">AppThumbnail.png</IconPath> <IconPath IsRelative="true" IsResource="false">AppThumbnail.png</IconPath>
<Capabilities> <Capabilities>
<Capability Name="ID_CAP_NETWORKING" /> <Capability Name="ID_CAP_NETWORKING" />
<Capability Name="ID_CAP_LOCATION" /> <Capability Name="ID_CAP_LOCATION" />
<Capability Name="ID_CAP_SENSORS" /> <Capability Name="ID_CAP_SENSORS" />
<Capability Name="ID_CAP_MICROPHONE" /> <Capability Name="ID_CAP_MICROPHONE" />
<Capability Name="ID_CAP_MEDIALIB" /> <Capability Name="ID_CAP_MEDIALIB" />
<Capability Name="ID_CAP_GAMERSERVICES" /> <Capability Name="ID_CAP_GAMERSERVICES" />
<Capability Name="ID_CAP_PHONEDIALER" /> <Capability Name="ID_CAP_PHONEDIALER" />
<Capability Name="ID_CAP_PUSH_NOTIFICATION" /> <Capability Name="ID_CAP_PUSH_NOTIFICATION" />
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" /> <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
</Capabilities> </Capabilities>
<Tasks> <Tasks>
<DefaultTask Name="_default" /> <DefaultTask Name="_default" />
</Tasks> </Tasks>
<Tokens> <Tokens>
<PrimaryToken TokenID="Jellyfish.Virtu.Xna.Phone.Token" TaskName="_default"> <PrimaryToken TokenID="Jellyfish.Virtu.Xna.Phone.Token" TaskName="_default">
<TemplateType5> <TemplateType5>
<BackgroundImageURI IsRelative="true" IsResource="false">AppThumbnail.png</BackgroundImageURI> <BackgroundImageURI IsRelative="true" IsResource="false">AppThumbnail.png</BackgroundImageURI>
<Count>0</Count> <Count>0</Count>
<Title>Virtu</Title> <Title>Virtu</Title>
</TemplateType5> </TemplateType5>
</PrimaryToken> </PrimaryToken>
</Tokens> </Tokens>
</App> </App>
</Deployment> </Deployment>