Beispiel #1
0
 void GetImageSelectedFromCollectionView(Image imageSelected)
 {
     /*
      * Get the image object returned from the collection view click
      * Send the data to the RightImageAttributeTable
      */
     Selected = imageSelected;
     RightAttributesTableSource.SetTableSource(imageSelected.ID);
     RightImageAttributeTable.RefreshTableView();
 }
Beispiel #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.
            TableSourceAttributes attrSource = new TableSourceAttributes();

            AttributesTableView.Source = attrSource;
            OkButton.TouchUpInside    += (sender, e) =>
            {
                string input = AttributeInput.Text;
                if (input != "")
                {
                    /*
                     * Insert attribute to attributes DB.
                     * This will keep attributes with unique values only.
                     */

                    RightAttributesTable.UpdateData(input.ToString());
                    RightAttributesTable.SetTableSource(currentlySelectedImage.ID);
                    ImageAttributeTable.RefreshTableView();
                    LeftAttributesTable.ReloadTableData();

                    PresentingController.DismissViewController(true, null);
                }
                else
                {
                    PresentingController.DismissViewController(true, null);
                }
            };
            attrSource.AttributeRowToController += (attr) =>
            {
                //add the attribute to the selected image

                RightAttributesTable.UpdateData(attr.Name);
                RightAttributesTable.SetTableSource(currentlySelectedImage.ID);
                ImageAttributeTable.RefreshTableView();
                PresentingController.DismissViewController(true, null);
            };
            this.ViewWillLayoutSubviews();
        }