예제 #1
0
파일: Icon.cs 프로젝트: hultqvist/Eto
		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);
			}
		}
예제 #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);
     }
 }
예제 #3
0
파일: Icon.cs 프로젝트: hultqvist/Eto
		public Icon (string fileName) : base(Generator.Current, typeof(IIcon))
		{
			inner = (IIcon)Handler;
			inner.Create (fileName);
		}
예제 #4
0
파일: Icon.cs 프로젝트: hultqvist/Eto
		public Icon (Stream stream) : base(Generator.Current, typeof(IIcon))
		{
			inner = (IIcon)Handler;
			inner.Create (stream);
		}
예제 #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);
 }
예제 #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);
 }