当前位置: 首页>>代码示例>>C#>>正文


C# DialogViewController.ActivateController方法代码示例

本文整理汇总了C#中MonoTouch.Dialog.DialogViewController.ActivateController方法的典型用法代码示例。如果您正苦于以下问题:C# DialogViewController.ActivateController方法的具体用法?C# DialogViewController.ActivateController怎么用?C# DialogViewController.ActivateController使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MonoTouch.Dialog.DialogViewController的用法示例。


在下文中一共展示了DialogViewController.ActivateController方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Selected

		public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			if (IsReadonly) {
				base.Selected (dvc, tableView, path);
				return;
			}

			var controller = new UIViewController ();

			UITextView disclaimerView = new UITextView (controller.View.Frame);
//			disclaimerView.BackgroundColor = UIColor.FromWhiteAlpha (0, 0);
//			disclaimerView.TextColor = UIColor.White;
//			disclaimerView.TextAlignment = UITextAlignment.Left;
			if (!string.IsNullOrWhiteSpace (Value))
				disclaimerView.Text = Value;
			else
				disclaimerView.Text = string.Empty;
			
			disclaimerView.Font = UIFont.SystemFontOfSize (16f);
			disclaimerView.Editable = true;

			controller.View.AddSubview (disclaimerView);
			controller.NavigationItem.Title = Caption;
			controller.NavigationItem.RightBarButtonItem = new UIBarButtonItem (string.IsNullOrEmpty (_saveLabel) ? "Save" : _saveLabel, UIBarButtonItemStyle.Done, (object sender, EventArgs e) => {
				if (OnSave != null)
					OnSave (this, EventArgs.Empty);
				controller.NavigationController.PopViewControllerAnimated (true);
				Value = disclaimerView.Text;
			});	

			dvc.ActivateController (controller);
		}
开发者ID:ClusterReplyBUS,项目名称:MonoTouch.Dialog,代码行数:32,代码来源:SelectableMultilineEntryElement.cs

示例2: Selected

		public override void Selected (DialogViewController dvc, UITableView tableView, Foundation.NSIndexPath path)
		{
			var eds = new MWC.iOS.Screens.iPhone.Exhibitors.ExhibitorDetailsScreen (exhibitor.ID);
			
			if (splitView != null)
				splitView.ShowExhibitor(exhibitor.ID, eds);
			else
				dvc.ActivateController (eds);
		}	
开发者ID:topcbl,项目名称:mobile-samples,代码行数:9,代码来源:ExhibitorElement.cs

示例3: Selected

		public override void Selected (DialogViewController dvc, UITableView tableView, MonoTouch.Foundation.NSIndexPath path)
		{
			var tds = new MWC.iOS.Screens.iPhone.Twitter.TweetDetailsScreen (tweet);
			
			if (splitView != null)
				splitView.ShowTweet(tweet.ID, tds);
			else
				dvc.ActivateController (tds);
		}
开发者ID:jorgenstorlie,项目名称:mobile-samples,代码行数:9,代码来源:TweetElement.cs

示例4: Selected

		public override void Selected (DialogViewController dvc, UITableView tableView, Foundation.NSIndexPath path)
		{
			var sds = new MWC.iOS.Screens.Common.News.NewsDetailsScreen(entry);
			
			if (splitView != null)
				splitView.ShowNews(entry.ID, sds);
			else
				dvc.ActivateController (sds);
		}
开发者ID:topcbl,项目名称:mobile-samples,代码行数:9,代码来源:NewsElement.cs

示例5: OpenHtmlString

        public static void OpenHtmlString(DialogViewController parent, string htmlString, NSUrl baseUrl)
        {
            UIView.BeginAnimations ("foo");
            Main.HidesBottomBarWhenPushed = true;
            Main.SetupWeb ();

            Main.WebView.LoadHtmlString (htmlString, baseUrl);
            parent.ActivateController (Main);
            UIView.CommitAnimations ();
        }
开发者ID:kangaroo,项目名称:TweetStation,代码行数:10,代码来源:Web.cs

