本文整理汇总了C#中Foundation类的典型用法代码示例。如果您正苦于以下问题:C# Foundation类的具体用法?C# Foundation怎么用?C# Foundation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Foundation类属于命名空间,在下文中一共展示了Foundation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetCell
public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
{
var cell = (PlayInfoCell)tableView.DequeueReusableCell(CELL_IDENT);
var item = tableItems[indexPath.Row];
cell.SetInformation(item, (indexPath.Row + 1));
return cell;
}
示例2: GetSizeForItem
public override CoreGraphics.CGSize GetSizeForItem (UICollectionView collectionView, UICollectionViewLayout layout, Foundation.NSIndexPath indexPath)
{
if (Master.MaxHeight != 0) {
return new CoreGraphics.CGSize ((Master.View.Frame.Size.Width - 10) / 3, Master.MaxHeight);
}
return new CoreGraphics.CGSize ((Master.View.Frame.Size.Width - padding - 10) / 3, (Master.View.Frame.Size.Width - padding - 10) / 3 + differential);
}
示例3: WillDisplay
public override void WillDisplay(UITableView tableView, UITableViewCell cell, Foundation.NSIndexPath indexPath)
{
// cell.SeparatorInset = UIEdgeInsets.Zero;
// cell.PreservesSuperviewLayoutMargins = false;
// cell.LayoutMargins = UIEdgeInsets.Zero;
//
}
示例4: TouchesCancelled
/// <summary>
/// Called when the touches are cancelled due to a phone call, etc.
/// </summary>
public override void TouchesCancelled (Foundation.NSSet touches, UIEvent evt)
{
base.TouchesCancelled (touches, evt);
// we fail the recognizer so that there isn't unexpected behavior
// if the application comes back into view
base.State = UIGestureRecognizerState.Failed;
}
示例5: InitalizeWithEmptyBuffer
public void InitalizeWithEmptyBuffer()
{
using (var foundation = new Foundation())
{
var stream = new DefaultMemoryOutputStream(new byte[] { });
}
}
示例6: GetHeightForRow
public override nfloat GetHeightForRow (UITableView tableView, Foundation.NSIndexPath indexPath)
{
if (!data.IsList && indexPath.Section == 0) {
return indexPath.Row == 0 ? 66.0f : 22.0f;
}
return 44.0f;
}
示例7: ShouldStartLoad
public override bool ShouldStartLoad (UIWebView webView, Foundation.NSUrlRequest request, UIWebViewNavigationType navigationType)
{
WebNavigationEvent navEvent = WebNavigationEvent.NewPage;
switch (navigationType) {
case UIWebViewNavigationType.LinkClicked:
navEvent = WebNavigationEvent.NewPage;
break;
case UIWebViewNavigationType.FormSubmitted:
navEvent = WebNavigationEvent.NewPage;
break;
case UIWebViewNavigationType.Reload:
navEvent = WebNavigationEvent.Refresh;
break;
case UIWebViewNavigationType.FormResubmitted:
navEvent = WebNavigationEvent.NewPage;
break;
case UIWebViewNavigationType.Other:
navEvent = WebNavigationEvent.NewPage;
break;
}
lastEvent = navEvent;
Console.WriteLine ("[Custom Delegate] Url: {0}", request.Url);
Console.WriteLine ("[Custom Delegate] MainDocUrl: {0}", request.MainDocumentURL);
return true;
}
示例8: DefaultResolutionPipeline
public DefaultResolutionPipeline(Foundation foundation, IServiceLocatorAdapter adapter, IServiceLocatorStore store)
: base(foundation, adapter, store)
{
var pipeline = new PostResolutionPipeline(foundation, adapter, store);
Add(new AdapterPipelineItem(foundation, adapter, store, pipeline));
}
示例9: SelectionDidChange
public override void SelectionDidChange (Foundation.NSNotification notification)
{
if (_callback != null)
{
_callback.SelectionDidChange();
}
}
示例10: GetCell
public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
{
cell = tableView.DequeueReusableCell ("instaReuseCell") as InstaTabControllerCell;
cell.UpdateCell(mData [indexPath.Row].UserName, UIImage.FromFile (mData[indexPath.Row].ImageName),mData [indexPath.Row].Detail,mData [indexPath.Row].NumLikes, mData [indexPath.Row].NumComments,mData [indexPath.Row].PostDate,UIImage.FromFile (mData[indexPath.Row].PostImage) );
return cell;
}
示例11: FinishedLaunching
public override void FinishedLaunching (Foundation.NSObject notification)
{
if (mainFormFunc != null)
main_form = mainFormFunc ();
main_form.m_helper.MakeKeyAndOrderFront (this);
main_form.m_helper.DidChangeScreen += delegate(object sender, EventArgs e) { main_form.m_helper.Display (); };
}
示例12: GetCell
public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath)
{
UITableViewCell cell = tableView.DequeueReusableCell ( strCellIdentifier ) ?? new UITableViewCell ( UITableViewCellStyle.Default , strCellIdentifier );
cell.TextLabel.Text = lstContacts [indexPath.Row].strContactName;
cell.TextLabel.Font = UIFont.SystemFontOfSize (12);
return cell;
}
示例13: TouchesBegan
public override void TouchesBegan (Foundation.NSSet touches, UIKit.UIEvent evt)
{
swiped = false;
UITouch touch = touches.AnyObject as UITouch ;
lastPoint = touch.LocationInView (this);
}
示例14: FactoryResolutionPipeline
public FactoryResolutionPipeline(Foundation foundation, IServiceLocatorAdapter adapter, IServiceLocatorStore store)
{
var pipeline = new PostResolutionPipeline(foundation, adapter, store);
Add(new ConditionalPipelineItem(foundation, adapter, store, pipeline));
Add(new DefaultPipelineItem(foundation, adapter, store, pipeline));
}
示例15: TouchesMoved
/// <summary>
/// Called when the fingers move
/// </summary>
public override void TouchesMoved (Foundation.NSSet touches, UIEvent evt)
{
base.TouchesMoved (touches, evt);
// if we haven't already failed
if(base.State != UIGestureRecognizerState.Failed) {
// get the current and previous touch point
CGPoint newPoint = (touches.AnyObject as UITouch).LocationInView (View);
CGPoint previousPoint = (touches.AnyObject as UITouch).PreviousLocationInView (View);
// if we're not already on the upstroke
if(!strokeUp) {
// if we're moving down, just continue to set the midpoint at
// whatever point we're at. when we start to stroke up, it'll stick
// as the last point before we upticked
if (newPoint.X >= previousPoint.X && newPoint.Y >= previousPoint.Y)
midpoint = newPoint;
// if we're stroking up (moving right x and up y [y axis is flipped])
else if (newPoint.X >= previousPoint.X && newPoint.Y <= previousPoint.Y)
strokeUp = true;
// otherwise, we fail the recognizer
else
base.State = UIGestureRecognizerState.Failed;
}
}
Console.WriteLine (base.State.ToString ());
}