本文整理汇总了C#中DocumentWorkspace类的典型用法代码示例。如果您正苦于以下问题:C# DocumentWorkspace类的具体用法?C# DocumentWorkspace怎么用?C# DocumentWorkspace使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DocumentWorkspace类属于命名空间,在下文中一共展示了DocumentWorkspace类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FreeformShapeTool
public FreeformShapeTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
PdnResources.GetImageResource("Icons.FreeformShapeToolIcon.png"),
PdnResources.GetString("FreeformShapeTool.Name"),
PdnResources.GetString("FreeformShapeTool.HelpText"))
{
}
开发者ID:herbqiao,项目名称:paint.net,代码行数:7,代码来源:FreeformShapeTool.cs
示例2: EllipseTool
public EllipseTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.EllipseToolIcon.png"),
PdnResources.GetString("EllipseTool.Name"),
PdnResources.GetString("EllipseTool.HelpText"))
{
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:7,代码来源:EllipseTool.cs
示例3: RoundedRectangleTool
public RoundedRectangleTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.RoundedRectangleToolIcon.png"),
PdnResources.GetString("RoundedRectangleTool.Name"),
PdnResources.GetString("RoundedRectangleTool.HelpText"))
{
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:7,代码来源:RoundedRectangleTool.cs
示例4: PerformAction
public override HistoryMemento PerformAction(DocumentWorkspace documentWorkspace)
{
DateTime lastUpdate = DateTime.Now;
documentWorkspace.History.BeginStepGroup();
using (new WaitCursorChanger(documentWorkspace))
{
documentWorkspace.SuspendToolCursorChanges();
while (documentWorkspace.History.RedoStack.Count > 0)
{
documentWorkspace.History.StepForward();
if ((DateTime.Now - lastUpdate).TotalMilliseconds >= 500)
{
documentWorkspace.History.EndStepGroup();
documentWorkspace.Update();
lastUpdate = DateTime.Now;
documentWorkspace.History.BeginStepGroup();
}
}
documentWorkspace.ResumeToolCursorChanges();
}
documentWorkspace.History.EndStepGroup();
Utility.GCFullCollect();
documentWorkspace.Document.Invalidate();
documentWorkspace.Update();
return null;
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:34,代码来源:HistoryFastForwardAction.cs
示例5: EllipseSelectTool
public EllipseSelectTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.EllipseSelectToolIcon.png"),
PdnResources.GetString("EllipseSelectTool.Name"),
PdnResources.GetString("EllipseSelectTool.HelpText"),
's',
ToolBarConfigItems.None)
{
}
开发者ID:nkaligin,项目名称:paint-mono,代码行数:9,代码来源:EllipseSelectTool.cs
示例6: LassoSelectTool
public LassoSelectTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
PdnResources.GetImageResource("Icons.LassoSelectToolIcon.png"),
PdnResources.GetString("LassoSelectTool.Name"),
PdnResources.GetString("LassoSelectTool.HelpText"),
's',
ToolBarConfigItems.None)
{
}
开发者ID:herbqiao,项目名称:paint.net,代码行数:9,代码来源:LassoSelectTool.cs
示例7: CloneStampTool
public CloneStampTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.CloneStampToolIcon.png"),
PdnResources.GetString("CloneStampTool.Name"),
PdnResources.GetString("CloneStampTool.HelpText"),
'l',
false,
ToolBarConfigItems.Pen | ToolBarConfigItems.Antialiasing)
{
}
开发者ID:nkaligin,项目名称:paint-mono,代码行数:10,代码来源:CloneStampTool.cs
示例8: RecolorTool
public RecolorTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.RecoloringToolIcon.png"),
PdnResources.GetString("RecolorTool.Name"),
PdnResources.GetString("RecolorTool.HelpText"),
'r',
false,
ToolBarConfigItems.Pen | ToolBarConfigItems.Antialiasing | ToolBarConfigItems.Tolerance)
{
}
开发者ID:nkaligin,项目名称:paint-mono,代码行数:10,代码来源:RecoloringTool.cs
示例9: GradientTool
public GradientTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
StaticImage,
StaticName,
PdnResources.GetString("GradientTool.HelpText"),
'g',
false,
ToolBarConfigItems.Gradient | ToolBarConfigItems.AlphaBlending)
{
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:10,代码来源:GradientTool.cs
示例10: EraserTool
public EraserTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.EraserToolIcon.png"),
PdnResources.GetString("EraserTool.Name"),
PdnResources.GetString("EraserTool.HelpText"), //"Click and drag to erase a portion of the image",
'e',
false,
ToolBarConfigItems.Pen | ToolBarConfigItems.Antialiasing)
{
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:10,代码来源:EraserTool.cs
示例11: PaintBucketTool
public PaintBucketTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.PaintBucketIcon.png"),
PdnResources.GetString("PaintBucketTool.Name"),
PdnResources.GetString("PaintBucketTool.HelpText"),
'f',
false,
ToolBarConfigItems.Brush | ToolBarConfigItems.Antialiasing | ToolBarConfigItems.AlphaBlending)
{
}
开发者ID:nkaligin,项目名称:paint-mono,代码行数:10,代码来源:PaintBucketTool.cs
示例12: LineTool
public LineTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.LineToolIcon.png"),
PdnResources.GetString("LineTool.Name"),
PdnResources.GetString("LineTool.HelpText"),
ToolBarConfigItems.None,
ToolBarConfigItems.ShapeType)
{
this.ForceShapeDrawType = true;
this.ForcedShapeDrawType = ShapeDrawType.Outline;
}
开发者ID:nkaligin,项目名称:paint-mono,代码行数:11,代码来源:LineTool.cs
示例13: MoveSelectionTool
public MoveSelectionTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.MoveSelectionToolIcon.png"),
MoveSelectionTool.StaticName,
PdnResources.GetString("MoveSelectionTool.HelpText"), // "Click and drag to move a selected region",
'm',
false,
ToolBarConfigItems.None)
{
this.context = new Context();
}
开发者ID:nkaligin,项目名称:paint-mono,代码行数:11,代码来源:MoveSelectionTool.cs
示例14: ZoomTool
public ZoomTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.ZoomToolIcon.png"),
PdnResources.GetString("ZoomTool.Name"),
PdnResources.GetString("ZoomTool.HelpText"),
'z',
false,
ToolBarConfigItems.None)
{
this.mouseDown = MouseButtons.None;
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:11,代码来源:ZoomTool.cs
示例15: MagicWandTool
public MagicWandTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.MagicWandToolIcon.png"),
PdnResources.GetString("MagicWandTool.Name"),
PdnResources.GetString("MagicWandTool.HelpText"),
's',
false,
ToolBarConfigItems.None)
{
LimitToSelection = false;
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:11,代码来源:MagicWandTool.cs
示例16: PencilTool
public PencilTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.PencilToolIcon.png"),
PdnResources.GetString("PencilTool.Name"),
PdnResources.GetString("PencilTool.HelpText"),
'p',
true,
ToolBarConfigItems.AlphaBlending)
{
// initialize any state information you need
mouseDown = false;
}
开发者ID:nkaligin,项目名称:paint-mono,代码行数:12,代码来源:PencilTool.cs
示例17: MoveTool
public MoveTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.MoveToolIcon.png"),
MoveTool.StaticName,
PdnResources.GetString("MoveTool.HelpText"), // "Click and drag to move a selected region",
'm',
false,
ToolBarConfigItems.Resampling)
{
this.context = new MoveToolContext();
this.enableOutline = false;
}
开发者ID:nkaligin,项目名称:paint-mono,代码行数:12,代码来源:MoveTool.cs
示例18: PanTool
public PanTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.PanToolIcon.png"),
PdnResources.GetString("PanTool.Name"),
PdnResources.GetString("PanTool.HelpText"),
'h',
false,
ToolBarConfigItems.None)
{
autoScroll = false;
tracking = false;
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:12,代码来源:PanTool.cs
示例19: PaintBrushTool
public PaintBrushTool(DocumentWorkspace documentWorkspace)
: base(documentWorkspace,
ImageResource.Get("Icons.PaintBrushToolIcon.png"),
PdnResources.GetString("PaintBrushTool.Name"),
PdnResources.GetString("PaintBrushTool.HelpText"),
'b',
false,
ToolBarConfigItems.Brush | ToolBarConfigItems.Pen | ToolBarConfigItems.Antialiasing | ToolBarConfigItems.AlphaBlending)
{
// initialize any state information you need
mouseDown = false;
}
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:12,代码来源:PaintBrushTool.cs
示例20: PerformAction
public override HistoryMemento PerformAction(DocumentWorkspace documentWorkspace)
{
if (!ScanningAndPrinting.CanPrint)
{
Utility.ShowWiaError(documentWorkspace);
return null;
}
using (new PushNullToolMode(documentWorkspace))
{
// render image to a bitmap, save it to disk
Surface scratch = documentWorkspace.BorrowScratchSurface(this.GetType().Name + ".PerformAction()");
try
{
scratch.Clear();
RenderArgs ra = new RenderArgs(scratch);
documentWorkspace.Update();
using (new WaitCursorChanger(documentWorkspace))
{
ra.Surface.Clear(ColorBgra.White);
documentWorkspace.Document.Render(ra, false);
}
string tempName = Path.GetTempFileName() + ".bmp";
ra.Bitmap.Save(tempName, ImageFormat.Bmp);
try
{
ScanningAndPrinting.Print(documentWorkspace, tempName);
}
catch (Exception ex)
{
Utility.ShowWiaError(documentWorkspace);
Tracing.Ping(ex.ToString());
// TODO: do a "better" error dialog here
}
// Try to delete the temp file but don't worry if we can't
bool result = FileSystem.TryDeleteFile(tempName);
}
finally
{
documentWorkspace.ReturnScratchSurface(scratch);
}
}
return null;
}
开发者ID:herbqiao,项目名称:paint.net,代码行数:53,代码来源:PrintAction.cs
注:本文中的DocumentWorkspace类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论