コード例 #1
0
        private NuGenAssemblySearchOptions GetSelectedAssemblySearchOptions()
        {
            NuGenAssemblySearchOptions result = null;

            if (assembliesListBox.SelectedIndex > -1)
            {
                result = (NuGenAssemblySearchOptions)assembliesListBox.Items[assembliesListBox.SelectedIndex];
            }

            return(result);
        }
コード例 #2
0
        private void assembliesListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!UpdatingControls)
            {
                NuGenAssemblySearchOptions selectedAssemblySearchOptions = GetSelectedAssemblySearchOptions();

                if (selectedAssemblySearchOptions != null)
                {
                    DisplayAssemblySearchOptions(GetSelectedAssemblySearchOptions());
                }
            }
        }
コード例 #3
0
        private void DisplayAssemblySearchOptions(NuGenAssemblySearchOptions assemblySearchOptions)
        {
            searchOptionsListBox.BeginUpdate();
            UpdatingControls = true;

            for (int index = 0; index < searchOptionsListBox.Items.Count; index++)
            {
                SearchOptions searchOption = (SearchOptions)searchOptionsListBox.Items[index];
                searchOptionsListBox.SetItemChecked(index, assemblySearchOptions.IsSearchOptionChosen(searchOption));
            }

            UpdatingControls = false;
            searchOptionsListBox.EndUpdate();
        }
コード例 #4
0
        private void searchOptionsListBox_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            if (!UpdatingControls)
            {
                NuGenAssemblySearchOptions selectedAssemblySearchOptions = GetSelectedAssemblySearchOptions();

                if (selectedAssemblySearchOptions != null)
                {
                    SearchOptions selectedSearchOptions = (SearchOptions)searchOptionsListBox.Items[e.Index];

                    if (e.NewValue == CheckState.Checked)
                    {
                        selectedAssemblySearchOptions.SetSearchOption(selectedSearchOptions);
                    }
                    else
                    {
                        selectedAssemblySearchOptions.ClearSearchOption(selectedSearchOptions);
                    }
                }
            }
        }
コード例 #5
0
		private void DisplayAssemblySearchOptions(NuGenAssemblySearchOptions assemblySearchOptions)
		{
			searchOptionsListBox.BeginUpdate();
			UpdatingControls = true;

			for (int index = 0; index < searchOptionsListBox.Items.Count; index++)
			{
				SearchOptions searchOption = (SearchOptions)searchOptionsListBox.Items[index];
				searchOptionsListBox.SetItemChecked(index, assemblySearchOptions.IsSearchOptionChosen(searchOption));
			}

			UpdatingControls = false;
			searchOptionsListBox.EndUpdate();
		}