ATMLCommonLibrary.controls.lists.SwitchingListControl.btnAdd_Click C# (CSharp) Method

btnAdd_Click() protected method

protected btnAdd_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        protected override void btnAdd_Click(object sender, EventArgs e)
        {
            var form = new SwitchForm(_instrument);
            if (DialogResult.OK == form.ShowDialog())
            {
                Item switchItem = form.SwitchItem;
                if (switchItem == null)
                    switchItem = new Switch();
                AddSwitchItem(switchItem);
            }
        }