// CALCULATION HANDLING internal static PropertyGrid PropertyGridParams(SlowVolFigSVFbdParam param, int height) { var pg = new PropertyGrid(); pg.ToolbarVisible = false; pg.PropertySort = PropertySort.NoSort; pg.Size = new Size(150, height); pg.Location = new Point(20, 12); pg.SelectedObject = param; pg.PropertyValueChanged += OnParamSettingChange; return(pg); }
internal static void SlowVolumeFigureSVFbd(ref AllTable[] atRows, SlowVolFigSVFbdParam svf, int startRow, int endRow, out string[] auditSummary) { double denom; auditSummary = new string[] { }; //1) prefill for (int i = startRow; i <= endRow; i++) // 2 -> 10401 { atRows[i].APSVbd = 1; } // calculate SVFbd for (int i = startRow; i <= endRow; i++) // 2 -> 10401 { denom = (atRows[i].SVd * atRows[i].APSVbd); if (denom > 0) { atRows[i].SVFbd = atRows[i].SVb / denom; } double biggest = BiggestPrecedingSVFbd(ref atRows, i, svf.Z); if (biggest > 1) { atRows[i].APSVbd *= (1 + svf.Y); //also onwards to last row for (int j = i + 1; j <= endRow; j++) { atRows[j].APSVbd *= (1 + svf.Y); } } else { atRows[i].APSVbd *= (1 - svf.Y); //also onwards to last row for (int j = i + 1; j <= endRow; j++) { atRows[j].APSVbd *= (1 - svf.Y); } } // add to PtsVol if (biggest > svf.W) { atRows[i].PtsVolb += biggest; } } auditSummary = $"SlowVolumeFigureSVFbd:\nSVFbd computed for {startRow}-{endRow}.\nInspect the view".Split('\n'); }