Ejemplo n.º 1
0
        void GetAttributeRowSelected(Attribute attrReturned)
        {
            //get the row selected from the left table
            //new UIAlertView("Row Selected", attrReturned.Name, null, "OK", null).Show();

            if (attrReturned.Name == "All")
            {
                attributesCollectionView.ClearImages();
                attributesCollectionView.UpdateImages(new DatabaseContext <Image>().GetQuery("Select * from Image"));
                return;
            }

            List <ImageAttributes> ImagesWithSameAttribute = new DatabaseContext <ImageAttributes>().GetQuery("SELECT * FROM ImageAttributes WHERE Name = ?", attrReturned.Name);
            List <Image>           Images = new List <Image>();

            foreach (ImageAttributes a in ImagesWithSameAttribute)
            {
                List <Image> temp = new DatabaseContext <Image>().GetQuery("Select * FROM Image WHERE ID = ?", a.ImageID.ToString());
                foreach (Image i in temp)
                {
                    Images.Add(i);
                }
            }

            if (Images != null)
            {
                attributesCollectionView.ClearImages();
                attributesCollectionView.UpdateImages(Images);
            }

            //clear the attributes table
            RightAttributesTableSource.ClearTable();
            RightImageAttributeTable.RefreshTableView();
        }
Ejemplo n.º 2
0
        void HandleTouchUpInsideLeft(object sender, EventArgs ee)
        {
            AttributesTableSource.RowDeselected(attributesTableViewController.getTable(), null);

            RightAttributesTableSource.ClearTable();
            RightImageAttributeTable.RefreshTableView();
            attributesCollectionView.ClearImages();
            attributesCollectionView.UpdateImages(new DatabaseContext <Image>().GetQuery("Select * FROM Image"));
        }