本文整理汇总了C#中ImageItem类的典型用法代码示例。如果您正苦于以下问题:C# ImageItem类的具体用法?C# ImageItem怎么用?C# ImageItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ImageItem类属于命名空间,在下文中一共展示了ImageItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Execute
public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source,
Shape imageShape)
{
designer.ApplyPseudoTextWhenNoTextShapes();
if ((option.IsUseBannerStyle
|| option.IsUseFrostedGlassBannerStyle)
&& (option.GetTextBoxPosition() == Position.Left
|| option.GetTextBoxPosition() == Position.Centre
|| option.GetTextBoxPosition() == Position.Right))
{
designer.ApplyTextWrapping();
}
else if (option.IsUseCircleStyle
|| option.IsUseOutlineStyle)
{
designer.ApplyTextWrapping();
}
else
{
designer.RecoverTextWrapping();
}
ApplyTextEffect(option, designer);
designer.ApplyTextGlowEffect(option.IsUseTextGlow, option.TextGlowColor);
return new List<Shape>();
}
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:28,代码来源:TextStyleWorker.cs
示例2: ParseAll
public ImageItemCollection ParseAll(ref string html)
{
ImageItem item;
ImageItemCollection list = null;
MatchCollection mc = FirstStep(ref html);
if (mc.Count < 1)
return null;
List<string> urls = SecondStep(mc);
list = new ImageItemCollection();
foreach(string m in urls)
{
item = new ImageItem(m);
list.Add(item);
string resized = Resize(m);
if (resized != null)
{
item = new ImageItem(resized);
list.Add(item);
}
}
if (list.Count < 1)
return null;
return list;
}
开发者ID:Aosamesan,项目名称:NZNZ-WPF,代码行数:29,代码来源:ImageParser.cs
示例3: ApplyStyle
public void ApplyStyle(ImageItem source, Slide contentSlide,
float slideWidth, float slideHeight, StyleOptions option = null)
{
if (Globals.ThisAddIn != null)
{
Globals.ThisAddIn.Application.StartNewUndoEntry();
}
if (option != null)
{
SetStyleOptions(option);
}
// try to use cropped/adjusted image to apply
var fullsizeImage = source.FullSizeImageFile;
source.FullSizeImageFile = source.CroppedImageFile ?? source.FullSizeImageFile;
source.OriginalImageFile = fullsizeImage;
var effectsHandler = new EffectsDesigner(contentSlide,
slideWidth, slideHeight, source);
ApplyStyle(effectsHandler, source, isActualSize: true);
source.FullSizeImageFile = fullsizeImage;
source.OriginalImageFile = null;
}
开发者ID:oswellchan,项目名称:PowerPointLabs,代码行数:25,代码来源:StylesDesigner.cs
示例4: Setup
private void Setup(float slideWidth, float slideHeight, ImageItem source)
{
SlideWidth = slideWidth;
SlideHeight = slideHeight;
Source = source;
PrepareShapesForPreview();
}
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:7,代码来源:EffectsDesigner.cs
示例5: Execute
public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source, Shape imageShape, Settings settings)
{
if (option.StyleName != TextCollection.PictureSlidesLabText.StyleNameDirectText
&& option.StyleName != TextCollection.PictureSlidesLabText.StyleNameBlur
&& option.StyleName != TextCollection.PictureSlidesLabText.StyleNameSpecialEffect
&& option.StyleName != TextCollection.PictureSlidesLabText.StyleNameOverlay)
{
designer.ApplyPseudoTextWhenNoTextShapes();
}
if ((option.IsUseBannerStyle
|| option.IsUseFrostedGlassBannerStyle)
&& (option.GetTextBoxPosition() == Position.Left
|| (option.GetTextBoxPosition() == Position.Centre
&& option.GetBannerDirection() != BannerDirection.Horizontal)
|| option.GetTextBoxPosition() == Position.Right))
{
designer.ApplyTextWrapping();
}
else if (option.IsUseCircleStyle
|| option.IsUseOutlineStyle)
{
designer.ApplyTextWrapping();
}
else
{
designer.RecoverTextWrapping(option.GetTextBoxPosition(), option.GetTextAlignment());
}
ApplyTextEffect(option, designer);
designer.ApplyTextGlowEffect(option.IsUseTextGlow, option.TextGlowColor);
return new List<Shape>();
}
开发者ID:nus-fboa2016-PL,项目名称:PowerPointLabs,代码行数:34,代码来源:TextStyleWorker.cs
示例6: EffectsDesigner
/// <summary>
/// For `preview`
/// </summary>
/// <param name="slide">the temp slide to produce preview image</param>
/// <param name="contentSlide">the slide that contains content</param>
/// <param name="slideWidth"></param>
/// <param name="slideHeight"></param>
/// <param name="source"></param>
private EffectsDesigner(PowerPoint.Slide slide, PowerPoint.Slide contentSlide,
float slideWidth, float slideHeight, ImageItem source)
: base(slide)
{
ContentSlide = contentSlide;
Setup(slideWidth, slideHeight, source);
}
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:15,代码来源:EffectsDesigner.cs
示例7: PreviewApplyStyle
public PreviewInfo PreviewApplyStyle(ImageItem source, Slide contentSlide,
float slideWidth, float slideHeight, StyleOption option)
{
SetStyleOptions(option);
SlideWidth = slideWidth;
SlideHeight = slideHeight;
var previewInfo = new PreviewInfo();
var handler = CreateEffectsHandlerForPreview(source, contentSlide);
// use thumbnail to apply, in order to speed up
var fullSizeImgPath = source.FullSizeImageFile;
var originalThumbnail = source.ImageFile;
source.FullSizeImageFile = null;
source.ImageFile = source.CroppedThumbnailImageFile ?? source.ImageFile;
ApplyStyle(handler, source, isActualSize: false);
// recover the source back
source.FullSizeImageFile = fullSizeImgPath;
source.ImageFile = originalThumbnail;
handler.GetNativeSlide().Export(previewInfo.PreviewApplyStyleImagePath, "JPG",
GetPreviewWidth(), PreviewHeight);
handler.Delete();
return previewInfo;
}
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:27,代码来源:StylesDesigner.cs
示例8: PreviewApplyStyle
public PreviewInfo PreviewApplyStyle(ImageItem source, Slide contentSlide,
float slideWidth, float slideHeight, StyleOption option)
{
Logger.Log("PreviewApplyStyle begins");
SetStyleOptions(option);
SlideWidth = slideWidth;
SlideHeight = slideHeight;
var previewInfo = new PreviewInfo();
EffectsDesignerForPreview.PreparePreviewing(contentSlide, slideWidth, slideHeight, source);
// use thumbnail to apply, in order to speed up
source.BackupFullSizeImageFile = source.FullSizeImageFile;
var backupImageFile = source.ImageFile;
source.FullSizeImageFile = null;
source.ImageFile = source.CroppedThumbnailImageFile ?? source.ImageFile;
GenerateStyle(EffectsDesignerForPreview, source, isActualSize: false);
// recover the source back
source.FullSizeImageFile = source.BackupFullSizeImageFile;
source.ImageFile = backupImageFile;
EffectsDesignerForPreview.GetNativeSlide().Export(previewInfo.PreviewApplyStyleImagePath, "JPG",
GetPreviewWidth(), PreviewHeight);
Logger.Log("PreviewApplyStyle done");
return previewInfo;
}
开发者ID:nus-fboa2016-PL,项目名称:PowerPointLabs,代码行数:27,代码来源:StylesDesigner.cs
示例9: BmtvConfig
public BmtvConfig()
{
Username = new StringItem { Name = "Username" };
Password = new StringItem { Name = "Password" };
CaptchaImage = new ImageItem { Name = "Captcha Image" };
CaptchaText = new StringItem { Name = "Captcha Text" };
}
开发者ID:Venxir,项目名称:Jackett,代码行数:7,代码来源:BitMeTV.cs
示例10: Setup
private void Setup(float slideWidth, float slideHeight, ImageItem source)
{
SlideWidth = slideWidth;
SlideHeight = slideHeight;
Source = source;
DeleteShapesWithPrefix(ShapeNamePrefix);
}
开发者ID:youthinkk,项目名称:PowerPointLabs,代码行数:7,代码来源:EffectsDesigner.cs
示例11: Execute
public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source, Shape imageShape)
{
if (option.IsUseTextBoxStyle)
{
designer.ApplyTextboxEffect(option.TextBoxColor, option.TextBoxTransparency);
}
return new List<Shape>();
}
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:8,代码来源:TextBoxStyleWorker.cs
示例12: ConfigurationDataCaptchaLogin
public ConfigurationDataCaptchaLogin()
{
Username = new StringItem { Name = "Username" };
Password = new StringItem { Name = "Password" };
CaptchaImage = new ImageItem { Name = "Captcha Image" };
CaptchaText = new StringItem { Name = "Captcha Text" };
CaptchaCookie = new HiddenItem("") { Name = "Captcha Cookie" };
}
开发者ID:dardano,项目名称:Jackett,代码行数:8,代码来源:ConfigurationDataCaptchaLogin.cs
示例13: Execute
public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source,
Shape imageShape)
{
// store style options information into original image shape
// return original image and cropped image
return designer.EmbedStyleOptionsInformation(
source.OriginalImageFile, source.FullSizeImageFile,
source.ContextLink, source.Rect, option);
}
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:9,代码来源:StyleEmbeddingWorker.cs
示例14: PreparePreviewing
public void PreparePreviewing(PowerPoint.Slide contentSlide, float slideWidth, float slideHeight, ImageItem source)
{
Logger.Log("PreparePreviewing begins");
InitLayoutAndDesign(contentSlide);
DeleteAllShapes();
CopyShapes(contentSlide);
Setup(slideWidth, slideHeight, source);
Logger.Log("PreparePreviewing done");
}
开发者ID:youthinkk,项目名称:PowerPointLabs,代码行数:9,代码来源:EffectsDesigner.cs
示例15: ConfigurationDataCaptchaLogin
/// <param name="instructionMessageOptional">Enter any instructions the user will need to setup the tracker</param>
public ConfigurationDataCaptchaLogin(string instructionMessageOptional = null)
{
Username = new StringItem { Name = "Username" };
Password = new StringItem { Name = "Password" };
CaptchaImage = new ImageItem { Name = "Captcha Image" };
CaptchaText = new StringItem { Name = "Captcha Text" };
CaptchaCookie = new HiddenItem("") { Name = "Captcha Cookie" };
Instructions = new DisplayItem(instructionMessageOptional) { Name = "" };
}
开发者ID:CatmanIX,项目名称:Shades,代码行数:10,代码来源:ConfigurationDataCaptchaLogin.cs
示例16: Execute
public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source, Shape imageShape)
{
var result = new List<Shape>();
if (option.IsUseCircleStyle)
{
var circleOverlayShape = designer.ApplyCircleRingsEffect(option.CircleColor, option.CircleTransparency);
result.Add(circleOverlayShape);
}
return result;
}
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:10,代码来源:CircleStyleWorker.cs
示例17: Execute
public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source, Shape imageShape)
{
var result = new List<Shape>();
if (option.IsUseBannerStyle)
{
var bannerOverlayShape = ApplyBannerStyle(option, designer, imageShape);
result.Add(bannerOverlayShape);
}
return result;
}
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:10,代码来源:BannerStyleWorker.cs
示例18: ImageItemforUI
public ImageItemforUI(ImageItem imageitem)
{
imageId = imageitem.ImageId;
path = imageitem.Path;
// 本来ならここでDB読んでタグを収集
tags = new List<string>();
tags.Add("テストタグ1");
tags.Add("テストタグ2");
tags.Add("テストタグ3");
}
开发者ID:yasu0796,项目名称:XamarinCloudVisionApp,代码行数:10,代码来源:ImageItemforUI.cs
示例19: GetMetaInfo
public static void GetMetaInfo(ref string url, ImageItem item)
{
if (IsValidGoogleImageLink(url))
{
var googleImageUri = new Uri(url);
var parameters = HttpUtility.ParseQueryString(googleImageUri.Query);
url = HttpUtility.UrlDecode(parameters.Get("imgurl"));
item.ContextLink = HttpUtility.UrlDecode(parameters.Get("imgrefurl"));
}
}
开发者ID:oswellchan,项目名称:PowerPointLabs,代码行数:10,代码来源:UrlUtil.cs
示例20: Init
public void Init()
{
_designer = new StylesDesigner(App);
_sourceImage = new ImageItem
{
ImageFile = PathUtil.GetDocTestPath() + "koala.jpg",
Tooltip = "some tooltip"
};
_contentSlide = PpOperations.SelectSlide(1);
}
开发者ID:oswellchan,项目名称:PowerPointLabs,代码行数:10,代码来源:StylesDesignerTest.cs
注:本文中的ImageItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论