private void PanelSelectedIndexChanged(object sender, ClForms.Common.EventArgs.PropertyChangedEventArgs <int> e) { descriptionLabel.Text = "Listen OnSelectedIndexChanged event for detect with item user checked"; var value = targetPanel.Items[e.NewValue]; MessageBox.Show($"{value.Text} was checked"); }
private void CheckedChanged(object sender, ClForms.Common.EventArgs.PropertyChangedEventArgs <bool> e) { if (e.NewValue && sender is RadioButton radioButton) { var groupBox = radioButton.Parent.Parent as GroupBox; propertyChangedLabel.Text = $"You checked {radioButton.Text} in {groupBox.Text}"; } }
private void TextChanged(object sender, ClForms.Common.EventArgs.PropertyChangedEventArgs <string> e) { if (sender is TextBox textBox) { textBox.Tag = $"PasswordChar has character used to mask characters of a password in the control. Original text is: '{e.NewValue}'"; ShowDescriptionByControlEnter(sender, EventArgs.Empty); } }
private void ListViewSelectedIndexChanged(object sender, ClForms.Common.EventArgs.PropertyChangedEventArgs <int> e) { if (isSelectedViewMode) { codeLabel.Lines = new[] { $"FirstVisibleItemIndex: {targetListView.FirstVisibleItemIndex}", $"SelectedIndex: {e.NewValue}", }; } }
private void ListBoxSelectedIndexChanged(object sender, ClForms.Common.EventArgs.PropertyChangedEventArgs <int> e) { if (sender is ListBox <string> targetListBox) { if (targetListBox == leftListBox) { leftToRightButton.IsDisabled = targetListBox.SelectedIndex == -1; } else { rightToLeftButton.IsDisabled = targetListBox.SelectedIndex == -1; } } }
private void ListBoxSelectedIndexChanged(object sender, ClForms.Common.EventArgs.PropertyChangedEventArgs <int> e) { selectedIndexLabel.Text = e.NewValue.ToString(); removeButton.IsDisabled = e.NewValue == -1; }
private void ListBoxSelectedIndexChanged(object sender, ClForms.Common.EventArgs.PropertyChangedEventArgs <int> e) { FileName = Path.Combine(TargetFolder, $"{listBox1.Items[listBox1.SelectedIndex]}{Consts.MazeMapFileExtension}"); button1.IsDisabled = false; }
private void CheckedChanged(object sender, ClForms.Common.EventArgs.PropertyChangedEventArgs <bool> e) { var checkBox = sender as CheckBox; propertyChangedLabel.Text = $"{checkBox.Text} was clicked. Checked: {checkBox.Checked}"; }