public override void Selected(NSIndexPath indexPath)
        {
            base.Selected(indexPath);
            ThemedFileElement element    = (ThemedFileElement)fileSection [indexPath.Row];
            string            targetPath = BasePath.Expand(element.Caption, element.PathId);

            OpenFile(targetPath);
        }
 public IEnumerable <Element> GetElements()
 {
     foreach (ThemedFileElement element in ReadFileSystem())
     {
         element.Tapped += () => OpenFile(BasePath.Expand(element.Caption, basePathId));
         yield return(element);
     }
 }
Esempio n. 3
0
        public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
        {
            if (editingStyle != UITableViewCellEditingStyle.Delete)
            {
                return;
            }

            Section           section     = Root [indexPath.Section];
            ThemedFileElement fileElement = section [indexPath.Row] as ThemedFileElement;

            if (fileElement == null)
            {
                return;
            }
            string fullPath = BasePath.Expand(fileElement.Caption, fileElement.PathId);

            File.Delete(fullPath);
            section.Remove(indexPath.Row);
        }