Esempio n. 1
0
        private void AutoSchemesOnAddingNew(object sender, AddingNewEventArgs addingNewEventArgs)
        {
            var apc = new AutoProtectionCriterions();

            addingNewEventArgs.NewObject = apc;
            apc.Name += _autoSchemes.Count == 0 ? "" : _autoSchemes.Count.ToString();
        }
Esempio n. 2
0
        private void RefreshDgvDataSource(AutoProtectionCriterions autoProtectionCriterions)
        {
            // 边坡的自动防护
            dgv_Slope.SetDataSource(autoProtectionCriterions.SlopeCriterions);

            // 平台的自动防护
            // dgv_Platform.SetDataSource(autoProtectionCriterions.PlatformCriterions);
        }
Esempio n. 3
0
        /// <summary> 导入自动防护规则 </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_btn_ImportProtectRull_Click(object sender, EventArgs e)
        {
            var f   = AutoProtectionForm.GetUniqueInstance();
            var res = f.ShowDialog();

            if (res == DialogResult.OK)
            {
                _autoSpCriterion = f.ActiveSpCriterion;
            }
        }
Esempio n. 4
0
        private AutoProtectionForm()
        {
            InitializeComponent();

            // 构造初始的自动防护数据
            if (LoadedSpCriterions == null)
            {
                LoadedSpCriterions = new List <AutoProtectionCriterions>();
            }
            if (LoadedSpCriterions.Count == 0)
            {
                var defaultSPC = new AutoProtectionCriterions();
                LoadedSpCriterions.Add(defaultSPC);
            }
            ActiveSpCriterion = LoadedSpCriterions[0];
            //
            ConstructUI();
        }
Esempio n. 5
0
        private void CbbAutoSchemesOnSelectedValueChanged(object sender, EventArgs eventArgs)
        {
            var src = cbb_AutoSchemes.SelectedItem as AutoProtectionCriterions;

            ActiveSpCriterion = src;
        }