コード例 #1
0
        private void MovableBedForm_Load(object sender, EventArgs e)
        {
            valueParamPanel.Visible        = false;
            physicalParamPanel.Visible     = false;
            seabedCompositionPanel.Visible = false;
            rockStablePanel.Visible        = false;
            rockbedPanel.Visible           = false;
            transSandMethodPanel.Visible   = false;

            ControllerUtility.SetHtmlUrl(comment, "Logo.html");
            ControllerUtility.InitialGridPictureBoxByProfile(ref mapPicBox, p);

            mapPicBox.Visible = true;

            previewSedimentCompositionPanel.Size = mapPicBox.Size;
            previewSedimentCompositionPanel.Top  = mapPicBox.Top;
            previewSedimentCompositionPanel.Left = mapPicBox.Left;
            InitPreviewCombo();
            previewCombo.SelectedIndex = (int)(PreviewType.GridMap) - 1;


            LoadStatus();
            UpdateStatus();
        }
コード例 #2
0
 private void timeTxt_Enter(object sender, EventArgs e)
 {
     ControllerUtility.SetHtmlUrl(comment, "D1-1.html");
 }
コード例 #3
0
 private void valueTimePanel_MouseHover(object sender, EventArgs e)
 {
     ControllerUtility.SetHtmlUrl(comment, "D1-1.html");
 }
コード例 #4
0
 private void Back_Click(object sender, EventArgs e)
 {
     sp.SlidePanel(null, SliderPanel.Direction.Back, this.ClientSize);
     ControllerUtility.SetHtmlUrl(comment, "Logo.html");
 }
コード例 #5
0
 private void sedimentParticlesNumTxt_MouseHover(object sender, EventArgs e)
 {
     ControllerUtility.SetHtmlUrl(comment, "D1-2-1-3.html");
 }
コード例 #6
0
        private bool ConvertQuayStable()
        {
            if (!ControllerUtility.CheckConvertDouble(ref p.rockStableTimeSpacing, rockStableTimeSpacingTxt, "請輸入正確的岸壁穩定-時間間距", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!(p.analysisLeftBankStable || p.analysisRightBankStable))
            {
                MessageBox.Show("請至少選取一側岸壁穩定分析!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.leftSlopeToePosiotion, leftSlopeToePosiotionTxt, "請輸入正確的岸壁穩定-分析左岸岸壁穩定-坡腳位置!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.leftBankHeight, leftBankHeightTxt, "請輸入正確的岸壁穩定-分析左岸岸壁穩定-岸壁高度!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.leftInitBankSlope, leftInitBankSlopeTxt, "請輸入正確的岸壁穩定-分析左岸岸壁穩定-初始岸壁坡度!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.leftDikeToBankLength, leftDikeToBankLengthTxt, "請輸入正確的岸壁穩定-分析左岸岸壁穩定-堤防到岸壁的長度!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.rightSlopeToePosiotion, rightSlopeToePosiotionTxt, "請輸入正確的岸壁穩定-分析右岸岸壁穩定-坡腳位置!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.rightBankHeight, rightBankHeightTxt, "請輸入正確的岸壁穩定-分析右岸岸壁穩定-岸壁高度!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.rightInitBankSlope, rightInitBankSlopeTxt, "請輸入正確的岸壁穩定-分析右岸岸壁穩定-初始岸壁坡度!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.rightDikeToBankLength, rightDikeToBankLengthTxt, "請輸入正確的岸壁穩定-分析右岸岸壁穩定-堤防到岸壁的長度!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.bankSoilInternalFrictionAngle, bankSoilInternalFrictionAngleTxt, "請輸入正確的岸壁穩定-岸壁土壤性質-內摩擦角!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.bankSoilConductCoefficient, bankSoilConductCoefficientTxt, "請輸入正確的岸壁穩定-岸壁土壤性質-傳導係數!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.bankSoilBankScourCriticalStress, bankSoilBankScourCriticalStressTxt, "請輸入正確的岸壁穩定-岸壁土壤性質-岸壁沖刷臨界剪應力!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.bankSoilCohesion, bankSoilCohesionTxt, "請輸入正確的岸壁穩定-岸壁土壤性質-凝聚力!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.bankSoilAngleOfRepose, bankSoilAngleOfReposeTxt, "請輸入正確的岸壁穩定-岸壁土壤性質-安息角!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.bankSoilSpecificYield, bankSoilSpecificYieldTxt, "請輸入正確的岸壁穩定-岸壁土壤性質-比流率!", ControllerUtility.CheckType.GreaterThanZero))
            {
                return(false);
            }

            return(true);
        }
コード例 #7
0
        private bool ConvertWaterModeling()
        {
            if (boundaryTimeBtn.Enabled)
            {
                if (!ConvertBoundaryTimeNumber())
                {
                    return(false);
                }

                if (p.boundaryTime == null || p.boundaryTime.Length != p.boundaryTimeNumber)
                {
                    MessageBox.Show("請輸入水理模式-邊界時間!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
            }

            if (p.upFlowCondition == RiverSimulationProfile.FlowConditionType.None)
            {
                MessageBox.Show("請選擇水理模式-上游-流況設定!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }
            else if (p.upFlowCondition == RiverSimulationProfile.FlowConditionType.SuperCriticalFlow)
            {
                if (!p.superMainFlowQuantity.HasInputed())
                {
                    MessageBox.Show("請輸入水理模式-上游-超臨界流-主流方向流量!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
                if (!p.superSideFlowQuantity.HasInputed())
                {
                    MessageBox.Show("請輸入水理模式-上游-超臨界流-側方向流量!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
                if (!p.superWaterLevel.HasInputed())
                {
                    MessageBox.Show("請輸入水理模式-上游-超臨界流-水位!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
            }
            else if (p.upFlowCondition == RiverSimulationProfile.FlowConditionType.SubCriticalFlow)
            {
                if (!p.subMainFlowQuantity.HasInputed())
                {
                    MessageBox.Show("請輸入水理模式-上游-亞臨界流-主流方向流量!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
                if (!p.subSideFlowQuantity.HasInputed())
                {
                    MessageBox.Show("請輸入水理模式-上游亞臨界流-側方向流量!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
            }

            if (p.downFlowCondition == RiverSimulationProfile.FlowConditionType.None)
            {
                MessageBox.Show("請選擇水理模式-下游-流況設定!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }
            else if (p.downFlowCondition == RiverSimulationProfile.FlowConditionType.SubCriticalFlow)
            {
                if (!p.downSubWaterLevel.HasInputed())
                {
                    MessageBox.Show("請輸入水理模式-下游-亞臨界流-水位!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
            }

            if (!ConvertVerticalVelocityDistributionNumber())
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.mainstreamWindShear, mainstreamWindShearTxt, "請輸入正確的水理模式-主流方向風剪!", ControllerUtility.CheckType.NoCheck))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.sideWindShear, sideWindShearTxt, "請輸入正確的水理模式-側方向風剪!", ControllerUtility.CheckType.NoCheck))
            {
                return(false);
            }

            if (!ControllerUtility.CheckConvertDouble(ref p.coriolisForce, coriolisForceTxt, "請輸入正確的水理模式-科氏力!", ControllerUtility.CheckType.NoCheck))
            {
                return(false);
            }
            return(true);
        }