示例#1
0
        private void UpdateActionComboBox()
        {
            _actionComboBox.Items.Clear();

            DocumentType documentType = new DocumentType(
                _documentTypeComboBox.SelectedItem as string);

            List <String> actions =
                _buildToolManager.GetAvailableActions(documentType);

            foreach (string action in actions)
            {
                _actionComboBox.Items.Add(action);
            }

            if (actions.Count == 0)
            {
                _actionComboBox.Enabled = false;
            }
            else
            {
                _actionComboBox.SelectedIndex = 0;
            }
        }