public override void OnStay(PointEventArgs e) { if (pname != null) { WorldComponent.Sandbox.UpPressed.Publish(true, pname); } }
public override void OnEnd(PointEventArgs e) { if (pname != null) { WorldComponent.Sandbox.RightPressed.Publish(false, pname); } }
private void inputs_OnTouchStay(object sender, PointEventArgs e) { if (e.Transform.gameObject == gameObject) { OnStay(e); } }
private async void TapGestureRecognizer_Tapped(object sender, PointEventArgs e) { if (fingerPrintPage.Children.Contains(imageFingerPrint)) { fingerPrintPage.Children.Remove(imageFingerPrint); fingerPrintPage.Children.Remove(reqThumb); var ver = DependencyService.Get <IDeviceChecker>().GetDeviceVersion(); subImage.IsVisible = true; var image = new FFImageLoading.Forms.CachedImage(); image.Source = "fingerprint"; if (ver == 5) { image.HeightRequest = 162; image.WidthRequest = 315; } else if (ver == 6) { image.HeightRequest = 162; image.WidthRequest = 372; } else if (ver == 61) { image.HeightRequest = 162; image.WidthRequest = 413; } image.Aspect = Aspect.AspectFit; fingerPrintPage.Children.Add(image); await Task.Delay(6000); subImage.IsVisible = false; await Task.Run(new Action(() => FadeFingerPrint())); } }
private void inputs_OffTouch(object sender, PointEventArgs e) { if (e.Transform.gameObject == gameObject) { OnEnd(e); } }
void touches_OnCancel(object sender, PointEventArgs e) { if (e.Transform.gameObject == gameObject) { OnCancel(e); } }
void toolsPanel_DoInsert(object sender, PointEventArgs e) { if (this.DoInsert != null) { this.DoInsert(this, e); } }
private void LogReadAction(string type, PointEventArgs args) { Logger.LogInformation("{Count} {Type} read starting at {Address}.", args.NumberOfPoints, type, args.StartAddress); }
private void Aiis_PointsUpdate(PointEventArgs e) { TreeNode[] nodes = treePoints.Nodes.Find(e.ParentPoint.ID.ToString(), true); if (nodes.Length == 1) { FillTree(nodes[0], e.Points); } }
public override void OnEnd(PointEventArgs e) { if (pname != null) { WorldComponent.Sandbox.UpPressed.Publish(false, pname); } WorldComponent.Sandbox.Log.Publish("jump end " + pname); }
/// <summary> /// Used during open and workspace changes to set the location of the workspace /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public virtual void OnCurrentOffsetChanged(object sender, PointEventArgs e) { if (CurrentOffsetChanged != null) { Debug.WriteLine(string.Format("Setting current offset to {0}", e.Point)); CurrentOffsetChanged(this, e); } }
private void inputs_OnTouch(object sender, PointEventArgs e) { if (e.Transform.gameObject == gameObject) { WorldComponent.Sandbox.Log.Publish("touched " + e.Transform.gameObject.name); OnStart(e); } }
private void LogWriteAction(string type, PointEventArgs <bool> args) { var data = string.Join(", ", args.Points.Select(p => p ? "1" : "0")); Logger.LogInformation("{Count} {Type} written starting at {Address}: [{Data}]", args.NumberOfPoints, type, args.StartAddress, data); }
public override void OnStart(PointEventArgs e) { WorldComponent.Sandbox.Log.Publish("hmmm 3"); if (pname != null) { WorldComponent.Sandbox.UpPressed.Publish(true, pname); } WorldComponent.Sandbox.Log.Publish("jump start " + pname); }
private void OnMoveDialogAway(object?sender, PointEventArgs e) { if (this.Host == null) { return; } const int triggerMargin = 64; // First, we check if the current position is hiding the selection or not var current = new System.Drawing.Rectangle( (int)this.Host.Left - triggerMargin, (int)this.Host.Top - triggerMargin, (int)this.Host.Width + 2 * triggerMargin, (int)this.Host.Height + 2 * triggerMargin); if (!current.Contains(e.Data)) { return; } // We simply try to put the dialog in one of the four corners of the main window, until we find one // which does not hide the selection const int margin = 32; var owner = this.Host.Owner; for (var i = 0; i < 2; ++i) { for (var j = 0; j < 2; ++j) { var left = j == 0 ? owner.Left + margin : owner.Left + owner.Width - this.Host.Width - margin; var top = i == 0 ? owner.Top + margin : owner.Top + owner.Height - this.Host.Height - margin; var r = new System.Drawing.Rectangle( (int)left, (int)top, (int)this.Host.Width, (int)this.Host.Height); if (r.Contains(e.Data)) { continue; } this.Host.Left = left; this.Host.Top = top; return; } } }
private void SessionStarted(object sender, PointEventArgs e) { handDetected = true; slider2D.Reposition(new XnMPoint(e.Point.X, e.Point.Y, e.Point.Z)); handHandler = new HandHandler(); handHandler.DropSessionTrigger += new EventHandler <EventArgs>(handHandler_DropSessionTrigger); if (HandDetected != null) { HandDetected(sender, e); } }
private void GetPixel(PointEventArgs args) { int c; using (var b = new Bitmap(1, 1)) { using (var g = Graphics.FromImage(b)) g.CopyFromScreen((int)args.Point.X, (int)args.Point.Y, 0, 0, b.Size); c = b.GetPixel(0, 0).ToArgb(); }/* * MessageBox.Show(Application.Current.MainWindow, * $"The pixel at {args.Point.X}, {args.Point.Y} has the ARGB color #{c:X8}", * Application.Current.MainWindow.Title, MessageBoxButton.OK, MessageBoxImage.Information);*/ SelectedColor = Color.FromArgb((byte)((c >> 24) & 0xFF), (byte)((c >> 16) & 0xFF), (byte)((c >> 8) & 0xFF), (byte)(c & 0xFF)); }
protected void SessionManagerSessionStarted(object sender, PointEventArgs e) { if (neverStarted) { Debug.WriteLine("Sessão Startada"); neverStarted = false; } else { Debug.WriteLine("Sessão Retomada"); } }
static void session_SessionStarted(object sender, PointEventArgs e) { Console.WriteLine("Session Started"); }
void session_SessionStarted(object sender, PointEventArgs e) { this.viewModel.Text = "Session started"; }
public SessionStartedEventArgs(PointEventArgs e) : this(e.Point.X, e.Point.Y, e.Point.Z) { }
private void OnDragMove(object sender, PointEventArgs e) { _navigator.InternalDragMove(e); }
/// <summary> /// Occurs when drag operation completes with pages being dropped. /// </summary> /// <param name="sender">Source of the page drag; can be null.</param> /// <param name="e">Event arguments containing the new screen point of the mouse.</param> /// <returns>Drop was performed and the source can perform any removal of pages as required.</returns> public virtual bool PageDragEnd(object sender, PointEventArgs e) { return(DragEnd(e.Point)); }
/// <summary> /// Occurs when drag operation completes with pages being dropped. /// </summary> /// <param name="sender">Source of the page drag; can be null.</param> /// <param name="e">Event arguments containing the new screen point of the mouse.</param> /// <returns>Drop was performed and the source can perform any removal of pages as required.</returns> public bool PageDragEnd(object sender, PointEventArgs e) { return(_workspace.InternalPageDragEnd(sender as KryptonNavigator, e)); }
void session_SessionStarted(object sender, PointEventArgs e) { this.timer.Start(); }
private void Control_ContextMenuRequested(object sender, PointEventArgs e) { Container.ShowContextMenu(RPlotCommandIds.PlotDeviceContextMenu, e.Point); }
void sessionManager_SessionStarted(object sender, PointEventArgs e) { SessionStarted(sender, new SessionStartedEventArgs(e.Point.X, e.Point.Y, e.Point.Z)); }
static void sessionManager_SessionStarted(object sender, PointEventArgs e) { sessionManager.TrackPoint(e.Point); }
void session_SessionStarted(object sender, PointEventArgs e) { state = SessionState.Started; }
/// <summary> /// Occurs when the mouse moves during the drag operation. /// </summary> /// <param name="sender">Source of the page drag; can be null.</param> /// <param name="e">Event arguments containing the new screen point of the mouse.</param> public void PageDragMove(object sender, PointEventArgs e) { _workspace.InternalPageDragMove(sender as KryptonNavigator, e); }
public void ServerAction(ToolEventArgs args) { Map mapCtrl = null; mapCtrl = (Map)args.Control; string strName = ""; PointEventArgs ptArgs = null; ptArgs = (PointEventArgs)args; System.Drawing.Point pt = ptArgs.ScreenPoint; //转换为地图上的点 ESRI.ArcGIS.ADF.Web.Geometry.Point adfPt = ESRI.ArcGIS.ADF.Web.Geometry.Point.ToMapPoint(pt.X, pt.Y, mapCtrl.Extent , (int)mapCtrl.Width.Value, (int)mapCtrl.Height.Value); //查找图层 System.Collections.IEnumerable func_enum = null; func_enum = mapCtrl.GetFunctionalities(); ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource grahpResource = null; System.Data.DataTable dt; foreach (IGISFunctionality gisfunction in func_enum) { IGISResource gisRes = null; gisRes = gisfunction.Resource; if (gisfunction.Resource.Name == "graph") { grahpResource = (MapResource)gisfunction.Resource;//找到内存图像资源 } bool bIsSupported = false; //地理资源是否支持查询 bIsSupported = gisRes.SupportsFunctionality((typeof(IQueryFunctionality))); if (!bIsSupported) { continue; } IQueryFunctionality qFunc = null; qFunc = (IQueryFunctionality)gisRes.CreateFunctionality((typeof(IQueryFunctionality)), null); string[] strIds; string[] strNames; qFunc.GetQueryableLayers(null, out strIds, out strNames); if (strIds == null) { continue; //如果是遥感影像不支持查询 } int layerIndex = -1; for (int i = 0; i < strNames.Length; i++) { if (strNames[i] == "bou2_4p") { layerIndex = i; break; } } if (layerIndex < 0) { continue; } //找到该图层 SpatialFilter sFilter = new SpatialFilter(); sFilter.ReturnADFGeometries = true; sFilter.Geometry = adfPt; sFilter.MaxRecords = 100; dt = qFunc.Query(null, strIds[layerIndex], sFilter); if (dt == null || dt.Rows.Count == 0) { continue; } for (int jj = 0; jj < dt.Columns.Count; jj++) { strName = dt.Rows[0]["name"].ToString(); if (dt.Columns[jj].DataType == typeof(ESRI.ArcGIS.ADF.Web.Geometry.Geometry)) { //找到该集合对象 ESRI.ArcGIS.ADF.Web.Geometry.Geometry geom = (ESRI.ArcGIS.ADF.Web.Geometry.Geometry)dt.Rows[0][jj]; ESRI.ArcGIS.ADF.Web.Display.Graphics.ElementGraphicsLayer glayer = null; foreach (System.Data.DataTable dt1 in grahpResource.Graphics.Tables) { if (dt1 is ESRI.ArcGIS.ADF.Web.Display.Graphics.ElementGraphicsLayer) { glayer = (ESRI.ArcGIS.ADF.Web.Display.Graphics.ElementGraphicsLayer)dt1; break; } } if (glayer == null) { glayer = new ESRI.ArcGIS.ADF.Web.Display.Graphics.ElementGraphicsLayer(); grahpResource.Graphics.Tables.Add(glayer); } glayer.Clear(); ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicElement ge = null; ge = new ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicElement(geom, System.Drawing.Color.Red); ge.Symbol.Transparency = 50; glayer.Add(ge); } } } // if (mapCtrl.ImageBlendingMode == ImageBlendingMode.WebTier) { mapCtrl.Refresh(); } else if (mapCtrl.ImageBlendingMode == ImageBlendingMode.Browser) { mapCtrl.RefreshResource(grahpResource.Name); } object[] oa = new object[1]; string sa = "alert('" + strName + "');"; oa[0] = sa; CallbackResult crl = new CallbackResult(null, null, "javascript", oa); mapCtrl.CallbackResults.Add(crl); }
/// <summary> /// Occurs when the mouse moves during the drag operation. /// </summary> /// <param name="sender">Source of the page drag; can be null.</param> /// <param name="e">Event arguments containing the new screen point of the mouse.</param> public virtual void PageDragMove(object sender, PointEventArgs e) { DragMove(e.Point); }
private void OnContextMenuRequested(object sender, PointEventArgs e) { ShowContextMenu(e.Point); }
static void sessionManager_SessionStarted(object sender, PointEventArgs e) { Trace.WriteLine("Kinect session started"); sessionManager.TrackPoint(e.Point); }
private void OnDragEnd(object sender, PointEventArgs e) { Navigator.InternalDragEnd(e); }
/// <summary> /// Event handler for when the Kinect tracks a new hand /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void sessionManager_SessionStarted(object sender, PointEventArgs e) { Trace.WriteLine("Kinect hand point detected."); sessionManager.TrackPoint(e.Point); }
private void SessionStarted(object sender, PointEventArgs e) { handDetected = true; slider2D.Reposition(new XnMPoint(e.Point.X, e.Point.Y, e.Point.Z)); handHandler = new HandHandler(); handHandler.DropSessionTrigger += new EventHandler<EventArgs>(handHandler_DropSessionTrigger); if (HandDetected != null) { HandDetected(sender, e); } }