2019-05-09 18:49:11 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Switch_Toolbox.Library.Forms;
|
|
|
|
|
using Octokit;
|
|
|
|
|
|
|
|
|
|
namespace Toolbox
|
|
|
|
|
{
|
|
|
|
|
public partial class GithubUpdateDialog : STForm
|
|
|
|
|
{
|
|
|
|
|
public GithubUpdateDialog()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-14 01:21:51 +00:00
|
|
|
|
private List<GitHubCommit> ActiveCommitList;
|
2019-05-09 18:49:11 +00:00
|
|
|
|
public void LoadCommits(List<GitHubCommit> Commits)
|
|
|
|
|
{
|
2019-05-14 01:21:51 +00:00
|
|
|
|
ActiveCommitList = Commits;
|
2019-05-09 18:49:11 +00:00
|
|
|
|
foreach (var commit in Commits)
|
|
|
|
|
{
|
2019-05-15 20:36:22 +00:00
|
|
|
|
|
|
|
|
|
listViewCustom1.Items.Add(commit.Commit.Message).SubItems.Add(commit.Commit.Author.Date.LocalDateTime.ToString());
|
2019-05-09 18:49:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-05-14 01:21:51 +00:00
|
|
|
|
|
|
|
|
|
private void listViewCustom1_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (listViewCustom1.SelectedIndices.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
int index = listViewCustom1.SelectedIndices[0];
|
|
|
|
|
stTextBox1.Text = ActiveCommitList[index].Commit.Message;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-05-09 18:49:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|