예제 #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));
            }
        }
예제 #2
0
 public void outlineView_setObjectValue_forTableColumn_byItem(NSTableView table, NSObject value, NSTableColumn col, TableItem item)
 {
     string newName = value.description();
     DoRename(item, newName);
 }
예제 #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;
        }
예제 #4
0
        public int outlineView_numberOfChildrenOfItem(NSOutlineView table, TableItem item)
        {
            if (m_root == null)
                return 0;

            return item == null ? m_root.Count : item.Count;
        }
예제 #5
0
 public bool outlineView_isItemExpandable(NSOutlineView table, TableItem item)
 {
     return item == null ? true : item.IsExpandable;
 }
예제 #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];
        }