Inheritance: Monospace11.WebViewControllerBase
コード例 #1
0
 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     MIX10Xml.Session s = _svc.Sessions[indexPath.Row];
     if (sessVC == null)
     {
         sessVC = new SessionViewController(s);
     }
     else
     {
         sessVC.Update(s);
     }
     sessVC.Title = s.Title;
     _svc.NavigationController.PushViewController(sessVC, true);
     tableView.DeselectRow(indexPath, true);
 }
コード例 #2
0
 public override bool ShouldStartLoad(UIWebView webView, NSUrlRequest request, UIWebViewNavigationType navigationType)
 {
     if (navigationType == UIWebViewNavigationType.LinkClicked)
     {
         string path = request.Url.Path.Substring(1);
         if (sessVC == null)
         {
             sessVC = new SessionViewController(path);
         }
         else
         {
             sessVC.Update(path);
         }
         _c.NavigationController.PushViewController(sessVC, true);
     }
     return(true);
 }
コード例 #3
0
 public override bool ShouldStartLoad(UIWebView webView, NSUrlRequest request, UIWebViewNavigationType navigationType)
 {
     if (navigationType == UIWebViewNavigationType.LinkClicked)
     {
         string path = request.Url.Path.Substring(1);
         string host = request.Url.Host.ToLower();
         if (host == "tweet.mix10.app")
         {
             var tweet = new TWTweetComposeViewController();
             tweet.SetInitialText("@" + path + " #monkeyspace");
             viewController.PresentModalViewController(tweet, true);
         }
         else if (host == "twitter.mix10.app")
         {
             var nsurl = new NSUrl("twitter://user?screen_name=" + viewController.speaker.TwitterHandle);
             UIApplication.SharedApplication.OpenUrl(nsurl);
         }
         else if (host == "session.mix10.app")
         {
             if (sessVC == null)
             {
                 sessVC = new SessionViewController(path);
             }
             else
             {
                 sessVC.Update(path);
             }
             viewController.NavigationController.PushViewController(sessVC, true);
         }
         else
         {
             viewController.NavigationController.PushViewController(new WebViewController(request), true);
             return(false);
         }
     }
     return(true);
 }
コード例 #4
0
        public override void Selected(DialogViewController dvc, UITableView tableView, MonoTouch.Foundation.NSIndexPath path)
        {
            var svc = new SessionViewController(session);

            dvc.ActivateController(svc);
        }
コード例 #5
0
 public override bool ShouldStartLoad(UIWebView webView, NSUrlRequest request, UIWebViewNavigationType navigationType)
 {
     if (navigationType == UIWebViewNavigationType.LinkClicked) {
         string path = request.Url.Path.Substring(1);
         string host = request.Url.Host.ToLower ();
         if (host == "tweet.monkeyspace.app") {
             var tweet = new TWTweetComposeViewController();
             tweet.SetInitialText ("@" + path + " " + MonkeySpace.Core.Constants.TwitterHashTag);
             viewController.PresentModalViewController(tweet, true);
         } else if (host == "twitter.monkeyspace.app") {
             var nsurl = new NSUrl("twitter://user?screen_name="+viewController.speaker.TwitterHandle);
             UIApplication.SharedApplication.OpenUrl (nsurl);
         } else if (host == "session.monkeyspace.app") {
             if (sessVC == null)
                 sessVC = new SessionViewController (path);
             else
                 sessVC.Update (path);
             viewController.NavigationController.PushViewController (sessVC, true);
         }
         else
         {
             viewController.NavigationController.PushViewController (new WebViewController (request), true);
             return false;
         }
     }
     return true;
 }
コード例 #6
0
 public override bool ShouldStartLoad(UIWebView webView, NSUrlRequest request, UIWebViewNavigationType navigationType)
 {
     if (navigationType == UIWebViewNavigationType.LinkClicked) {
         string path = request.Url.Path.Substring (1);
         if (sessVC == null)
             sessVC = new SessionViewController (path);
         else
             sessVC.Update (path);
         _c.NavigationController.PushViewController (sessVC, true);
     }
     return true;
 }
コード例 #7
0
 public override void Selected(DialogViewController dvc, UITableView tableView, MonoTouch.Foundation.NSIndexPath path)
 {
     var svc = new SessionViewController (session);
     dvc.ActivateController (svc);
 }
コード例 #8
0
 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     MIX10Xml.Session s = _svc.Sessions[indexPath.Row];
     if (sessVC == null)
         sessVC = new SessionViewController(s);
     else
         sessVC.Update(s);
     sessVC.Title = s.Title;
     _svc.NavigationController.PushViewController(sessVC, true);
     tableView.DeselectRow(indexPath,true);
 }