/* Metoda wywolywana przy nacisnieciu przycisku zmiany dlugosci slowa */ private void Word_Button_Click(object sender, RoutedEventArgs e) { TextInformation newTextInformation = LogicMaster.ChangeWordLength(); WordButton.Content = newTextInformation.Content; SetButtonFont(WordButton, newTextInformation); }
/* Metoda aktualizacujace wyswietlany tekst */ private void UpdateDisplay() { TextInformation newTextInformation = LogicMaster.GetTextInformation(); Displayer.Text = newTextInformation.Content; Displayer.FontSize = newTextInformation.FontSize; Displayer.Foreground = newTextInformation.Foreground; }
private void SetButtonFont(Button btn, TextInformation txtInfo) { btn.FontSize = txtInfo.FontSize; btn.Foreground = txtInfo.Foreground; }