Example #1
0
 private void submitNewTask(object render, RoutedEventArgs e)
 {
     Console.WriteLine("task name ", task_name.Text);
     if (!task_name.Text.Equals("") || !task_des.Text.Equals(""))
     {
         Task task = new Task(task_name.Text, task_des.Text,null);
         App.tasks.Add(task);
         Navigation.GoToPage(this, Pages.Main, null);
     }
     else
         emptyError.Visibility = Visibility.Visible;
 }
Example #2
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            IDictionary<string, string> parameters = this.NavigationContext.QueryString;
            if(parameters.ContainsKey("Text")){
                String id = parameters["Text"];
                 this.task = App.tasks.First(a => a.getName() == id);
                 taskDesc.Text = this.task.Description;
                 setStatusNumber();
                 PageTitle.Text = id;
                 if (this.task.getImgSrc() != null)
                 {

                     String tempSrc = this.task.getImgSrc();
                     BitmapSource tn = new BitmapImage(new Uri(tempSrc, UriKind.Relative));

                     //tn.SetSource(Application.GetResourceStream(new Uri(tempSrc, UriKind.Relative)).Stream);
                     image1.Source = tn;
                 }
            } else
                Navigation.GoToPage(this, Pages.Main, null);
        }
Example #3
0
 public void addTask(Task taski)
 {
     this.doneTasks.Add(taski);
 }