internal void RemoveDummy() { if (_dummy != null) { Nodes.Remove(_dummy); _dummy = null; } }
private void reposBrowser_AfterSelect(object sender, TreeViewEventArgs e) { RepositoryTreeNode tn = reposBrowser.SelectedNode; if (tn != null && tn.RawUri != null) { urlBox.Text = tn.RawUri.AbsoluteUri; timer.Stop(); } }
public RepositoryExplorerItem(IAnkhServiceProvider context, SvnOrigin origin, RepositoryTreeNode tn) { if (context == null) { throw new ArgumentNullException("context"); } else if (tn == null) { throw new ArgumentNullException("tn"); } _context = context; _origin = origin; _tn = tn; _name = tn.Text; }
internal void Preload(SvnNodeKind kind) { if (kind == SvnNodeKind.Directory) { if (Nodes.Count == 0 && _dummy == null) { _dummy = new RepositoryTreeNode(RawUri, true); _dummy.Name = _dummy.Text = "<dummy>"; Nodes.Add(_dummy); } } else { _loaded = true; } }
void RefreshFileList() { fileView.Items.Clear(); RepositoryTreeNode tn = treeView.SelectedNode as RepositoryTreeNode; if (tn != null && tn.Origin != null) { foreach (RepositoryTreeNode sn in tn.Nodes) { if (sn.FolderItems.Contains(sn.RawUri)) { ISvnRepositoryListItem ea = sn.FolderItems[sn.RawUri]; RepositoryListItem item = new RepositoryListItem(fileView, ea, tn.Origin, IconMapper); fileView.Items.Add(item); } } foreach (ISvnRepositoryListItem ee in tn.FolderItems) { if (ee.Uri != tn.RawUri) { RepositoryListItem item = new RepositoryListItem(fileView, ee, tn.Origin, IconMapper); fileView.Items.Add(item); } } if (fileView.Items.Count > 0) { SmartColumn fileColumn = fileView.AllColumns[0]; if (fileColumn.DisplayIndex >= 0) { fileColumn.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); } } } }
private void okButton_Click(object sender, EventArgs e) { RepositoryTreeNode rtn = reposBrowser.SelectedNode; if (rtn != null && rtn.Origin != null) { IAnkhConfigurationService ics = GetService <IAnkhConfigurationService>(); RegistryLifoList lifo = null; if (ics != null) { lifo = ics.GetRecentReposUrls(); } string url = rtn.Origin.RepositoryRoot.AbsoluteUri; if (lifo != null && !lifo.Contains(url)) { lifo.Add(url); } } }