Skip to content

Commit

Permalink
Initial commit of code and data
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Hallock committed May 3, 2016
1 parent 8b24fae commit 26769c3
Show file tree
Hide file tree
Showing 48 changed files with 4,633 additions and 0 deletions.
6 changes: 6 additions & 0 deletions App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
9 changes: 9 additions & 0 deletions App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="IronKingdomsUnleashedCharacterSheet.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:IronKingdomsUnleashedCharacterSheet"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace IronKingdomsUnleashedCharacterSheet
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
14 changes: 14 additions & 0 deletions BaseClasses/PropertyChangedNotifier.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.ComponentModel;

namespace IronKingdomsUnleashedCharacterSheet.BaseClasses
{
public class PropertyChangedNotifier : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;

protected void NotifyPropertyChanged(string property)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
}
}
}
39 changes: 39 additions & 0 deletions DataHelpers/BitmapImageExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System.IO;
using System.Windows.Media.Imaging;

namespace IronKingdomsUnleashedCharacterSheet.DataHelpers
{
public static class BitmapImageExtensions
{
public static BitmapImage GetBitmapImage(this byte[] data)
{
if (data == null)
return null;
using (var ms = new MemoryStream())
{
ms.Write(data, 0, data.Length);
ms.Seek(0, SeekOrigin.Begin);
var img = new BitmapImage();
img.BeginInit();
img.StreamSource = ms;
img.CacheOption = BitmapCacheOption.OnLoad;
img.EndInit();
img.Freeze();
return img;
}
}

public static byte[] GetBytes(this BitmapImage img)
{
if (img == null)
return null;
var encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(img));
using (MemoryStream ms = new MemoryStream())
{
encoder.Save(ms);
return ms.ToArray();
}
}
}
}
16 changes: 16 additions & 0 deletions Enums/Archetype.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IronKingdomsUnleashedCharacterSheet.Enums
{
public enum Archetype
{
Cunning,
Gifted,
Mighty,
Skilled
}
}
7 changes: 7 additions & 0 deletions Enums/Race.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace IronKingdomsUnleashedCharacterSheet.Enums
{
public enum Race
{
Gatorman, Tharn, Human, Trollkin, Farrow, Pyg, Nyss, Bog_Trog
}
}
14 changes: 14 additions & 0 deletions Enums/Sex.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IronKingdomsUnleashedCharacterSheet.Enums
{
public enum Sex
{
Male,
Female
}
}
Loading

0 comments on commit 26769c3

Please sign in to comment.