本文整理汇总了C#中Foundation类的典型用法代码示例。如果您正苦于以下问题:C# Foundation类的具体用法?C# Foundation怎么用?C# Foundation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Foundation类属于命名空间,在下文中一共展示了Foundation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:Kethsar,项目名称:CS235IM,代码行数:7,代码来源:PlayDataSource.cs
示例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);
}
开发者ID:natevarghese,项目名称:XamarinTen,代码行数:7,代码来源:UserFeedCollectionViewDelegateFlowLayout.cs
示例3: WillDisplay
public override void WillDisplay(UITableView tableView, UITableViewCell cell, Foundation.NSIndexPath indexPath)
{
// cell.SeparatorInset = UIEdgeInsets.Zero;
// cell.PreservesSuperviewLayoutMargins = false;
// cell.LayoutMargins = UIEdgeInsets.Zero;
//
}
开发者ID:ctsxamarintraining,项目名称:cts440202,代码行数:7,代码来源:TripTableSOurce.cs
示例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;
}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:10,代码来源:CheckmarkGestureRecognizer.cs
示例5: InitalizeWithEmptyBuffer
public void InitalizeWithEmptyBuffer()
{
using (var foundation = new Foundation())
{
var stream = new DefaultMemoryOutputStream(new byte[] { });
}
}
开发者ID:kpko,项目名称:PhysX.Net,代码行数:7,代码来源:DefaultMemoryOutputStreamTest.cs
示例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;
}
开发者ID:mono,项目名称:Continuous,代码行数:7,代码来源:ObjectInspector.cs
示例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;
}
开发者ID:ChandrakanthBCK,项目名称:customer-success-samples,代码行数:27,代码来源:WebViewCustomRenderer.cs
示例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));
}
开发者ID:adamjmoon,项目名称:Siege,代码行数:7,代码来源:DefaultResolutionPipeline.cs
示例9: SelectionDidChange
public override void SelectionDidChange (Foundation.NSNotification notification)
{
if (_callback != null)
{
_callback.SelectionDidChange();
}
}
开发者ID:SubtitleEdit,项目名称:subtitleedit-mac,代码行数:7,代码来源:StringListTableDelegate.cs
示例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;
}
开发者ID:poojagaonkar,项目名称:PGDemoIOS,代码行数:7,代码来源:InstaTableSource.cs
示例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 (); };
}
开发者ID:Clancey,项目名称:MonoMac.Windows.Form,代码行数:7,代码来源:ApplicationContext.cs
示例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;
}
开发者ID:suchithm,项目名称:SqliteDemo.iOS,代码行数:7,代码来源:ContactListTableSource.cs
示例13: TouchesBegan
public override void TouchesBegan (Foundation.NSSet touches, UIKit.UIEvent evt)
{
swiped = false;
UITouch touch = touches.AnyObject as UITouch ;
lastPoint = touch.LocationInView (this);
}
开发者ID:CrossGeeks,项目名称:Xamarin.Samples,代码行数:7,代码来源:NativeDrawView.cs
示例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));
}
开发者ID:rexwhitten,项目名称:Siege,代码行数:7,代码来源:FactoryResolutionPipeline.cs
示例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 ());
}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:33,代码来源:CheckmarkGestureRecognizer.cs
示例16: RowSelected
public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
{
var sb = UIStoryboard.FromName("Main", null);
var ctrl = sb.InstantiateViewController("SignInViewController") as SignInViewController;
ctrl.ApplyTheme = indexPath.Row == 1;
NavigationController.PushViewController(ctrl, true);
}
开发者ID:zyamusic,项目名称:MonoTouch.Fabric,代码行数:7,代码来源:ViewController.cs
示例17: TouchesEnded
public override void TouchesEnded (Foundation.NSSet touches, UIEvent evt)
{
if(!swiped) {
UIGraphics.BeginImageContext(Frame.Size);
tempDrawImage.Image.Draw (new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height));
using (var context = UIGraphics.GetCurrentContext ())
{
context.SetLineCap (CGLineCap.Round);
context.SetLineWidth (brush);
context.SetStrokeColor(PaintColor.CGColor);
context.MoveTo(lastPoint.X, lastPoint.Y);
context.AddLineToPoint(lastPoint.X, lastPoint.Y);
context.StrokePath ();
context.Flush ();
tempDrawImage.Image = UIGraphics.GetImageFromCurrentImageContext ();
UIGraphics.EndImageContext();
}
}
UIGraphics.BeginImageContext(mainImage.Frame.Size);
mainImage.Image.Draw(new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height), CGBlendMode.Normal, 1.0f);
tempDrawImage.Image.Draw (new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height), CGBlendMode.Normal, opacity);
mainImage.Image = UIGraphics.GetImageFromCurrentImageContext ();
//tempDrawImage.Image = CreateImageFromColor ();
UIGraphics.EndImageContext();
}
开发者ID:CrossGeeks,项目名称:Xamarin.Samples,代码行数:34,代码来源:NativeDrawView.cs
示例18: TouchesMoved
public override void TouchesMoved (Foundation.NSSet touches, UIEvent evt)
{
swiped = true;
UITouch touch = touches.AnyObject as UITouch;
CGPoint currentPoint= touch.LocationInView (this);
UIGraphics.BeginImageContext(Frame.Size);
tempDrawImage.Image.Draw(new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height));
using (var context = UIGraphics.GetCurrentContext ())
{
context.MoveTo(lastPoint.X, lastPoint.Y);
context.AddLineToPoint(currentPoint.X,currentPoint.Y);
context.SetLineCap (CGLineCap.Round);
context.SetLineWidth (brush);
context.SetStrokeColor (PaintColor.CGColor);
context.SetBlendMode (CGBlendMode.Normal);
context.StrokePath ();
}
tempDrawImage.Image = UIGraphics.GetImageFromCurrentImageContext ();
tempDrawImage.Alpha = opacity;
UIGraphics.EndImageContext ();
lastPoint = currentPoint;
}
开发者ID:CrossGeeks,项目名称:Xamarin.Samples,代码行数:29,代码来源:NativeDrawView.cs
示例19: PerformSegue
public override void PerformSegue (string identifier, Foundation.NSObject sender) {
base.PerformSegue (identifier, sender);
var navigationList = new List<UIViewController> (this.NavigationController.ViewControllers);
navigationList.RemoveAt (0);
this.NavigationController.ViewControllers = navigationList.ToArray();
}
开发者ID:RobertAltland,项目名称:MovieExplorer,代码行数:7,代码来源:SplashViewController.cs
示例20: GetCell
public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath)
{
var cell = tableView.DequeueReusableCell ("stringCell") ?? new UITableViewCell (UITableViewCellStyle.Default, "stringCell");
if(Parent != null)
cell.TextLabel.Text = Parent.filteredItems.ElementAt (indexPath.Row);
return cell;
}
开发者ID:hasithaPrasanga,项目名称:XamarinStore,代码行数:7,代码来源:StringTableViewController.cs
注:本文中的Foundation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论