src/FingersDance.Control.SessionInput/UserControlAnnotationOrSearch.xaml.cs
changeset 208 0699cab5cbb3
child 216 45d2dff788f2
equal deleted inserted replaced
207:6405d0b7d085 208:0699cab5cbb3
       
     1 using System;
       
     2 using System.Collections.Generic;
       
     3 using System.Linq;
       
     4 using System.Text;
       
     5 using System.Windows;
       
     6 using System.Windows.Controls;
       
     7 using System.Windows.Data;
       
     8 using System.Windows.Documents;
       
     9 using System.Windows.Input;
       
    10 using System.Windows.Media;
       
    11 using System.Windows.Media.Imaging;
       
    12 using System.Windows.Navigation;
       
    13 using System.Windows.Shapes;
       
    14 
       
    15 namespace FingersDance.Control.SessionInput
       
    16 {
       
    17 
       
    18     /// <summary>
       
    19     /// Interaction logic for UserControlAnnotationOrSearch.xaml
       
    20     /// </summary>
       
    21     public partial class UserControlAnnotationOrSearch : UserControl
       
    22     {
       
    23         public event EventHandler<AnnotationOrSearchEventArg> ModeChosen;
       
    24 
       
    25         public UserControlAnnotationOrSearch()
       
    26         {
       
    27             InitializeComponent();
       
    28         }
       
    29 
       
    30         private void annotBtn_Click(object sender, RoutedEventArgs e)
       
    31         {
       
    32             ModeChosen(this, new AnnotationOrSearchEventArg("Annotation"));
       
    33         }
       
    34 
       
    35         private void annotBtn_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
       
    36         {
       
    37             ModeChosen(this, new AnnotationOrSearchEventArg("Annotation"));
       
    38         }
       
    39 
       
    40         private void searchBtn_Click(object sender, RoutedEventArgs e)
       
    41         {
       
    42             ModeChosen(this, new AnnotationOrSearchEventArg("Search"));
       
    43         }
       
    44 
       
    45         private void searchBtn_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
       
    46         {
       
    47             ModeChosen(this, new AnnotationOrSearchEventArg("Search"));
       
    48         }
       
    49     }
       
    50 
       
    51 
       
    52     /// <summary>
       
    53     /// AnnotationOrSearchEventArg
       
    54     /// </summary>
       
    55     public class AnnotationOrSearchEventArg : EventArgs
       
    56     {
       
    57         public String ChosenMode
       
    58         {
       
    59             get;
       
    60             set;
       
    61         }
       
    62 
       
    63         public AnnotationOrSearchEventArg(String chosenMode)
       
    64         {
       
    65 
       
    66             ChosenMode = chosenMode;
       
    67 
       
    68         }
       
    69 
       
    70     }
       
    71 }