Ejemplo n.º 1
0
        private void newToDoAddButton_Click(object sender, RoutedEventArgs e)
        {
            // Create a new to-do item based on the text box.
            ToDoItem newToDo = new ToDoItem { ItemName = newToDoTextBox.Text };

            // Add a to-do item to the observable collection.
            ToReallyDoItems.Add(newToDo);

            // Add a to-do item to the local database.
            toDoDB.ToDoItems.InsertOnSubmit(newToDo);

            toDoDB.SubmitChanges();

            Dthread d1 = new Dthread(newToDoTextBox.Text);
            Thread oThread = new Thread(new ThreadStart(d1.download));

            //TODO: 
            download(newToDoTextBox.Text+".des");
            download(newToDoTextBox.Text + ".comment");
            // Start the thread
            GlobalVar.item = newToDoTextBox.Text;
            GlobalVar.iscomplete = false;
            oThread.Start();

            
            //update(newToDoTextBox.Text);
            //download(newToDoTextBox.Text);
        }
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Dthread d1 = new Dthread(PageTitle.Text);
            Thread oThread = new Thread(new ThreadStart(d1.download));
            GlobalVar.item = PageTitle.Text;
            GlobalVar.iscomplete = false;
            oThread.Start();
            

        }