refactor
This commit is contained in:
parent
898d1f22c8
commit
fab28fbc47
1 changed files with 2 additions and 4 deletions
|
@ -79,9 +79,8 @@ internal sealed partial class UpdateForm : CustomForm
|
||||||
updateButton.Enabled = true;
|
updateButton.Enabled = true;
|
||||||
updateButton.Click += OnUpdate;
|
updateButton.Click += OnUpdate;
|
||||||
changelogTreeView.Visible = true;
|
changelogTreeView.Visible = true;
|
||||||
for (int r = 0; r < releases!.Count; r++)
|
foreach (ProgramRelease release in releases)
|
||||||
{
|
{
|
||||||
ProgramRelease release = releases[r];
|
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
if (release.Version <= currentVersion)
|
if (release.Version <= currentVersion)
|
||||||
continue;
|
continue;
|
||||||
|
@ -90,10 +89,9 @@ internal sealed partial class UpdateForm : CustomForm
|
||||||
changelogTreeView.Nodes.Add(root);
|
changelogTreeView.Nodes.Add(root);
|
||||||
if (changelogTreeView.Nodes.Count > 0)
|
if (changelogTreeView.Nodes.Count > 0)
|
||||||
changelogTreeView.Nodes[0].EnsureVisible();
|
changelogTreeView.Nodes[0].EnsureVisible();
|
||||||
for (int c = 0; c < release.Changes.Length; c++)
|
foreach (string change in release.Changes)
|
||||||
Invoke(delegate
|
Invoke(delegate
|
||||||
{
|
{
|
||||||
string change = release.Changes[c];
|
|
||||||
TreeNode changeNode = new() { Text = change };
|
TreeNode changeNode = new() { Text = change };
|
||||||
root.Nodes.Add(changeNode);
|
root.Nodes.Add(changeNode);
|
||||||
root.Expand();
|
root.Expand();
|
||||||
|
|
Loading…
Reference in a new issue