protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            // Dispose of camera and media objects.
            DisposeVideoPlayer();
            DisposeVideoRecorder();
            ToDoItem newToDo = new ToDoItem { ItemName = isoVideoFileName };
            newToDo.IsComplete = true;
            explorer.toDoDB.ToDoItems.InsertOnSubmit(newToDo);
            explorer.toDoDB.SubmitChanges();

            base.OnNavigatedFrom(e);
        }
예제 #2
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);
        }