StrokeDescriptor.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / MS / Internal / Ink / InkSerializedFormat / StrokeDescriptor.cs / 1 / StrokeDescriptor.cs

                            //------------------------------------------------------------------------ 
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//----------------------------------------------------------------------- 

using System; 
 
// Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET
namespace MS.Internal.Ink.InkSerializedFormat 
{
    internal class StrokeDescriptor
    {
        private System.Collections.Generic.List _strokeDescriptor = new System.Collections.Generic.List(); 
        private uint _Size = 0;
        public uint Size 
        { 
            get
            { 
                return _Size;
            }
            set
            { 
                _Size = value;
            } 
        } 
        public System.Collections.Generic.List Template
        { 
            get
            {
                return _strokeDescriptor;
            } 
        }
        public StrokeDescriptor() 
        { 
        }
 
        public bool IsEqual(StrokeDescriptor strd)
        {
            // If the no of templates in them are different return false
            if( _strokeDescriptor.Count != strd.Template.Count ) 
                return false;
 
            // Compare each tag in the template. If any one of them is different, return false; 
            for( int i = 0; i < _strokeDescriptor.Count; i++ )
                if( _strokeDescriptor[i] != strd.Template[i] ) 
                    return false;
            return true;
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------ 
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//----------------------------------------------------------------------- 

using System; 
 
// Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET
namespace MS.Internal.Ink.InkSerializedFormat 
{
    internal class StrokeDescriptor
    {
        private System.Collections.Generic.List _strokeDescriptor = new System.Collections.Generic.List(); 
        private uint _Size = 0;
        public uint Size 
        { 
            get
            { 
                return _Size;
            }
            set
            { 
                _Size = value;
            } 
        } 
        public System.Collections.Generic.List Template
        { 
            get
            {
                return _strokeDescriptor;
            } 
        }
        public StrokeDescriptor() 
        { 
        }
 
        public bool IsEqual(StrokeDescriptor strd)
        {
            // If the no of templates in them are different return false
            if( _strokeDescriptor.Count != strd.Template.Count ) 
                return false;
 
            // Compare each tag in the template. If any one of them is different, return false; 
            for( int i = 0; i < _strokeDescriptor.Count; i++ )
                if( _strokeDescriptor[i] != strd.Template[i] ) 
                    return false;
            return true;
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK