Example #1
0
        private void CheckIfDataLoaded() // thread checking if WordLibraries are loaded
        {
            Thread dataLoaded = new Thread(dl =>
            {
                var rhymesLoaded   = false;
                var synonymsLoaded = false;
                do
                {
                    if (SQLiteDb.RhymesLoaded())
                    {
                        rhymesLoaded = true;
                        this.RunOnUiThread(() =>
                        {
                            findRhymesButton.SetTextColor(colors);
                        });
                    }
                    if (SQLiteDb.SynonymsLoaded())
                    {
                        synonymsLoaded = true;
                        this.RunOnUiThread(() =>
                        {
                            findSynonymsButton.SetTextColor(colors);
                        });
                    }
                }while (!(rhymesLoaded && synonymsLoaded));
            });

            dataLoaded.Start();
        }