Esempio n. 1
0
        public override SGHalfPeriod[] GetHalfPeriods(SOPPars _sop)
        {
            SGPars pars            = ParAll.ST.Defect.Cross.SolidGroup.sgPars;
            List <SGHalfPeriod> L  = new List <SGHalfPeriod>();
            IEnumerator         ie = SGCalc.Calc(
                SqlBoolean.False,
                new SqlString(GetImg()),
                GetThech(),
                new SqlInt32(pars.HalfPeriod),
                new SqlInt32(pars.HalfPeriodDif),
                new SqlBoolean(pars.FullPeriod),
                new SqlString(pars.AlgorithmPoints.ToString()),
                new SqlString(pars.ValIU.ToString()),
                new SqlInt32(pars.BorderBegin),
                new SqlInt32(pars.BorderEnd),
                _sop == null ? SqlInt32.Null : new SqlInt32(_sop.Length),
                _sop == null ? SqlInt32.Null : new SqlInt32(_sop.BeginPoint),
                _sop == null ? SqlInt32.Null : new SqlInt32(_sop.EndPoint)
                );
            int index = 0;

            while (ie.MoveNext())
            {
                SGCalc.Result result = ie.Current as SGCalc.Result;
                L.Add(new SGHalfPeriod(result.par, Convert.ToInt32(result.val), index++));
            }
            return(L.ToArray());
        }
Esempio n. 2
0
        public static void SaveParsToDB()
        {
            SGPars p = ParAll.SG.sgPars;

            new ExecSQL(string.Format("update Uran.SGPars set veracity={0},period={1},period_dif={2},borders={3},borders1={4},algorithm='{5}',pro='{6}',tubeCount={7},ValUI='{8}',FullPeriod='{9}'",
                                      p.Veracity.ToString(),
                                      p.HalfPeriod.ToString(),
                                      p.HalfPeriodDif.ToString(),
                                      p.BorderBegin.ToString(),
                                      p.BorderEnd.ToString(),
                                      p.AlgorithmPoints,
                                      p.AlgorithmSG,
                                      p.TubeCount.ToString(),
                                      p.ValIU.ToString(),
                                      p.FullPeriod ? "true" : "false"));
        }