public wndAgentsGroupConfig() { InitializeComponent(); cbGridRow.Height = new GridLength(0); group = new AgentsGroup(); group.AgentTemplateList = new List<AgentTemplate>(); group.AgentDistribution = new List<int>(); }
public wndAgentsGroupConfig(AgentsGroup group) { InitializeComponent(); cbGridRow.Height = new GridLength(0); this.group = group; tbName.Text = group.Name; if (group.IsNetworkGroup) { rbNetwork.IsChecked = true; } else { rbTimer.IsChecked = true; } if (group.IsNetworkGroup) { tbAddress.Text = group.Address; tbPort.Text = group.Port.ToString(); } lvAgentsTemplate.ItemsSource = group.AgentTemplateList; }
private void cbGroup_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cbGroup.SelectedIndex != -1) { group = (AgentsGroup)cbGroup.SelectedValue; tbName.Text = group.Name; if (group.IsNetworkGroup) { rbNetwork.IsChecked = true; } else { rbTimer.IsChecked = true; } if (group.IsNetworkGroup) { tbAddress.Text = group.Address; tbPort.Text = group.Port.ToString(); } lvAgentsTemplate.ItemsSource = group.AgentTemplateList; } }