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)); } }
public void outlineView_setObjectValue_forTableColumn_byItem(NSTableView table, NSObject value, NSTableColumn col, TableItem item) { string newName = value.description(); DoRename(item, newName); }
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; }
public int outlineView_numberOfChildrenOfItem(NSOutlineView table, TableItem item) { if (m_root == null) return 0; return item == null ? m_root.Count : item.Count; }
public bool outlineView_isItemExpandable(NSOutlineView table, TableItem item) { return item == null ? true : item.IsExpandable; }
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]; }