public MethodMonitor() { InitializeComponent(); acpiControl = (App.Current.MainWindow as MainWindow).acpiControl; Binding selectedBinding = new Binding("SelectedIndex"); selectedBinding.Source = methodList; methodListBox.SetBinding(ListBox.SelectedIndexProperty, selectedBinding); methodListBox.ItemsSource = methodList; }
public NotifyMonitor() { InitializeComponent(); acpiControl = (App.Current.MainWindow as MainWindow).acpiControl; DeviceNode[] deviceNodeArray = null; acpiControl.GetDeviceList(ref deviceNodeArray); deviceList = new DeviceList(deviceNodeArray, new IsCheckedChangedEventHandler(DeviceItemIsCheckedChanged)); notifyList = new NotifyList(deviceList); //methodListBox.ItemsSource = methodList; notifyListBox.ItemsSource = notifyList; deviceListBox.ItemsSource = deviceList; Binding checkedBinding = new Binding("IsChecked"); checkedBinding.Source = deviceList; checkedBinding.Converter = intToIsCheckedConverter; checkBoxSelectAll.SetBinding(CheckBox.IsCheckedProperty, checkedBinding); }
public CallMethod() { InitializeComponent(); acpiControl = (App.Current.MainWindow as MainWindow).acpiControl; acpiControl.GetMethodTree(ref methodNodeList); methodTree = new MethodTree(methodNodeList, acpiControl.GetRootIndex()); treeViewMethod.ItemsSource = methodTree; comboBoxArgument.ItemsSource = argumentList; Binding typeBinding = new Binding("Type"); typeBinding.Source = currentArgument; comboBoxType.SetBinding(ComboBox.SelectedIndexProperty, typeBinding); Binding dataBinding = new Binding("Data"); dataBinding.Source = currentArgument; textBoxData.SetBinding(TextBox.TextProperty, dataBinding); Binding selectedBinding = new Binding("SelectedIndex"); selectedBinding.Source = argumentList; comboBoxArgument.SetBinding(ListBox.SelectedIndexProperty, selectedBinding); //currentArgument.Type = new ARGUMENT_TYPE(); //currentArgument.Data = ""; }