source: trunk/PKCS1/WpfVisualization/Navigation/Navigation.xaml.cs @ 1650

Last change on this file since 1650 was 1650, checked in by schomburg, 11 years ago

initial commit of PKCS1 Plugin

File size: 1.6 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows;
6using System.Windows.Controls;
7using System.Windows.Data;
8using System.Windows.Documents;
9using System.Windows.Input;
10using System.Windows.Media;
11using System.Windows.Media.Imaging;
12using System.Windows.Navigation;
13using System.Windows.Shapes;
14using PKCS1.Library;
15
16namespace PKCS1.WpfVisualization.Navigation
17{
18    /// <summary>
19    /// Interaktionslogik für Navigation.xaml
20    /// </summary>
21    public partial class Navigation : UserControl
22    {
23        public event Navigate OnNavigate;
24        public Navigation()
25        {
26            InitializeComponent();
27        }
28
29        private void link_Click(object sender, RoutedEventArgs e)
30        {
31            if (null != OnNavigate)
32            {
33                NavigationCommandType commandtype = NavigationCommandType.None;
34
35                if (sender == link_SignatureGenerate) commandtype = NavigationCommandType.SigGen;
36                else if (sender == link_RsaKeyGenerate) commandtype = NavigationCommandType.RsaKeyGen;
37                else if (sender == link_AttackBleichenbacher) commandtype = NavigationCommandType.SigGenFakeBleichenb;
38                else if (sender == link_AttackShortKeysVariant) commandtype = NavigationCommandType.SigGenFakeShort;
39                else if (sender == link_SignatureValidate) commandtype = NavigationCommandType.SigVal;
40                else if (sender == link_Start) commandtype = NavigationCommandType.Start;
41
42                OnNavigate(commandtype);
43            }
44        }
45    }
46}
Note: See TracBrowser for help on using the repository browser.