-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
executable file
·125 lines (113 loc) · 14 KB
/
MainPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<phone:PhoneApplicationPage
x:Class="Integration2.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="False">
<Grid Background="{StaticResource PhoneAccentBrush}">
<phone:Pivot x:Name="piv">
<phone:PivotItem x:Name="Calculator"
Header="Calculator">
<StackPanel Orientation="Vertical"
VerticalAlignment="Bottom"
HorizontalAlignment="Center"
>
<Rectangle Margin="0,0,0,-80" Height="80" Width="380" Stroke="{StaticResource PhoneForegroundBrush}"/>
<TextBlock x:Name="result"
Height="80"
TextAlignment="Right"
FontSize="50"
Width="370"
TextWrapping="Wrap"
Margin="0,0,0,10" Foreground="{StaticResource PhoneDisabledBrush}"
/>
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
<Button Height="100" Width="100" MinWidth="90" x:Name="Cancel" Content="C" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Click="CancelButton_Click" Margin="0,0,0,0" Background="{StaticResource PhoneDisabledBrush}"/>
<Button Height="100" Width="100" MinWidth="90" x:Name="Delete" Content="Del" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Click="Delete_Click" Margin="0,0,0,0"/>
<Button Height="100" Width="100" MinWidth="90" x:Name="Variable" Content="y" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Margin="0,0,0,0" Click="NumberButton_Click" />
<Button Height="100" Width="100" MinWidth="90" x:Name="Divide" Content="/" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Margin="0,0,0,0" Click="NumberButton_Click"/>
</StackPanel>
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
<Button x:Name="seven" Margin="0,0,0,0" MinWidth="90" MinHeight="100" Content="7" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click"/>
<Button x:Name="eight" MinWidth="90" MinHeight="100" Content="8" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="nine" Content="9" MinWidth="90" MinHeight="100" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="multiply" MinWidth="90" MinHeight="100" Content="*" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Height="100" Width="100" Margin="0,0,0,0" Click="NumberButton_Click"/>
</StackPanel>
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
<Button x:Name="four" Content="4" MinWidth="90" MinHeight="100" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="five" Content="5" HorizontalAlignment="Center" MinWidth="90" MinHeight="100" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="six" Content="6" HorizontalAlignment="Center" VerticalAlignment="Center" MinWidth="90" MinHeight="100" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="subtract" Content="-" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" MinWidth="90" MinHeight="100" Background="{StaticResource PhoneDisabledBrush}" Height="100" Width="100" Margin="0,0,0,0" Click="NumberButton_Click"/>
</StackPanel>
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
<Button x:Name="one" Content="1" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" MinWidth="90" MinHeight="100" Margin="0,0,0,0"/>
<Button x:Name="two" Content="2" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" MinWidth="90" MinHeight="100" Margin="0,0,0,0"/>
<Button x:Name="three" Content="3" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" MinWidth="90" MinHeight="100" Margin="0,0,0,0"/>
<Button x:Name="plus" Content="+" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Height="100" Width="100" MinWidth="90" MinHeight="100" Margin="0,0,0,0" Click="NumberButton_Click"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="zero" Content="0" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="200" Click="NumberButton_Click" MinWidth="90" MinHeight="100" Margin="0,0,0,0"/>
<Button x:Name="point" Content="." HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" MinWidth="90" MinHeight="100" Margin="0,0,0,0" Click="NumberButton_Click"/>
<Button x:Name="equals" Content="=" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneTextBoxReadOnlyBrush}" Height="100" Width="100" MinWidth="90" MinHeight="100" Click="EvaluateFunction"/>
</StackPanel>
</StackPanel>
</phone:PivotItem>
<phone:PivotItem x:Name="Advanced"
Header="Advanced">
<StackPanel Orientation="Vertical"
VerticalAlignment="Bottom"
HorizontalAlignment="Center"
>
<Rectangle Margin="0,0,0,-80" Height="80" Width="380" Stroke="{StaticResource PhoneForegroundBrush}"/>
<TextBlock x:Name="result1"
Height="80"
Foreground="{StaticResource PhoneDisabledBrush}"
TextAlignment="Right"
FontSize="50"
Width="370"
TextWrapping="Wrap"
Margin="0,0,0,10"
Text="{Binding Text, ElementName=result, Mode=TwoWay}"
/>
<StackPanel Orientation="Horizontal">
<Button Height="100" Width="200" x:Name="Lower" Content="Lower Limit" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneTextBoxReadOnlyBrush}" Margin="0,0,0,0" Click="LowerLimit_Click"/>
<Button Height="100" Width="200" x:Name="Upper" Content="Upper Limit" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneTextBoxReadOnlyBrush}" Margin="0,0,0,0" Click="UpperLimit_Click"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="Cancel1" Height="100" Width="100" Content="C" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Click="CancelButton_Click" Margin="0,0,0,0"/>
<Button Height="100" MinWidth="100" x:Name="Delete1" Content="Del" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Click="Delete_Click" Margin="0,0,0,0"/>
<Button Height="100" MinWidth="100" x:Name="Divide1" Content="PI" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Margin="0,0,0,0" Click="NumberButton_Click"/>
<Button x:Name="PI" Content="(" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Height="100" Width="100" MinWidth="90" MinHeight="100" Margin="0,0,0,0" Click="NumberButton_Click"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="Sin" Margin="0,0,0,0" MinWidth="100" MinHeight="100" Content="Sin" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="50" Width="50" Click="NumberButton_Click"/>
<Button x:Name="Cos" MinWidth="100" MinHeight="100" Content="Cos" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="50" Width="50" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="Tan" Content="Tan" MinWidth="100" MinHeight="100" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="50" Width="50" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="multiply1" MinWidth="100" MinHeight="100" Content=")" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneDisabledBrush}" Height="50" Width="50" Margin="0,0,0,0" Click="NumberButton_Click"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="Asin" Content="Asin" Width="100" MinHeight="100" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="50" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="Acos" Content="Acos" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="Atan" Content="Atan" HorizontalAlignment="Center" VerticalAlignment="Center" MinWidth="90" MinHeight="100" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" Margin="0,0,0,0"/>
<Button x:Name="Pow" Content="^" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" MinWidth="90" MinHeight="100" Background="{StaticResource PhoneDisabledBrush}" Height="100" Width="100" Margin="0,0,0,0" Click="NumberButton_Click"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="Log10" Content="Log10" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" MinWidth="90" MinHeight="100" Margin="0,0,0,0"/>
<Button x:Name="Loge" Content="Loge" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" MinWidth="90" MinHeight="100" Margin="0,0,0,0"/>
<!-- Evaluation of pi and point2 is left-->
<Button x:Name="e" Content="e" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneSemitransparentBrush}" Height="100" Width="100" Click="NumberButton_Click" MinWidth="90" MinHeight="100" Margin="0,0,0,0"/>
<Button Height="100" MinWidth="100" x:Name="Variable1" Content="y" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="{StaticResource PhoneTextBoxReadOnlyBrush}" Margin="0,0,0,0" Click="Variable1_Click_1"/>
</StackPanel>
</StackPanel>
</phone:PivotItem>
</phone:Pivot>
</Grid>
</phone:PhoneApplicationPage>