当前位置: 首页>>代码示例>>C#>>正文


C# StrokeCollection类代码示例

本文整理汇总了C#中StrokeCollection的典型用法代码示例。如果您正苦于以下问题:C# StrokeCollection类的具体用法?C# StrokeCollection怎么用?C# StrokeCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


StrokeCollection类属于命名空间,在下文中一共展示了StrokeCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SelectionMovedOrResizedStroke

		public SelectionMovedOrResizedStroke(CommandStack commandStack, StrokeCollection selection, Rect newrect, Rect oldrect, int editingOperationCount)
			: base(commandStack) {
			_selection = selection;
			_newrect = newrect;
			_oldrect = oldrect;
			_editingOperationCount = editingOperationCount;
		}
开发者ID:paradoxfm,项目名称:ledx2,代码行数:7,代码来源:UndoInkStroke.cs

示例2: CheckOutputValue

 private void CheckOutputValue(Rect rect, String recognizedCharacter, bool isError, StrokeCollection removedStrokes)
 {
     //Check out if it is header box
     if (!_truthTable.IsHeaderBox(rect))
     {
         if (recognizedCharacter.Equals("1") || recognizedCharacter.Equals("l")
             || recognizedCharacter.Equals("|"))
         {
             _truthTable.insertValue(rect, "1");
         }
         else if (recognizedCharacter.Equals("0") || recognizedCharacter.Equals("O"))
         {
             _truthTable.insertValue(rect, "0");
         }
         else
         {
             _truthTable.DisplayInputErrorInfo(rect, removedStrokes);
         }
     }else {
         if (!isError)
         {
             if (_truthTable.default_terms_names.Contains(recognizedCharacter))
             {
                 _truthTable.insertValue(rect, recognizedCharacter);
             }
             else {
                 _truthTable.DisplayInputErrorInfo(rect, removedStrokes);
             }
         }
         else {
             _truthTable.DisplayInputErrorInfo(rect, removedStrokes);
         }      
     }
 }
开发者ID:buptkang,项目名称:LogicPad,代码行数:34,代码来源:InkAnalysisFeedbackAdorner.cs

示例3: SelectionAdorner

 public SelectionAdorner(StrokeCollection selectedStrokes, InkCanvas inkcanvas)
 {
     InitializeComponent();
     referencedStrokes = selectedStrokes;
     referencedCanvas = inkcanvas;
     setupSelectionAdorner();
 }
开发者ID:StackableRegiments,项目名称:metl2011,代码行数:7,代码来源:SelectionAdorner.xaml.cs

示例4: Representation

 public StrokeCollection Representation()
 {
     StrokeCollection strokes = new StrokeCollection();
     foreach (var data in stylusStrokes)
         strokes.Add(data.Representation());
     return strokes;
 }
开发者ID:rudi-c,项目名称:htn-stylus,代码行数:7,代码来源:InkData.cs

示例5: Empty_HitTest

		public void Empty_HitTest ()
		{
			StrokeCollection sc = new StrokeCollection ();
			Assert.Throws<ArgumentException> (delegate {
				sc.HitTest (null);
			}, "HitTest-null");
		}
开发者ID:dfr0,项目名称:moon,代码行数:7,代码来源:StrokeCollectionTest.cs

示例6: Empty_GetBounds

		public void Empty_GetBounds ()
		{
			StrokeCollection sc = new StrokeCollection ();
			Assert.Throws<ArgumentException> (delegate {
				sc.GetBounds ();
			}, "GetBounds");
		}
开发者ID:dfr0,项目名称:moon,代码行数:7,代码来源:StrokeCollectionTest.cs

示例7: UserDefinedShape

		public UserDefinedShape()
		{
			if (_strokes == null) {
				_strokes = new StrokeCollection();
			}
			(_strokes as INotifyCollectionChanged).CollectionChanged += StrokesChangedEventHandler;
		}
开发者ID:stewmc,项目名称:vixen,代码行数:7,代码来源:UserDefinedShape.cs

示例8: updateStrokePrivacy

        private void updateStrokePrivacy(object obj)
        {
            ClearAdorners();

            var newStrokes = new StrokeCollection(Strokes.Select(s => (Stroke)new PrivateAwareStroke(s, target)));
            Strokes.Clear();
            Strokes.Add(newStrokes);
        }
开发者ID:StackableRegiments,项目名称:metl2011,代码行数:8,代码来源:HandWriting.cs

