Пример #1
0
        /// <summary>
        /// Interaction logic for closing popup prompt
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Close(object sender, RoutedEventArgs e)
        {
            this.Close();

            if (main != null)
            {
                main.OnCloseMessagePrompt();
            }
            else if (parent.GetType() == typeof(ProfilePageOtherUser))
            {
                ProfilePageOtherUser castedParent = (ProfilePageOtherUser)parent;
                castedParent.OnCloseMessagePrompt();
            }
            else if (parent.GetType() == typeof(MessagesPage))
            {
                MessagesPage castedParent = (MessagesPage)parent;
                castedParent.OnCloseMessagePrompt();
            }
        }
Пример #2
0
        /// <summary>
        /// Interaction logic for clicking the cancel confirmation
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Cancel(object sender, RoutedEventArgs e)
        {
            this.Close();

            if (main != null)
            {
                main.OnCloseMessagePrompt();
            }
            else if (parent.GetType() == typeof(ProfilePageOtherUser))
            {
                ProfilePageOtherUser castedParent = (ProfilePageOtherUser)parent;
                castedParent.OnCloseMessagePrompt();
            }
            else if (parent.GetType() == typeof(MessagesPage))
            {
                MessagesPage castedParent = (MessagesPage)parent;
                castedParent.OnCloseMessagePrompt();
            }
            else if ((parent.GetType() == typeof(PhotoPopup)) || (parent.GetType() == typeof(DiscussionPopup)))
            {
                // Do nothing.
            }
        }