void XRiteNoise_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } Noise pc = new Noise(); CameraTestDesktop.getDesktopPanel().Children.Add(pc); if (testHelper.CurrentChart == null) { SilverlightLFC.common.Environment.ShowMessage("没有选择测试照片做进一步测试"); return; } List <WriteableBitmap> wbl = new List <WriteableBitmap>(); if (testHelper.CurrentChart.mp.SelectedArea.ContainsKey("Area_4_1")) { wbl.Add(testHelper.CurrentChart.mp.SelectedArea["Area_4_1"]); wbl.Add(testHelper.CurrentChart.mp.SelectedArea["Area_4_2"]); wbl.Add(testHelper.CurrentChart.mp.SelectedArea["Area_4_3"]); wbl.Add(testHelper.CurrentChart.mp.SelectedArea["Area_4_4"]); wbl.Add(testHelper.CurrentChart.mp.SelectedArea["Area_4_5"]); wbl.Add(testHelper.CurrentChart.mp.SelectedArea["Area_4_6"]); } pc.Test(wbl); }
void XRiteColorDis_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } ColorTrend pc = new ColorTrend(); CameraTestDesktop.getDesktopPanel().Children.Add(pc); if (testHelper.CurrentChart == null) { SilverlightLFC.common.Environment.ShowMessage("没有选择测试照片做进一步测试"); return; } List <WriteableBitmap> wbl = new List <WriteableBitmap>(); List <Color> sl = new List <Color>(); for (int i = 1; i < 4; i++) { for (int j = 1; j < 7; j++) { if ((testHelper.CurrentChart as XRiteColorChart).mp.SelectedArea.ContainsKey("Area_" + i.ToString() + "_" + j.ToString())) { wbl.Add(testHelper.CurrentChart.mp.SelectedArea["Area_" + i.ToString() + "_" + j.ToString()]); sl.Add((testHelper.CurrentChart as XRiteColorChart).ColorList[(i - 1) * 6 + j - 1]); } } } pc.setStandardColorList(sl); pc.Test(wbl); }
//void autoTest() //{ // if (!TestChartNull()) { return; } // //try{ // BeginTime = DateTime.Now; // Begin(); // EndTime = DateTime.Now; // //} // //catch (Exception e) // //{ // // SilverlightLFC.common.Environment.ShowMessage(e.Message); // //} //} //public void Test() //{ // //mark = new MarkProcess(ProcPhoto); // if (ChartPhoto.getChart() == null) { return; } // processbar.Value = 0; // //ResultPanel.Children.Clear(); // //Button li=; // t.setChart(ChartPhoto.getChart()); // //t.PhotoTestProc += new PhotoTestProcessHandler(t_PhotoTestProc); // t.CorrectISO12233Chart(); // t.BeginAnalyse(); // //t.sendProcEvent(true, ""); // //processbar.Value = 30; // sw.Stop(); // sw.Start(); // long r = t.getLPResoveLines(); // //li = new Button(); // //li.Name = "ResolvingPower"; // buttonRayleiResolution.Content = "分辨率(中央):" + r.ToString() + " LW/PH"; // buttonRayleiResolution.SetValue(ToolTipService.ToolTipProperty, "利用瑞利判据,直观判断相机分辨率,数据表示在一张照片里面可以分辨的垂直线条的数量"); // //li.Click += new RoutedEventHandler(RayleiResolution_Click); // //ResultPanel.Children.Add(li); // //t.sendProcEvent(true, ""); // //processbar.Value = 50; // r = t.getHEdgeResoveLines(); // //li = new Button(); // //li.Name = "HResolvingPower"; // buttonHMTF.Content = "分辨率(水平线):" + r.ToString() + " LW/PH"; // buttonHMTF.SetValue(ToolTipService.ToolTipProperty, "利用水平线条测试分辨率,接近相机的中心分辨率,数据表示在一张照片里面可以分辨的垂直线条的数量"); // //li.Click += new RoutedEventHandler(HMTF_Click); // //ResultPanel.Children.Add(li); // //t.sendProcEvent(true, ""); // //processbar.Value = 60; // r = t.getVEdgeResoveLines(); // //li = new Button(); // //li.Name = "VResolvingPower"; // buttonVMTF.Content = "分辨率(垂直线):" + r.ToString() + " LW/PH"; // buttonVMTF.SetValue(ToolTipService.ToolTipProperty, "利用垂直线条测试分辨率,接近相机的边沿分辨率,数据表示在一张照片里面可以分辨的垂直线条的数量"); // //li.Click += new RoutedEventHandler(VMTF_Click); // //ResultPanel.Children.Add(li); // //t.sendProcEvent(true, ""); // //processbar.Value = 70; // //li = new Button(); // decimal d = t.getHDispersiveness(); // //li.Name = "HDispersiveness"; // buttonHDispersiveness.Content = "色散(水平线):" + d.ToString() + " pxl"; // buttonHDispersiveness.SetValue(ToolTipService.ToolTipProperty, "利用水平线条测试,接近中央色散程度,数据表示红绿蓝三原色在边界分离的程度,无色散时为0"); // //li.Click += new RoutedEventHandler(VDispersiveness_Click); // //ResultPanel.Children.Add(li); // //t.sendProcEvent(true, ""); // //processbar.Value = 85; // //li = new Button(); // d = t.getVDispersiveness(); // //li.Name = "VDispersiveness"; // buttonVDispersiveness.Content = "色散(垂直线):" + d.ToString() + " pxl"; // buttonVDispersiveness.SetValue(ToolTipService.ToolTipProperty, "利用垂直线条测试,接近边沿色散程度,数据表示红绿蓝三原色在边界分离的程度,无色散时为0"); // //li.Click += new RoutedEventHandler(HDispersiveness_Click); // //ResultPanel.Children.Add(li); // //t.sendProcEvent(true, ""); // //processbar.Value = 100; // sw.Stop(); // ResultPanel.SetValue(ToolTipService.ToolTipProperty, "测试共花费" + sw.Interval.Milliseconds.ToString() + "ms"); // IsTested = true; // TestProject.TestHtml.Add(WriteHTML()); //} //double PrcoStep = 100 / 6d; //void t_PhotoTestProc(object sender, PhotoTestProcessEventArgs e) //{ // processbar.Value = processbar.Value + PrcoStep; // if (processbar.Value >= 99.5) // { // t.PhotoTestProc -= new PhotoTestProcessHandler(t_PhotoTestProc); // } //} void RayleiResolution_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } RayleiResolution pc = new RayleiResolution(); CameraTestDesktop.getDesktopPanel().Children.Add(pc); if (ChartPhoto.IsSelect) { pc.Test(ChartPhoto.getSelectArea()); } else { if (testHelper.CurrentChart == null) { SilverlightLFC.common.Environment.ShowMessage("没有选择测试照片做进一步测试"); return; } if (testHelper.CurrentChart.ProcessInfor.ContainsKey("RayleiResolutionIsLeft")) { if (Convert.ToBoolean(testHelper.CurrentChart.ProcessInfor["RayleiResolutionIsLeft"])) { pc.IsLeft = true; pc.Test(testHelper.CurrentChart.mp.SelectedArea["RayleiResolutionLArea"]); } else { pc.IsLeft = false; pc.Test(testHelper.CurrentChart.mp.SelectedArea["RayleiResolutionRArea"]); } } } }
void HDispersiveness_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } Dispersiveness pc = new Dispersiveness(); pc.IsV = true; CameraTestDesktop.getDesktopPanel().Children.Add(pc); if (ChartPhoto.IsSelect) { pc.Test(ChartPhoto.getSelectArea()); } else { if (testHelper.CurrentChart == null) { SilverlightLFC.common.Environment.ShowMessage("没有选择测试照片做进一步测试"); return; } if (testHelper.CurrentChart.mp.SelectedArea.ContainsKey("AreaVEdge")) { pc.Test(testHelper.CurrentChart.mp.SelectedArea["AreaVEdge"]); } } }
void XMarkAberration_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } Aberration pc = new Aberration(); CameraTestDesktop.getDesktopPanel().Children.Add(pc); if (testHelper.CurrentChart == null) { SilverlightLFC.common.Environment.ShowMessage("没有选择测试照片做进一步测试"); return; } if (ChartPhoto.IsSelect) { pc.Test(ChartPhoto.getSelectArea()); } else { if (testHelper.CurrentChart.getCorrectPhoto() != null) { pc.Test(testHelper.CurrentChart.getCorrectPhoto()); } } }
void XMarkWhiteBalance_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } WhiteBanlance pc = new WhiteBanlance(); CameraTestDesktop.getDesktopPanel().Children.Add(pc); if (testHelper.CurrentChart == null) { SilverlightLFC.common.Environment.ShowMessage("没有选择测试照片做进一步测试"); return; } List <WriteableBitmap> wbl = new List <WriteableBitmap>(); if (testHelper.CurrentChart.mp.SelectedArea.ContainsKey("AreaBW_1")) { for (int i = 1; i < 23; i++) { wbl.Add(testHelper.CurrentChart.mp.SelectedArea["AreaBW_" + i.ToString()]); } } pc.Test(wbl); }
void XMarkBrightChanges_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } BrightDistance pc = new BrightDistance(); CameraTestDesktop.getDesktopPanel().Children.Add(pc); if (testHelper.CurrentChart == null) { SilverlightLFC.common.Environment.ShowMessage("没有选择测试照片做进一步测试"); return; } List <WriteableBitmap> bl = new List <WriteableBitmap>(); bl.Add((testHelper.CurrentChart as XMarkChart).CropPhoto); //t.getCurveBrightnessChange(); if (testHelper.CurrentChart.mp.SelectedArea.ContainsKey("AreaHBright")) { bl.Add(testHelper.CurrentChart.mp.SelectedArea["AreaHBright"]); bl.Add(testHelper.CurrentChart.mp.SelectedArea["AreaVBright"]); } pc.Test(bl); }
private void buttonBrightInfor_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } PhotoBrightCurve w = new PhotoBrightCurve(); w.setTarget(lc); AddToStack(w); }
private void buttonColorEdit_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Standard)) { return; } PixEdit w = new PixEdit(); w.setTarget(lc); AddToStack(w); }
private void buttonPhotoInfor_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Standard)) { return; } PhotoInfor w = new PhotoInfor(); w.setTarget(lc); AddToStack(w); }
private void buttonBrightCurve_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Standard)) { return; } if (!testHelper.TestChartNull()) { return; } WriteableBitmap b = (testHelper.CurrentChart as GrayChart).getBrightChangesImage(lynxUpDown1.IntValue); IsNeedSave = false; ChartPhoto.setPhoto(b); }
private void buttonInterActiveTest_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } if (!testHelper.TestChartNull()) { return; } ChartPhoto.DisableMove(); buttonInterActiveTest.Foreground = new SolidColorBrush(Colors.Red); Canvas c = ChartPhoto.getDrawObjectCanvas(); c.PointerMoved += c_PointerMoved; c.PointerPressed += c_PointerPressed; }
private void buttonRS_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Professional)) { return; } if (!testHelper.TestChartNull()) { return; } ClearInterActive(); Canvas c = ChartPhoto.getDrawObjectCanvas(); ChartPhoto.DisableMove(); c.PointerMoved += new PointerEventHandler(RL_PointerMoved); c.PointerPressed += new MouseButtonEventHandler(RL_PointerPressed); }