예제 #1
0
        private void button_modify_capa_Click(object sender, RoutedEventArgs e)
        {
            string        capability = (listview_capabilities.SelectedItem as string);
            var           list       = CapabilitiesList;
            List <string> ExistList  = new List <string>();

            foreach (string Item in list)
            {
                ExistList.Add(Item);
            }

            CapabilitiesWizard CWizard = new CapabilitiesWizard(ExistList: ExistList);

            if (CWizard.ShowDialog() == true)
            {
                if (CapabilitiesList.Contains((listview_capabilities.SelectedItem as string)))
                {
                    CapabilitiesList.Remove((listview_capabilities.SelectedItem as string));
                }

                string input = CWizard.SelectedItem;
                CapabilitiesList.Add(input);
            }

            if (listview_capabilities.Items.Count == 0 || listview_capabilities.SelectedItem == null)
            {
                CapaListBtnEnable(false);
            }
        }
예제 #2
0
        private void button_add_capa_Click(object sender, RoutedEventArgs e)
        {
            var           list      = CapabilitiesList;
            List <string> ExistList = new List <string>();

            foreach (string Item in list)
            {
                ExistList.Add(Item);
            }

            CapabilitiesWizard CWizard = new CapabilitiesWizard(ExistList: ExistList);

            if (CWizard.ShowDialog() == true)
            {
                string input = CWizard.SelectedItem;
                CapabilitiesList.Add(input);
            }
        }