Ejemplo n.º 1
0
        private void DoRename(TableItem item, string newName)
        {
            string oldPath = item.Path;
            string oldName = System.IO.Path.GetFileName(oldPath);

            if (oldName != newName)
            {
                string oldDir = System.IO.Path.GetDirectoryName(oldPath);
                Sccs.Rename(oldPath, System.IO.Path.Combine(oldDir, newName));
            }
        }
Ejemplo n.º 2
0
 public void outlineView_setObjectValue_forTableColumn_byItem(NSTableView table, NSObject value, NSTableColumn col, TableItem item)
 {
     string newName = value.description();
     DoRename(item, newName);
 }
Ejemplo n.º 3
0
        public NSObject outlineView_objectValueForTableColumn_byItem(NSOutlineView table, NSTableColumn col, TableItem item)
        {
            if (m_root == null)
                return NSString.Empty;

            if (col.identifier().ToString() == "1")
                return item == null ? m_root.Name : item.Name;
            else
                return item == null ? m_root.Bytes : item.Bytes;
        }
Ejemplo n.º 4
0
        public int outlineView_numberOfChildrenOfItem(NSOutlineView table, TableItem item)
        {
            if (m_root == null)
                return 0;

            return item == null ? m_root.Count : item.Count;
        }
Ejemplo n.º 5
0
 public bool outlineView_isItemExpandable(NSOutlineView table, TableItem item)
 {
     return item == null ? true : item.IsExpandable;
 }
Ejemplo n.º 6
0
        public NSObject outlineView_child_ofItem(NSOutlineView table, int index, TableItem item)
        {
            if (m_root == null)
                return null;

            return item == null ? m_root[index] : item[index];
        }