SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
MessagesWrapper.xaml.cs
Go to the documentation of this file.
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 SeciControls
16 {
20  public partial class MessagesWrapper : UserControl
21  {
22  //Set up event and delegates for stopping/starting error thread while a question is asked
24  public delegate void QuestionHandler();
25 
27 
28  public MessagesWrapper()
29  {
30  InitializeComponent();
31  messagesCtrl.OnQuestionAsked += new MessagesControl.QuestionHandler(messagesCtrl_OnQuestionAsked);
32  messagesCtrl.OnQuestionAnswered += new MessagesControl.QuestionHandler(messagesCtrl_OnQuestionAnswered);
33  }
34 
36  {
37  if (OnQuestionAsked != null)
38  {
40  }
41  }
42 
44  {
45  if (OnQuestionAnswered != null)
46  {
48  }
49  }
50 
51  public void AddMessages(Seci.SerialisableList<Seci.Standard.MessageInfo> messages)
52  {
53  messagesCtrl.AddMessages(messages);
54  }
55 
56  public void ClearMessages()
57  {
58  messagesCtrl.ClearMessages();
59  }
60 
61  private void btnShow_Click(object sender, RoutedEventArgs e)
62  {
63  messagesCtrl.ShowSelectedMessage();
64  }
65 
66  private void btnClearAll_Click(object sender, RoutedEventArgs e)
67  {
68  messagesCtrl.RemoveAllErrorMessages();
69  }
70  }
71 }
delegate void QuestionHandler()
void btnShow_Click(object sender, RoutedEventArgs e)
Interaction logic for MessagesWrapper.xaml
void AddMessages(Seci.SerialisableList< Seci.Standard.MessageInfo > messages)
void btnClearAll_Click(object sender, RoutedEventArgs e)