Esempio n. 1
0
        private void CaculateRecordIndexRatio()
        {
            var    totalRecordsCount = Math.Round((totalHeight) / rowHeight);
            double rowStartHeight    = 0;

            for (var index = 1; index <= totalRecordsCount; index++)
            {
                var rowInfoModel = new RowInfoModel()
                {
                    RowIndex   = index,
                    StartValue = rowStartHeight,
                    EndValue   = rowHeight * index
                };
                TotalRowCollection.Add(index, rowInfoModel);
                rowStartHeight = rowHeight * index;
            }
        }
Esempio n. 2
0
        public void CalculateVisibleRowsCalculation()
        {
            if (VisibleRowCollection == null)
            {
                VisibleRowCollection = new Dictionary <int, RowInfoModel>();
            }
            var    visibleRecordsCount = Math.Round((viewPortHeight) / rowHeight);
            double rowStartHeight      = 0;

            for (var index = 1; index <= visibleRecordsCount; index++)
            {
                var rowInfoModel = new RowInfoModel()
                {
                    RowIndex   = index,
                    StartValue = rowStartHeight,
                    EndValue   = rowHeight * index
                };
                VisibleRowCollection.Add(index, rowInfoModel);
                rowStartHeight = rowHeight * index;
            }
        }
Esempio n. 3
0
 private bool CheckNumnber(RowInfoModel rowData, double checkableValue)
 {
     return(checkableValue > rowData.StartValue && checkableValue > rowData.EndValue);
 }
Esempio n. 4
0
 private bool GetNewRowIndex(RowInfoModel rowData, double checkableValue)
 {
     return(checkableValue > rowData.StartValue && checkableValue <= rowData.EndValue);
 }