當前位置: 首頁>>代碼示例>>C#>>正文


C# SchetsControl.CommitAction方法代碼示例

本文整理匯總了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;
     }
 }
開發者ID:CasWiddershoven,項目名稱:schets-plus,代碼行數:9,代碼來源:Tools.cs

示例2: MuisLos

 public override void MuisLos(SchetsControl s, Point p)
 {
     Bezig(s, startpunt, p);
     if(edittingLayer != null)
     {
         s.CommitAction(new SchetsActionAddLayer(edittingLayer));
         edittingLayer = null;
     }
 }
開發者ID:CasWiddershoven,項目名稱:schets-plus,代碼行數:9,代碼來源:Tools.cs

示例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);
        }
開發者ID:CasWiddershoven,項目名稱:schets-plus,代碼行數:11,代碼來源:Tools.cs

示例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;
         }
     }
 }
開發者ID:CasWiddershoven,項目名稱:schets-plus,代碼行數:18,代碼來源:Tools.cs


注:本文中的SchetsEditor.SchetsControl.CommitAction方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。