OK. Having some issues constructing the code block that is supposed to return
a collection of images.

Here is what I am trying to do -->


public UIImage[] ReturnAssemblyImages(int assemblyid)
                {
                        this.CreateDBConnection ();
                        try
                        {
                                string strimg="select Photo from Photo where 
PhotoOfflineID in (select
PhotoID from AssemblyPhoto where AssemblyID="+assemblyid+")";
                                SqliteDataAdapter sda=new 
SqliteDataAdapter(strimg, sconn);
                                DataSet ds=new DataSet();
                                sda.Fill (ds);
                                int imagescount=ds.Tables[0].Rows.Count;
                                UIImage[] imgarray=new UIImage[imagescount];
                                byte[] mybuffer=null;
                                for(int y=0; y<ds.Tables[0].Rows.Count; y++)
                                {
                                        
mybuffer=(byte[])(ds.Tables[0].Rows[y]["Photo"]);
                                        UIImage img= UIImage.LoadFromData 
(NSData.FromArray (mybuffer));

                                }
                        }
                        catch(Exception exp)
                        {
                                throw exp;
                        }
                        this.CloseDBConnection ();
                }

What I am trying to do is return a array of UIImage objects. So I
initialized the imgarray in my code. But when I try to add the new UIImage
img to the array, I find that the Add() method is not present. Obviously I
am going about it the wrong way or so it seems. Could you please help me
restructure the code properly? Some help needed on this in the earnest.

Thanks in advance.





--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/How-to-show-an-imagegallery-in-IPAD-application-tp4656388p4656413.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to