Example #1
0
        private void menu_File(object sender, RoutedEventArgs e)
        {
            var menu = sender as MenuItem;

            switch (menu.Name)
            {
                case "new":
                    TicketEditorView editor = new TicketEditorView(this);
                    editor.Show();

                    break;

                case "refresh":
                    RefreshTicketList();
                    break;

                case "close":
                    this.Close();
                    break;
            }
        }
Example #2
0
 private void new_ContextMenu(object sender, RoutedEventArgs e)
 {
     TicketEditorView editor = new TicketEditorView(this);
     editor.Show();
 }
Example #3
0
        //Logic for engaging the browser/list
        private void listView_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            var listviewelement = sender as ListView;

            int index = listviewelement.SelectedIndex;
            if (index > -1)
            {
                SelectedTicket = TicketList.ElementAt(index);
                TicketEditorView editor = new TicketEditorView(SelectedTicket,this);
                editor.Show();
            }
        }