164 lines
7.3 KiB
Plaintext
164 lines
7.3 KiB
Plaintext
|
<Window x:Class="GraphingCalculator.MainWindow"
|
||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
xmlns:my="clr-namespace:GraphingCalculator"
|
||
|
Title="Graphing Calculator" Height="526" Width="891"
|
||
|
MouseWheel="Window_MouseWheel"
|
||
|
KeyDown="Window_KeyDown" Icon="/GraphingCalculator;component/graphing-logo.ico">
|
||
|
|
||
|
<Window.Resources>
|
||
|
<ResourceDictionary>
|
||
|
<ResourceDictionary.MergedDictionaries>
|
||
|
<ResourceDictionary Source="Styles\GroupBoxStyle.xaml" />
|
||
|
<ResourceDictionary Source="Styles\ButtonStyle.xaml" />
|
||
|
</ResourceDictionary.MergedDictionaries>
|
||
|
</ResourceDictionary>
|
||
|
</Window.Resources>
|
||
|
|
||
|
<Grid>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition Height="Auto" />
|
||
|
<RowDefinition Height="Auto" />
|
||
|
<RowDefinition />
|
||
|
</Grid.RowDefinitions>
|
||
|
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition Width="200px" />
|
||
|
<ColumnDefinition Width="5px" />
|
||
|
<ColumnDefinition />
|
||
|
</Grid.ColumnDefinitions>
|
||
|
|
||
|
<Menu Grid.ColumnSpan="100">
|
||
|
<MenuItem Header="_File">
|
||
|
<MenuItem Name="menuFileSave" Header="Save plotted expressions..."
|
||
|
Click="menuFileSave_Click" InputGestureText="Ctrl+S"/>
|
||
|
<MenuItem Name="menuFileImport" Header="Import..."
|
||
|
Click="menuFileImport_Click" InputGestureText="Ctrl+O"/>
|
||
|
<Separator />
|
||
|
<MenuItem Name="menuFileExit" Header="Exit" Click="menuFileExit_Click"
|
||
|
InputGestureText="Ctrl+Q"/>
|
||
|
</MenuItem>
|
||
|
|
||
|
<MenuItem Header="_Application">
|
||
|
<MenuItem Name="menuAppLog" Header="View log..." Click="menuAppLog_Click"/>
|
||
|
<MenuItem Name="menuAppPref" Header="Preferences" Click="menuAppPref_Click" />
|
||
|
</MenuItem>
|
||
|
|
||
|
<MenuItem Header="_Help">
|
||
|
<MenuItem Name="menuAbout" Header="_About" Click="menuAbout_Click"
|
||
|
InputGestureText="Ctrl+F1"/>
|
||
|
<MenuItem Name="menuHelp" Header="_Help" Click="menuHelp_Click"
|
||
|
InputGestureText="F1"/>
|
||
|
|
||
|
</MenuItem>
|
||
|
</Menu>
|
||
|
|
||
|
<Border Grid.Row="2" Grid.Column="0">
|
||
|
<Border.Background>
|
||
|
<LinearGradientBrush StartPoint="0,0" EndPoint=".5,1">
|
||
|
<GradientStop Color="#EEE" Offset="0" />
|
||
|
<GradientStop Color="#BBB" Offset="1" />
|
||
|
</LinearGradientBrush>
|
||
|
</Border.Background>
|
||
|
|
||
|
<Grid>
|
||
|
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition Height="Auto" />
|
||
|
<RowDefinition />
|
||
|
<RowDefinition Height="Auto" />
|
||
|
</Grid.RowDefinitions>
|
||
|
|
||
|
<!-- Input box -->
|
||
|
<GroupBox Header="Input" Grid.Row="0">
|
||
|
<Grid>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition />
|
||
|
<RowDefinition Height="Auto" />
|
||
|
<RowDefinition Height="Auto" />
|
||
|
</Grid.RowDefinitions>
|
||
|
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition />
|
||
|
<ColumnDefinition />
|
||
|
<ColumnDefinition />
|
||
|
</Grid.ColumnDefinitions>
|
||
|
|
||
|
<TextBox Name="inputExpression"
|
||
|
TextWrapping="Wrap" Height="50px"
|
||
|
Grid.ColumnSpan="10" Margin="0,0,0,1" />
|
||
|
|
||
|
<Button Name="buttonPlot" Grid.Row="1" Grid.Column="0" Click="buttonPlot_Click">Plot</Button>
|
||
|
<Button Name="buttonEvaluate" Grid.Row="1" Grid.Column="1" Click="buttonEvaluate_Click">Evaluate</Button>
|
||
|
<Button Name="buttonIntegrate" Grid.Row="1" Grid.Column="2" Click="buttonIntegrate_Click">Integrate</Button>
|
||
|
|
||
|
</Grid>
|
||
|
</GroupBox>
|
||
|
|
||
|
<!-- Plotted functions list -->
|
||
|
<GroupBox Header="Plotted expressions" Grid.Row="1">
|
||
|
<Grid>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition />
|
||
|
<RowDefinition Height="Auto" />
|
||
|
</Grid.RowDefinitions>
|
||
|
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition />
|
||
|
<ColumnDefinition />
|
||
|
<ColumnDefinition />
|
||
|
</Grid.ColumnDefinitions>
|
||
|
|
||
|
<ListBox Name="listExpressions" Grid.ColumnSpan="10" Margin="0,0,0,1"/>
|
||
|
|
||
|
<Button Name="buttonDelete" Grid.Row="1" Grid.Column="0" Click="buttonDelete_Click">Delete</Button>
|
||
|
<Button Name="buttonClear" Grid.Row="1" Grid.Column="1" Click="buttonClear_Click">Clear</Button>
|
||
|
<Button Name="buttonHideAll" Grid.Row="1" Grid.Column="2" Click="buttonHideAll_Click">Hide all</Button>
|
||
|
|
||
|
</Grid>
|
||
|
|
||
|
</GroupBox>
|
||
|
|
||
|
|
||
|
<!-- Range box -->
|
||
|
<GroupBox Header="Range" Grid.Row="2">
|
||
|
<Grid>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition />
|
||
|
<RowDefinition />
|
||
|
<RowDefinition />
|
||
|
<RowDefinition />
|
||
|
<RowDefinition Height="Auto" />
|
||
|
</Grid.RowDefinitions>
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition Width="*" />
|
||
|
<ColumnDefinition Width="2*"/>
|
||
|
</Grid.ColumnDefinitions>
|
||
|
|
||
|
<TextBlock Grid.Row="0" VerticalAlignment="Center">Bottom:</TextBlock>
|
||
|
<TextBlock Grid.Row="1" VerticalAlignment="Center">Left:</TextBlock>
|
||
|
<TextBlock Grid.Row="2" VerticalAlignment="Center">Top:</TextBlock>
|
||
|
<TextBlock Grid.Row="3" VerticalAlignment="Center">Right:</TextBlock>
|
||
|
|
||
|
<TextBox Name="inputBoundsBottom" Grid.Column="1" Grid.Row="0" />
|
||
|
<TextBox Name="inputBoundsLeft" Grid.Column="1" Grid.Row="1" />
|
||
|
<TextBox Name="inputBoundsTop" Grid.Column="1" Grid.Row="2" />
|
||
|
<TextBox Name="inputBoundsRight" Grid.Column="1" Grid.Row="3" />
|
||
|
|
||
|
<Button Name="buttonChangeBounds" Margin="1,2,1,1"
|
||
|
Grid.Row="4" Grid.ColumnSpan="10"
|
||
|
Click="buttonChangeBounds_Click">Change</Button>
|
||
|
|
||
|
|
||
|
</Grid>
|
||
|
</GroupBox>
|
||
|
</Grid>
|
||
|
</Border>
|
||
|
|
||
|
<GridSplitter Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||
|
|
||
|
<my:GraphingCanvas x:Name="graphingCanvas" Grid.Column="2" Grid.Row="2" />
|
||
|
|
||
|
</Grid>
|
||
|
</Window>
|