Наследование: Canguro.Utility.GlobalizedObject, ICloneable
Пример #1
0
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is ASD01)
     {
         CopyFrom((ASD01)copy);
     }
 }
Пример #2
0
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is LRFD99)
     {
         CopyFrom((LRFD99)copy);
     }
 }
Пример #3
0
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is RCDF2001)
     {
         CopyFrom((RCDF2001)copy);
     }
 }
Пример #4
0
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is UBC97_ASD)
     {
         CopyFrom((UBC97_ASD)copy);
     }
 }
Пример #5
0
 /// <summary>
 /// Copies all properties from another ACI318_02 object
 /// </summary>
 /// <param name="copy">ACI318_02 object</param>
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is ACI318_02)
     {
         CopyFrom((ACI318_02)copy);
     }
 }
 public EditDesignOptionsDialog(DesignOptions options)
 {
     this.options = options;
     InitializeComponent();
     editPropertyGrid.SelectedObject = options;
     editPanel.Visible = true;
 }
Пример #7
0
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is UBC97_LRFD)
         CopyFrom((UBC97_LRFD)copy);
 }
Пример #8
0
 /// <summary>
 /// Copies all properties from another ACI318_02 object
 /// </summary>
 /// <param name="copy">ACI318_02 object</param>
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is ACI318_02)
         CopyFrom((ACI318_02)copy);
 }
Пример #9
0
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is LRFD99)
         CopyFrom((LRFD99)copy);
 }
Пример #10
0
 public abstract void CopyFrom(DesignOptions copy);
        private void analyzeButton2_Click(object sender, EventArgs e)
        {
            if (currentDesignOptions is ConcreteDesignOptions)
                currentDesignOptions = null;
            else if (currentDesignOptions is SteelDesignOptions)
                currentDesignOptions = (services.Model.ConcreteDesignOptions is ConcreteDesignOptions) ?
                    services.Model.ConcreteDesignOptions : null;

            AnalyzeButton_Click(sender, e);
        }
Пример #12
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="xml"></param>
        /// <param name="obj"></param>
        private void writeConcreteNode(XmlTextWriter xml, DesignOptions obj)
        {
            xml.WriteStartElement("Preferences_-_Concrete_Design_-_Mexican_RCDF_2001");
                if (obj is RCDF2001) writeRCDF2001(xml, (RCDF2001)obj);
                xml.WriteEndElement();

                xml.WriteStartElement("Preferences_-_Concrete_Design_-_ACI_318-02");
                if ( obj is ACI318_02) writeACI318_02(xml, (ACI318_02)obj);
                xml.WriteEndElement();

                xml.WriteStartElement("Preferences_-_Concrete_Design_-_UBC97");
                if( obj is UBC97_Conc) writeUBC97_Conc(xml, (UBC97_Conc)obj);
                xml.WriteEndElement();
        }
Пример #13
0
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is RCDF2001)
         CopyFrom((RCDF2001)copy);
 }
