public void TestForEquality() { SCBValue val1 = new SCBValue("ok1", "SomeText1"); SCBValue val2 = new SCBValue("ok2", "SomeText2"); SCBValue val3 = new SCBValue("ok3", "SomeText3"); SCBKey key1 = new SCBKey(new List <SCBValue>() { val1, val2, val3 }); SCBKey key2 = new SCBKey(new List <SCBValue>() { val1, val2, val3 }); SCBKey key3 = new SCBKey(new List <SCBValue>() { val1, val1, val3 }); Assert.True(key1.Equals(key2)); Assert.True(!key1.Equals(key3)); }
private void ReadSelectedValues(object sender, System.EventArgs e) { if (radioButtonItem.Checked) { if (listBoxVariables.SelectedItem is SCBVariable var) { foreach (SCBValue varValue in var.Values) { varValue.IsSelected = false; } foreach (object item in checkedListBoxItems.CheckedItems) { SCBValue val = (SCBValue)item; val.IsSelected = true; } } } }