public override void TouchesBegan (Foundation.NSSet touches, UIKit.UIEvent evt) { swiped = false; UITouch touch = touches.AnyObject as UITouch ; lastPoint = touch.LocationInView (this); }
public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) { var cell = base.GetCell (item, reusableCell, tv); cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator; return cell; }
public override UIKit.UITableViewCell GetCell(Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) { var cell = base.GetCell(item, reusableCell, tv); cell.Accessory = CellAccessoryHelper.GetCellAccessory(item.StyleId); return cell; }
partial void LogOutTouchUpInside (UIKit.UIButton sender) { // present tab bar controller var storyBoard = UIStoryboard.FromName ("Main", null); var loginView = storyBoard.InstantiateViewController ("rootView") as UINavigationController; this.PresentViewController (loginView, animated: true, completionHandler: null); }
public override void WireToViewController(UIKit.UIViewController viewController, CEInteractionOperation operation) { this.operation = operation; this.viewController = viewController; PrepareGestureRecognizer (viewController.View); }
public override UIKit.UITableViewCell GetCell(Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) { var cell = base.GetCell(item, reusableCell, tv); cell.SelectionStyle = UIKit.UITableViewCellSelectionStyle.None; return cell; }
public string GetTitle(UIKit.UIPickerView pickerView, System.nint row, System.nint component) { switch ((int)row) { case 0: return NearableType.Bag.ToString (); case 1: return NearableType.Bed.ToString (); case 2: return NearableType.Bike.ToString (); case 3: return NearableType.Car.ToString (); case 4: return NearableType.Chair.ToString (); case 5: return NearableType.Dog.ToString (); case 6: return NearableType.Door.ToString (); case 7: return NearableType.Fridge.ToString (); case 8: return NearableType.Generic.ToString (); case 9: return NearableType.Shoe.ToString (); default: return NearableType.Unknown.ToString (); } }
async partial void SaveRecord (UIKit.UIButton sender) { if (nameTextField.Text.Length < 1) { nameTextField.ResignFirstResponder (); return; } var saveLocation = new CLLocation (pin.Coordinate.Latitude, pin.Coordinate.Longitude); var record = await CloudManager.AddRecordAsync (nameTextField.Text, saveLocation); if (record == null) { Console.WriteLine ("Error: null returned on save"); return; } nameTextField.Text = string.Empty; nameTextField.ResignFirstResponder (); var alert = UIAlertController.Create ("CloudKitAtlas", "Saved record", UIAlertControllerStyle.Alert); alert.AddAction (UIAlertAction.Create ("OK", UIAlertActionStyle.Default, (act) => { DismissViewController (true, null); })); PresentViewController (alert, true, null); }
public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) { var cell = base.GetCell (item, reusableCell, tv); cell.SeparatorInset = UIEdgeInsets.Zero; cell.TextLabel.Font = UIFont.FromName ("baskervillebecker", 18f); return cell; }
public override UIKit.UITableViewCell GetCell (UIKit.UITableView tv) { cell = base.GetCell (tv); cell.UserInteractionEnabled = enabled; cell.TextLabel.Enabled = enabled; return cell; }
public override UIKit.UITableViewCell GetCell(UIKit.UITableView tv) { var cell = base.GetCell(tv); cell.ImageView.Image = this.Image; return cell; }
public override UIKit.UITableViewCell GetCell(UIKit.UITableView tv) { var cell = base.GetCell(tv); cell.BackgroundColor = StyledStringElement.BgColor; cell.TextLabel.Font = StyledStringElement.DefaultTitleFont.WithSize(StyledStringElement.DefaultTitleFont.PointSize * Element.FontSizeRatio); cell.TextLabel.TextColor = StyledStringElement.DefaultTitleColor; return cell; }
public override void LoadingFinished(UIKit.UIWebView webView) { var HeightHtml = webView.ScrollView.ContentSize.Height; pclControl.ContentHeight = (int)HeightHtml; webView.ScrollView.ScrollEnabled = false; //webView.LoadHtmlString ((pclControl.Source as HtmlWebViewSource).Html, null); }
public override void TouchesMoved(Foundation.NSSet touches, UIKit.UIEvent evt) { base.TouchesMoved(touches, evt); System.Diagnostics.Debug.WriteLine("GestureSwitch: TouchesMoved"); this.NextResponder.TouchesMoved(touches, evt); }
public override UIKit.UITableViewCell GetCell(UIKit.UITableView tv) { var cell = base.GetCell(tv); var addRemove = ((ChangesetCell)cell).AddRemoveView; addRemove.Added = _added; addRemove.Removed = _removed; addRemove.SetNeedsDisplay(); return cell; }
public override void DidReceiveLocalNotification(UIKit.UILocalNotification localNotification, Action<WKUserNotificationInterfaceType> completionHandler) { // This method is called when a local notification needs to be presented. // Implement it if you use a dynamic glance interface. // Populate your dynamic glance inteface as quickly as possible. // // After populating your dynamic glance interface call the completion block. completionHandler(WKUserNotificationInterfaceType.Custom); }
partial void SegmentedControlClicked (UIKit.UISegmentedControl sender){ if(sender.SelectedSegment == 0){ Type = "Timed"; } else{ Type = "Timers"; } ShowCorrectPage(); }
public override void HandleLocalNotificationAction(string identifier, UIKit.UILocalNotification localNotification) { Console.WriteLine($"HandleLocalNotificationAction: {identifier}"); var baseCurrency = (string)(NSString)localNotification.UserInfo.ValueForKey((NSString)"baseCurrency"); var counterCurrency = (string)(NSString)localNotification.UserInfo.ValueForKey((NSString)"counterCurrency"); Pairs.NotificationCurrencyPair = new NotificationCurrencyPair(baseCurrency, counterCurrency); base.HandleLocalNotificationAction(identifier, localNotification); }
protected override bool ShouldStartLoad(Foundation.NSUrlRequest request, UIKit.UIWebViewNavigationType navigationType) { if (!request.Url.AbsoluteString.StartsWith("file://", System.StringComparison.Ordinal)) { ViewModel.GoToLinkCommand.Execute(request.Url.AbsoluteString); return false; } return base.ShouldStartLoad(request, navigationType); }
partial void OnUpdateItemButtonTapped(UIKit.UIButton sender) { if (null == this.CreatedItemPath) { AlertHelper.ShowLocalizedAlertWithOkOption("Message", "Create item at first"); } else { this.SendUpdateRequest(); } }
public override UIKit.UITableViewCell GetCell (UIKit.UITableView tv) { // try and dequeue a cell object to reuse. if one doesn't exist, create a new one ExhibitorCell cell = tv.DequeueReusableCell (cellKey) as ExhibitorCell; if (cell == null) { cell = new UI.CustomElements.ExhibitorCell (exhibitor); } cell.UpdateCell(exhibitor); return cell; }
partial void LocalButtonClicked (UIKit.UIButton sender) { sender.SetImage (UIImage.FromBundle ("LocalSelected"), UIControlState.Normal); sender.SetImage (UIImage.FromBundle ("LocalSelected"), UIControlState.Normal); sender.SetImage (UIImage.FromBundle ("LocalSelected"), UIControlState.Normal); GlobalButton.SetImage (UIImage.FromBundle ("Global"), UIControlState.Normal); GlobalButton.SetImage (UIImage.FromBundle ("Global"), UIControlState.Normal); GlobalButton.SetImage (UIImage.FromBundle ("Global"), UIControlState.Normal); Scope = "Local"; ShowCorrectPage(); }
protected override UITableViewCell CreateCell (UIKit.UITableView tv) { string summary = GetSummary(tv); var cellStyle = (String.IsNullOrEmpty(summary))?UITableViewCellStyle.Default : UITableViewCellStyle.Subtitle; string key = rkey + (cellStyle.ToString()); var cell = tv.DequeueReusableCell(key) as VerticalLayoutCell; if (cell == null) { cell = new VerticalLayoutCell(cellStyle, key); } return cell; }
public override void Draw(CoreGraphics.CGRect bounds, CoreGraphics.CGContext context, UIKit.UIView view) { UIColor.White.SetFill (); context.FillRect (bounds); if (this.cell == null) { this.cell = new CheckPointTableCell (); view.AddSubview (cell); } cell.RenderCheckpointForDetail(this.data); view.LayoutIfNeeded (); }
public override UIKit.UITableViewCell GetCell(Xamarin.Forms.Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) { var cell = base.GetCell (item, reusableCell, tv); cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator; //set blue border for image cell.ImageView.Layer.BorderColor = Color.White.ToCGColor(); cell.ImageView.Layer.BorderWidth = 1; cell.BackgroundColor = Color.FromHex (ColorStyles.XamarinDark).ToUIColor (); return cell; }
public override UIKit.UITableViewCell GetCell(Xamarin.Forms.Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) { var cell = base.GetCell (item, reusableCell, tv); cell.BackgroundColor = UIColor.Black; cell.TextLabel.TextColor = UIColor.White; cell.SelectedBackgroundView = new UIView { BackgroundColor = UIColor.FromRGB(119,129,137), }; return cell; }
protected override bool ShouldStartLoad(Foundation.NSUrlRequest request, UIKit.UIWebViewNavigationType navigationType) { // Fucking BitBucket and their horrible user interface. if (request.Url.AbsoluteString == "https://bitbucket.org/features") return false; //We're being redirected to our redirect URL so we must have been successful if (request.Url.Host == "codebucket") { var code = request.Url.Query.Split('=')[1]; ViewModel.Login(code); return false; } return base.ShouldStartLoad(request, navigationType); }
public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) { var cell = base.GetCell (item,reusableCell, tv); var discItem = item as DisclosureCell; if (discItem.StyleId == "SearchControls") { cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator; } else if (discItem.StyleId == "Details" && discItem.IsSelected) { cell.Accessory = UIKit.UITableViewCellAccessory.Checkmark; } else { cell.AccessoryView = new UIKit.UIView (new CoreGraphics.CGRect (0, 0, 20, cell.Bounds.Height)); } return cell; }
public override void DidMoveToView(SKView view) { base.DidMoveToView (view); var obstacles = new [] { AddObstacle (new CGPoint (Frame.GetMidX (), Frame.GetMidY () + 150f)), AddObstacle (new CGPoint (Frame.GetMidX () - 200f, Frame.GetMidY () - 150f)), AddObstacle (new CGPoint (Frame.GetMidX () + 200f, Frame.GetMidY () - 150f)) }; Player = new AgentNode (this, DefaultAgentRadius, new CGPoint (Frame.GetMidX (), Frame.GetMidY ())); Player.Agent.Behavior = new GKBehavior (); AgentSystem.AddComponent (Player.Agent); SeekGoal = GKGoal.GetGoalToSeekAgent (TrackingAgent); Player.Agent.Behavior.SetWeight (100, GKGoal.GetGoalToAvoidObstacles (obstacles, 1)); }
/// <summary> /// Gets the cell. /// </summary> /// <param name="item">The item.</param> /// <param name="reusableCell">The reusable table view cell.</param> /// <param name="tv">The table view.</param> /// <returns>MonoTouch.UIKit.UITableViewCell.</returns> public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UIKit.UITableView tv) { var viewCell = item as AccessoryViewCell; var nativeCell = base.GetCell(item, reusableCell, tv); if (viewCell != null) { var frame = new CGRect (0, 0, (float)viewCell.AccessoryView.WidthRequest, (float)viewCell.AccessoryView.HeightRequest); var nativeView = RendererFactory.GetRenderer (viewCell.AccessoryView).NativeView; nativeView.Frame = frame; nativeView.Bounds = frame; nativeCell.AccessoryView = nativeView; } return nativeCell; }