Пример #1
0
        void SyncComplete(object sender, SyncEventArgs e)
        {
            ActionHandler.Busy = false;
            ActionHandlerEx.Busy = false;

            CommonData common = (CommonData)_context.ValueStack.Values["common"];
            common.SyncIsOK = e.OK;

            DbEngine.Database.Current.SyncComplete(e.OK);

            if (_handler != null)
                _context.InvokeOnMainThread(() =>
                {
                    _handler.ExecuteStandalone(_scriptEngine.Visitor, new object[] { _state });
                    _state = null;
                    _handler = null;
                });

            if (!e.OK)
            {
                LastError = e.Exception.Message;
                _context.HandleException(e.Exception);
            }
        }
Пример #2
0
 void LoadComplete(object sender, SyncEventArgs e)
 {
     _baseActivity.RunOnUiThread(() =>
     {
         if (!_disposed)
             if (e.OK)
                 StartApplication();
             else
             {
                 var ce = e.Exception as ConnectionException;
                 if (ce != null)
                     ReturnToStartMenu(ce.FriendlyMessage, ce.Report);
                 else
                 {
                     HandleException(e.Exception);
                     var ex = e.Exception as CustomException;
                     if (ex != null)
                         ReturnToStartMenu(ex.FriendlyMessage, ex.Report);
                 }
             }
     });
 }
Пример #3
0
		void LoadComplete (object sender, SyncEventArgs args)
		{
			if (args.OK)
				_controller.BeginInvokeOnMainThread (() => {
					OpenStartScreen (true);
					UIApplication.SharedApplication.EndBackgroundTask (_backgroundTaskId);
				});
			else {

				CustomException ce = args.Exception as CustomException;
				if (ce != null) {
					string msg = ce.FriendlyMessage;
					Logon (Settings.ClearCacheOnStart, msg);
				} else
					HandleException (args.Exception);
				UIApplication.SharedApplication.EndBackgroundTask (_backgroundTaskId);
			}
		}