private void buttonCrop_Click(object sender, RoutedEventArgs e) { if ((o == null) || (lc == null)) { return; } DCTestLibrary.XMarkChart xc = o as DCTestLibrary.XMarkChart; if (xc != null) { if (xc.CropPhoto == null) { return; } lc.setPhoto(xc.CropPhoto); } }
public List <List <decimal> > getCurveWaveQ(WriteableBitmap b, int No)//得到一个表示测试卡波型的亮度变化曲线,给出的是依据顺序由低到高的频率 { List <List <decimal> > al = new List <List <decimal> >(); List <decimal> Sal;//理论波形 List <decimal> Val; int WaveSwing; int minValue; Val = getDecimalList(getHalfWaveList(b, XMarkChart.getHalfWaveCountByIndex(No))); WaveSwing = Convert.ToInt32(Val[0]) - Convert.ToInt32(Val[Val.Count - 1]); minValue = Convert.ToInt32(Val[Val.Count - 1]); Sal = getAdjustWaveValueList(Val.Count, WaveSwing, minValue); al.Add(Sal); al.Add(Val); return(al); }