//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void calculate(boolean paramBoolean) throws org.boris.expr.ExprException public override void calculate(bool paramBoolean) { if (this.autoCalculate && !paramBoolean) { return; } this.graph.sort(); IDictionary <string, ResourceToAssignmentTable> .KeyCollection hashSet = new HashSet <object>(this.assignmentsWithFormulasMap.Keys); foreach (Range range in this.graph) { string str = range.Dimension1Name; bool @bool = hashSet.contains(str); if (@bool) { hashSet.remove(str); } Expr expr = (Expr)this.inputs[range]; if (expr is ExprEvaluatable) { if (@bool) { CurrentField = "QTYPUNITFORM"; ResourceToAssignmentTable resourceToAssignmentTable = (ResourceToAssignmentTable)this.assignmentsWithFormulasMap[str]; if (resourceToAssignmentTable.getResourceTable() is AssemblyTable) { AssemblyTable assemblyTable = (AssemblyTable)resourceToAssignmentTable.getResourceTable(); loadLocalVariables(assemblyTable.Vars); } else if (resourceToAssignmentTable.getResourceTable() is BoqItemTable) { BoqItemTable boqItemTable = (BoqItemTable)resourceToAssignmentTable.getResourceTable(); loadLocalVariables(boqItemTable.Vars); } } Expr expr1 = ((ExprEvaluatable)expr).evaluate(this); this.provider.valueChanged(range, expr1); if (@bool) { ((ResourceToAssignmentTable)this.assignmentsWithFormulasMap[str]).PvVars = (string.ReferenceEquals(PvVars, null)) ? "" : PvVars; } this.values[range] = expr1; } } foreach (string str in hashSet) { CurrentField = "QTYPUNITFORM"; ResourceToAssignmentTable resourceToAssignmentTable = (ResourceToAssignmentTable)this.assignmentsWithFormulasMap[str]; Expr expr = parseStatement(resourceToAssignmentTable.QuantityPerUnitFormula); Range range = new Range(str); this.provider.valueChanged(range, expr); this.values[range] = expr; resourceToAssignmentTable.PvVars = (string.ReferenceEquals(PvVars, null)) ? "" : PvVars; } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void reloadVariables() throws org.boris.expr.ExprException private void reloadVariables() { this.assignmentsWithFormulasMap.Clear(); this.updatedResourceToAssignmentQtyPerUnitSet.Clear(); this.pvVarsCalled = new StringBuilder(); foreach (string str in BoqItemTable.VIEWABLE_FIELDS) { if (!this.currentField.Equals(str)) { object @object = getFieldFormulaValue(this.boqTable, str + "Formula"); string str1 = variableFromField(str); if (@object != null) { set(str1, "=" + @object.ToString()); } else if (BoqItemTable.isFieldEditable(str)) { object object1 = getFieldValue(this.boqTable, str); if (BoqItemTable.isFieldDate(str)) { object1 = Convert.ToDouble(0.0D); } else { object1 = ""; } setExprValue(str1, object1); } } } this.boqTable.PvVars = (this.pvVarsCalled == null) ? "" : this.pvVarsCalled.ToString(); this.boqTable.HasPVFormula = Convert.ToBoolean((this.pvVarsCalled != null && this.pvVarsCalled.ToString().Length > 0)); foreach (object @object in this.boqTable.ResourceAssignmentsList) { ResourceToAssignmentTable resourceToAssignmentTable = (ResourceToAssignmentTable)@object; resourceToAssignmentTable.PvVars = ""; ResourceWithAssignmentsTable resourceWithAssignmentsTable = resourceToAssignmentTable.getResourceTable(); if (resourceToAssignmentTable.getResourceTable() is AssemblyTable) { AssemblyTable assemblyTable = (AssemblyTable)resourceToAssignmentTable.getResourceTable(); loadLocalVariables(assemblyTable.Vars); } else if (resourceToAssignmentTable.getResourceTable() is BoqItemTable) { BoqItemTable boqItemTable = (BoqItemTable)resourceToAssignmentTable.getResourceTable(); loadLocalVariables(boqItemTable.Vars); } if (resourceToAssignmentTable.QuantityPerUnitFormulaState == ResourceToAssignmentTable.QTYPUFORM_NOFORMULA) { continue; } string str = resourceToAssignmentTable.QuantityPerUnitFormula; if (!StringUtils.isNullOrBlank(str)) { string str1 = System.Guid.randomUUID().ToString(); set(str1, "=" + str.ToString()); this.assignmentsWithFormulasMap[str1] = resourceToAssignmentTable; } } if (this.boqTable.BoqItemAssemblySet != null) { foreach (BoqItemAssemblyTable boqItemAssemblyTable in this.boqTable.BoqItemAssemblySet) { AssemblyTable assemblyTable = boqItemAssemblyTable.AssemblyTable; loadLocalVariables(assemblyTable.Vars); QuantityPerUnitFieldFormula = assemblyTable; } } }