Пример #1
0
        public RoadControlForm(BCMainForm _mainForm)
        {
            InitializeComponent();
            this.TopMost = true;

            mainForm = _mainForm;
            oht_form = mainForm.OpenForms[nameof(OHT_Form)] as OHT_Form;
            bcApp    = mainForm.BCApp;
            line     = bcApp.SCApplication.getEQObjCacheManager().getLine();

            //segment_List = bcApp.SCApplication.MapBLL.loadAllSegments();
            segment_List = bcApp.SCApplication.SegmentBLL.cache.GetSegments();
            dgv_segment.AutoGenerateColumns = false;
            dgv_segment.DataSource          = segment_List;

            bcApp.SCApplication.RoadControlService.SegmentListChanged += RoadControlService_SegmentListChanged;

            oht_form.entrySegmentSetMode(SegmentSelectOnMap);
            RefreshMapColor();
        }
        public RoadControlForm(BCMainForm _mainForm)
        {
            InitializeComponent();
            this.TopMost = true;

            mainForm = _mainForm;
            oht_form = mainForm.OpenForms[nameof(OHT_Form)] as OHT_Form;
            bcApp    = mainForm.BCApp;
            line     = bcApp.SCApplication.getEQObjCacheManager().getLine();

            //segment_List = bcApp.SCApplication.MapBLL.loadAllSegments();
            segment_List = bcApp.SCApplication.SegmentBLL.cache.GetSegments();
            dgv_segment.AutoGenerateColumns = false;
            dgv_segment.DataSource          = segment_List;

            if (line.SegmentPreDisableExcuting)
            {
                Task.Run(() => checkSegmentStatus());
            }
            oht_form.entrySegmentSetMode(SegmentSelectOnMap);
            RefreshMapColor();
        }