• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IPresentableItem类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IPresentableItem的典型用法代码示例。如果您正苦于以下问题:C# IPresentableItem类的具体用法?C# IPresentableItem怎么用?C# IPresentableItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IPresentableItem类属于命名空间,在下文中一共展示了IPresentableItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PresentItem

    static void PresentItem(IPresentableItem item, Element element, PresentationState state, UnitTestElementImage type)
    {
      item.RichText = element.GetTitle();

      SetTextColor(item, element);
      SetImage(item, state, type);
    }
开发者ID:benlovell,项目名称:machine.specifications,代码行数:7,代码来源:Presenter.cs


示例2: PresentSpecification

 protected virtual void PresentSpecification(FieldElement element,
                                         IPresentableItem item,
                                         TreeModelNode modelNode,
                                         PresentationState state)
 {
     PresentItem(item, element, state, UnitTestElementImage.Test);
 }
开发者ID:simonlaroche,项目名称:machine,代码行数:7,代码来源:Presenter.cs


示例3: PresentContext

 protected virtual void PresentContext(ContextElement element,
                                   IPresentableItem item,
                                   TreeModelNode modelNode,
                                   PresentationState state)
 {
     PresentItem(item, element, state, UnitTestElementImage.TestContainer);
 }
开发者ID:simonlaroche,项目名称:machine,代码行数:7,代码来源:Presenter.cs


示例4: Present

 public void Present(IUnitTestElement element, IPresentableItem item, TreeModelNode node, PresentationState state)
 {
     if (element is Element)
     {
         this._presenter.UpdateItem(element, node, item, state);
     }
 }
开发者ID:JAllman,项目名称:machine.specifications.runner.resharper,代码行数:7,代码来源:MSpecUnitTestPresenter.cs


示例5: GetDescription

        public string GetDescription(IPresentableItem item)
        {
            var description = this.itemPresenter.GetDescription(item);
            var markdown = new Markdown();
            var transformedDescription = markdown.Transform(description);

            return transformedDescription;
        }
开发者ID:ivankustera,项目名称:AtomiaStore,代码行数:8,代码来源:MarkdownItemPresenter.cs


示例6: SetTextColor

    static void SetTextColor(IPresentableItem item, Element element)
    {
      if (element.Explicit)
      {
        item.RichText.SetForeColor(SystemColors.GrayText);
      }

      item.RichText.SetForeColor(SystemColors.GrayText, 0, element.GetTitlePrefix().Length);
    }
开发者ID:simonlaroche,项目名称:Simple.Testing,代码行数:9,代码来源:Presenter.cs


