public Model(ProModelInterface model, InParamsExt inParams, OutParams previewParams, OptionParams optionParams) { this.model = model; this.inParams = inParams; this.previewParams = previewParams; this.optionParams = optionParams; }
public void updateFromOutParams(OutParams outParams) { for (int compi = 0; compi < outParams.outSet.comps.Count; compi++) { controlcomps[compi].updateFromOutComp(outParams.outSet.comps[compi]); } }
public void clearTimeOut() { if (outParams == null) { outParams = new OutParams(); } outParams.resetTime(); }
public void update(InParamsExt inParams, OutParams previewParams) { outParams = new OutParams(); this.inParams = inParams; this.previewParams = previewParams; if (this.previewParams == null) { this.previewParams = outParams; } stats.start(); run(); stats.storeModelTime(); }
public void updateModel(OutParams outParams) { // Called from model thread; need to invoke to update UI controls Dispatcher.Invoke((Action)(() => { if (outTab.IsSelected) { outView.update(outParams); } else if (timeTab.IsSelected) { timeView.update(outParams); } })); }
public void update(OutParams outParams) { this.outParams = outParams; if (TimeMode) { ntime = outParams.timeVisOutSet.Count; // Reset scrollbar //scrollBar.Value = 0; timei = 0; if (timei >= ntime) { timei = ntime - 1; } updateScroll(); updateTimeText(); } update(); }
public void writeOutRaw(string fileName, ViewParams viewParams, InParamsExt inParams, OutParams outParams) { // *** obsolete; can re-use writeOut instead? TextWriter file; OutCell[][] rawOutCells; string unitsLabel = ""; string label; string addlabel; int nphases; int ncomps; int nseries; int ncells; bool dispDual = (viewParams.phaseDisplay == PhaseDisplayType.UpperLower); bool first; if (dispDual) { nphases = 2; } else { nphases = 1; } ncomps = inParams.comps.Count; if (viewParams.peaksDisplay != PeaksDisplayType.Peaks) { ncomps++; } nseries = ncomps * nphases; if (inParams.natUnits == QuantityType.Steps) { unitsLabel = "Step"; } else if (inParams.natUnits == QuantityType.Volume) { unitsLabel = "Volume"; } else if (inParams.natUnits == QuantityType.Time) { unitsLabel = "Time"; } else if (inParams.natUnits == QuantityType.ReS) { unitsLabel = "ReS"; } file = new StreamWriter(fileName); // labels first = true; for (int c = 0; c < ncomps; c++) { if (c < inParams.comps.Count) { label = inParams.comps[c].label; } else { label = "Sum"; } for (int i = 0; i < nphases; i++) { if (!first) { file.Write(","); } file.Write(unitsLabel); file.Write(","); if (nphases > 1 && (PhaseType)(i + 1) == PhaseType.Upper) { addlabel = "(UP)"; } else if (nphases > 1 && (PhaseType)(i + 1) == PhaseType.Lower) { addlabel = "(LP)"; } else { addlabel = ""; } file.Write(label + addlabel); first = false; } } file.WriteLine(); // data rawOutCells = outParams.outSet.rawOutCells; ncells = rawOutCells[0].Length; for (int i = 0; i < ncells; i++) { first = true; for (int s = 0; s < nseries; s++) { if (!first) { file.Write(","); } file.Write(string.Format(CultureInfo.InvariantCulture, "{0},{1}", rawOutCells[s][i].pos, rawOutCells[s][i].con)); first = false; } file.WriteLine(); } file.Close(); }
public void updatePreview(OutParams outParams) { setupView.updatePreview(outParams); }
public override void updatePreview(OutParams outParams) { previewVis.update(outParams); }
public virtual void updatePreview(OutParams outparams) // will be overwritten { }
public TransModel(ProModelInterface model, InParamsExt inParams, OutParams previewParams, OptionParams optionParams) : base(model, inParams, previewParams, optionParams) { mincon = 0.001f; }
public void modelUpdate(OutParams outParams) { mainWindow.updateModel(outParams); }
public void previewUpdate(OutParams outParams) { mainWindow.updatePreview(outParams); // also update view using controlparams controlParams.updateFromOutParams(outParams); }