moel@345: using System; moel@345: using System.IO; moel@345: using System.Reflection; moel@345: using System.Windows.Forms; moel@345: using System.Collections.Generic; moel@345: using System.Text; moel@345: moel@345: namespace Aga.Controls moel@345: { moel@345: public static class ResourceHelper moel@345: { moel@345: // VSpilt Cursor with Innerline (symbolisize hidden column) moel@345: private static Cursor _dVSplitCursor = GetCursor(Properties.Resources.DVSplit); moel@345: public static Cursor DVSplitCursor moel@345: { moel@345: get { return _dVSplitCursor; } moel@345: } moel@345: moel@345: private static GifDecoder _loadingIcon = GetGifDecoder(Properties.Resources.loading_icon); moel@345: public static GifDecoder LoadingIcon moel@345: { moel@345: get { return _loadingIcon; } moel@345: } moel@345: moel@345: /// moel@345: /// Help function to convert byte[] from resource into Cursor Type moel@345: /// moel@345: /// moel@345: /// moel@345: private static Cursor GetCursor(byte[] data) moel@345: { moel@345: using (MemoryStream s = new MemoryStream(data)) moel@345: return new Cursor(s); moel@345: } moel@345: moel@345: /// moel@345: /// Help function to convert byte[] from resource into GifDecoder Type moel@345: /// moel@345: /// moel@345: /// moel@345: private static GifDecoder GetGifDecoder(byte[] data) moel@345: { moel@345: using(MemoryStream ms = new MemoryStream(data)) moel@345: return new GifDecoder(ms, true); moel@345: } moel@345: moel@345: } moel@345: }