private void ButtonDetailsClicked(Id aSender) { try { System.Diagnostics.Process.Start(iUpdateInfo.History.AbsoluteUri); } catch (Exception) { NSAlert alert = new NSAlert(); alert.AddButtonWithTitle(NSString.StringWithUTF8String("Close")); alert.MessageText = NSString.StringWithUTF8String("Failed to retrieve update details."); alert.InformativeText = NSString.StringWithUTF8String("Failed to contact " + iUpdateInfo.History); alert.AlertStyle = NSAlertStyle.NSWarningAlertStyle; alert.BeginSheetModalForWindowModalDelegateDidEndSelectorContextInfo(Window, null, IntPtr.Zero); alert.Release(); } }
private void ButtonUpdateClicked(Id aSender) { if (iUpdateInfo.IsCompatibilityFamilyUpgrade) { NSAlert alert = new NSAlert(); alert.AddButtonWithTitle(NSString.StringWithUTF8String("Update")); alert.AddButtonWithTitle(NSString.StringWithUTF8String("Cancel")); alert.MessageText = NSString.StringWithUTF8String("This is a compatibility family upgrade. Do you wish to continue with the upgrade?"); alert.InformativeText = NSString.StringWithUTF8String("Updating " + iUpdateInfo.Name + " to a new compatibility family will also require updating Linn DS firmware."); alert.AlertStyle = NSAlertStyle.NSWarningAlertStyle; alert.BeginSheetModalForWindowModalDelegateDidEndSelectorContextInfo(Window, CompatibilityAlertEnd, IntPtr.Zero); alert.Release(); } else { CompatibilityAlertEnd(null, NSAlert.NSAlertFirstButtonReturn, IntPtr.Zero); } }