コード例 #1
0
        private void closeButton_Click(object sender, EventArgs e)
        {
            G02File    = null;
            curstation = null;

            this.Close();
        }
コード例 #2
0
        private void stationSelector_SelectedIndexChanged(object sender, EventArgs e)
        {
            heightBox.Items.Clear();
            curstation = null;
            string selectedStation = stationSelector.SelectedItem.ToString();

            foreach (Model.Station station in G02File.Stations)
            {
                if (selectedStation == station.stationName.ToString())
                {
                    curstation = station;
                }
            }
            wetAreaNumber.Text      = curstation.wetArea.ToString();
            wetPerimeterNumber.Text = curstation.wetPerimeter.ToString();
            rValueNumber.Text       = curstation.R.ToString();
            conveyanceNumber.Text   = curstation.Conveyance.ToString();
            Int32 min_height = Convert.ToInt32(curstation.ys.Min());
            Int32 max_height = Convert.ToInt32(curstation.ys.Max());

            for (int height = min_height; height < max_height; height++)
            {
                string[] numbers = { height.ToString() };
                heightBox.Items.AddRange(numbers);
            }
            crossSectionPanel.Refresh();

            Model.drawing.drawCrossSection(curstation.xs, curstation.ys, 0, crossSectionPanel);
        }
コード例 #3
0
        private void heightBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selectedStation = stationSelector.SelectedItem.ToString();
            int    selectedheight  = Convert.ToInt32(heightBox.SelectedItem);

            foreach (Model.Station station in G02File.Stations)
            {
                if (selectedStation == station.stationName.ToString())
                {
                    curstation = station;
                }
            }
            wetAreaNumber.Text      = curstation.wet_areas[heightBox.SelectedIndex].ToString();
            wetPerimeterNumber.Text = curstation.wet_perims[heightBox.SelectedIndex].ToString();
            double conveyance_ar = curstation.wet_areas[heightBox.SelectedIndex] * curstation.wet_areas[heightBox.SelectedIndex] /
                                   curstation.wet_perims[heightBox.SelectedIndex] * (2 / 3);

            conveyanceNumber.Refresh();
            //conveyanceNumber.Text = conveyance_ar.ToString();
            conveyanceNumber.Text = curstation.conveyances[heightBox.SelectedIndex].ToString();
            rValueNumber.Text     = curstation.Rs[heightBox.SelectedIndex].ToString();
            crossSectionPanel.Refresh();
            Model.drawing.drawCrossSection(curstation.xs, curstation.ys, selectedheight, crossSectionPanel);
        }