void SyncWithServerComplete(NSDictionary n) { NSString key = new NSString("userInfo.SyncStatus"); SyncSuccessLevel status = (SyncSuccessLevel)Enum.Parse(typeof(SyncSuccessLevel), n.ValueForKeyPath(key).ToString()); this.syncStatusBtnView.ShowStatus(status); }
public void NotifySyncComplete(SyncSuccessLevel status) { InvokeOnMainThread(delegate { NSString key = new NSString("SyncStatus"); NSDictionary userInfo = NSDictionary.FromObjectAndKey(NSObject.FromObject(status), key); NSNotificationCenter.DefaultCenter.PostNotificationName("SyncWithServerComplete", null, userInfo); }); }
public void ShowStatus(SyncSuccessLevel status) { switch (status) { case SyncSuccessLevel.FailedSevere: backgroundImage.Image = Resources.SyncIconAmber; break; case SyncSuccessLevel.FailedWarning: backgroundImage.Image = Resources.SyncIconAmber; break; default: backgroundImage.Image = Resources.SyncIconGrey; break; } }