Esempio n. 1
0
 void ShowResource(ResourceItem item)
 {
     if (item == null)
     {
         ShowView(null);
         return;
     }
     if (item.ResourceValue is Icon)
     {
         IconView iv = new IconView(item);
         ShowView(iv);
     }
     else if (item.ResourceValue is Bitmap)
     {
         BitmapView bv = new BitmapView(item);
         ShowView(bv);
     }
     else if (item.ResourceValue is Cursor)
     {
         CursorView cv = new CursorView(item);
         ShowView(cv);
     }
     else if (item.ResourceValue is string)
     {
         TextView tv = new TextView(item);
         ShowView(tv);
     }
     else if (item.ResourceValue is byte[])
     {
         BinaryView bv = new BinaryView(item);
         ShowView(bv);
     }
     else if (item.ResourceValue is bool)
     {
         BooleanView bv = new BooleanView(item);
         ShowView(bv);
     }
     else
     {
         ShowView(null);
     }
 }
Esempio n. 2
0
		void showResource(ResourceItem item)
		{
			if(item == null) {
				showView(null);
				return;
			}
			if (item.ResourceValue is Icon) {
				IconView iv = new IconView(item);
				showView(iv);
			} else if(item.ResourceValue is Bitmap) {
				BitmapView bv = new BitmapView(item);
				showView(bv);
			} else if(item.ResourceValue is Cursor) {
				CursorView cv = new CursorView(item);
				showView(cv);
			} else if(item.ResourceValue is string) {
				TextView tv = new TextView(item);
				showView(tv);
			} else if(item.ResourceValue is byte[]) {
				BinaryView bv = new BinaryView(item);
				showView(bv);
			} else if(item.ResourceValue is bool) {
				BooleanView bv = new BooleanView(item);
				showView(bv);
			} else {
				showView(null);
			}
		}