Esempio n. 1
0
        private void refreshTagTypeList()
        {
            tagTypeList = tagOrganizer.getTagTypeList();
            dataGridTagTypeList.DataSource = tagTypeList;

            buttonRemoveTagType.Enabled = tagTypeList.Count > 0 ? true : false;
            buttonModifyTagType.Enabled = tagTypeList.Count > 0 ? true : false;
            labelHasTagTypes.Visible    = tagTypeList.Count > 0 ? false : true;
        }
Esempio n. 2
0
        //Function to retrieve a new list of tag types.
        private void refreshTagTypeList()
        {
            //get a new tag type list for the TagOrganizer
            //reset the datasource for the datagrid
            tagTypeList = tagOrganizer.getTagTypeList();
            dataGridTagTypeList.DataSource = tagTypeList;

            //enable and disable buttons based on number of tags
            buttonRemoveTagType.Enabled = tagTypeList.Count > 0 ? true : false;
            buttonModifyTagType.Enabled = tagTypeList.Count > 0 ? true : false;
            labelHasTagTypes.Visible    = tagTypeList.Count > 0 ? false : true;
        }
Esempio n. 3
0
        //Function to get a new list of tag types
        private void refreshTagTypeList()
        {
            //get a new tag list
            tagTypeList = tagOrganizer.getTagTypeList();

            //setup the combobox to contain all tag types, with a blank first
            tagTypeDictionary = new Dictionary <string, TagType>();
            tagTypeDictionary.Add("", null);
            foreach (KeyValuePair <string, TagType> kvp in tagTypeList)
            {
                tagTypeDictionary.Add(kvp.Key, kvp.Value);
            }

            comboBoxTagType.DataSource = tagTypeDictionary.Keys.ToList();
        }
Esempio n. 4
0
        //Function used to retrieve a new tag list
        private void refreshTagList()
        {
            //get tagTypes
            tagTypeList = tagOrganizer.getTagTypeList();

            //get tags
            tagList = tagOrganizer.getTagList(sourceImage.name);
            dataGridTags.DataSource = tagList;

            //show label if no tags, or no tag types.
            labelNoTags.Text    = tagTypeList.Count > 0 ? "No tags have been applied to this image." : "No tag types have been created.";
            labelNoTags.Visible = tagList.Count > 0 ? false : true;

            //enable and disable buttons
            buttonApplyTags.Enabled = tagList.Count < tagTypeList.Count ? true : false;;
            buttonModifyTag.Enabled = tagList.Count > 0 ? true : false;
            buttonRemoveTag.Enabled = tagList.Count > 0 ? true : false;
        }