private void buttonCopy_Click(object sender, RoutedEventArgs e) { if (lcp == null) { SilverlightLFC.common.Environment.ShowMessage("未将按钮和测试对象关联!"); return; } CameraTestDesktop d = CameraTestDesktop.getDesktop(); d.addClip(lcp.getPhoto()); }
private void buttonRemove_Click(object sender, RoutedEventArgs e) { Image i = Tag as Image; Visibility = Visibility.Collapsed; CameraTestDesktop d = CameraTestDesktop.getDesktop(); if (d.ClipList.Children.Contains(i)) { d.ClipList.Children.Remove(i); } }
private void buttonAdd_Click(object sender, RoutedEventArgs e) { WriteableBitmap b = OpenImage(); if (b == null) { return; } image1.Source = b; CameraTestDesktop d = CameraTestDesktop.getDesktop(); d.addClip(b); }
private void buttonPaste_Click(object sender, RoutedEventArgs e) { if (lcp == null) { SilverlightLFC.common.Environment.ShowMessage("未将按钮和测试对象关联!"); return; } CameraTestDesktop d = CameraTestDesktop.getDesktop(); WriteableBitmap wb = d.getClip(); if (wb == null) { return; } lcp.setPhoto(wb); }
public void ToIcon() { if (ctp == null) { return; } ActionAnimationShow a = new ActionAnimationShow(ctp); CameraTestDesktop cd = CameraTestDesktop.getDesktop(); StackPanel taskBar = CameraTestDesktop.getTaskBar(); FormPoint = new Point(Canvas.GetLeft(ctp), Canvas.GetTop(ctp)); Point ep = CameraTestDesktop.getPosition(this); a.AnimationComplete += new AnimationCompleteEventHandler(hidea_AnimationComplete); a.HideZoomProjection(500, FormPoint, ep); }
public CameraTestProject() { InitializeComponent(); am = new ActionMove(this, this.LayoutRoot); CameraTestDesktop cd = CameraTestDesktop.getDesktop(); }
private void LayoutRoot_PointerPressed(object sender, PointerRoutedEventArgs e) { CameraTestDesktop cd = CameraTestDesktop.getDesktop(); cd.currentProject = this; }
public static Point getPosition(UIElement u) { GeneralTransform gt = u.TransformToVisual(CameraTestDesktop.getDesktop()); return(gt.TransformPoint(new Point())); }