Skip to content

Instantly share code, notes, and snippets.

@ChuckSavage
ChuckSavage / MapMagic_AutoSave
Last active October 14, 2016 09:19
MapMagic v1.5 Setting up Auto-Save of Nodes data. Modify MapMagic at your own risk. There is no guarantee that the node file generated by this is useful. Be sure to test it for your own assurance.
Edit MapMagicWindow.cs
Make the following method static, it doesn't reference internal class data, so it is ok.
private static Generator[] SmartCopyGenerators(Generator gen)
Then refactor the SaveGenerator method, extracting the file saving to a public static ExportToFile method
void SaveGenerator(Generator gen, Vector2 pos)
{
@ChuckSavage
ChuckSavage / Paths.cs
Created February 10, 2013 18:59
Paths utility file for adding params to a string Combine.
public class Paths
{
/// <summary>
/// Apply Path.Combine(on path and list)
/// </summary>
/// <param name="path"></param>
/// <param name="list"></param>
/// <returns></returns>
public static string Combine(string path, params string[] list)
{
[DebuggerDisplay("{Title}, Desc({Description}), Link({Link})")]
public class Item
{
public Item(XElement x)
{
Title = x.Element("title").Value;
Description = x.Element("description").Value;
XElement link = x.Element("link");
if(null != link)
Link = link.Value;
@ChuckSavage
ChuckSavage / ViewExtensions.cs
Created June 6, 2012 19:58
MonoTouch Swipe Event
using System.Collections.Generic;
using MonoTouch.Foundation;
using MonoTouch.ObjCRuntime;
using MonoTouch.UIKit;
namespace iOSLib
{
public static class ViewExtensions
{
static Dictionary<UIView, Dictionary<UISwipeGestureRecognizerDirection, SwipeClass>>