private void btnAdd_Click(object sender, RoutedEventArgs e)
 {
     AgentTemplateConfigWindow temp = new AgentTemplateConfigWindow();
     if (temp.ShowDialog().GetValueOrDefault())
     {
         group.AgentTemplateList.Add(temp.GetTemplate());
     }
     lvAgentsTemplate.ItemsSource = null;
     lvAgentsTemplate.ItemsSource = group.AgentTemplateList;
 }
Пример #2
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            AgentTemplateConfigWindow temp = new AgentTemplateConfigWindow();

            if (temp.ShowDialog().GetValueOrDefault())
            {
                group.AgentTemplateList.Add(temp.GetTemplate());
            }
            lvAgentsTemplate.ItemsSource = null;
            lvAgentsTemplate.ItemsSource = group.AgentTemplateList;
        }
Пример #3
0
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (lvAgentsTemplate.SelectedIndex >= 0)
     {
         AgentTemplateConfigWindow temp = new AgentTemplateConfigWindow(group.AgentTemplateList[lvAgentsTemplate.SelectedIndex]);
         if (temp.ShowDialog().GetValueOrDefault())
         {
             group.AgentTemplateList[lvAgentsTemplate.SelectedIndex] = temp.GetTemplate();
         }
     }
     lvAgentsTemplate.ItemsSource = null;
     lvAgentsTemplate.ItemsSource = group.AgentTemplateList;
 }
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (lvAgentsTemplate.SelectedIndex >= 0)
     {
         AgentTemplateConfigWindow temp = new AgentTemplateConfigWindow(group.AgentTemplateList[lvAgentsTemplate.SelectedIndex]);
         if (temp.ShowDialog().GetValueOrDefault())
         {
             group.AgentTemplateList[lvAgentsTemplate.SelectedIndex] = temp.GetTemplate();
         }
     }
     lvAgentsTemplate.ItemsSource = null;
     lvAgentsTemplate.ItemsSource = group.AgentTemplateList;
 }