private async void Initialize() { strings = await MyDataBase.GetCountWords(id, 10); iteration = -1; timeLabel.Content = time; // ТУТ КНОПКИ СОЗДАЕМ for (var i = 0; i < 4; i++) { butts[i] = new System.Windows.Controls.Button(); butts[i].FontSize = 30; butts[i].Padding = new Thickness(5); butts[i].Margin = new Thickness(0, 0, 0, 10); butts[i].Background = Brushes.AliceBlue; buttsPanel.Children.Add(butts[i]); } var nextButt = new System.Windows.Controls.Button(); nextButt.Content = "Далее"; nextButt.FontSize = 30; nextButt.Padding = new Thickness(5); nextButt.Margin = new Thickness(0, 30, 0, 10); nextButt.Background = Brushes.AliceBlue; nextButt.Click += Next; buttsPanel.Children.Add(nextButt); // ЧТОБЫ МЕНЬШЕ ТЕКСТА, ПОТОМ СОЗДАТЬ СТИЛЬ Next(null, null); }
private async void Initialize() { wordIteration = -1; strings = await MyDataBase.GetCountWords(id, 5); tbs = new List <TextBlock>(); bts = new List <Button>(); Next(null, null); }
private async void OnOpenTranslateWordPage2() { if (await MyDataBase.GetCountWords(id) < 10) { MessageBox.Show("Слов должно больше 10!"); return; } TranslateWordPage2 twp = new TranslateWordPage2(id); twp.GoBack += OnGoBack; Pages.Content = twp; }
private async void OnOpenWordConstructorPage() { if (await MyDataBase.GetCountWords(id) < 5) { MessageBox.Show("Слов должно больше 5!"); return; } WordConstructorPage wcp = new WordConstructorPage(id); wcp.GoBack += OnGoBack; Pages.Content = wcp; }
private async void SetCountWords() { countWordsLabel.Content = "Количество слов в словаре: " + (await MyDataBase.GetCountWords(id)); }