void Handler_ColumnHeaderClick(object sender, DataEventArgs e) { JournalColumnHeader header = sender as JournalColumnHeader; if (header == null) { return; } if (this.selectedColumnHeader != null) { this.selectedColumnHeader.DetectChanges(); } this.selectedColumnHeader = header; foreach (var i in this.columnHeaders) { if (i != header) { i.IsSelected = false; i.Column.ActivateCells(false); i.Column.HighlightCells(false); } } header.IsSelected = !header.IsSelected; if (header.IsSelected) { this.tbTopic.Text = header.Topic; this.tbTask.Text = header.Task; if (this.IsEditable) { header.Column.ActivateCells(true); } else { header.Column.HighlightCells(true); } } else { this.tbTask.Text = ""; this.tbTopic.Text = ""; header.Column.HighlightCells(false); header.Column.ActivateCells(false); } foreach (var i in this.rowHeaders) { if (i.IsSelected) { i.Row.HighlightCells(true); } } }
void Handler_SelectedMonthChanged(object sender, DataEventArgs e) { if (this.tableHeader.SelectedSubject != null && this.tableHeader.SelectedDate != DateTime.MinValue) { this.SetSubjectAndMonth(this.tableHeader.SelectedSubject, this.tableHeader.SelectedDate); } }
void Handler_JournalClose(object sender, DataEventArgs e) { this.secondGrid.Children.Remove(this.journal); this.secondGrid.Visibility = System.Windows.Visibility.Hidden; this.firstGrid.Visibility = System.Windows.Visibility.Visible; this.journal = null; }