private void UpdateCloudStatus(CloudStatus newStatus) { if (CloudStatus == newStatus) { return; } CloudStatus = newStatus; OnCloudStatusUpdated?.Invoke(this, System.EventArgs.Empty); }
private void UpdatePanel() { CloudStatus newStatus = DataManager.CloudStatus; bool waitingCloud = DataManager.WaitingForTheCloud; if (newStatus == CloudStatus.CloudUpdated && !waitingCloud) { updatedCountdown = FADE_DURATION; } cloudUpdated.SetActive(newStatus == CloudStatus.CloudUpdated && !waitingCloud); waiting.SetActive(newStatus == CloudStatus.CloudUpdated && waitingCloud); cloudDisconnected.SetActive(newStatus == CloudStatus.CloudDisconnected); cloudUpdating.SetActive(newStatus == CloudStatus.CloudUpdating); }
/// <summary> /// 设置云引擎连接状态 /// </summary> /// <param name="text"></param> /// <param name="image"></param> public void SetCloudStatus(string text, Image image) { if (CloudStatus.GetCurrentParent().InvokeRequired) { DelegateSetCloudStatus dv = SetCloudStatus; Invoke(dv, new object[] { text, image }); } else { if (!string.IsNullOrEmpty(text)) { CloudStatus.Text = text; } if (image != null) { CloudStatus.Image = image; } } }