本文整理汇总了C#中SchetsEditor.SchetsControl.CommitAction方法的典型用法代码示例。如果您正苦于以下问题:C# SchetsControl.CommitAction方法的具体用法?C# SchetsControl.CommitAction怎么用?C# SchetsControl.CommitAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SchetsEditor.SchetsControl
的用法示例。
在下文中一共展示了SchetsControl.CommitAction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToolChange
// Make sure that if we are editting a layer, the layer is always added to the Schets
public override void ToolChange(SchetsControl s)
{
if(edittingLayer != null)
{
s.CommitAction(new SchetsActionAddLayer(edittingLayer));
edittingLayer = null;
}
}
示例2: MuisLos
public override void MuisLos(SchetsControl s, Point p)
{
Bezig(s, startpunt, p);
if(edittingLayer != null)
{
s.CommitAction(new SchetsActionAddLayer(edittingLayer));
edittingLayer = null;
}
}
示例3: MuisVast
public override void MuisVast(SchetsControl s, Point p)
{
if(edittingLayer != null)
{
((LayerText) edittingLayer).Editting = false;
s.CommitAction(new SchetsActionAddLayer(edittingLayer));
s.Invalidate();
}
base.MuisVast(s, p);
}
示例4: eraseLayer
/// <summary>Erases the layer at the given position (if there is one)</summary>
/// <param name="s">The SchetsControl to erase the layer from</param>
/// <param name="p">The position of the layer that should be erased</param>
private void eraseLayer(SchetsControl s, Point p)
{
// Loop through the layers from top to bottom
for(int i = s.Schets.Layers.Count; i != 0; --i)
{
// Check if we found a layer at the given position
if(s.Schets.Layers[i-1].IsClicked(p))
{
s.CommitAction(new SchetsActionRemoveLayer(s.Schets.Layers[i - 1], i - 1));
s.Schets.Layers.RemoveAt(i - 1);
s.Invalidate();
return;
}
}
}