예제 #1
0
        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);
        }
예제 #2
0
 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);
     });
 }
예제 #3
0
        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;
            }
        }