Exemple #1
0
        private void frmTimeHistory_Load(object sender, EventArgs e)
        {
            chkNodalConstraint.Checked = with_node;

            txtNodeNumbers.Text   = iACad.GetSelectedJointsInText();
            txtMemberNumbers.Text = iACad.GetSelectedMembersInText();
        }
Exemple #2
0
        private void frmTempLoad_Load(object sender, EventArgs e)
        {
            if (ASTRA_Data.Count > 0)
            {
                string kStr = ASTRA_Data[0];

                MyStrings mlist = new MyStrings(MyStrings.RemoveAllSpaces(kStr), ' ');

                int r = -1;
                for (int i = 0; i < mlist.Count; i++)
                {
                    if (r == -1)
                    {
                        if (mlist.StringList[i] == "TEMP")
                        {
                            r = i;
                            txt_joint_number.Text = mlist.GetString(0, r - 1);
                            txt_init_temp.Text    = mlist.StringList[i + 1];
                            if (mlist.Count > (i + 2))
                            {
                                txt_final_temp.Text = mlist.StringList[i + 2];
                            }
                        }
                    }
                }

                btn_jload_add.Text = "Change";
                ASTRA_Data.Clear();
            }
            else
            {
                txt_joint_number.Text = iACad.GetSelectedJointsInText();
            }
        }
Exemple #3
0
        private void frmSupportDisplacements_Load(object sender, EventArgs e)
        {
            if (ASTRA_Data.Count > 0)
            {
                string kStr = ASTRA_Data[0];

                MyStrings mlist = new MyStrings(MyStrings.RemoveAllSpaces(kStr), ' ');

                int r = -1;
                for (int i = 0; i < mlist.Count; i++)
                {
                    if (r == -1)
                    {
                        if (mlist.StringList[i] == "FX" || mlist.StringList[i] == "FY" || mlist.StringList[i] == "FZ" ||
                            mlist.StringList[i] == "MX" || mlist.StringList[i] == "MY" || mlist.StringList[i] == "MZ")
                        {
                            r = i;
                        }
                    }

                    if (mlist.StringList[i] == "FX")
                    {
                        txt_fx.Text = mlist.StringList[i + 1];
                    }
                    else if (mlist.StringList[i] == "FY")
                    {
                        txt_fy.Text = mlist.StringList[i + 1];
                    }
                    else if (mlist.StringList[i] == "FZ")
                    {
                        txt_fz.Text = mlist.StringList[i + 1];
                    }
                    else if (mlist.StringList[i] == "MX")
                    {
                        txt_mx.Text = mlist.StringList[i + 1];
                    }
                    else if (mlist.StringList[i] == "MY")
                    {
                        txt_my.Text = mlist.StringList[i + 1];
                    }
                    else if (mlist.StringList[i] == "MZ")
                    {
                        txt_mz.Text = mlist.StringList[i + 1];
                    }
                }

                if (r != -1)
                {
                    txt_joint_number.Text = mlist.GetString(0, r - 1);
                }
                btn_jload_add.Text = "Change";
                ASTRA_Data.Clear();
            }
            else
            {
                txt_joint_number.Text = iACad.GetSelectedJointsInText();
            }
        }
Exemple #4
0
        void SetGrid()
        {
            kStr = iACad.GetSelectedJointsInText();

            if (kStr == "")
            {
                kStr = "ALL";
            }
            MyStrings mList = null;

            if (kStr == "ALL")
            {
                for (int i = 0; i < iACad.AstraDocument.Joints.Count; i++)
                {
                    dgvNodeGrid.Rows.Add(iACad.AstraDocument.Joints[i].NodeNo,
                                         iACad.AstraDocument.Joints[i].Point.x,
                                         iACad.AstraDocument.Joints[i].Point.y,
                                         iACad.AstraDocument.Joints[i].Point.z, "");
                }
            }
            else if (kStr.Contains("TO"))
            {
                mList = new MyStrings(MyStrings.RemoveAllSpaces(kStr), ' ');
                int indx = -1;
                for (int i = mList.GetInt(0); i <= mList.GetInt(2); i++)
                {
                    indx = iACad.AstraDocument.Joints.IndexOf(i);

                    dgvNodeGrid.Rows.Add(iACad.AstraDocument.Joints[indx].NodeNo,
                                         iACad.AstraDocument.Joints[indx].Point.x,
                                         iACad.AstraDocument.Joints[indx].Point.y,
                                         iACad.AstraDocument.Joints[indx].Point.z, "");
                }
            }
            else
            {
                //kStr =
                mList = new MyStrings(MyStrings.RemoveAllSpaces(kStr), ',');
                int indx = -1;
                for (int i = 0; i < mList.Count; i++)
                {
                    indx = iACad.AstraDocument.Joints.IndexOf(mList.GetInt(i));
                    dgvNodeGrid.Rows.Add(iACad.AstraDocument.Joints[indx].NodeNo,
                                         iACad.AstraDocument.Joints[indx].Point.x,
                                         iACad.AstraDocument.Joints[indx].Point.y,
                                         iACad.AstraDocument.Joints[indx].Point.z, "");
                }
            }
        }
Exemple #5
0
        private void frmElements_Load(object sender, EventArgs e)
        {
            if (ASTRA_Data.Count > 0)
            {
                string kStr = ASTRA_Data[0];


                MyStrings mlist = new MyStrings(MyStrings.RemoveAllSpaces(kStr), ' ');


                int r = MyStrings.StringToInt(kStr, -1);
                if (r == -1)
                {
                    r = DGV.CurrentCell.RowIndex;
                    btn_elmt_add.Text = "Insert";
                    txt_elmt_no.Text  = DGV[0, r].Value.ToString();
                }
                else
                {
                    txt_elmt_no.Text    = DGV[0, r].Value.ToString();
                    txt_elmt_node1.Text = DGV[1, r].Value.ToString();
                    txt_elmt_node2.Text = DGV[2, r].Value.ToString();
                    txt_elmt_node3.Text = DGV[3, r].Value.ToString();
                    txt_elmt_node4.Text = DGV[4, r].Value.ToString();
                    btn_elmt_add.Text   = "Change";
                }
            }
            else
            {
                txt_elmt_no.Text = DGV.RowCount + 1 + "";

                List <int> joints = MyStrings.Get_Array_Intiger(iACad.GetSelectedJointsInText());

                if (joints.Count > 3)
                {
                    txt_elmt_node1.Text = joints[0].ToString();
                    txt_elmt_node2.Text = joints[1].ToString();
                    txt_elmt_node3.Text = joints[2].ToString();
                    txt_elmt_node4.Text = joints[3].ToString();
                }

                //txt_elmt_node1.Text = "0";
                //txt_elmt_node2.Text = "0.0";
                //txt_jnt_start_z.Text = "0.0";
            }
        }
Exemple #6
0
        private void frmLoad_Load(object sender, EventArgs e)
        {
            cmb_member_load.SelectedIndex = 0;
            cmb_load_dir.SelectedIndex    = 1;
            cmb_Self_Weight.SelectedIndex = 1;
            cmb_joint_dir.SelectedIndex   = 2;


            cmbMassUnit.SelectedIndex   = (int)iACad.MassUnit;
            cmbLengthUnit.SelectedIndex = (int)iACad.LengthUnit;;

            //cmbMassUnit.SelectedIndex = 2;
            //cmbLengthUnit.SelectedIndex = 0;



            txt_member_numbers.Text  = iACad.GetSelectedMembersInText();
            txt_area_mem_number.Text = txt_member_numbers.Text;
            txt_joint_number.Text    = iACad.GetSelectedJointsInText();
        }
Exemple #7
0
        private void frmJointWeight_Load(object sender, EventArgs e)
        {
            if (ASTRA_Data.Count > 0)
            {
                string kStr = ASTRA_Data[0];

                MyStrings mlist = new MyStrings(MyStrings.RemoveAllSpaces(kStr), ' ');

                int r = -1;
                for (int i = 0; i < mlist.Count; i++)
                {
                    if (r == -1)
                    {
                        if (mlist.StringList[i].StartsWith("WEI"))
                        {
                            r = i;
                        }
                    }
                    if (mlist.StringList[i].StartsWith("WEI"))
                    {
                        txt_fy.Text = mlist.StringList[i + 1];
                    }
                }

                if (r != -1)
                {
                    txt_joint_number.Text = mlist.GetString(0, r - 1);
                }
                btn_jload_add.Text = "Change";
                ASTRA_Data.Clear();

                this.Height       = 140;
                groupBox1.Visible = false;
            }
            else
            {
                txt_joint_number.Text = iACad.GetSelectedJointsInText();

                this.Height = 447;
            }
        }
Exemple #8
0
        private void frmSupport_Load(object sender, EventArgs e)
        {
            if (ASTRA_Data != "")
            {
                chk_fx.Checked = false;
                chk_mx.Checked = false;

                chk_fy.Checked = false;
                chk_my.Checked = false;

                chk_fz.Checked = false;
                chk_mz.Checked = false;


                MyStrings mlist = new MyStrings(MyStrings.RemoveAllSpaces(ASTRA_Data), ' ');

                string kStr = "";
                int    r    = -1;
                for (int i = 0; i < mlist.Count; i++)
                {
                    if (mlist.StringList[i].StartsWith("FIXED"))
                    {
                        r = i;

                        cmb_support_type.SelectedIndex = 0;
                    }
                    else if (mlist.StringList[i].StartsWith("PINNED"))
                    {
                        r = i;
                        cmb_support_type.SelectedIndex = 1;
                        //break;
                    }
                    else if (mlist.StringList[i].StartsWith("FX"))
                    {
                        chk_fx.Checked = true;
                    }
                    else if (mlist.StringList[i].StartsWith("FY"))
                    {
                        chk_fy.Checked = true;
                    }
                    else if (mlist.StringList[i].StartsWith("FZ"))
                    {
                        chk_fz.Checked = true;
                    }
                    else if (mlist.StringList[i].StartsWith("MX"))
                    {
                        chk_mx.Checked = true;
                    }
                    else if (mlist.StringList[i].StartsWith("MY"))
                    {
                        chk_my.Checked = true;
                    }
                    else if (mlist.StringList[i].StartsWith("MZ"))
                    {
                        chk_mz.Checked = true;
                    }
                    //Chiranjit [2014 10 13]
                    else if (mlist.StringList[i].StartsWith("KFX"))
                    {
                        rbtn_kFX.Checked = true;
                        txt_kVal.Text    = mlist.StringList[i + 1];
                    }
                    else if (mlist.StringList[i].StartsWith("KFY"))
                    {
                        rbtn_kFY.Checked = true;
                        txt_kVal.Text    = mlist.StringList[i + 1];
                    }
                    else if (mlist.StringList[i].StartsWith("KFZ"))
                    {
                        rbtn_kFZ.Checked = true;
                        txt_kVal.Text    = mlist.StringList[i + 1];
                    }
                }

                if (r != -1)
                {
                    txt_joint_nos.Text = mlist.GetString(0, r - 1).Trim();
                }
                btnAddData.Text = "Change";
            }
            else
            {
                cmb_support_type.SelectedIndex = 0;
                txt_joint_nos.Text             = iACad.GetSelectedJointsInText();
            }
        }