コード例 #1
0
 /// <summary>
 /// Removes the matching configuration from the list as well as the name fro mthe name list
 /// </summary>
 /// <param name="config">Configuration to remove</param>
 public void RemoveConfiguration(ConfigurationGroup config)
 {
     if (config != null)
     {
         Int32 index = _configurationList.IndexOf(config);
         if (index != -1) // if found
         {
             RemoveConfiguration(index);
             OnPropertyChanged();
         }
     }
 }
コード例 #2
0
        private void RemoveConfigGroup(object obj)
        {
            ConfigurationGroup configGroup = obj as ConfigurationGroup;

            if (configGroup != null)
            {
                var result = MessageBox.Show("Are you sure you want to remove this Configuration Group?", "",
                                             MessageBoxButton.YesNo);
                if (result == MessageBoxResult.Yes)
                {
                    ConfigurationList.Remove(configGroup);
                }
            }
        }