Пример #14
0
        /// <summary>
        /// Destruye todo el modelo y lo deja limpio
        /// </summary>
        /// <TODO>Modified, Save, Load</TODO>
        public void Reset()
        {
            try
            {
                this.undoManager = new UndoManager(this);
                undoManager.Enabled = false;
                this.abstractCases = new ManagedList<Canguro.Model.Load.AbstractCase>();
                abstractCases.ElementRemoved += new ManagedList<AbstractCase>.ListChangedEventHandler(abstractCases_ElementRemoved);
                this.activeLoadCase = null;
                this.areaList = new ItemList<AreaElement>();
                this.constraintList = new ManagedList<Constraint>();
                this.isLocked = false;
                this.jointList = new ItemList<Joint>();
                this.layers = new ItemList<Layer>();
                layers.ElementRemoved += new ManagedList<Layer>.ListChangedEventHandler(layers_ElementRemoved);
                this.lineList = new ItemList<LineElement>();
                this.loadCases = new ManagedDictionary<string, LoadCase>();
                loadCases.ElementRemoved += new ManagedDictionary<string, LoadCase>.ListChangedEventHandler(loadCases_ElementRemoved);
                this.summary = new ModelSummary(this);

                this.designOptions = new List<DesignOptions>();
                designOptions.Add(NoDesign.Instance);
                designOptions.Add(new LRFD99());
                designOptions.Add(new ACI318_02());
                designOptions.Add(new ASD01());
                designOptions.Add(new RCDF2001());
                designOptions.Add(new UBC97_ASD());
                designOptions.Add(new UBC97_LRFD());
                designOptions.Add(new UBC97_Conc());
                steelDesignOptions = NoDesign.Instance;
                concreteDesignOptions = NoDesign.Instance;
                coldFormedDesignOptions = NoDesign.Instance;
                aluminumDesignOptions = NoDesign.Instance;

                this.results = new Canguro.Model.Results.Results(0);

                // Layer es un Item y todos los Items asignan su propiedad layer
                // de acuerdo a ActiveLayer, por lo que hay que asignarla en null
                // antes de crear el primer Layer, root de todos los demás
                activeLayer = null;
                Layer rootLayer = new Layer(Culture.Get("defaultLayerName"));
                ActiveLayer = rootLayer;

                activeLoadCase = new LoadCase(Culture.Get("defaultLoadCase"), LoadCase.LoadCaseType.Dead);
                activeLoadCase.SelfWeight = 1.0f;
                loadCases.Add(activeLoadCase.Name, activeLoadCase);

                AnalysisCase anc = new Canguro.Model.Load.AnalysisCase(Culture.Get("defaultLoadCase"));
                AbstractCases.Add(anc);
                if (anc != null)
                {
                    StaticCaseProps props = anc.Properties as StaticCaseProps;
                    if (props != null)
                    {
                        List<StaticCaseFactor> list = props.Loads;
                        list.Add(new StaticCaseFactor(ActiveLoadCase));
                        props.Loads = list;
                    }
                }

                MaterialManager.Instance.Initialize();
                SectionManager.Instance.Initialize(ref sections);
                sections.ElementRemoved += new Catalog<Canguro.Model.Section.Section>.ListChangedEventHandler(sections_ElementRemoved);
                this.currentPath = "";
                foreach (Canguro.Model.UnitSystem.UnitSystem us in UnitSystemsManager.Instance.UnitSystems)
                    if (Properties.Settings.Default.UnitSystem.Equals(us.GetType().Name))
                        UnitSystemsManager.Instance.CurrentSystem = us;

                viewManager = Canguro.View.GraphicViewManager.Instance;
                modified = false;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.StackTrace);
                throw e;
            }
            finally
            {
                if (ModelReset != null)
                    ModelReset(this, EventArgs.Empty);
                undoManager.Enabled = true;
            }
        }
Пример #15
0
 public abstract void CopyFrom(DesignOptions copy);
Пример #16
0
 public override void CopyFrom(DesignOptions copy)
 {
     if (copy is ASD01)
         CopyFrom((ASD01)copy);
 }
 private void steelCombosLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     currentDesignOptions = services.Model.SteelDesignOptions;
     wizardControl.SelectTab(1);
     updateDesignCombosPage();
 }
Пример #18
0
 public override void CopyFrom(DesignOptions copy)
 {
 }
Пример #19
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="xml"></param>
        /// <param name="obj"></param>
        private void writeSteelNode(XmlTextWriter xml, DesignOptions obj)
        {
            xml.WriteStartElement("Preferences_-_Steel_Design_-_AISC-LRFD99");
                if (obj is LRFD99) writeLRFD99(xml, (LRFD99)obj);
                xml.WriteEndElement();

                xml.WriteStartElement("Preferences_-_Steel_Design_-_UBC97-ASD");
                if (obj is UBC97_ASD) writeUBC97_ASD(xml, (UBC97_ASD)obj);
                xml.WriteEndElement();

                xml.WriteStartElement("Preferences_-_Steel_Design_-_UBC97-LRFD");
                if (obj is UBC97_LRFD) writeUBC97_LRFD(xml, (UBC97_LRFD)obj);
                xml.WriteEndElement();

                xml.WriteStartElement("Preferences_-_Steel_Design_-_AISC-ASD01");
                if( obj is ASD01) writeASD01_Conc(xml, (ASD01)obj);
                xml.WriteEndElement();

                xml.WriteStartElement("Program_Control");
                writeProgramControl(tmpxml);
                xml.WriteEndElement();
        }
Пример #20
0
 private void store(OleDbConnection cn, DesignOptions obj)
 {
     if (obj is NoDesign)
         return;
     else if (obj is LRFD99) //A
         store(cn, (LRFD99)obj);
     else if (obj is RCDF2001) //C
         store(cn, (RCDF2001)obj);
     else if (obj is ACI318_02) //C
         store(cn, (ACI318_02)obj);
     else if (obj is UBC97_ASD) //A
         store(cn, (UBC97_ASD)obj);
     else if (obj is UBC97_LRFD) //A
         store(cn, (UBC97_LRFD)obj);
     else if (obj is UBC97_Conc) //C
         store(cn, (UBC97_Conc)obj);
     else if (obj is ASD01) //A
         store(cn, (ASD01)obj);
 }
