示例#1
0
        //only if closed from outside(eg back button)
        void parentPopup_Closed(object sender, EventArgs e)
        {
            var ea = new PayNowEventArgs
            {
                IsSuccess = false,
            };

            if (dateSelectorPopup != null)
            {
                dateSelectorPopup.IsOpen = false;
            }

            if (stateSelectorPopup != null)
            {
                stateSelectorPopup.IsOpen = false;
            }

            SystemTray.BackgroundColor = (Color)Resources["PhoneBackgroundColor"];

            gr_busy.Visibility = Visibility.Collapsed;

            var eventHandler = Closed;

            if (eventHandler != null)
            {
                eventHandler(this, ea);
            }
        }
        private void LongListSelector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var ea = new PayNowEventArgs
            {
                IsSuccess = false,
                Response  = LongListSelector.SelectedItem
            };

            var eventHandler = Closed;

            if (eventHandler != null)
            {
                eventHandler(this, ea);
            }

            CloseSelf();
        }
示例#3
0
        private void RaiseEventHandler(bool isSuccess, object response = null)
        {
            gr_busy.Visibility = Visibility.Collapsed;

            var e = new PayNowEventArgs
            {
                IsSuccess = isSuccess,
                Response  = response
            };

            var eventHandler = Closed;

            if (eventHandler != null)
            {
                eventHandler(this, e);
            }

            CloseSelf();
        }
        private void DoneClick(object sender, RoutedEventArgs e)
        {
            var m = (int)((NumbersDataSource)ls_month.DataSource).SelectedItem;
            var y = (int)((NumbersDataSource)ls_year.DataSource).SelectedItem;

            var ea = new PayNowEventArgs
            {
                IsSuccess = false,
                Response  = new List <int> {
                    m, y
                }
            };

            var eventHandler = Closed;

            if (eventHandler != null)
            {
                eventHandler(this, ea);
            }

            CloseSelf();
        }