Пример #1
0
        public static void OpenFriendsImportContacts(Action continueClickCallback)
        {
            if (AppGlobalStateManager.Current.GlobalState.AllowSendContacts)
            {
                if (continueClickCallback != null)
                {
                    continueClickCallback.Invoke();
                }
                return;
            }
            DialogService popup = new DialogService
            {
                AnimationType      = DialogService.AnimationTypes.None,
                AnimationTypeChild = DialogService.AnimationTypes.SlideInversed,
                BackgroundBrush    = new SolidColorBrush(Colors.Transparent)
            };
            ContactsSyncRequestUC child = new ContactsSyncRequestUC();

            child.buttonContinue.Click += (delegate(object sender, RoutedEventArgs args)
            {
                AppGlobalStateManager.Current.GlobalState.AllowSendContacts = true;
                EventAggregator.Current.Publish(new ContactsSyncEnabled());
                popup.Hide();
                if (continueClickCallback != null)
                {
                    continueClickCallback.Invoke();
                }
            });
            popup.Child   = child;
            popup.Opened += delegate(object sender, EventArgs args)
            {
                child.LoadFriends();
            };
            popup.Show(null);
        }
Пример #2
0
 private void ContactsSyncStartButton_OnTapped(object sender, System.Windows.Input.GestureEventArgs e)
 {
     ContactsSyncRequestUC.OpenFriendsImportContacts((Action)(() => Navigator.Current.NavigateToFriendsImportContacts()));
 }