コード例 #1
0
 private void removeMappingLogicControl(MappingLogicControl control)
 {
     if (this.mappingLogicPanel.Controls.Count > 1)
     {
         this.mappingLogicPanel.Controls.Remove(control);
         this.Height = this.Height - (control.Height + padding);
     }
     this.enableDisable();
 }
コード例 #2
0
        private MappingLogicControl addMappingLogicControl(MappingLogic logic)
        {
            var mappingLogicControl = new MappingLogicControl();

            mappingLogicControl.deleteButtonClicked     += mappingLogicDeleteButtonClicked;
            mappingLogicControl.mappingLogicTextChanged += mappingLogicChanged;
            mappingLogicControl.selectedContextChanged  += mappingLogicChanged;
            mappingLogicControl.AutoSizeMode             = AutoSizeMode.GrowAndShrink;
            mappingLogicControl.BorderStyle              = BorderStyle.FixedSingle;
            mappingLogicControl.Anchor   = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            mappingLogicControl.TabIndex = mappingLogicPanel.Controls.Count;
            mappingLogicControl.setContexts(this.contexts);
            mappingLogicControl.mappingLogic = logic;
            mappingLogicControl.Show();
            if (mappingLogicPanel.Controls.Count >= 1)
            {
                this.Height = this.Height + mappingLogicControl.Height + padding;
            }
            this.mappingLogicPanel.Controls.Add(mappingLogicControl, 0, mappingLogicPanel.Controls.Count);
            this.enableDisable();
            return(mappingLogicControl);
        }