Esempio n. 1
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;
        }