示例9: AddAllStrokesAtOriginalIndex

		private void AddAllStrokesAtOriginalIndex(StrokeCollection toBeAdded) {
			foreach (Stroke stroke in toBeAdded) {
				int strokeIndex = (int)stroke.GetPropertyData(STROKE_INDEX_PROPERTY);
				if (strokeIndex > _commandStack.StrokeCollection.Count)
					strokeIndex = _commandStack.StrokeCollection.Count;
				_commandStack.StrokeCollection.Insert(strokeIndex, stroke);
			}
		}
开发者ID:paradoxfm,项目名称:ledx2,代码行数:8,代码来源:UndoInkStroke.cs

示例10: StrokesAddedOrRemovedStroke

		public StrokesAddedOrRemovedStroke(CommandStack commandStack, InkCanvasEditingMode editingMode, StrokeCollection added, StrokeCollection removed, int editingOperationCount)
			: base(commandStack) {
			_editingMode = editingMode;

			_added = added;
			_removed = removed;

			_editingOperationCount = editingOperationCount;
		}
开发者ID:paradoxfm,项目名称:ledx2,代码行数:9,代码来源:UndoInkStroke.cs

示例11: InkQueryRegionStruct

        public InkQueryRegionStruct(StrokeCollection strokes)
        {
            _equalStrokes = strokes;
            _children = new VisualCollection(this);

            EqualRect = strokes.GetBounds();
            LeftSideRegionRect = new Rect(new Point(EqualRect.TopLeft.X - EqualRect.Width * 5, EqualRect.TopLeft.Y - EqualRect.Height * 2), new Size(EqualRect.Width * 4, EqualRect.Height * 4));
            RightSideRegionRect = new Rect(new Point(EqualRect.BottomRight.X + EqualRect.Width, EqualRect.BottomRight.Y - EqualRect.Height * 3), new Size(EqualRect.Width * 4, EqualRect.Height * 4));
        }
开发者ID:buptkang,项目名称:LogicPad,代码行数:9,代码来源:InkQueryRegionStruct.cs

示例12: StrokeCollectionChangedEventArgs

 /// <summary>Constructor</summary> 
 public StrokeCollectionChangedEventArgs(StrokeCollection added, StrokeCollection removed)
 {
     if ( added == null && removed == null )
     { 
         throw new ArgumentException(SR.Get(SRID.CannotBothBeNull, "added", "removed"));
     } 
     _added = ( added == null ) ? null : new StrokeCollection.ReadOnlyStrokeCollection(added); 
     _removed = ( removed == null ) ? null : new StrokeCollection.ReadOnlyStrokeCollection(removed);
 } 
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:10,代码来源:Events.cs

示例13: DoCommandStack

 /// <summary>
 /// Initialization.
 /// </summary>
 /// <param name="strokes"></param>
 public DoCommandStack(StrokeCollection strokes)
 {
     if (strokes == null)
     {
         return;
     }
     _strokeCollection = strokes;
     _undoStack = new Stack<CommandItem>();
     _redoStack = new Stack<CommandItem>();
     _disableChangeTracking = false;
 }
开发者ID:sonicrang,项目名称:RangPaint,代码行数:15,代码来源:RedoUndo.cs

示例14: RefreshPattern

 public void RefreshPattern()
 {
     if (Pattern != null) {
         StrokeCollection collection = new StrokeCollection();
         for (int i = 0; i < Count; i++) {
             foreach (var stroke in Pattern[i]) {
                 collection.Add(stroke);
             }
         }
         inkPresenter.Strokes = collection;
     }
 }
开发者ID:shadowfox3141,项目名称:HuaZhengZi,代码行数:12,代码来源:InkPattern.xaml.cs

示例15: extractGeomtry

        //local calls only 
        public void extractGeomtry(StrokeCollection strokes, Rect bounds)
        {
            _bounds = bounds;

            _strokes = strokes.Clone();
            foreach (Stroke strk in strokes)
            {                
                var brush = new SolidColorBrush(strk.DrawingAttributes.Color);             
                drawGrp.Children.Add(  new GeometryDrawing( brush, null, strk.GetGeometry())  );
            }

            SetMarkers();
            SetBounds();
        }
开发者ID:gdlprj,项目名称:duscusys,代码行数:15,代码来源:VdFreeForm.cs


注:本文中的StrokeCollection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。