Compass.Coondornator.OmssaParameterLine.RemoveLine C# (CSharp) Method

RemoveLine() public static method

public static RemoveLine ( string name ) : bool
name string
return bool
        public static bool RemoveLine(string name)
        {
            if (!ParameterLines.Remove(name))
                return false;

            OnChanged();
            return true;
        }

Usage Example

Example #1
0
        private void listBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.Delete)
            {
                return;
            }

            var listBox = sender as ListBox;

            if (listBox == null)
            {
                return;
            }

            OmssaParameterLine line = listBox.SelectedValue as OmssaParameterLine;

            if (line == null)
            {
                return;
            }

            OmssaParameterLine.RemoveLine(line.Name);
        }