Esempio n. 1
0
        private void activateNote(Entry e, Note note)
        {
            e.addAnnotation(note);



            //remove big note
            RemoveFromScreen(note);

            //annotation.MouseDoubleClick += new MouseButtonEventHandler(annotation_MouseDoubleClick);


        }
Esempio n. 2
0
        private void AddNote_Click(object sender, RoutedEventArgs e)
        {

            Note note = new Note();
            note.MouseMove += new MouseEventHandler(note_MouseMove);
            note.PreviewTouchMove += new EventHandler<TouchEventArgs>(note_PreviewTouchMove);
            AddNewTool(note);
        }
Esempio n. 3
0
        public void addAnnotation(Note note)
        {
            //Save the fields of the two text boxes
            String titleString = note.titleText.Text;
            String noteString = note.txt.Text;

            //Make label out of title
            Label noteTitle = new Label();
            noteTitle.Content = titleString;
            noteTitle.Foreground = Brushes.Black;

            //Make item that will be attached
            ScatterViewItem annotation = new ScatterViewItem();

            //Format visually
            annotation.Background = new SolidColorBrush(Color.FromRgb(252, 240, 173));
            annotation.ShowsActivationEffects = false;
            annotation.CanScale = false;
            annotation.MinHeight = 25;
            annotation.PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(annotation_PreviewMouseDown);
            annotation.PreviewMouseUp += new System.Windows.Input.MouseButtonEventHandler(annotation_PreviewMouseUp);
            annotation.TouchEnter += new EventHandler<System.Windows.Input.TouchEventArgs>(annotation_TouchEnter);
            annotation.TouchLeave += new EventHandler<System.Windows.Input.TouchEventArgs>(annotation_TouchLeave);
            annotation.PreviewMouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(annotation_PreviewMouseDoubleClick);

            //Attach 
            annotation.Content = noteTitle;
            annotation.Tag = noteString;

            this.annotations.Add(annotation);

            ((Canvas)this.Content).Children.Add(annotation);
            Canvas.SetRight(annotation, this.Width);
            Canvas.SetTop(annotation, annotations.IndexOf(annotation) * 50);



        }