Пример #21
0
 public override void CopyFrom(DesignOptions copy)
 {
 }
        public void UpdateDialog()
        {
            try
            {
                updatingDialog = true;
                int responseSpectrumCases = 0;
                Canguro.Model.Model model = services.Model;
                analysisCasesCheckedListBox.Items.Clear();

                foreach (AbstractCase aCase in model.AbstractCases)
                {
                    if (!(aCase is AnalysisCase) || (!(((AnalysisCase)aCase).Properties is ModalCaseProps) &&
                        (!(((AnalysisCase)aCase).Properties is ResponseSpectrumCaseProps)) &&
                        (!(((AnalysisCase)aCase).Properties is PDeltaCaseProps))))
                        analysisCasesCheckedListBox.Items.Add(aCase);

                    if (aCase is AnalysisCase && ((AnalysisCase)aCase).Properties is ResponseSpectrumCaseProps)
                    {
                        if (aCase.IsActive)
                            responseSpectrumCases++;

                        switch (responseSpectrumCases)
                        {
                            case 0:
                                responseSpectrumCheckBox.CheckState = CheckState.Unchecked;
                                break;
                            case 1:
                            case 2:
                                responseSpectrumCheckBox.CheckState = CheckState.Indeterminate;
                                break;
                            default:
                                responseSpectrumCheckBox.CheckState = CheckState.Checked;
                                responseSpectrumFactorUpDown.Value = Convert.ToDecimal(((ResponseSpectrumCaseProps)((AnalysisCase)aCase).Properties).ScaleFactor);
                                dampingFactorUpDown.Value = Convert.ToDecimal(((ResponseSpectrumCaseProps)((AnalysisCase)aCase).Properties).ModalDamping);
                                break;
                        }
                    }

                    if (aCase is AnalysisCase && ((AnalysisCase)aCase).Properties is ModalCaseProps)
                        modalAnalysisCheckBox.Checked = aCase.IsActive;

                    if (aCase is AnalysisCase && ((AnalysisCase)aCase).Properties is PDeltaCaseProps)
                        pDeltaCheckBox.Checked = aCase.IsActive;
                }

                for (int i = 0; i < analysisCasesCheckedListBox.Items.Count; i++)
                    analysisCasesCheckedListBox.SetItemChecked(i,
                        ((AbstractCase)analysisCasesCheckedListBox.Items[i]).IsActive);

                if (modalCase != null)
                    modesNumericUpDown.Value = ((ModalCaseProps)modalCase.Properties).MaxModes;
                if (responseCases.Count > 0 && responseCases[0].IsActive)
                {
                    ResponseSpectrumCaseProps rsProps = (ResponseSpectrumCaseProps)responseCases[0].Properties;
                    //responseSpectrumFunctionsComboBox.SelectedText = rsProps.ResponseSpectrumFunction.ToString();
                    if (responseSpectrumFunctionsComboBox.SelectedValue == null ||
                        !responseSpectrumFunctionsComboBox.SelectedValue.ToString().Equals(rsProps.ResponseSpectrumFunction.ToString()))
                    {
                        foreach (object obj in responseSpectrumFunctionsComboBox.Items)
                            if (rsProps != null && obj.ToString().Equals(rsProps.ResponseSpectrumFunction.ToString()))
                                responseSpectrumFunctionsComboBox.SelectedItem = obj;
                    }
                    viewSpectrumLink.Enabled = true;
                }
                else
                    viewSpectrumLink.Enabled = false;

                modesNumericUpDown.Enabled = modalAnalysisCheckBox.Checked;
                //responseSpectrumCheckBox.Enabled = modalAnalysisCheckBox.Checked;
                responseSpectrumFunctionsComboBox.Enabled = responseSpectrumCheckBox.Checked;
                responseSpectrumFactorUpDown.Enabled = responseSpectrumCheckBox.Checked;
                dampingFactorLabel.Enabled = responseSpectrumCheckBox.Checked;
                dampingFactorUpDown.Enabled = responseSpectrumCheckBox.Checked;

                editSteelDesignLinkLabel.Enabled = steelDesignComboBox.Enabled && model.SteelDesignOptions is SteelDesignOptions;
                steelCombosLinkLabel.Enabled = editSteelDesignLinkLabel.Enabled;
                editConcreteDesignLinkLabel.Enabled = concreteDesignComboBox.Enabled && model.ConcreteDesignOptions is ConcreteDesignOptions;
                concreteCombosLinkLabel.Enabled = editConcreteDesignLinkLabel.Enabled;

                if (model.SteelDesignOptions is SteelDesignOptions && model.SteelDesignOptions.DesignCombinations.Count == 0)
                    currentDesignOptions = model.SteelDesignOptions;
                else if (model.ConcreteDesignOptions is ConcreteDesignOptions && model.ConcreteDesignOptions.DesignCombinations.Count == 0)
                    currentDesignOptions = model.ConcreteDesignOptions;
                else
                    currentDesignOptions = null;

                AnalyzeButton.Text = (currentDesignOptions == null) ? Culture.Get("analyze") : Culture.Get("next");
                AcceptButton = AnalyzeButton;
            }
            finally
            {
                updatingDialog = false;
            }

            Update();
        }