void BtnFinishedClicked_TouchUpInside(object sender, EventArgs e)
        {
            //get the list of images
            List <Image> SelectedImages = AttributeImageSource.getSelectedImagesForImageStack();


            int index = 1;

            /*
             * Add images to the DB. get Index ID
             */

            List <ImageStackImages> imgCount = new DatabaseContext <ImageStackImages>().GetQuery("Select * From ImageStackImages Where ParentImageStackID = ? Order By ImageStackIndex ASC", SelectedImageStack.ID.ToString());

            if (imgCount.Count > 0)
            {
                //get the last image index
                index = imgCount[imgCount.Count - 1].ImageStackIndex + 1;
            }

            //index = 1;
            //add it to the database
            if (SelectedImageStack != null)
            {
                foreach (Image i in SelectedImages)
                {
                    ImageStackImages tempInsert = new ImageStackImages();
                    tempInsert.ImageID            = i.ID;
                    tempInsert.ParentImageStackID = SelectedImageStack.ID;
                    tempInsert.ImageStackIndex    = index;
                    index++;
                    new DatabaseContext <ImageStackImages>().Insert(tempInsert);
                }
            }
            //attributesCollectionView.clearCellSelection();
            AttributeImageSource.clearSelectedImages(attributesCollectionView.getCollection());
            MainTabBarController tab = (MainTabBarController)ParentViewController;

            tab.SelectedIndex = 2;
            tab.DismissModalViewController(true);
        }
        void CollectionViewAddButton_TouchUpInside(object sender, EventArgs e)
        {
            //new UIAlertView("CollectionView Add Button", "", null, "OK", null).Show();
            //show all the images to choose from. create delegate to return those images
            MainTabBarController tab = (MainTabBarController)ParentViewController;

            ImageStackAddingSplitViewController imageStackAdding = (ImageStackAddingSplitViewController)tab.CustomizableViewControllers[0];

            if (SelectedImageStack != null)
            {
                imageStackAdding.SetSelectedImageStack(SelectedImageStack);

                //imageStackAddingSplitViewController = (ImageStackAddingSplitViewController)tab.ViewControllers[4];
                //SessionScreen.setFieldsAndInitialize(sessionsTableViewController.TableView.Source, profileRow, tab);
                tab.SelectedIndex = 0;
                tab.DismissModalViewController(true);
            }
            else
            {
                new UIAlertView("Select an imageStack", "", null, "OK", null).Show();
            }
        }
Exemplo n.º 3
0
        public SessionsScreenMasterTableNavigationController(IUpdatableTable tableViewController, MainTabBarController view) : base()
        {
            tabBar = view;
            PushViewController(tableViewController.tableController, true);
            table = tableViewController;
            tableViewController.tableController.NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add, (sender, e) => HandleTouchUpInside(sender, e));

            NavigationBar.TitleTextAttributes = new UIStringAttributes()
            {
                ForegroundColor = UIColor.White
            };
            NavigationBar.BarTintColor = AppColors.DARK_GRAY;
            NavigationBar.TintColor    = UIColor.White;
        }
Exemplo n.º 4
0
 public SettingsAlertController(Profiles profileSelected, Category categorySelected, MainTabBarController tab, TableSourceSessions session, RunsTableViewController runTableViewController, ImagesTableViewController ImageTableViewController) : base("SettingsAlertController", null)
 {
     CurrentProfile           = profileSelected;
     CurrentCategory          = categorySelected;
     tabBar                   = tab;
     SessionSource            = session;
     runsTableViewController  = runTableViewController;
     imageTableViewController = ImageTableViewController;
 }
Exemplo n.º 5
0
 //DEFUNCT
 public SettingsAlertController(Profiles profileSelected, Category categorySelected, MainTabBarController tab) : base("SettingsAlertController", null)
 {
     CurrentProfile  = profileSelected;
     CurrentCategory = categorySelected;
     tabBar          = tab;
 }
Exemplo n.º 6
0
 public SessionController(Profiles profileSelected, Category categorySelected, FinishScreenController finishController, MainTabBarController topParent) : base("SessionController", null)
 {
     _Session        = new CurrentSession();
     CurrentProfile  = profileSelected;
     CurrentCategory = categorySelected;
     ImageStack2D    = new List <List <ImageStackImages> >();
     ImageStackNames = new List <String>();
     finishedScreen  = finishController;
     Parent          = topParent;
 }
        public void setFieldsAndInitialize(UITableViewSource sessionSource, Profiles profileRow, MainTabBarController tab)
        {
            SessionSource = (TableSourceSessions)sessionSource;
            tabBar        = tab;
            InitializeRunsControllerFields(SessionSource, profileRow);
            InitializeMasterControllerFields();

            ViewControllers = new UIViewController[] { masterNavigationController, runsSplitViewController };
        }