Example #1
0
        public void AutocompletionPopulateAllNotesWithFileTableValues(FileDatabase database)
        {
            // Check the arguments for null
            ThrowIf.IsNullArgument(database, nameof(database));

            foreach (DataEntryControl control in this.Controls)
            {
                // no point in autocompleting if its read-only
                if (control.ContentReadOnly == true)
                {
                    continue;
                }
                // We are only autocompleting notes
                if (!(control is DataEntryNote note))
                {
                    continue;
                }
                note.ContentControl.Autocompletions = database.GetDistinctValuesInSelectedFileTableColumn(note.DataLabel, 2);
            }
        }