Auto updater added

This commit is contained in:
goomatt33
2023-11-20 16:20:20 -05:00
parent 87a73ff24b
commit 8cff012772
23 changed files with 776 additions and 33 deletions
+51
View File
@@ -0,0 +1,51 @@
using PWAppUpdater;
namespace PWAppUpdater2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void progressBar1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "Updating.... Please wait.";
label1.Update();
progressBar1.Maximum = 8;
progressBar1.Step = 1;
button1.Enabled = false;
try
{
PWAppUpdater.Updater.Update("C:\\PWAPP\\App\\", progressBar1, StepInfo, "C:\\PWAPP\\Temp\\");
}
catch (NoAuthException)
{
MessageBox.Show("Please run the updater with administrator privilages or from the PWApp Application.");
Application.Exit();
}
MessageBox.Show("Done!");
Application.Exit();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void label2_Click(object sender, EventArgs e)
{
}
}
}