private void finishButton_Click(object sender, EventArgs e)
        {
            EntitiesTypeSelection typeSelection;

            if (_multiproject)
            {
                typeSelection = GetEntitiesTypeSelection(clientServiceListView);
            }
            else
            {
                typeSelection = GetEntitiesTypeSelection(serviceClientSharedListView);
            }
            EntitiesCategorySelection categorySelection = EntitiesCategorySelection.DotNetEntities;

            if (typeSelection != EntitiesTypeSelection.ServiceEntities)
            {
                categorySelection = GetEntitiesCategorySelection(portableDotNetListView);
            }

            EntitiesSelection entitiesType     = ToSelectionType(typeSelection);
            EntitiesSelection entitiesCategory = ToSelectionType(categorySelection);

            EntitiesSelection = entitiesType | entitiesCategory;
            DialogResult      = DialogResult.OK;
        }
        private EntitiesSelection ToSelectionType(EntitiesCategorySelection categorySelection)
        {
            switch (categorySelection)
            {
            case EntitiesCategorySelection.PortableEntities:
                return(EntitiesSelection.Portable);

            case EntitiesCategorySelection.DotNetEntities:
                return(EntitiesSelection.DotNet45);

            default:
                return(EntitiesSelection.None);
            }
        }
        private void portableDotNetListView_SelectedIndexChanged(object sender, EventArgs e)
        {
            string entityType = GetSelectedEntityType();
            EntitiesCategorySelection selection = GetEntitiesCategorySelection(portableDotNetListView);

            switch (selection)
            {
            case EntitiesCategorySelection.PortableEntities:
                descriptionLabel.Text = string.Format(Constants.Descriptions.PortableEntities, entityType);
                break;

            case EntitiesCategorySelection.DotNetEntities:
                descriptionLabel.Text = string.Format(Constants.Descriptions.DotNetEntities, entityType);
                break;
            }
            SetPageState();
        }
 private EntitiesSelection ToSelectionType(EntitiesCategorySelection categorySelection)
 {
     switch (categorySelection)
     {
         case EntitiesCategorySelection.PortableEntities:
             return EntitiesSelection.Portable;
         case EntitiesCategorySelection.DotNetEntities:
             return EntitiesSelection.DotNet45;
         default:
             return EntitiesSelection.None;
     }
 }