private void ButtonKindleToggle_Click(object sender, RoutedEventArgs e) { if (!kindleDisplayed) { kindleDisplayed = true; currentOnHold = currentDisplay; this.Dispatcher.Invoke(new Action(() => { this.Cursor = Cursors.Wait; })); SetDisplayContent(KindleLibrarian.KindleObjects(currentDisplay)); this.Dispatcher.Invoke(new Action(() => { this.Cursor = Cursors.Arrow; })); buttonKindleToggle.Background = ExTools.ConvertColorFromHexString(Constants.GreenClr); } else { kindleDisplayed = false; SetDisplayContent(currentOnHold); currentOnHold = null; buttonKindleToggle.Background = ExTools.ConvertColorFromHexString(Constants.RedClr); } }
private void Grid_Loaded(object sender, RoutedEventArgs e) { Grid gd = (Grid)sender; var fic_id = gd.Tag.ToString(); if (kindleIds.Contains(fic_id)) { gd.Background = ExTools.ConvertColorFromHexString(Constants.GreenClr); } }