27 lines
834 B
C#
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);
|
|
}
|
|
}
|
|
} |