示例#1
0
 public static GistCreateView Show(UIViewController parent)
 {
     var ctrl = new GistCreateView();
     var weakVm = new WeakReference<GistCreateViewModel>(ctrl.ViewModel);
     ctrl.ViewModel.SaveCommand.Subscribe(_ => parent.DismissViewController(true, null));
     ctrl.NavigationItem.LeftBarButtonItem = new UIBarButtonItem { Image = Images.Buttons.CancelButton };
     ctrl.NavigationItem.LeftBarButtonItem.GetClickedObservable().Subscribe(_ => {
         weakVm.Get()?.CancelCommand.Execute(null);
         parent.DismissViewController(true, null);
     });
     parent.PresentViewController(new ThemedNavigationController(ctrl), true, null);
     return ctrl;
 }
示例#2
0
        public static GistCreateView Show(UIViewController parent)
        {
            var ctrl   = new GistCreateView();
            var weakVm = new WeakReference <GistCreateViewModel>(ctrl.ViewModel);

            ctrl.ViewModel.SaveCommand.Subscribe(_ => parent.DismissViewController(true, null));
            ctrl.NavigationItem.LeftBarButtonItem = new UIBarButtonItem {
                Image = Images.Buttons.CancelButton
            };
            ctrl.NavigationItem.LeftBarButtonItem.GetClickedObservable().Subscribe(_ => {
                weakVm.Get()?.CancelCommand.Execute(null);
                parent.DismissViewController(true, null);
            });
            parent.PresentViewController(new ThemedNavigationController(ctrl), true, null);
            return(ctrl);
        }
示例#3
0
 public EditSource(GistCreateView dvc)
     : base(dvc)
 {
 }
示例#4
0
 public EditSource(GistCreateView dvc)
     : base(dvc.TableView, true)
 {
     _parent = dvc;
 }
示例#5
0
 public EditSource(GistCreateView dvc) 
     : base (dvc)
 {
 }
示例#6
0
 public EditSource(GistCreateView dvc) 
     : base (dvc)
 {
     _parent = dvc;
 }
示例#7
0
 public EditSource(GistCreateView dvc)
     : base(dvc)
 {
     _parent = dvc;
 }
示例#8
0
 private void GoToCreateGist()
 {
     GistCreateView.Show(this);
 }