FM tells me that I have a newer version that the one available. Quite irritating imho. Maybe dont display the message when installed version > stable version?
in Form1.cs if you replace the entire CheckVersionWorker_DoWork method with the following code it will only check for updates when you ask it to via the menu.
int result = String.Compare(line, 1, FriendlyVersion, 1, 8, true, CultureInfo.InvariantCulture);
if (result < 0)
m_notifyicon.ShowBalloonTip(1, "Your version is newer.", line + " is online version. You have " + FriendlyVersion + ".", ToolTipIcon.Info);
else if (result > 0)
m_notifyicon.ShowBalloonTip(1, "New Update Is Available", line + " is available. You have " + FriendlyVersion + ".\nCheck About dialog for download site.", ToolTipIcon.Info);
else if (respond_to_latest)
{
m_notifyicon.ShowBalloonTip(1, "No New Updates", "You have the latest version (" + line + ").", ToolTipIcon.Info);
respond_to_latest = false;
}
version info
Logged In: NO
Same here.
Logged In: YES
user_id=1960110
Originator: NO
in Form1.cs if you replace the entire CheckVersionWorker_DoWork method with the following code it will only check for updates when you ask it to via the menu.
private void CheckVersionWorker_DoWork(object sender, DoWorkEventArgs e)
{
AssemblyName ThisAssemblyName = myAssembly.GetName();
string FriendlyVersion = "v" + ThisAssemblyName.Version.Major + "." + ThisAssemblyName.Version.Minor + "." + ThisAssemblyName.Version.Build;
if (respond_to_latest)
{
//Thread.Sleep(30000);
respond_to_latest = false;
try
{
WebRequest w = WebRequest.Create("http://freemeter.cvs.sourceforge.net/*checkout*/freemeter/FM_CVS/changelog.txt?revision=HEAD");
Stream sw = w.GetResponse().GetResponseStream();
StreamReader sr = new StreamReader(sw);
string line = sr.ReadLine();
int result = String.Compare(line, 1, FriendlyVersion, 1, 8, true, CultureInfo.InvariantCulture);
if (result < 0)
m_notifyicon.ShowBalloonTip(1, "Your version is newer.", line + " is online version. You have " + FriendlyVersion + ".", ToolTipIcon.Info);
else if (result > 0)
m_notifyicon.ShowBalloonTip(1, "New Update Is Available", line + " is available. You have " + FriendlyVersion + ".\nCheck About dialog for download site.", ToolTipIcon.Info);
else if (respond_to_latest)
{
m_notifyicon.ShowBalloonTip(1, "No New Updates", "You have the latest version (" + line + ").", ToolTipIcon.Info);
respond_to_latest = false;
}
sr.Close();
sr.Dispose();
sw.Close();
sw.Dispose();
}
catch (Exception ex)
{
m_notifyicon.ShowBalloonTip(1, "Check For Update", ex.Message, ToolTipIcon.Error);
}
}
}