Exemplo n.º 1
0
 //
 // Dispatcher that can open various assorted link-like text entries
 //
 public void Open(DialogViewController controller, string data)
 {
     if (data.Length == 0)
     {
         return;
     }
     if (data [0] == '@')
     {
         var profile = new FullProfileView(Util.CleanName(data.Substring(1)));
         controller.ActivateController(profile);
     }
     else if (data [0] == '#')
     {
         var search = new SearchViewController(data.Substring(1))
         {
             Account = TwitterAccount.CurrentAccount
         };
         controller.ActivateController(search);
     }
     else
     {
         WebViewController.OpenUrl(controller, data);
     }
 }
Exemplo n.º 2
0
 //
 // Dispatcher that can open various assorted link-like text entries
 //
 public void Open(DialogViewController controller, string data)
 {
     if (data.Length == 0)
         return;
     if (data [0] == '@'){
         var profile = new FullProfileView (Util.CleanName (data.Substring (1)));
         controller.ActivateController (profile);
     } else if (data [0] == '#'){
         var search = new SearchViewController (data.Substring (1)) { Account = TwitterAccount.CurrentAccount };
         controller.ActivateController (search);
     } else
         WebViewController.OpenUrl (controller, data);
 }