public static List <MethodData> getData(MethodSimple method, int element, int formula, bool use_all, out int used) { MethodSimpleElementFormula msef = method.GetElHeader(element).Formula[formula]; bool[] used_frames = msef.Formula.GetUsedFrames(); List <MethodData> ret = new List <MethodData>(); int prob_count = method.GetProbCount(); used = 0; for (int pr = 0; pr < prob_count; pr++) { MethodSimpleProb m_prob = method.GetProbHeader(pr); MethodSimpleCell m_cell = method.GetCell(element, pr); double con = m_cell.Con; if (con < 0) { continue; } int sub_prob_count = method.GetSubProbCount(pr); for (int sub_pr = 0; sub_pr < sub_prob_count; sub_pr++) { MethodSimpleProbMeasuring m_prob_measuring = m_prob.MeasuredSpectrs[sub_pr]; Spectr sp = m_prob_measuring.Sp; if (sp == null) { continue; } bool en = m_cell.GetData(sub_pr, formula).Enabled; if (use_all == true) { en = true; } int short_count = sp.GetShotCount(); int[] shorts = sp.GetShotIndexes(); for (int short_index = 0; short_index < shorts.Length; short_index++) { bool fl = en & used_frames[short_index]; if (fl) { used++; } MethodData md = new MethodData(con, fl, pr, sub_pr, short_index, sp.GetViewsSet()[shorts[short_index]], sp.GetNullFor(shorts[short_index]), sp.GetCommonDispers()); ret.Add(md); } } } if (ret.Count == 0) { return(null); } return(ret); }