示例6: Selected

		/// <summary>
		/// Behaves differently depending on iPhone or iPad
		/// </summary>
		public override void Selected (DialogViewController dvc, UITableView tableView, MonoTouch.Foundation.NSIndexPath path)
		{
			if (splitView != null)
				splitView.ShowSpeaker (speaker.ID);
			else {
				var sds = new MWC.iOS.Screens.iPhone.Speakers.SpeakerDetailsScreen (speaker.ID);
				sds.Title = "Speaker";
				dvc.ActivateController (sds);
			}
		}
开发者ID:Adameg,项目名称:mobile-samples,代码行数:13,代码来源:SpeakerElement.cs

示例7: Selected

        /// <summary>
        /// Behaves differently depending on iPhone or iPad
        /// </summary>
        public override void Selected(DialogViewController dvc, UITableView tableView, MonoTouch.Foundation.NSIndexPath path)
        {
            //TODO on selected go to papers list for this tag
            var papersByTagList = new PapersByTagView ();
            papersByTagList.SelectedTag = tag;
            papersByTagList.Title = tag.name;
            dvc.ActivateController (papersByTagList);

            //			var paperDetails = new WhitePaperBible.iOS.PaperDetailsView(tagNode.tag);
            //paperDetails.Title = tagNode.tag.permalink;
            //			dvc.ActivateController(paperDetails);
        }
开发者ID:davidortinau,项目名称:WhitePaperBibleMono,代码行数:15,代码来源:TagElement.cs

示例8: Selected

		public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			/*var vc = new MapKitViewController (this) {
				Autorotate = dvc.Autorotate
			};*/
			
			NetworkActivity = true;
			if ( SKPaymentQueue.CanMakePayments )
			{
				// Let's do it
				NSSet productIdentifiers  = NSSet.MakeNSObjectSet<NSString>(/*new NSString[]{new NSString("com.savagesoftwaresolutions.murdermap.subscription.monthly"), new NSString("com.savagesoftwaresolutions.com.murdermap.monthly")}*/ ProductIdentifiers);
				var request = new SKProductsRequest(productIdentifiers);
				
				request.ReceivedResponse += delegate(object sender, SKProductsRequestResponseEventArgs e) 
				{
					var root = new RootElement (Caption);
					var dvStore = new DialogViewController (root, true);
					var storeSection = new Section();
					
					root.Add(storeSection);
			
					
					foreach (var product in e.Response.Products) 
					{
						storeSection.Add(new StringElement(product.LocalizedTitle +":"+ product.PriceLocale ) );
					}
					
					dvc.ActivateController (dvStore);
				};
				
				request.RequestFailed += delegate(object sender, SKRequestErrorEventArgs e) 
				{					
					using (var msg = new UIAlertView ("Request Failed", e.Error.ToString(), null, "Ok")){
						msg.Show ();
					}
				};
				
				request.RequestFinished += delegate(object sender, EventArgs e) {
					NetworkActivity = false;
				};				
				
				request.Start();
			}
			else
			{
				using (var msg = new UIAlertView ("Unabled to Make Payments", "We are unable to connect to the Apple Store at this moment, to process your payments.\n Please try again later.", null, "Ok")){
					msg.Show ();
				}
			}
			
			NetworkActivity = false;
		}
开发者ID:CartBlanche,项目名称:MonoTouch.Dialog,代码行数:52,代码来源:StoreKitElement.cs

示例9: Selected

 public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
 {
     model = new CounterPickerDataModel(model.Counter);
     var vc = new MyViewController (this) {
         Autorotate = dvc.Autorotate
     };
     counterPicker = CreatePicker ();
     counterPicker.Frame = PickerFrameWithSize (counterPicker.SizeThatFits (SizeF.Empty));
     counterPicker.Model = model;
     for (int d = 0; d < model.Items.Count; d++) {
         counterPicker.Select(model.SelectedIndex[d], d, true);
     }
     vc.View.BackgroundColor = UIColor.Black;
     vc.View.AddSubview (counterPicker);
     dvc.ActivateController (vc);
 }
