VixenModules.App.Curves.CurveLibrarySelector.buttonDeleteCurve_Click C# (CSharp) Method

buttonDeleteCurve_Click() private method

private buttonDeleteCurve_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void buttonDeleteCurve_Click(object sender, EventArgs e)
        {
            if (listViewCurves.SelectedItems.Count == 0)
                return;
            //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible)
            MessageBoxForm.msgIcon = SystemIcons.Question; //this is used if you want to add a system icon to the message form.
            var messageBox = new MessageBoxForm("If you delete this library curve, ALL places it is used will be unlinked and will become independent curves. Are you sure you want to continue?", "Delete library curve?", true, false);
            messageBox.ShowDialog();

            if (messageBox.DialogResult == DialogResult.OK) {
                Library.RemoveCurve(listViewCurves.SelectedItems[0].Name);
                PopulateListWithCurves();
            }
        }