kopia lustrzana https://github.com/njcrawford/EmbroideryReader
Updated to latest nc_Updater.dll, added update location missing messagebox
rodzic
507292fe89
commit
06f28dab8c
|
@ -54,5 +54,5 @@ using System.Runtime.InteropServices;
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("1.4.0.0")]
|
[assembly: AssemblyVersion("1.4.0.5")]
|
||||||
[assembly: AssemblyFileVersion("1.4.0.0")]
|
[assembly: AssemblyFileVersion("1.4.0.5")]
|
||||||
|
|
|
@ -54,9 +54,9 @@ namespace embroideryReader
|
||||||
{
|
{
|
||||||
string updateLoc;
|
string updateLoc;
|
||||||
updateLoc = settings.getValue("update location");
|
updateLoc = settings.getValue("update location");
|
||||||
if (String.IsNullOrEmpty(updateLoc))
|
if (String.IsNullOrEmpty(updateLoc) || updateLoc == "http://www.njcrawford.com/embreader/")
|
||||||
{
|
{
|
||||||
settings.setValue("update location", "http://www.njcrawford.com/embreader/");
|
settings.setValue("update location", "http://www.njcrawford.com/embroidery-reader/");
|
||||||
}
|
}
|
||||||
if (settings.getValue("background color", "enabled") == "yes")
|
if (settings.getValue("background color", "enabled") == "yes")
|
||||||
{
|
{
|
||||||
|
@ -241,23 +241,14 @@ namespace embroideryReader
|
||||||
|
|
||||||
private void checkForUpdateToolStripMenuItem_Click(object sender, EventArgs e)
|
private void checkForUpdateToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
//bool isNewerVersion = false;
|
|
||||||
nc_Updater.IniFileUpdater updater = new nc_Updater.IniFileUpdater(settings.getValue("update location"));
|
nc_Updater.IniFileUpdater updater = new nc_Updater.IniFileUpdater(settings.getValue("update location"));
|
||||||
//UpdateTester.nc_Update updater = new UpdateTester.nc_Update("http://www.google.com/");
|
|
||||||
//char[] sep = { '.' };
|
// this shouldn't be able to happen, the update location is checked at form load
|
||||||
//string[] upVersion = updater.VersionAvailable().Split(sep);
|
if(settings.getValue("update location") == null)
|
||||||
//string[] curVersion = currentVersion().Split(sep);
|
{
|
||||||
//for (int i = 0; i < 4; i++)
|
MessageBox.Show("Cannot check for update because the 'update location'" + Environment.NewLine + "setting has been removed from the settings file.");
|
||||||
//{
|
}
|
||||||
// if (Convert.ToInt32( upVersion[i]) > Convert.ToInt32(curVersion[i]))
|
else if (updater.IsUpdateAvailable())
|
||||||
// {
|
|
||||||
// isNewerVersion = true;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//if (isNewerVersion)
|
|
||||||
if (updater.IsUpdateAvailable() && settings.getValue("update location") != null)
|
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("Version " + updater.VersionAvailable() + " is available." + Environment.NewLine + "You have version " + currentVersion() + ". Would you like to go to the Embroidery Reader website to download it?", "New version available", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
if (MessageBox.Show("Version " + updater.VersionAvailable() + " is available." + Environment.NewLine + "You have version " + currentVersion() + ". Would you like to go to the Embroidery Reader website to download it?", "New version available", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
|
|
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue