protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)
{
if (control == btDoUpdate)
{
//install the patch(s)
installUpdateGUI();
// tell the user what has been done
cmc_ChangeLog.Visible = false;
btDoUpdate.Visible = false;
if (AvalonGUIConfig.manualInstallNeeded)
{
GUIDialogOK dlgDone = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
dlgDone.SetHeading(Translation.mupdateheader);
dlgDone.SetLine(1, Translation.mupdateline1);
dlgDone.SetLine(2, Translation.mupdateline2);
dlgDone.SetLine(3, string.Format(Translation.mupdateline3, Path.GetFileName(optionDownloadPath)));
dlgDone.SetLine(4, Translation.mupdateline4);
dlgDone.DoModal(GUIWindowManager.ActiveWindow);
}
else
{
if (!updateCancelled)
{
GUIDialogOK dlgDone = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
dlgDone.SetHeading(Translation.SkinUpdate);
dlgDone.SetLine(1, string.Format(Translation.NumPatchesInstalled, updateCheck.patchList.Count.ToString()));
dlgDone.SetLine(2, String.Empty);
dlgDone.SetLine(3, string.Format(Translation.PatchUpdateComplete, updateCheck.SkinVersion()));
dlgDone.DoModal(GUIWindowManager.ActiveWindow);
}
}
GUIWindowManager.ShowPreviousWindow();
AvalonGUIConfig.updateAvailable = false;
}
}