| | |
| | | int index = Convert.ToInt32(lastChar); |
| | | if (!double.TryParse(skytextBox.Text, out double result) && !string.IsNullOrEmpty(skytextBox.Text)) |
| | | { |
| | | result = _sectionBundleInfo.GaMa_Left[index]; |
| | | skytextBox.Text = _sectionBundleInfo.GaMa_Left[index].ToString(); |
| | | }else if(result>45) |
| | | { |
| | | MessageBox.Show("请è¾å
¥å°äº45度çè§åº¦"); |
| | | skytextBox.Text = _sectionBundleInfo.GaMa_Left[index].ToString(); |
| | | } |
| | | else |
| | | { |
| | | var initialR = _sectionBundleInfo.CalInitialR(_hdrBaseInfo, _geomBaseInfo); |
| | | var height = _sectionBundleInfo.CalcHeight(_geomBaseInfo, index, result, initialR[index]); |
| | | var R = _sectionBundleInfo.CheckChamferR(height, index, result, initialR[index]); |
| | | SkyTextBox controlh1 = this.Controls.Find($"skyTextBoxæé¢H1{index}", true).FirstOrDefault() as SkyTextBox; |
| | | SkyTextBox controlr1 = this.Controls.Find($"skyTextBoxæé¢r1{index}", true).FirstOrDefault() as SkyTextBox; |
| | | controlh1.Text = height.ToString(); |
| | | controlr1.Text = R.ToString(); |
| | | } |
| | | } |
| | | } |
| | |
| | | RefreshShape(Rec_sectionBundleInfo); |
| | | } |
| | | } |
| | | |
| | | private void skyTextBoxæé¢H11_TextChanged(object sender, EventArgs e) |
| | | { |
| | | if (sender is SkyTextBox skytextBox) |
| | | { |
| | | string lastChar = skytextBox.Name[skytextBox.Name.Length - 1].ToString(); |
| | | int index = Convert.ToInt32(lastChar); |
| | | if (!double.TryParse(skytextBox.Text, out double resultH) && !string.IsNullOrEmpty(skytextBox.Text)) |
| | | { |
| | | resultH = _sectionBundleInfo.H[index]; |
| | | skytextBox.Text = _sectionBundleInfo.H[index].ToString(); |
| | | } |
| | | else |
| | | { |
| | | SkyTextBox controlGaMa1 = this.Controls.Find($"skyTextBoxæé¢y1{index}", true).FirstOrDefault() as SkyTextBox; |
| | | SkyTextBox controlr1 = this.Controls.Find($"skyTextBoxæé¢r1{index}", true).FirstOrDefault() as SkyTextBox; |
| | | if (!double.TryParse(controlGaMa1.Text, out double resultGame) && !string.IsNullOrEmpty(controlGaMa1.Text)) |
| | | { |
| | | resultH = _sectionBundleInfo.GaMa_Left[index]; |
| | | } |
| | | var R = _sectionBundleInfo.HCalR(_geomBaseInfo, index, resultGame, resultH); |
| | | R = _sectionBundleInfo.CheckChamferR(resultH, index, resultH, R); |
| | | skytextBox.Text = resultH.ToString(); |
| | | controlr1.Text = R.ToString(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |