Example #1
0
        public MarkdownBlock(string text, TextTypeEnum type = TextTypeEnum.mrkdwn, string accessoryImageUrl = null)
        {
            Markdown = new MarkdownSection(text, type);

            if (!string.IsNullOrEmpty(accessoryImageUrl))
            {
                Accessory = new ImageAccessorySection(accessoryImageUrl);
            }
        }
 private void SetOutputTextVisibility(TextTypeEnum en, OutputText item)
 {
     if (item.TextType == en)
     {
         item.Visibility = Visibility.Visible;
     }
     else
     {
         item.Visibility = Visibility.Collapsed;
     }
 }
Example #3
0
        private NamedResourceGroup GetOrCreateNamedResourceGroup(long projectId, TextTypeEnum textType, string resourceGroupName)
        {
            var resourceGroup = m_resourceRepository.GetNamedResourceGroup(projectId, resourceGroupName, textType);

            if (resourceGroup != null)
            {
                return(resourceGroup);
            }

            var project = m_resourceRepository.Load <Project>(projectId);

            resourceGroup = new NamedResourceGroup
            {
                Project  = project,
                Name     = resourceGroupName,
                TextType = textType
            };

            m_resourceRepository.Create(resourceGroup);
            return(resourceGroup);
        }
Example #4
0
 public MarkdownSection(string text, TextTypeEnum type)
 {
     Text = text;
     Type = type.ToString();
 }
Example #5
0
 public virtual NamedResourceGroup GetNamedResourceGroup(long projectId, string name, TextTypeEnum textType)
 {
     return(GetSession().QueryOver <NamedResourceGroup>()
            .Where(x => x.Project.Id == projectId && x.TextType == textType && x.Name == name)
            .SingleOrDefault());
 }
Example #6
0
 public override NamedResourceGroup GetNamedResourceGroup(long projectId, string name, TextTypeEnum textType)
 {
     return(new NamedResourceGroup
     {
         Name = name,
         Project = new Project {
             Id = projectId
         },
         TextType = textType
     });
 }