protected override void OnPageLoad()
{
cmc_ChangeLog.Visible = false;
btDoUpdate.Visible = false;
if (updateCheck.updateAvailable(false))
{
btDoUpdate.Label = Translation.UpdateInstall;
updateFound.downloadChangeLog(false);
try
{
System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox();
string s = File.ReadAllText(Path.Combine(Path.GetTempPath(), "ChangeLog.rtf"));
rtBox.Rtf = s;
Log.Debug("Change Log: \\n" + rtBox.Text);
cmc_ChangeLog.Label = rtBox.Text;
cmc_ChangeLog.Visible = true;
btDoUpdate.Visible = true;
GUIPropertyManager.SetProperty("#Avalon.Revisions", AvalonGUIConfig.theRevisions);
}
catch (Exception ex)
{
Log.Error("Exception Generating Change Log: " + ex.Message + "\\n" + ex.StackTrace);
}
}
else
{
GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
dlg.Reset();
dlg.SetHeading(Translation.SkinUpdate);
dlg.SetLine(1, Translation.NoUpdatesAvailable);
dlg.DoModal(GUIWindowManager.ActiveWindow);
GUIWindowManager.ShowPreviousWindow();
}
}