public ImageStackAddingSplitViewController() : base()
        {
            View.BackgroundColor  = AppColors.LIGHT_TEAL;
            AttributesTableSource = new TableSourceAttributes();

            //master
            attributesTableViewController = new AttributesTableViewController(AttributesTableSource);
            attributesTableViewController.View.BackgroundColor = AppColors.LIGHT_TEAL;


            navController = new MasterImageAddingTableNavigationController(attributesTableViewController);
            navController.NavigationBar.BackgroundColor = AppColors.DARK_GRAY;

            AttributesTableSource.AttributeRowToController += GetAttributeRowSelected;
            AttributesTableSource.ReloadCollectionView     += ReloadCollectionViewAll;

            //slave
            //AttributeImageSource = new CollectionViewImageSourceAttribute(false);
            AttributeImageSource     = new ImageStackAddingSource();
            attributesCollectionView = new ImageStackAddingCollectionView(AttributeImageSource);
            attributesCollectionView.View.BackgroundColor = AppColors.LIGHT_TEAL;
            PreferredPrimaryColumnWidthFraction           = 0.2f;

            ViewControllers = new UIViewController[] { navController, attributesCollectionView };

            //delegate for finish button
            navController.getFinishButton().Clicked  += BtnFinishedClicked_TouchUpInside;
            navController.getFinishButton().TintColor = AppColors.LIGHT_TEAL;
        }
Пример #2
0
 public PopupAttributes(Image Selected, UIViewController presentingController, TableSourceAttributes leftTable, TableSourceImageAttributes rightTable, ImageAttributesTableViewController attrTable) : base("PopupAttributes", null)
 {
     currentlySelectedImage = Selected;
     PresentingController   = presentingController;
     RightAttributesTable   = rightTable;
     LeftAttributesTable    = leftTable;
     ImageAttributeTable    = attrTable;
 }
Пример #3
0
        public void InitializeLeftTableView()
        {
            AttributesTableSource = new TableSourceAttributes();
            AttributesTableSource.AttributeRowToController += GetAttributeRowSelected;
            AttributesTableSource.ReloadCollectionView     += ReloadCollectionViewAll;

            attributesTableViewController = new AttributesTableViewController(AttributesTableSource);

            navController = new AttributesMasterTableNavigationController(attributesTableViewController);
        }
Пример #4
0
        public AttributesTableViewController(TableSourceAttributes paramSource)
        {
            tableController = new UITableViewController();
            //tableController.Title = "Attributes (Select to filter)";
            table = new UITableView();
            table.BackgroundColor = AppColors.LIGHT_TEAL;
            source       = paramSource;
            table.Source = (UITableViewSource)source;

            tableController.View = table;
        }
Пример #5
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();
        }
Пример #6
0
 public void setAttributesSource(TableSourceAttributes AttributesTableSource)
 {
     this.AttributesTableSource = AttributesTableSource;
 }