コード例 #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);
            }
        }
コード例 #2
0
 private void SetOutputTextVisibility(TextTypeEnum en, OutputText item)
 {
     if (item.TextType == en)
     {
         item.Visibility = Visibility.Visible;
     }
     else
     {
         item.Visibility = Visibility.Collapsed;
     }
 }
コード例 #3
0
ファイル: UpdatePagesSubtask.cs プロジェクト: RIDICS/ITJakub
        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);
        }
コード例 #4
0
 public MarkdownSection(string text, TextTypeEnum type)
 {
     Text = text;
     Type = type.ToString();
 }
コード例 #5
0
ファイル: ResourceRepository.cs プロジェクト: RIDICS/ITJakub
 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());
 }
コード例 #6
0
 public override NamedResourceGroup GetNamedResourceGroup(long projectId, string name, TextTypeEnum textType)
 {
     return(new NamedResourceGroup
     {
         Name = name,
         Project = new Project {
             Id = projectId
         },
         TextType = textType
     });
 }