1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Enable updater

This commit is contained in:
KillzXGaming 2019-03-23 13:55:12 -04:00
parent c8b1d71875
commit 822a4c699e
12 changed files with 13400 additions and 34 deletions

Binary file not shown.

View File

@ -267,27 +267,23 @@ namespace FirstPlugin
bool IsLoaded = false; bool IsLoaded = false;
public override void OnClick(TreeView treeView) public override void OnClick(TreeView treeView)
{ {
if (!Runtime.DisableViewport) Viewport editor = (Viewport)LibraryGUI.Instance.GetActiveContent(typeof(Viewport));
if (editor == null)
{ {
Viewport editor = (Viewport)LibraryGUI.Instance.GetActiveContent(typeof(Viewport)); editor = new Viewport();
LibraryGUI.Instance.LoadEditor(editor);
if (editor == null)
{
editor = new Viewport();
LibraryGUI.Instance.LoadEditor(editor);
}
editor.Text = Text;
editor.Dock = DockStyle.Fill;
if (!IsLoaded)
{
editor.AddDrawable(Renderer);
editor.LoadObjects();
}
IsLoaded = true;
} }
editor.Text = Text;
editor.Dock = DockStyle.Fill;
if (!IsLoaded)
{
editor.AddDrawable(Renderer);
editor.LoadObjects();
}
IsLoaded = true;
} }
public MarioKart.MK7.KCL kcl = null; public MarioKart.MK7.KCL kcl = null;

View File

@ -111,25 +111,21 @@ namespace Toolbox
} }
#region Updater #region Updater
bool UpdatePromptShown = false;
private void Application_Idle(object sender, EventArgs e) private void Application_Idle(object sender, EventArgs e)
{ {
if (UpdateProgram.CanUpdate && !Runtime.EnableVersionCheck) if (UpdateProgram.CanUpdate && !Runtime.EnableVersionCheck)
{ {
if (!UpdatePromptShown) //Prompt once for the user to update the tool.
UpdatePromptShown = true;
DialogResult result;
using (DialogCenteringService centeringService = new DialogCenteringService(this)) // center message box
{ {
//Prompt once for the user to update the tool. result = MessageBox.Show($"A new update is available {UpdateProgram.LatestRelease.TagName}!" +
UpdatePromptShown = true; $" Would you like to install it?", "Updater", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
DialogResult result; }
using (DialogCenteringService centeringService = new DialogCenteringService(this)) // center message box if (result == DialogResult.Yes)
{ {
result = MessageBox.Show($"A new update is available {UpdateProgram.LatestRelease.TagName}!" + UpdateApplication();
$" Would you like to install it?", "Updater", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
}
if (result == DialogResult.Yes)
{
UpdateApplication();
}
} }
} }
} }

View File

@ -1,3 +1,3 @@
v1.0 BETA v1.0 r1 BETA EXPERIMENTAL
3/23/2019 1:40:02 PM +00:00 3/23/2019 1:40:02 PM +00:00
master master

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff