private void comboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { this.Section = SectionBase.Create(this.SelectedSection); Section.CalculateSecProps(); Material = new StructuralBase.Material.Steel(210000, 355, 70000); Design = (StructuralBase.Design.Steel.SteelDesign)Section.DesignSection(Material); sectionControl = (InputControl)ControlBase.Create(ControlTypes.Input); sectionControl.SourceObject = this.Section; sectionControl.InputChanged += Check; sectionControl.Settings.UpdateDynamically = true; this.SectionInput.Children.Clear(); this.SectionInput.Children.Add(sectionControl); outputControl = (OutputControl)ControlBase.Create(ControlTypes.Output); outputControl.SourceObject = this.Section; outputControl.Settings.UpdateDynamically = true; this.SectionOutput.Children.Clear(); this.SectionOutput.Children.Add(outputControl); sectionControl.InputChanged += new InputControl.InputEventHandler(outputControl.Refresh); InputControl designCont = (InputControl)ControlBase.Create(ControlTypes.Input); designCont.Settings.UpdateDynamically = true; designCont.SourceObject = this.Design; this.DesignInput.Children.Clear(); this.DesignInput.Children.Add(designCont); designCont.InputChanged += Check; }
public virtual bool CheckSection(StructuralBase.Section.SectionBase Section) { // Design StructuralBase.Material.Steel mat = new StructuralBase.Material.Steel(210000, 355, 70000); StructuralBase.Design.Steel.SteelDesign newDesign = (StructuralBase.Design.Steel.SteelDesign)Section.DesignSection(mat); StructuralBase.Design.InternalForces newForce = new StructuralBase.Design.InternalForces(); double moment = MaxMoment; newForce.M3 = moment; newForce.V2 = moment / (l / 2.0); newDesign.Lx = l; newDesign.Ly = l; newDesign.MA = moment / 2.0; newDesign.MB = moment; newDesign.MC = moment / 2.0; newDesign.MMax = moment; newDesign.K = 1; newDesign.CheckASD(newForce); //if (newDesign.Result == false) // return false; // return(true); }