コード例 #1
0
        public void Generate()
        {
            var eps = Mapper.Map <ApertureSequence, ExitPupilSequence>(this);

            eps.Generate();

            var epsHalf = eps.GetShallowCopy();

            epsHalf.ApertureIn = EMath.RInt(epsHalf.ApertureIn / 2);
            epsHalf.Generate();

            var epsDouble = eps.GetShallowCopy();

            epsDouble.ApertureIn = EMath.RInt(epsDouble.ApertureIn * 2);
            epsDouble.Generate();

            ExitPupilSequences.Clear();
            ExitPupilSequences.Add(epsDouble);
            ExitPupilSequences.Add(eps);
            ExitPupilSequences.Add(epsHalf);
        }
コード例 #2
0
 private void ResizeControl(ControlResizeParms crp, double widthRatio, double heightRatio)
 {
     crp.Control.Location = new Point(EMath.RInt(crp.Location.X * widthRatio), EMath.RInt(crp.Location.Y * heightRatio));
     crp.Control.Size     = new Size(EMath.RInt(crp.Size.Width * widthRatio), EMath.RInt(crp.Size.Height * heightRatio));
 }