source: trunk/CrypPlugins/BooleanOperators/ButtonInputPresentation.xaml @ 759

Last change on this file since 759 was 759, checked in by weyers, 12 years ago

added boolean button

File size: 1.1 KB
Line 
1<UserControl x:Class="BooleanOperators.ButtonInputPresentation"
2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4    Height="70" Width="70">
5    <Button Name="myButton" Height="50" Width="50" Click="ExecuteThisMethodWhenButtonIsClicked">
6        <Image Name="myButtonPic" Source="icons\true.png"/>
7    </Button>
8    <x:Code>
9
10        <![CDATA[
11
12            public Boolean c = true;
13           
14            public void ExecuteThisMethodWhenButtonIsClicked(object sender, EventArgs e)
15           
16            {
17               
18                if (c == true)
19                {
20
21                    this.myButton.Background = Brushes.Green;
22                    this.myButton.Content = "true";
23                    c=false;
24                   
25                }
26               
27                else
28                {
29                    this.myButton.Background = Brushes.Red;
30                    this.myButton.Content = "false";
31                    c=true;
32                }
33               
34            }
35
36        ]]>
37
38    </x:Code>
39</UserControl>
Note: See TracBrowser for help on using the repository browser.