Auto updater added
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user