示例#1
0
        private void UpdateConfig()
        {
            IDictionary <int, RoadRange> roadRanges = new Dictionary <int, RoadRange>();

            for (int i = 0; i < this.panel1.Controls.Count; i++)
            {
                RoadRangeControl rangeControl = (RoadRangeControl)panel1.Controls[i];
                roadRanges.Add(i + 1, rangeControl.RoadRange);
            }
            roadRisk.UpdateRoadRiskLevelToConfig(roadRanges);
        }
示例#2
0
        private void AddArange(RoadRange roadRange)
        {
            RoadRangeControl roadRangeControl = null;

            if (roadRange != null)
            {
                roadRangeControl = new RoadRangeControl(this.panel1.Controls.Count + 1, roadRange);
            }
            else
            {
                roadRangeControl = new RoadRangeControl(this.panel1.Controls.Count + 1);
            }
            //    roadRangeControl.Width = 43;
            //    roadRangeControl.Height = 18;
            roadRangeControl.Location = new Point(5, (this.panel1.Controls.Count) * (roadRangeControl.Height + 5));
            this.panel1.Controls.Add(roadRangeControl);
        }