Ejemplo n.º 1
0
		public Icon (Assembly asm, string resourceName) : base(Generator.Current, typeof(IIcon))
		{
			inner = (IIcon)Handler;
			if (asm == null)
				asm = Assembly.GetCallingAssembly ();
			using (var stream = asm.GetManifestResourceStream (resourceName)) {
				if (stream == null)
					throw new ResourceNotFoundException (asm, resourceName);
				inner.Create (stream);
			}
		}
Ejemplo n.º 2
0
 public Icon(Assembly asm, string resourceName) : base(Generator.Current, typeof(IIcon))
 {
     handler = (IIcon)Handler;
     if (asm == null)
     {
         asm = Assembly.GetCallingAssembly();
     }
     using (var stream = asm.GetManifestResourceStream(resourceName)) {
         if (stream == null)
         {
             throw new ResourceNotFoundException(asm, resourceName);
         }
         handler.Create(stream);
     }
 }
Ejemplo n.º 3
0
		public Icon (string fileName) : base(Generator.Current, typeof(IIcon))
		{
			inner = (IIcon)Handler;
			inner.Create (fileName);
		}
Ejemplo n.º 4
0
		public Icon (Stream stream) : base(Generator.Current, typeof(IIcon))
		{
			inner = (IIcon)Handler;
			inner.Create (stream);
		}
Ejemplo n.º 5
0
 /// <summary>
 /// Intitializes a new instanc of the Icon class with the contents of the specified <paramref name="fileName"/>
 /// </summary>
 /// <param name="fileName">Name of the file to loat the content from</param>
 public Icon(string fileName) : base(Generator.Current, typeof(IIcon))
 {
     handler = (IIcon)Handler;
     handler.Create(fileName);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the Icon class with the contents of the specified <paramref name="stream"/>
 /// </summary>
 /// <param name="stream">Stream to load the content from</param>
 public Icon(Stream stream) : base(Generator.Current, typeof(IIcon))
 {
     handler = (IIcon)Handler;
     handler.Create(stream);
 }