This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
UpTool2/UpTool2/SourcesForm.cs

27 lines
834 B
C#

using System.Collections.Generic;
using System.Windows.Forms;
using UpToolLib.DataStructures;
namespace UpTool2
{
public partial class SettingsForms : Form
{
private readonly List<Repo> _repos = new List<Repo>();
public SettingsForms()
{
InitializeComponent();
Program.FixXml();
_repos.AddRange(Program.Lib.V2.RepoManagement.GetRepos());
sourceGrid.Columns.Clear();
sourceGrid.Columns.Add("name", "Name");
sourceGrid.Columns.Add("link", "Link");
foreach (Repo repo in _repos)
sourceGrid.Rows.Add(repo.Name, repo.Url);
}
private void SettingsForms_FormClosing(object sender, FormClosingEventArgs e)
{
Program.Lib.V2.RepoManagement.Save(_repos);
}
}
}