Exemple #1
0
 public static void RepaintInstance()
 {
     if (windowInstance)
     {
         windowInstance.Repaint();
     }
 }
Exemple #2
0
        private void DeleteRecords()
        {
            for (var i = recordsToDeleteIndexes.Length - 1; i >= 0; i--)
            {
                var index  = recordsToDeleteIndexes[i];
                var record = filteredRecords[index];
                records = CSArrayTools.RemoveAt(records, Array.IndexOf(records, record));

                GetState().selection.RemoveAt(index);
                GetState().compaction.RemoveAt(index);
            }

            recordsToDeleteIndexes = null;

            ApplySorting();

            if (filteredRecords.Length > 0)
            {
                recordsTotalPages = (int)Math.Ceiling((double)filteredRecords.Length / RecordsPerPage);
            }
            else
            {
                recordsTotalPages = 1;
            }

            if (recordsCurrentPage + 1 > recordsTotalPages)
            {
                recordsCurrentPage = recordsTotalPages - 1;
            }

            SaveSearchResults();
            window.Repaint();
        }
Exemple #3
0
        protected virtual void DeleteRecord()
        {
            T record = filteredRecords[recordToDeleteIndex];

            records = CSArrayTools.RemoveAt(records, Array.IndexOf(records, record));
            ApplySorting();

            if (filteredRecords.Length > 0)
            {
                recordsTotalPages = (int)Math.Ceiling((double)filteredRecords.Length / RECORDS_PER_PAGE);
            }
            else
            {
                recordsTotalPages = 1;
            }

            if (recordsCurrentPage + 1 > recordsTotalPages)
            {
                recordsCurrentPage = recordsTotalPages - 1;
            }

            SaveSearchResults();
            window.Repaint();
        }