public void SetUpdateNotification(object sender, EventArgs widgetEvent) { switch (UpdateControlData.Instance.UpdateStatus) { case UpdateControlData.UpdateStatusStates.MayBeAvailable: case UpdateControlData.UpdateStatusStates.ReadyToInstall: case UpdateControlData.UpdateStatusStates.UpdateAvailable: case UpdateControlData.UpdateStatusStates.UpdateDownloading: if (addedUpdateMark == null) { addedUpdateMark = new UpdateNotificationMark(); addedUpdateMark.OriginRelativeParent = new Vector2(aboutTabWidget.tabTitle.Width + 3, 7); aboutTabWidget.AddChild(addedUpdateMark); } addedUpdateMark.Visible = true; break; case UpdateControlData.UpdateStatusStates.UpToDate: case UpdateControlData.UpdateStatusStates.CheckingForUpdate: if (addedUpdateMark != null) { addedUpdateMark.Visible = false; } break; default: throw new NotImplementedException(); } }
public void SetUpdateNotification(object sender, EventArgs widgetEvent) { if (this.UpdateIsAvailable() || UpdateControl.NeedToCheckForUpdateFirstTimeEver) { #if true if (addedUpdateMark == null) { UpdateControl.NeedToCheckForUpdateFirstTimeEver = false; addedUpdateMark = new NotificationWidget(); addedUpdateMark.OriginRelativeParent = new Vector2(63, 10); aboutTabView.AddChild(addedUpdateMark); } #else AboutTabPage.Text = string.Format("About (!)"); #endif } else { if (addedUpdateMark != null) { addedUpdateMark.Visible = false; } AboutTabPage.Text = string.Format("About"); } }