Пример #1
0
 public UserControl1(Modes mode, Data.Todos todo, Todo_Listview _Listview, Main_Window _Conainter)
 {
     InitializeComponent();
     this.todo = todo;
     ChangeMode(mode);
     FillFields(todo);
     ListView  = _Listview;
     Container = _Conainter;
 }
Пример #2
0
        private void FillFields(Data.Todos todo)
        {
            description.Text       = todo.Description;
            deadline.Text          = todo.ExpiryDate.ToString();
            priority.SelectedIndex = todo.Priority;
            done.IsChecked         = todo.Done;
            switch (todo.Colour)
            {
            case "Red":
                radioRed.IsChecked = true;
                break;

            case "Green":
                radioGreen.IsChecked = true;
                break;

            case "Blue":
                radioBlue.IsChecked = true;
                break;
            }
        }