public TEWindow(TEItem toBeShowed) { DataContext = new TEModelView(toBeShowed); InitializeComponent(); if (toBeShowed is Exam) { Title = "Test"; } else { Title = "Úkol"; } }
private void addItem(TEItem te, int column) { ItemInMainGrid grid = new ItemInMainGrid(); grid.AddOnClickHandler((e, a) => { TEWindow window = new TEWindow(te); window.ShowDialog(); }); grid.LeftText = te.getTitle(); grid.RightText = DateUtil.CZ_SHORT_DATE_FORMAT.format(te.getDate()); if (column == 1) { examsColumnView.Children.Add(grid); } else { tasksColumnView.Children.Add(grid); } }
public TEModelView(TEItem source) { this.source = source; }