| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Updater.NET1.0.0.0.zip | 2014-03-20 | 49.5 kB | |
| UpdaterNET.xml | 2014-03-20 | 407 Bytes | |
| README.txt | 2014-03-20 | 2.6 kB | |
| Totals: 3 Items | 52.5 kB | 0 |
/*
* Version : 1.0.0.0
* Coded By: RebinF
* Website : http://rebinf.users.sourceforge.net/
* License : Free to use in commercial and personal projects.
*/
Form1 is provided for demonstration purposes, you can delete it.
You can also delete this README file after you're done with it.
You only need to do the following files:
Updater.cs
UpdateChecker.cs
UpdateCreator.cs
How to use:
1. Create a text file in your Resources name it UpdaterCode.txt
2. Open Updater.cs, copy all the code inside it and paste it in UpdaterCode.txt and save it.
* The code inside UpdaterCode.txt will be used to create the updater,
* If you want to change the updater make sure to copy all the code to UpdaterCode.txt replacing the old content.
3. To check for updates on startup:
//Change this url to your xml url
static string xmlURL = "http://sourceforge.net/projects/updaternet/files/UpdaterNET.xml/download";
private void Form1_Load(object sender, EventArgs e)
{
UpdateChecker updateChecker = new UpdateChecker();
updateChecker.updateAvilableEvent += updateChecker_updateAvilableEvent;
updateChecker.updateNOTAvilableEvent += updateChecker_updateNOTAvilableEvent;
updateChecker.CheckForUpdates(xmlURL);
}
void updateChecker_updateNOTAvilableEvent(object sender, EventArgs e)
{
// Do nothing, you can remove this method if you dont need it
}
if (MessageBox.Show(e, "Update") == System.Windows.Forms.DialogResult.Yes)
{
UpdateCreator.CreateUpdater(xmlURL, true, false);
}
4. The XML file, your xml file should look like something below,
* replace "Updater.NET" with your application name
* Change URL to your update URL
* Change UpdateType to type your update type
* Parameters, if your update is an exe file you can set parameters to be sent to the exe file before running it.
* Changes, provide what has been changed since the last update this will show in the message box when prompted to user.
* FilesToDelete, if you want some files to be deleted from user's application folder,
* like old useless files that are not required by the application anymore,
* seperate the file names with commas without spaces like file1.exe,file2.txt,file3.doc
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Updater.NET>
<CurrentVersion>1.0.0.0</CurrentVersion>
<URL>http://sourceforge.net/projects/win81tousb/files/Updater.NET1.0.0.0.zip/download</URL>
<UpdateType>zip</UpdateType>
<Parameters>None</Parameters>
<Changes>
* Bugs fixed.
* Features added.
* More changes...
</Changes>
<FilesToDelete>None</FilesToDelete>
</Updater.NET>