开发者ID:austinvernsonger,项目名称:monotouch-element-pack,代码行数:16,代码来源:CounterElement.cs

示例10: Selected

 public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
 {
     try
     {
         if (_tappedAction != null)
         {
             _tappedAction();
         }
         if (_tappedFunc != null)
         {
             UIViewController controller = _tappedFunc();
             dvc.ActivateController(controller);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
 }
开发者ID:GSerjo,项目名称:ImagePocket,代码行数:19,代码来源:MenuElement.cs

示例11: Selected

        public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            tableView.DeselectRow(path, false);
            if (loading)
                return;
            var cell = GetActiveCell();
            var spinner = StartSpinner(cell);
            loading = true;

            var request = new NSUrlRequest(new NSUrl(apiNode.ApiUrl), NSUrlRequestCachePolicy.UseProtocolCachePolicy, 60);

            var connection = new NSUrlConnection(request, new ConnectionDelegate((data, error) =>
            {
                var apiNodes = DrupalApiParser.ParseJsonStream(data);

                loading = false;
                spinner.StopAnimating();
                spinner.RemoveFromSuperview();

                string childType = apiNode["childType"];

                if (this.Count == 0)
                    Add(new Section(""));
                else
                    this[0].Clear();

                foreach (var element in apiNodes)
                {
                    this[0].Add(CreateElement(element, apiNode));
                }

                var newDvc = new DialogViewController(this, true)
                {
                    Autorotate = true
                };
                PrepareDialogViewController(newDvc);
                dvc.ActivateController(newDvc);

                return;
            }));
        }
开发者ID:josiahpeters,项目名称:CCBoise,代码行数:41,代码来源:CustomRootElement.cs

示例12: Selected

        public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            int i = 0;
            var vc = new UIViewController()
            {
                //Autorotate = dvc.Autorotate
            };

            webView = new UIWebView(UIScreen.MainScreen.Bounds)
            {
                BackgroundColor = UIColor.White,
                ScalesPageToFit = true,
                AutoresizingMask = UIViewAutoresizing.All
            };

            webView.LoadHtmlString(html, new NSUrl("HtmlContent", true));

            vc.NavigationItem.Title = Caption;

            vc.View.AutosizesSubviews = true;
            vc.View.AddSubview(webView);

            dvc.ActivateController(vc);
        }
开发者ID:josiahpeters,项目名称:CCBoise,代码行数:24,代码来源:HtmlStringElement.cs

示例13: msgSelected

		void msgSelected (DialogViewController dvc, UITableView tv, NSIndexPath path)
		{
			var np = new DialogViewController (new RootElement ("Message Display") {
				new Section () {
					new StyledMultilineElement (
	                    "From: foo\n" +
	                    "To: bar\n" +
	                    "Subject: Hey there\n\n" +
	                    "This is very simple!")
				}
			}, true);
			dvc.ActivateController (np);
		}
开发者ID:Clancey,项目名称:MonoTouch.Dialog,代码行数:13,代码来源:DemoDate.cs

示例14: Open

 //
 // 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);
 }
开发者ID:kellabyte,项目名称:TweetStation,代码行数:16,代码来源:Main.cs

示例15: MakeLoginDialog

        void MakeLoginDialog(DialogViewController parent, RootElement root)
        {
            loginDialog = new DialogViewController (UITableViewStyle.Grouped, root);

            if (parent == null){
                loginRoot = new UINavigationController (loginDialog);
                window.AddSubview (loginRoot.View);
            } else {
                loginDialog.NavigationItem.RightBarButtonItem =
                    new UIBarButtonItem (Locale.GetText ("Close"),
                                         UIBarButtonItemStyle.Plain,
                                         delegate { loginDialog.DismissModalViewControllerAnimated (true); });
                parent.ActivateController (loginDialog);
            }
        }
开发者ID:kellabyte,项目名称:TweetStation,代码行数:15,代码来源:Main.cs


注:本文中的MonoTouch.Dialog.DialogViewController.ActivateController方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。