private void ProcessRegistryListBox_ItemCheck(object sender, ItemCheckEventArgs e) { if (MyWSim != null) { string SelectedName = ProcessRegistryListBox.SelectedItem.ToString(); int index = ProcessRegistryListBox.SelectedIndex; CheckState ischecked = ProcessRegistryListBox.GetItemCheckState(index); if (ischecked == CheckState.Unchecked) { AnnualFeedbackProcess AFP = MyWSim.ProcessRegistry.Construct(SelectedName, MyWSim); if (AFP != null) { MyWSim.ProcessManager.AddProcess(AFP); } } else { AnnualFeedbackProcess AFP = MyWSim.ProcessManager.FindByClassname(SelectedName); if (AFP != null) { MyWSim.ProcessManager.Delete(AFP); } } } }
private void ProcessRegistryListBox_Click(object sender, EventArgs e) { if (MyWSim != null) { string SelectedName = ProcessRegistryListBox.SelectedItem.ToString(); int index = ProcessRegistryListBox.SelectedIndex; CheckState ischecked = ProcessRegistryListBox.GetItemCheckState(index); } }
private void ProcessRegistryListBox_MouseDoubleClick(object sender, MouseEventArgs e) { if (MyWSim != null) { string SelectedName = ProcessRegistryListBox.SelectedItem.ToString(); int index = ProcessRegistryListBox.SelectedIndex; CheckState ischecked = ProcessRegistryListBox.GetItemCheckState(index); AnnualFeedbackProcess AFP = MyWSim.ProcessRegistry.Construct(SelectedName, MyWSim); if (AFP != null) { MyWSim.ProcessManager.AddProcess(AFP); } } }