Clone( ) function added to IParamsProvider and all procedure/test parameters classes.
This commit is contained in:
@@ -224,6 +224,42 @@ namespace TBF.BenchControl.Cameras.CameraRoi
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(RoiProcedureParams prms)
|
||||
{
|
||||
prms.IRoiX = this.IRoiX;
|
||||
prms.IRoiY = this.IRoiY;
|
||||
prms.IRoiW = this.IRoiW;
|
||||
prms.IRoiH = this.IRoiH;
|
||||
|
||||
prms.GradPerLtr = this.GradPerLtr;
|
||||
prms.CCW = this.CCW;
|
||||
prms.ORoiW = this.ORoiW;
|
||||
prms.ORoiH = this.ORoiH;
|
||||
prms.CX = this.CX;
|
||||
prms.CY = this.CY;
|
||||
|
||||
prms.R1 = this.R1;
|
||||
prms.R2 = this.R2;
|
||||
prms.R3 = this.R3;
|
||||
prms.Ang1 = this.Ang1;
|
||||
prms.Ang2 = this.Ang2;
|
||||
prms.AngStep = this.AngStep;
|
||||
prms.MinMvmt = this.MinMvmt;
|
||||
prms.MaxMvmt = this.MaxMvmt;
|
||||
|
||||
prms.SequenceLen = this.SequenceLen;
|
||||
prms.SequenceTiming = this.SequenceTiming;
|
||||
prms.BackgroundCorr = this.BackgroundCorr;
|
||||
prms.BrightnessRoi = this.BrightnessRoi;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
RoiProcedureParams pars = new RoiProcedureParams();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public override void UpdateProcedureParams(Entities.ComponentProcedure dbEntity)
|
||||
{
|
||||
if (dbEntity == null) return;
|
||||
@@ -236,31 +272,7 @@ namespace TBF.BenchControl.Cameras.CameraRoi
|
||||
componentName = dbEntity.CmpntName;
|
||||
procedure = dbEntity.Procedure;
|
||||
|
||||
IRoiX = tmp.IRoiX;
|
||||
IRoiY = tmp.IRoiY;
|
||||
IRoiW = tmp.IRoiW;
|
||||
IRoiH = tmp.IRoiH;
|
||||
|
||||
GradPerLtr = tmp.GradPerLtr;
|
||||
CCW = tmp.CCW;
|
||||
ORoiW = tmp.ORoiW;
|
||||
ORoiH = tmp.ORoiH;
|
||||
CX = tmp.CX;
|
||||
CY = tmp.CY;
|
||||
|
||||
R1 = tmp.R1;
|
||||
R2 = tmp.R2;
|
||||
R3 = tmp.R3;
|
||||
Ang1 = tmp.Ang1;
|
||||
Ang2 = tmp.Ang2;
|
||||
AngStep = tmp.AngStep;
|
||||
MinMvmt = tmp.MinMvmt;
|
||||
MaxMvmt = tmp.MaxMvmt;
|
||||
|
||||
SequenceLen = tmp.SequenceLen;
|
||||
SequenceTiming = tmp.SequenceTiming;
|
||||
BackgroundCorr = tmp.BackgroundCorr;
|
||||
BrightnessRoi = tmp.BrightnessRoi;
|
||||
tmp.CopyContentTo(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user