示例#1
0
 protected ModalViewModel(IModalView view, IApplicationController appController)
     : base(view, appController)
 {
     OkCommand     = CreateCommand(DoOk, OkAllowed);
     CancelCommand = CreateCommand(DoCancel);
     Result        = MessageBoxResult.None;
 }
示例#2
0
        public ModalNavView(IModalView view) : base((UIViewController)view)
        {
            view.ToHide += OnViewToHide;

            if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                HidesBarsOnSwipe = true;
            }
        }
示例#3
0
        public void ShowDialog <T>(IModalDialog modalDialog, IModalView modalView, T dataContext, Action <T> onClosed)
        {
            if (modalDialog == null)
            {
                throw new ArgumentNullException("modalDialog", "Cannot be null");
            }
            if (modalView == null)
            {
                throw new ArgumentNullException("modalView", "Cannot be null");
            }

            EventHandler onDialogClosedHandler = null;
            EventHandler <ModalViewEventArgs> onViewClosedHandler = null;

            if (onClosed != null)
            {
                onDialogClosedHandler = (s, a) =>
                {
                    modalDialog.Closed -= onDialogClosedHandler;
                    onClosed(dataContext);
                };

                onViewClosedHandler = (s, a) =>
                {
                    modalDialog.Closed      -= onDialogClosedHandler;
                    modalView.Closed        -= onViewClosedHandler;
                    modalDialog.DialogResult = a.DialogResult;
                    //modalDialog.Close();
                    onClosed(dataContext);
                };

                modalDialog.Closed += onDialogClosedHandler;
                modalView.Closed   += onViewClosedHandler;
            }

            modalDialog.Content   = modalView;
            modalView.DataContext = dataContext;
            modalDialog.ShowDialog();
        }
示例#4
0
 public void HideModalView()
 {
     mb_fio.FadeOut(true);
     activeModalView?.Hide();
     activeModalView = null;
 }
示例#5
0
 public void ShowAbout()
 {
     activeModalView = (AboutUIController)AboutSection;
     ShowModalView();
 }
示例#6
0
 public void ShowSettings()
 {
     activeModalView = (SettingsUIController)SettingsSection;
     ShowModalView();
 }