private void okButton_Click(object sender, EventArgs e) { CancelEventArgs cea = new CancelEventArgs(); ValidateAdd(this, cea); if (cea.Cancel) { DialogResult = DialogResult.None; } else if (Context != null) { RepositoryTreeNode rtn = repositoryTree.SelectedNode; if (rtn != null && rtn.RepositoryRoot != null) { IAnkhConfigurationService config = Context.GetService <IAnkhConfigurationService>(); RegistryLifoList lifo = config.GetRecentReposUrls(); string url = rtn.RepositoryRoot.ToString(); if (!lifo.Contains(url)) { lifo.Add(url); } } } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (Context != null) { IAnkhConfigurationService config = Context.GetService<IAnkhConfigurationService>(); _items = config.GetRecentLogMessages(); logMessageList.Items.Clear(); foreach (string i in _items) { if (string.IsNullOrEmpty(i)) continue; ListViewItem item = new ListViewItem(); item.Text = i.Trim().Replace("\r", "").Replace("\n", "\x23CE"); item.Tag = i; logMessageList.Items.Add(i); } } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (Context != null) { IAnkhConfigurationService config = Context.GetService <IAnkhConfigurationService>(); _items = config.GetRecentLogMessages(); logMessageList.Items.Clear(); foreach (string i in _items) { if (string.IsNullOrEmpty(i)) { continue; } ListViewItem item = new ListViewItem(); item.Text = i.Trim().Replace("\r", "").Replace("\n", "\x23CE"); item.Tag = i; logMessageList.Items.Add(i); } } }
private void okButton_Click(object sender, EventArgs e) { RegistryLifoList recentUrls = GetService <IAnkhConfigurationService>().GetRecentReposUrls(); Uri fullUri; if (!string.IsNullOrEmpty(urlTextBox.Text) && Uri.TryCreate(urlTextBox.Text, UriKind.Absolute, out fullUri)) { string toAdd = fullUri.AbsoluteUri; if (!recentUrls.Contains(toAdd)) { recentUrls.Add(toAdd); } } }
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); } } }