本文整理匯總了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;
}
}
}