math-suite/Source/GraphingCalculator/Controls/EvaluateWindow.xaml

102 lines
4.4 KiB
XML

<Window x:Class="GraphingCalculator.EvaluateWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Evaluate expression" Height="251" Width="471" WindowStartupLocation="CenterScreen"
WindowStyle="ToolWindow" SnapsToDevicePixels="True"
KeyUp="Window_KeyUp">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Styles/GroupBoxStyle.xaml" />
<ResourceDictionary Source="/Styles/ButtonStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Window.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint=".5,1">
<GradientStop Color="#EEE" Offset="0" />
<GradientStop Color="#BBB" Offset="1" />
</LinearGradientBrush>
</Window.Background>
<Grid Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="5"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GridSplitter Grid.Column="1" Grid.Row="0" Background="Transparent"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
<GroupBox Header="Input expression" Margin="0,0,-3,0">
<TextBox Name="inputExpression" TextWrapping="Wrap"/>
</GroupBox>
<GroupBox Grid.Column="2" Header="Variables" Margin="-3,0,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ListBox Name="listVars" Grid.ColumnSpan="100" Margin="0,0,0,2">
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Edit" Click="contextEdit_Click"/>
<MenuItem Header="Delete" Click="contextDelete_Click" />
<MenuItem Header="Clear list" Click="contextClear_Click" />
</ContextMenu>
</ListBox.ContextMenu>
</ListBox>
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">Name:</TextBlock>
<TextBox Name="inputVarName" Grid.Row="1" Grid.Column="1" />
<TextBlock Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" Margin="3,0,0,0">Value:</TextBlock>
<TextBox Name="inputVarValue" Grid.Row="1" Grid.Column="3" />
<Button VerticalAlignment="Center" Name="buttonAdd"
Grid.Row="1" Grid.Column="4" Margin="3,0,0,0"
Click="buttonAdd_Click">Add</Button>
</Grid>
</GroupBox>
<GroupBox Grid.Row="1" Grid.ColumnSpan="3" Header="Result">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBox Name="outputResult" Grid.ColumnSpan="2" IsReadOnly="True" Background="White"
Margin="0,0,0,2"/>
<Button Name="buttonClose" Grid.Row="1" Grid.Column="1" Width="80" Margin="2"
HorizontalAlignment="Left" Click="buttonClose_Click">Close</Button>
<Button Name="buttonEval" Grid.Row="1" Width="80" Margin="2"
HorizontalAlignment="Right" Click="buttonEval_Click">Evaluate</Button>
</Grid>
</GroupBox>
</Grid>
</Window>