示例7: PresentClassElement

 private void PresentClassElement(XunitTestClassElement value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
 {
     if (IsNodeParentNatural(modelNode, value))
         item.RichText = value.TypeName.ShortName;
     else if (string.IsNullOrEmpty(value.TypeName.GetNamespaceName()))
         item.RichText = value.TypeName.ShortName;
     else
         item.RichText = string.Format("{0}.{1}", value.TypeName.GetNamespaceName(), value.TypeName.ShortName);
 }
开发者ID:EddieGarmon,项目名称:resharper-xunit,代码行数:9,代码来源:XunitTestClassPresenter.cs


示例8: Present

 public void Present(IUnitTestElement element, IPresentableItem item, TreeModelNode node, PresentationState state)
 {
     // We only want to customise how class elements are displayed. If the
     // parent node isn't a namespace, and isn't the namespace of the class,
     // display the class as namespace qualified
     if (!(element is XunitTestClassElement))
         return;
     treePresenter.UpdateItem(element, node, item, state);
 }
开发者ID:EddieGarmon,项目名称:resharper-xunit,代码行数:9,代码来源:XunitTestClassPresenter.cs


示例9: PresentObject

 protected override void PresentObject(object value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
 {
     var association = value as FileAssociation;
       if (association != null)
       {
     RichText richText = association.Pattern ?? "(empty)";
     item.RichText = richText;
       }
 }
开发者ID:derigel23,项目名称:resharper-zencoding,代码行数:9,代码来源:FileAssociationPresenter.cs


示例10: Present

		public override void Present(StructuredPresenter<TreeModelNode, IPresentableItem> presenter, IPresentableItem item,
			TreeModelNode modelNode, PresentationState state) {
			base.Present(presenter, item, modelNode, state);
			if (_element.InheritanceInformation != null)
				item.Images.Add(_element.InheritanceInformation.Image, _element.InheritanceInformation.ToolTip);
			else {
				// if the children have inheritance information, we must add en empty inheritance icon so that the text is aligned
				var structureDeclaredElement = _element.Parent as T4CSharpCodeStructureDeclaredElement;
				if (structureDeclaredElement != null && structureDeclaredElement.ChildrenWithInheritance)
					item.Images.Add(PsiServicesThemedIcons.Empty.Id);
			}
		}
开发者ID:mnaoumov,项目名称:ForTea,代码行数:12,代码来源:T4CSharpCodeStructureAspects.cs


示例11: SetImage

    static void SetImage(IPresentableItem item, PresentationState state, UnitTestElementImage imageType)
    {
      Image stateImage = UnitTestManager.GetStateImage(state);
      Image typeImage = UnitTestManager.GetStandardImage(imageType);

      if (stateImage != null)
      {
        item.Images.Add(stateImage);
      }
      else if (typeImage != null)
      {
        item.Images.Add(typeImage);
      }
    }
开发者ID:benlovell,项目名称:machine.specifications,代码行数:14,代码来源:Presenter.cs


示例12: Present

        public void Present(UnitTestElement element, IPresentableItem item, TreeModelNode node, PresentationState state)
        {
            item.RichText = element.GetTitle();

            var standardImage = GetImage(element);
            var stateImage = UnitTestManager.GetStateImage(state);
            if (stateImage != null)
            {
                item.Images.Add(stateImage);
            }
            else if (standardImage != null)
            {
                item.Images.Add(standardImage);
            }
        }
开发者ID:davidmfoley,项目名称:bickle,代码行数:15,代码来源:BickleElementPresenter.cs


示例13: GetName

        /// <summary>
        /// Get actual domain name if available for domain products (registration, transfer), 
        /// otherwise get default default name from <see cref="Atomia.Store.Core.IProductProvider"/>
        /// </summary>
        public string GetName(IPresentableItem item)
        {
            var product = productProvider.GetProduct(item.ArticleNumber);
            var domainCategories = domainsProvider.GetDomainCategories();

            if (domainCategories.Any(dc => product.Categories.Any(c => c.Name == dc)))
            {
                var domainNameAttr = item.CustomAttributes.FirstOrDefault(ca => ca.Name == "DomainName");
                
                if (domainNameAttr != default(CustomAttribute)) {
                    return domainNameAttr.Value;
                }
            }

            return product.Name;
        }
开发者ID:ivankustera,项目名称:AtomiaStore,代码行数:20,代码来源:ItemPresenter.cs


示例14: PresentObject

        protected override void PresentObject(object value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
        {
            if (modelNode.Parent == null)
            {
                item.RichText.Text = "Issues";
                item.Images.Add(ImageLoader.GetImage("youtrack-root"));
            }
            else
            {
                var issueItem = (IssueItem)value;

                item.RichText.Text = string.Format("[{0} - {1}] {2}", issueItem.Id, issueItem.State, issueItem.Summary);

                item.Images.Add(issueItem.Priority == IssueItemPriority.High
                                    ? ImageLoader.GetImage("issue-high-priority")
                                    : ImageLoader.GetImage("issue-low-priority"));
            }
        }
开发者ID:e-llumin,项目名称:YouTrackForReSharper,代码行数:18,代码来源:YouTrackIssuePresenter.cs


示例15: Present

        public void Present(UnitTestElement element, IPresentableItem item, TreeModelNode node, PresentationState state)
        {
            var testElement = element as StorEvilUnitTestElement;
            if (testElement == null)
                return;

            item.RichText = element.ShortName;

            Image standardImage = UnitTestManager.GetStandardImage(UnitTestElementImage.Test);
            Image stateImage = UnitTestManager.GetStateImage(state);
            if (stateImage != null)
            {
                item.Images.Add(stateImage);
            }
            else if (standardImage != null)
            {
                item.Images.Add(standardImage);
            }
        }
开发者ID:pawelpabich,项目名称:storevil,代码行数:19,代码来源:StorEvilUnitTestPresenter.cs


示例16: PresentTestElement

        private static void PresentTestElement(GallioTestElement value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
        {
            item.Clear();

            item.RichText = value.TestName;

            if (value.Explicit)
                item.RichText.SetForeColor(SystemColors.GrayText);

            var typeImage = UnitTestIconManager.GetStandardImage(UnitTestElementImage.Test);
            var stateImage = UnitTestIconManager.GetStateImage(state);
            if (stateImage != null)
            {
                item.Images.Add(stateImage);
            }
            else if (typeImage != null)
            {
                item.Images.Add(typeImage);
            }
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:20,代码来源:GallioTestPresenter6.cs


示例17: PresentTestElement

        private void PresentTestElement(GallioTestElement value, IPresentableItem item,
            TreeModelNode modelNode, PresentationState state)
        {
            item.Clear();

            item.RichText = value.TestName;

#if RESHARPER_60_OR_NEWER
            if (value.Explicit)
				item.RichText.SetForeColor(SystemColors.GrayText);

			var typeImage = UnitTestIconManager.GetStandardImage(UnitTestElementImage.Test);
			var stateImage = UnitTestIconManager.GetStateImage(state);
			if (stateImage != null)
			{
				item.Images.Add(stateImage);
			}
			else if (typeImage != null)
			{
				item.Images.Add(typeImage);
			}
#else
			if (value.IsExplicit)
				item.RichText.SetForeColor(SystemColors.GrayText);

            Image image = UnitTestManager.GetStateImage(state);

            if (image == null)
                image = UnitTestManager.GetStandardImage(value.IsTestCase ? UnitTestElementImage.Test : UnitTestElementImage.TestCategory);

            if (image != null)
                item.Images.Add(image);

            if (! value.IsTestCase)
                AppendOccurencesCount(item, modelNode, "test");
#endif
		}
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:37,代码来源:GallioTestPresenter.cs


示例18: Present

 public void Present(UnitTestElement element, IPresentableItem item, TreeModelNode node, PresentationState state)
 {
     Presenter.UpdateItem(element, node, item, state);
 }
开发者ID:simonlaroche,项目名称:machine,代码行数:4,代码来源:MSpecUnitTestProvider.cs


示例19: Present

 public void Present(IUnitTestElement element, IPresentableItem item, TreeModelNode node, PresentationState state)
 {
     if (element is NBehaveUnitTestElementBase)
         presenter.UpdateItem(element, node, item, state);
 }
开发者ID:AngelPortal,项目名称:NBehave,代码行数:5,代码来源:TestTreePresenter.cs


示例20: PresentStep

 private void PresentStep(NBehaveStepTestElement value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
 {
 }
开发者ID:AngelPortal,项目名称:NBehave,代码行数:3,代码来源:TestTreePresenter.cs



注:本文中的IPresentableItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IPresentationImage类代码示例发布时间:2022-05-24
下一篇:
C# IPresent类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap