Exemplo n.º 1
0
 public HomePage()
 {
     this.InitializeComponent();
     Welcome.Text = "Welcome! " + App.login_user.Username;
     ViewModel    = new ViewModels.TaskItemViewModel();
     all          = ViewModel.getNoPicAllItems();
     this.getTaskModel();
 }
Exemplo n.º 2
0
 //get selected item
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter.GetType() == typeof(ViewModels.TaskItemViewModel))
     {
         this.ViewModel = (ViewModels.TaskItemViewModel)(e.Parameter);
         detail.Text    = ViewModel.SelectedItem.description;
         title.Text     = ViewModel.SelectedItem.title;
         creator.Text   = ViewModel.SelectedItem.username + "  创建于 " + ViewModel.SelectedItem.datetime.ToString();
         img.Source     = ViewModel.SelectedItem.source;
         date.Date      = ViewModel.SelectedItem.datetime;
     }
 }
 //get selected item
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter.GetType() == typeof(ViewModels.TaskItemViewModel))
     {
         this.ViewModel = (ViewModels.TaskItemViewModel)(e.Parameter);
         detail.Text = ViewModel.SelectedItem.description;
         title.Text = ViewModel.SelectedItem.title;
         creator.Text = ViewModel.SelectedItem.username + "  创建于 " + ViewModel.SelectedItem.datetime.ToString();
         img.Source = ViewModel.SelectedItem.source;
         comment_bar.Text = ViewModel.SelectedItem.comments;
         date.Date = ViewModel.SelectedItem.datetime;
     }
 }
Exemplo n.º 4
0
 private void init()
 {
     ViewModel = new ViewModels.TaskItemViewModel();
 }