private void button1_Click(object sender, RoutedEventArgs e) { WriteableBitmap b = null; if (pc != null) { b = pc.getPhoto(); } if (b != null) { DCTestLibrary.PhotoTest pt = new DCTestLibrary.PhotoTest(); float sx, sy; sx = Convert.ToSingle(textBoxPixH.Text) / b.PixelHeight; sy = Convert.ToSingle(textBoxPixW.Text) / b.PixelWidth; b = pt.ScaleBitmap(b, sx, sy).Result; pc.setPhoto(b); } }
private void buttonPaste_Click(object sender, RoutedEventArgs e) { if (lcp == null) { SilverlightLFC.common.Environment.ShowMessage("未将按钮和测试对象关联!"); return; } ClearActiveAll(); CameraTestDesktop d = CameraTestDesktop.getDesktop(); WriteableBitmap wb = d.getClip(); if (wb == null) { return; } lcp.setPhoto(wb); if (addPhoto != null) { addPhoto(wb); } if (PhotoOperate != null) { PhotoOperate("Paste", wb); } }
private void buttonSource_Click(object sender, RoutedEventArgs e) { if ((o == null) || (lc == null)) { return; } if (o.mp.SourcePhoto == null) { return; } lc.setPhoto(o.mp.SourcePhoto); }
private void UpStep_Click(object sender, RoutedEventArgs e) { if (lc == null) { return; } if (lc.getPhoto() == null) { return; } var r = pt.MoveBitmap(lc.getPhoto(), 0, -1 * lynxUpDownMovePix.IntValue); if (r != null && r.Result != null) { lc.setPhoto(r.Result); } }
public void AddPhoto(WriteableBitmap photo) { LChartPhoto.setPhoto(photo); }
private void buttonPaste_Click(object sender, RoutedEventArgs e) { CameraTestDesktop d = CameraTestDesktop.getDesktop(); lc.setPhoto(d.getClip()); }