本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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 ();
}
示例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);
}
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
}
示例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;
}));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}