DataGridDisplayData.cs :  » 2.6.4-mono-.net-core » System.Windows » System » Windows » Controlsb1 » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » 2.6.4 mono .net core » System.Windows 
System.Windows » System » Windows » Controlsb1 » DataGridDisplayData.cs
// Copyright  Microsoft Corporation. 
// This source is subject to the Microsoft Source License for Silverlight Controls (March 2008 Release).
// Please see http://go.microsoft.com/fwlink/?LinkID=111693 for details.
// All other rights reserved. 

namespace System.Windows.Controlsb1{ 
    internal class DataGridDisplayData 
    {
        #region Data 

        private int _firstDisplayedFrozenCol;
        // 
        private int _firstDisplayedScrollingCol;
        private int _firstDisplayedScrollingRow;
        private int _lastDisplayedFrozenCol; 
        // 
        private int _lastDisplayedScrollingRow;
        private int _lastTotallyDisplayedScrollingCol; 
        private int _numDisplayedFrozenCols;
        //
        private int _numDisplayedScrollingCols; 
        private int _numDisplayedScrollingRows;
        //
        private int _numTotallyDisplayedScrollingRows; 
 
        #endregion
 
        public DataGridDisplayData()
        {
            // 
            _firstDisplayedFrozenCol = -1;
            _firstDisplayedScrollingRow = -1;
            _firstDisplayedScrollingCol = -1; 
            _lastTotallyDisplayedScrollingCol = -1; 
            _lastDisplayedScrollingRow = -1;
            _lastDisplayedFrozenCol = -1; 
            //
            OldFirstDisplayedScrollingRow = -1;
            OldFirstDisplayedScrollingCol = -1; 
        }

        #region Public Properties 
 
        public bool ColumnInsertionOccurred
        { 
            get;
            private set;
        } 

        public bool Dirty
        { 
            get; 
            set;
        } 

        public int FirstDisplayedFrozenCol
        { 
            get
            {
                return this._firstDisplayedFrozenCol; 
            } 
            set
            { 
                if (value != _firstDisplayedFrozenCol)
                {
                    EnsureDirtyState(); 
                    _firstDisplayedFrozenCol = value;
                }
            } 
        } 

        // 


 


 
 

 


        public int FirstDisplayedScrollingCol 
        {
            get
            { 
                return _firstDisplayedScrollingCol; 
            }
            set 
            {
                if (value != _firstDisplayedScrollingCol)
                { 
                    EnsureDirtyState();
                    _firstDisplayedScrollingCol = value;
                } 
            } 
        }
 
        public int FirstDisplayedScrollingRow
        {
            get 
            {
                return _firstDisplayedScrollingRow;
            } 
            set 
            {
                if (value != _firstDisplayedScrollingRow) 
                {
                    EnsureDirtyState();
                    _firstDisplayedScrollingRow = value; 
                }
            }
        } 
 
        public int LastDisplayedFrozenCol
        { 
            get
            {
                return _lastDisplayedFrozenCol; 
            }
            set
            { 
                if (value != _lastDisplayedFrozenCol) 
                {
                    EnsureDirtyState(); 
                    _lastDisplayedFrozenCol = value;
                }
            } 
        }

        // 
 

 


 


 
 

        public int LastDisplayedScrollingRow 
        {
            get
            { 
                return _lastDisplayedScrollingRow;
            }
            set 
            { 
                if (value != _lastDisplayedScrollingRow)
                { 
                    EnsureDirtyState();
                    _lastDisplayedScrollingRow = value;
                } 
            }
        }
 
        public int LastTotallyDisplayedScrollingCol 
        {
            get 
            {
                return _lastTotallyDisplayedScrollingCol;
            } 
            set
            {
                if (value != _lastTotallyDisplayedScrollingCol) 
                { 
                    EnsureDirtyState();
                    _lastTotallyDisplayedScrollingCol = value; 
                }
            }
        } 

        public int NumDisplayedFrozenCols
        { 
            get 
            {
                return _numDisplayedFrozenCols; 
            }
            set
            { 
                if (value != _numDisplayedFrozenCols)
                {
                    EnsureDirtyState(); 
                    _numDisplayedFrozenCols = value; 
                }
            } 
        }

        // 


 
 

 


 


 
 

 
        public int NumDisplayedScrollingCols
        {
            get 
            {
                return _numDisplayedScrollingCols;
            } 
            set 
            {
                if (value != _numDisplayedScrollingCols) 
                {
                    EnsureDirtyState();
                    _numDisplayedScrollingCols = value; 
                }
            }
        } 
 
        public int NumDisplayedScrollingRows
        { 
            get
            {
                return _numDisplayedScrollingRows; 
            }
            set
            { 
                if (value != _numDisplayedScrollingRows) 
                {
                    EnsureDirtyState(); 
                    _numDisplayedScrollingRows = value;
                }
            } 
        }

        // 
 

 


 


 
 

 


 
        public int NumTotallyDisplayedScrollingRows
        {
            get 
            { 
                return _numTotallyDisplayedScrollingRows;
            } 
            set
            {
                if (value != _numTotallyDisplayedScrollingRows) 
                {
                    EnsureDirtyState();
                    _numTotallyDisplayedScrollingRows = value; 
                } 
            }
        } 

        public int OldFirstDisplayedScrollingCol
        { 
            get;
            private set;
        } 
 
        public int OldFirstDisplayedScrollingRow
        { 
            get;
            private set;
        } 

        //
 
 

 

        public int OldNumDisplayedScrollingRows
        { 
            get;
            private set;
        } 
 
        public bool RowInsertionOccurred
        { 
            get;
            private set;
        } 

        #endregion
 
        #region Public Methods 

        public void CorrectColumnIndexAfterInsertion(int columnIndex, int insertionCount) 
        {
            EnsureDirtyState();
            if (OldFirstDisplayedScrollingCol != -1 && columnIndex <= OldFirstDisplayedScrollingCol) 
            {
                OldFirstDisplayedScrollingCol += insertionCount;
            } 
            ColumnInsertionOccurred = true; 
        }
 
        public void CorrectRowIndexAfterDeletion(int rowIndex)
        {
            EnsureDirtyState(); 
            if (OldFirstDisplayedScrollingRow != -1 && rowIndex <= OldFirstDisplayedScrollingRow)
            {
                OldFirstDisplayedScrollingRow--; 
            } 
        }
 
        public void CorrectRowIndexAfterInsertion(int rowIndex, int insertionCount)
        {
            EnsureDirtyState(); 
            if (OldFirstDisplayedScrollingRow != -1 && rowIndex <= OldFirstDisplayedScrollingRow)
            {
                OldFirstDisplayedScrollingRow += insertionCount; 
            } 
            RowInsertionOccurred = true;
            OldNumDisplayedScrollingRows += insertionCount; 
            //
        }
 
        public void EnsureDirtyState()
        {
            if (!Dirty) 
            { 
                Dirty = true;
                RowInsertionOccurred = false; 
                ColumnInsertionOccurred = false;
                SetOldValues();
            } 
        }

        #endregion 
 
        #region Private Methods
 
        private void SetOldValues()
        {
            OldFirstDisplayedScrollingRow = _firstDisplayedScrollingRow; 
            OldFirstDisplayedScrollingCol = _firstDisplayedScrollingCol;
            //
            OldNumDisplayedScrollingRows = _numDisplayedScrollingRows; 
        } 

        #endregion 
    }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.