示例#1
0
        private void frmHydraulicCalculations_Load(object sender, EventArgs e)
        {
            // Default Data
            if (dgvRiver.Rows.Count <= 1)
            {
                dgvRiver.Rows.Add(1, 126.933, 67.370);
                dgvRiver.Rows.Add(2, 132.933, 64.170);
                dgvRiver.Rows.Add(3, 138.933, 62.388);
                dgvRiver.Rows.Add(4, 145.433, 61.970);
                dgvRiver.Rows.Add(5, 151.933, 62.250);
                dgvRiver.Rows.Add(6, 157.933, 63.370);
                dgvRiver.Rows.Add(7, 163.933, 67.370);
            }
            Check_Grid();


            #region Chiranjit Design Option

            try
            {
                eDesignOption edp = iApp.Get_Design_Option(Title);
                if (edp == eDesignOption.None)
                {
                    this.Close();
                }
                else if (edp == eDesignOption.Open_Design)
                {
                    FilePath = Path.Combine(iApp.LastDesignWorkingFolder, Title);
                    iApp.Read_Form_Record(this, user_path);

                    MessageBox.Show("Data Loaded successfully.", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "Input data file Error..");
            }
            #endregion Chiranjit Design Option
        }
示例#2
0
        private void frm_BearingDesign_Load(object sender, System.EventArgs e)
        {
            //Chiranjit [2013 03 30]
            Save_FormRecord.Set_Demo_Data(this);
            iApp.Check_Demo_Version();


            #region Chiranjit Design Option

            try
            {
                eDesignOption edp = iApp.Get_Design_Option(Title);
                if (edp == eDesignOption.None)
                {
                    this.Close();
                }
                else if (edp == eDesignOption.Open_Design)
                {
                    user_path = Path.Combine(iApp.LastDesignWorkingFolder, Title);
                    iApp.Read_Form_Record(this, user_path);


                    if (iApp.IsDemo)
                    {
                        MessageBox.Show("ASTRA USB Dongle not found at any port....\nOpening with default data......", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        MessageBox.Show("Data Loaded successfully.", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "Input data file Error..");
            }
            #endregion Chiranjit Design Option
        }