コード例 #1
0
        public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, Foundation.NSIndexPath indexPath)
        {
            switch (editingStyle)
            {
            case UITableViewCellEditingStyle.Delete:
                // remove the item from the underlying data source
                Profiles selected = tableItems[indexPath.Section];

                var didDelete = new DatabaseContext <Profiles>().Delete(selected.ID);

                if (didDelete > 0)                         //deleted
                {
                    tableItems.RemoveAt(indexPath.Section);
                    tableView.DeleteSections(NSIndexSet.FromIndex(indexPath.Section), UITableViewRowAnimation.Fade);
                }


                break;

            case UITableViewCellEditingStyle.None:
                Console.WriteLine("CommitEditingStyle:None called");
                break;
            }
        }
コード例 #2
0
 public void setProfile(Profiles p)
 {
     profileRow = p;
 }
コード例 #3
0
 //DEFUNCT
 public SettingsAlertController(Profiles profileSelected, Category categorySelected, MainTabBarController tab) : base("SettingsAlertController", null)
 {
     CurrentProfile  = profileSelected;
     CurrentCategory = categorySelected;
     tabBar          = tab;
 }
コード例 #4
0
 public FinishScreenController(MainTabBarController tab, TableSourceSessions s, RunsTableViewController r, ImagesTableViewController i, Profiles p, Category c) : base("FinishScreenController", null)
 {
     tabBar                   = tab;
     SessionSource            = s;
     ranSessions              = r;
     imageTableViewController = i;
     CurrentProfile           = p;
     SessionCategory          = c;
 }