Beispiel #1
0
		public CLLocation (CLLocationCoordinate2D coordinate, System.Double altitude, System.Double hAccuracy, System.Double vAccuracy, NSDate timestamp) : base (NSObjectFlag.Empty)
		{
			if (timestamp == null)
				throw new ArgumentNullException ("timestamp");
			if (IsDirectBinding) {
				Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_CLLocationCoordinate2D_Double_Double_Double_IntPtr (this.Handle, selInitWithCoordinateAltitudeHorizontalAccuracyVerticalAccuracyTimestamp, coordinate, altitude, hAccuracy, vAccuracy, timestamp.Handle);
			} else {
				Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_CLLocationCoordinate2D_Double_Double_Double_IntPtr (this.SuperHandle, selInitWithCoordinateAltitudeHorizontalAccuracyVerticalAccuracyTimestamp, coordinate, altitude, hAccuracy, vAccuracy, timestamp.Handle);
			}
		}
Beispiel #2
0
		public static DateTime? Convert (NSDate date)
		{
			if (date == null) return null;
			return new DateTime ((long)(date.SecondsSinceReferenceDate * TimeSpan.TicksPerSecond + ReferenceDate.Ticks), DateTimeKind.Utc).ToLocalTime ();
		}
		// NSEventMask is a superset (64 bits) of the mask that can be used (32 bits)
		// NSEventMaskFromType is often used to convert from NSEventType to the mask
		public NSEvent NextEvent (NSEventMask mask, NSDate expiration, string mode, bool deqFlag)
		{
			return NextEvent ((uint) mask, expiration, mode, deqFlag);
		}
Beispiel #4
0
		public bool RunUntil (NSRunLoopMode mode, NSDate limitDate)
		{
			return RunUntil (FromEnum (mode), limitDate);
		}
Beispiel #5
0
		public void AcceptInputForMode (NSRunLoopMode mode, NSDate limitDate)
		{
			AcceptInputForMode (FromEnum (mode), limitDate);
		}
Beispiel #6
0
		public void AcceptInputForMode (string mode, NSDate limitDate)
		{
			AcceptInputForMode (GetRealMode (mode), limitDate);
		}
Beispiel #7
0
 public NSTimer(NSDate date, TimeSpan when, NSAction action, System.Boolean repeats)
     : this(date, when.TotalSeconds, new NSActionDispatcher(action), NSActionDispatcher.Selector, null, repeats)
 {
 }
Beispiel #8
0
 public bool RunUntil(NSRunLoopMode mode, NSDate limitDate)
 {
     return(RunUntil(FromEnum(mode), limitDate));
 }
Beispiel #9
0
 public void AcceptInputForMode(NSRunLoopMode mode, NSDate limitDate)
 {
     AcceptInputForMode(FromEnum(mode), limitDate);
 }
Beispiel #10
0
 public void AcceptInputForMode(string mode, NSDate limitDate)
 {
     AcceptInputForMode(GetRealMode(mode), limitDate);
 }
Beispiel #11
0
 public NSTimer(NSDate date, TimeSpan when, NSAction action, System.Boolean repeats)
     : this(date, when.TotalSeconds, new NSActionDispatcher (action), NSActionDispatcher.Selector, null, repeats)
 {
 }
Beispiel #12
0
		// untilDate isn't allowed null
		public static NSEvent NextEventEx(this NSApplication app, NSEventMask mask, NSDate untilDate, NSString mode, bool dequeue)
		{
			return (NSEvent)Runtime.GetNSObject(Messaging.IntPtr_objc_msgSend_nuint_IntPtr_IntPtr_bool(app.Handle, selNextEventMatchingMask, (nuint)(uint)mask, untilDate != null ? untilDate.Handle : IntPtr.Zero, mode.Handle, dequeue));
		}
 public DateTime NSDateToDateTime(NSDate date)
 {
     return (new DateTime(2001,1,1,0,0,0)).AddSeconds(date.SecondsSinceReferenceDate);
 }
 void ValidateProposedDateValue (NSDatePickerCell aDatePickerCell, ref NSDate proposedDateValue, double proposedTimeInterval)
 {
         TestWindowController controller = (TestWindowController)aDatePickerCell.WeakDelegate;
         if (controller != null && controller == this && aDatePickerCell == datePickerControl.Cell) {
                 // override code goes here.  You should ensure that the new values are within the appropriate range.
                 if (overrideDateCheck.SelectedCell.State == NSCellStateValue.On)
                         // override the date using the user specified date
                         proposedDateValue = overrideDate.DateValue;
                 
                 // NOTE:  I think there is a problem setting the proposed Date value as it is a ref
         }
 }