public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (evt.Type == UIEventType.Motion) { UIAlertController helpControl = UIAlertController.Create("Need Help?", "On this page you will learn over 500 French phrases. Simply choose a category and have fun", UIAlertControllerStyle.Alert); UIAlertAction confirmed = UIAlertAction.Create("Cool", UIAlertActionStyle.Default, (Action) => { helpControl.Dispose(); }); helpControl.AddAction(confirmed); if (this.PresentedViewController == null) { SystemSound sound = new SystemSound(4095); sound.PlaySystemSound(); this.PresentViewController(helpControl, true, null); } else if (this.PresentedViewController != null) { this.PresentedViewController.DismissViewController(true, () => { this.PresentedViewController.Dispose(); SystemSound sound = new SystemSound(4095); sound.PlaySystemSound(); this.PresentViewController(helpControl, true, null); }); } } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { base.MotionEnded(motion, evt); var store = AppStore.Instance; var cnt = store.Locations.Count; Vibration.Vibrate(); // Or use specified time var duration = TimeSpan.FromSeconds(1); Vibration.Vibrate(duration); if (cnt == 0) { LabelLunch.Text = "First enter some Locations, dude!"; return; } LabelLunch.Hidden = true; ButtonAccept.Hidden = false; var idx = store.Rnd.Next(cnt); ButtonAccept.SetTitle(store.Locations[idx].Name, UIControlState.Normal); ButtonAccept.Tag = idx; store.Locations[idx].Count++; }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { BITHockeyManager.SharedHockeyManager.FeedbackManager.ShowFeedbackComposeView(); } }
public override void MotionBegan(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { BITHockeyManager.SharedHockeyManager.FeedbackManager.ShowFeedbackComposeViewWithGeneratedScreenshot(); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { Debugging.Profiler.Default.Show(); } }
/// <summary> /// Method invoked when a motion (a shake) has started. /// </summary> /// <param name="motion">The motion subtype.</param> /// <param name="evt">The event arguments.</param> public override void MotionBegan(UIEventSubtype motion, UIEvent evt) { base.MotionBegan(motion, evt); if (motion == UIEventSubtype.MotionShake) { this.ActualController.HandleGesture(this, new OxyShakeGesture(), new OxyKeyEventArgs()); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { ((ShakablePage)Element).OnShake(); } base.MotionEnded(motion, evt); }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if(motion == UIEventSubtype.MotionShake) { interactionLabel.Text= "iPhone was shaken"; SetTimerToClearMotionLabel(); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { (Delegate as AppDelegate)?.Reset(string.Empty); } base.MotionEnded(motion, evt); }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { base.MotionEnded(motion, evt); if (motion == UIEventSubtype.MotionShake) { Console.WriteLine($"{this.GetType().Name}.{nameof(MotionEnded)}: You shook me!"); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { Accelerometer.HandleShake(); } base.MotionEnded(motion, evt); }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { base.MotionEnded(motion, evt); if (motion == UIEventSubtype.MotionShake) { _page.OnShaken(this.Element, EventArgs.Empty); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { var page = this.Element as TasksPage; var vm = page?.BindingContext as TasksViewModel; vm?.TestConflict(); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { if (mainView != null) { mainView.ShakeReceived (); } } base.MotionEnded (motion, evt); }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { // TRAINING: Create task list conflict (for development only) var page = this.Element as TaskListsPage; var vm = page?.BindingContext as TaskListsViewModel; vm?.TestConflict(); } }
public override void MotionEnded (UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { // Do your application-specific shake response here... if (BitMobile.Application.ApplicationContext.Context != null && BitMobile.Application.ApplicationContext.Context.ValueStack != null) { string workflow = BitMobile.Application.ApplicationContext.Context.Workflow.Name; BitMobile.Application.ApplicationContext.Context.ValueStack.TryCallScript ("Events", "OnApplicationShake", workflow); } } }
public override void MotionBegan(UIEventSubtype motion, UIEvent evt) { base.MotionBegan (motion, evt); if (motion != UIEventSubtype.MotionShake) { return; } Console.WriteLine("Device started shaking!"); CircleColor = UIColor.Red; }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { if (mainView != null) { mainView.ShakeReceived(); } } base.MotionEnded(motion, evt); }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { // Do your application-specific shake response here... if (ApplicationContext.Current != null && ApplicationContext.Current.ValueStack != null) { string workflow = ApplicationContext.Current.Workflow.Name; BusinessProcessContext.Current.GlobalEventsController.OnApplicationShake(workflow); } } }
// Called after the iOS determines the motion wasn't noise (such as walking up stairs). public override void MotionEnded (UIEventSubtype motion, UIEvent evt) { Console.WriteLine("Motion Ended"); base.MotionEnded(motion, evt); // if the motion was a shake if(motion == UIEventSubtype.MotionShake) { Console.Write("Shake Detected"); lblShakeStatus.Text = "Shook!"; } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { Console.WriteLine("Motion detected"); if (motion == UIEventSubtype.MotionShake) { Console.WriteLine("and was a shake"); labelLastUpdated.Text = "All shook up! Updating..."; // never appears // Do your application-specific shake response here... Update(); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { Console.WriteLine("Motion detected"); if (motion == UIEventSubtype.MotionShake) { Console.WriteLine("and was a shake"); //labelLastUpdated.Text = "All shook up! Updating..."; // never appears // Do your application-specific shake response here... var ice = new ICEViewController(); this.PresentModalViewController(ice, true); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { // Do your application-specific shake response here... if (BitMobile.Application.ApplicationContext.Context != null && BitMobile.Application.ApplicationContext.Context.ValueStack != null) { string workflow = BitMobile.Application.ApplicationContext.Context.Workflow.Name; BitMobile.Application.ApplicationContext.Context.ValueStack.TryCallScript("Events", "OnApplicationShake", workflow); } } }
// Called after the iOS determines the motion wasn't noise (such as walking up stairs). public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { Console.WriteLine("Motion Ended"); base.MotionEnded(motion, evt); // if the motion was a shake if (motion == UIEventSubtype.MotionShake) { Console.Write("Shake Detected"); lblShakeStatus.Text = "Shook!"; } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { base.MotionEnded(motion, evt); if (evt.Subtype == UIEventSubtype.MotionShake) { #if DEBUG Debug.WriteLine("**shake**"); #endif mImageScrollView.ClearSegments(); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { Console.WriteLine("Motion detected"); if (motion == UIEventSubtype.MotionShake) { Console.WriteLine("and was a shake"); //labelLastUpdated.Text = "All shook up! Updating..."; // never appears // Do your application-specific shake response here... var ice = new ICEViewController(); this.PresentModalViewController (ice, true); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { if (sharedManager.IsHidden) { sharedManager.ShowExplorer(); } else { sharedManager.HideExplorer(); } } }
public override void MotionBegan(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { Console.WriteLine("Device started shaking"); if (CircleColor != UIColor.Red) { CircleColor = UIColor.Red; } else { CircleColor = UIColor.LightGray; } } }
// Called after the iOS determines the motion wasn't noise (such as walking up stairs). public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { base.MotionEnded(motion, evt); if (!ButtonKitty.Enabled) { return; } // if the motion was a shake if (motion == UIEventSubtype.MotionShake) { #if !STARTER FlurryAnalytics.Flurry.LogEvent("Otter"); #endif SetImage(OverflowHelper.Animal.Otter); } }
// Erase on Shake public override void MotionBegan(UIEventSubtype eType, UIEvent evt) { if (eType == UIEventSubtype.MotionShake) { var alert = UIAlertController.Create( "Erase Canvas?", "This will clear the shared Realm database and erase the canvas. Are you sure you wish to proceed?", UIAlertControllerStyle.Alert); alert.AddAction(UIAlertAction.Create("Erase", UIAlertActionStyle.Destructive, action => _drawer?.ErasePaths())); alert.AddAction(UIAlertAction.Create("Cancel", UIAlertActionStyle.Cancel, null)); if (alert.PopoverPresentationController != null) { alert.PopoverPresentationController.SourceView = View; } PresentViewController(alert, animated: true, completionHandler: null); //// unlike other gesture actions, don't call View.SetNeedsDisplay but let major Realm change prompt redisplay } }
private void HandleRemoteControlEvent(UIEventSubtype eventType) { switch (eventType) { case UIEventSubtype.RemoteControlPlay: _playbackController.Play(); break; case UIEventSubtype.RemoteControlPause: _playbackController.Pause(); break; case UIEventSubtype.RemoteControlTogglePlayPause: _playbackController.PlayPause(); break; case UIEventSubtype.RemoteControlStop: _playbackController.Stop(); break; case UIEventSubtype.RemoteControlNextTrack: _playbackController.PlayNext(); break; case UIEventSubtype.RemoteControlPreviousTrack: _playbackController.PlayPreviousOrSeekToStart(); break; case UIEventSubtype.RemoteControlBeginSeekingForward: StartSeekingForward(); break; case UIEventSubtype.RemoteControlBeginSeekingBackward: StartSeekingBackward(); break; case UIEventSubtype.RemoteControlEndSeekingForward: case UIEventSubtype.RemoteControlEndSeekingBackward: EndSeeking(); break; } }
public override void MotionBegan(UIEventSubtype motion, UIEvent evt) { HypnosisView view = this.View as HypnosisView; if (motion == UIEventSubtype.MotionShake) { Console.WriteLine("Device started shaking"); if (view.CircleColor != UIColor.Orange) { lastSelectedColor = view.CircleColor; lastSelectedSegmentIndex = segControl.SelectedSegment; view.CircleColor = UIColor.Orange; segControl.SelectedSegment = -1; } else { view.CircleColor = lastSelectedColor; segControl.SelectedSegment = lastSelectedSegmentIndex; } } }
public static Offset <UIEvent> CreateUIEvent(FlatBufferBuilder builder, UIEventType eventType = UIEventType.ADD_NAME, UIEventSubtype eventSubType = UIEventSubtype.NONE, int nameIdx = 0, long timestamp = 0, int iteration = 0, int epoch = 0, short variableId = 0, Offset <FrameIteration> frameIterOffset = default(Offset <FrameIteration>), ushort plugin = 0) { builder.StartObject(9); UIEvent.AddTimestamp(builder, timestamp); UIEvent.AddFrameIter(builder, frameIterOffset); UIEvent.AddEpoch(builder, epoch); UIEvent.AddIteration(builder, iteration); UIEvent.AddNameIdx(builder, nameIdx); UIEvent.AddPlugin(builder, plugin); UIEvent.AddVariableId(builder, variableId); UIEvent.AddEventSubType(builder, eventSubType); UIEvent.AddEventType(builder, eventType); return(UIEvent.EndUIEvent(builder)); }
public override void MotionEnded (UIEventSubtype motion, UIEvent evt) { base.MotionEnded (motion, evt); DropboxDatabase.Shared.Reset (); }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { base.MotionEnded(motion, evt); DropboxDatabase.Shared.Reset(); }
// Called after the iOS determines the motion wasn't noise (such as walking up stairs). public override void MotionEnded (UIEventSubtype motion, UIEvent evt) { base.MotionEnded(motion, evt); if (!ButtonKitty.Enabled) return; // if the motion was a shake if(motion == UIEventSubtype.MotionShake) { FlurryAnalytics.Flurry.LogEvent("Otter"); SetImage (OverflowHelper.Animal.Otter); } }
public override void MotionBegan(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) BITHockeyManager.SharedHockeyManager.FeedbackManager.ShowFeedbackComposeViewWithGeneratedScreenshot(); }
/// <summary> /// Method invoked when a motion (shake) has finished. /// </summary> /// <param name="motion">Motion.</param> /// <param name="evt">Evt.</param> public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { base.MotionEnded (motion, evt); // If the user shakes the device, kick the ball. if(motion == UIEventSubtype.MotionShake) { // Kick the ball. if(this.SKView.Scene != null) { var boingScene = this.SKView.Scene as BoingScene; boingScene.KickBall(); } } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { StartGame(); } }
public override void MotionEnded (UIEventSubtype motion, UIEvent evt) { TKFeedback.ShowFeedback (); }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { Console.WriteLine ("Motion detected"); if (motion == UIEventSubtype.MotionShake) { Console.WriteLine ("and was a shake"); labelLastUpdated.Text = "All shook up! Updating..."; // never appears // Do your application-specific shake response here... Update (); } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) this.ShakeDevice(); base.MotionEnded(motion, evt); }
public override void MotionBegan(UIEventSubtype motion, UIEvent evt) { if (motion == UIEventSubtype.MotionShake) { Console.WriteLine("Device started shaking"); if (CircleColor != UIColor.Red) CircleColor = UIColor.Red; else CircleColor = UIColor.LightGray; } }
public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { TKFeedback.ShowFeedback(); }
// >> feedback-motion-cs public override void MotionEnded(UIEventSubtype motion, UIEvent evt) { // >> feedback-initialize-cs TKFeedback.ShowFeedback(); // << feedback-initialize-cs }