Add project files.
This commit is contained in:
32
OemanTrader.WPF/Controls/MajorIndexCard.xaml
Normal file
32
OemanTrader.WPF/Controls/MajorIndexCard.xaml
Normal file
@ -0,0 +1,32 @@
|
||||
<UserControl x:Class="OemanTrader.WPF.Controls.MajorIndexCard"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:OemanTrader.WPF.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Border BorderBrush="LightGray" BorderThickness="1" CornerRadius="10">
|
||||
<Grid Margin="10" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="{Binding Type, FallbackValue=Name}" FontSize="18" HorizontalAlignment="Center" />
|
||||
<Grid Grid.Row="1" Margin="0 10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Margin="5" Text="Price" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="5" HorizontalAlignment="Right" Text="{Binding Price, StringFormat={}{0:c}, FallbackValue=$0.00}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Margin="5" Text="Changes" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Margin="5" HorizontalAlignment="Right" Text="{Binding Changes, StringFormat={}{0:c}, FallbackValue=$0.00}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
28
OemanTrader.WPF/Controls/MajorIndexCard.xaml.cs
Normal file
28
OemanTrader.WPF/Controls/MajorIndexCard.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OemanTrader.WPF.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MajorIndexCard.xaml
|
||||
/// </summary>
|
||||
public partial class MajorIndexCard : UserControl
|
||||
{
|
||||
public MajorIndexCard()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
26
OemanTrader.WPF/Controls/MajorIndexListing.xaml
Normal file
26
OemanTrader.WPF/Controls/MajorIndexListing.xaml
Normal file
@ -0,0 +1,26 @@
|
||||
<UserControl x:Class="OemanTrader.WPF.Controls.MajorIndexListing"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:OemanTrader.WPF.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions >
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="Major Indexes" FontSize="18" />
|
||||
<Grid Grid.Row="1" Margin="0 10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:MajorIndexCard Grid.Column="0" Margin="10 0" DataContext="{Binding Nasdaq}" />
|
||||
<local:MajorIndexCard Grid.Column="1" Margin="10 0" DataContext="{Binding DowJones}" />
|
||||
<local:MajorIndexCard Grid.Column="2" Margin="10 0" DataContext="{Binding SP500}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
OemanTrader.WPF/Controls/MajorIndexListing.xaml.cs
Normal file
28
OemanTrader.WPF/Controls/MajorIndexListing.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OemanTrader.WPF.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MajorIndexListing.xaml
|
||||
/// </summary>
|
||||
public partial class MajorIndexListing : UserControl
|
||||
{
|
||||
public MajorIndexListing()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
OemanTrader.WPF/Controls/NavigationBar.xaml
Normal file
40
OemanTrader.WPF/Controls/NavigationBar.xaml
Normal file
@ -0,0 +1,40 @@
|
||||
<UserControl x:Class="OemanTrader.WPF.Controls.NavigationBar"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:OemanTrader.WPF.Controls"
|
||||
xmlns:nav="clr-namespace:OemanTrader.WPF.State.Navigators" d:DataContext="{d:DesignInstance Type=nav:Navigator}"
|
||||
xmlns:vm="clr-namespace:OemanTrader.WPF.ViewModels"
|
||||
xmlns:converters="clr-namespace:OemanTrader.WPF.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<converters:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Padding="10" FontSize="28" Text="Oeman Trader" Foreground="White" Background="{StaticResource BrushPrimary1}"/>
|
||||
<Grid Grid.Row="1" RenderOptions.EdgeMode="Aliased" Background="{StaticResource BrushPrimary2}">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="RadioButton" BasedOn="{StaticResource NavButton}"/>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<RadioButton Grid.Column="0" Content="Home" IsChecked="{Binding CurrentViewModel, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type vm:HomeViewModel}}"
|
||||
Command="{Binding UpdateCurrentViewModelCommand}"
|
||||
CommandParameter="{x:Static nav:ViewType.Home}" />
|
||||
<RadioButton Grid.Column="1" Content="Portfolio" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:ViewType.Portfolio}" />
|
||||
<RadioButton Grid.Column="2" Content="Buy" />
|
||||
<RadioButton Grid.Column="3" Content="Sell" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
OemanTrader.WPF/Controls/NavigationBar.xaml.cs
Normal file
28
OemanTrader.WPF/Controls/NavigationBar.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OemanTrader.WPF.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for NavigationBar.xaml
|
||||
/// </summary>
|
||||
public partial class NavigationBar : UserControl
|
||||
{
|
||||
public NavigationBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user