Ejemplo n.º 1
0
		public static void Init() 
		{
			if (Instance == null)
			{
				Instance = new UserDialogService();
			}
		}
Ejemplo n.º 2
0
		public static void Init(Activity activity)
		{
			if (Instance != null)
				return;
			var app = Application.Context.ApplicationContext as Application;
			if (app == null)
				throw new Exception("Application Context is not an application");
			ActivityMonitor.CurrentTopActivity = activity;
			app.RegisterActivityLifecycleCallbacks(new ActivityMonitor());
			Instance = new UserDialogService(() => ActivityMonitor.CurrentTopActivity);
		}
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TerminologyVocabularyViewModel"/> class.
        /// </summary>
        /// <param name="proxy">The proxy.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        public TerminologyVocabularyViewModel(
            ITerminologyProxy proxy, UserDialogService userDialogService, IAccessControlManager accessControlManager, ICommandFactory commandFactory)
            : base(accessControlManager, commandFactory)
        {
            _proxy             = proxy;
            _userDialogService = userDialogService;
            _proxy.GetVocabularyListCompleted            += GetVocabularyListCompleted;
            _proxy.FindConceptsWithNameMatchingCompleted += FindConceptsWithNameMatchingCompleted;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper(this, commandFactory);

            NamespaceChangedCommand = commandFactoryHelper.BuildDelegateCommand <TerminologyVocabulary> (
                () => NamespaceChangedCommand, ExecuteNamespaceChanged);
            PerformSearchCommand = commandFactoryHelper.BuildDelegateCommand <string> (() => PerformSearchCommand, ExecutePerformSearch);
        }
Ejemplo n.º 4
0
		public static void Init(Func<Activity> getActivity)
		{
			if (Instance == null)
				Instance = new UserDialogService(getActivity);
		}
Ejemplo n.º 5
0
 protected virtual async Task HandleException(Exception ex)
 {
     var baseException = ex.GetBaseException();
     await UserDialogService.AlertAsync(baseException.Message);
 }