199 lines
8.7 KiB
XML
199 lines
8.7 KiB
XML
<UserControl
|
|
x:Class="WolfOfWallStreet.Views.Controllers.EasyTraderController"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:helper="clr-namespace:WolfOfWallStreet.Helper"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
FlowDirection="RightToLeft">
|
|
|
|
<Grid>
|
|
|
|
<Grid Grid.Column="0" Margin="10,10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<hc:ScrollViewer
|
|
Grid.Row="0"
|
|
Padding="0,15"
|
|
HorizontalScrollBarVisibility="Visible"
|
|
Orientation="Horizontal">
|
|
<ItemsControl ItemsSource="{Binding Symbols}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
|
|
<hc:Tag
|
|
Margin="4,0"
|
|
Padding="25,0"
|
|
Content="{Binding SymbolName}"
|
|
Selectable="True"
|
|
Selected="SymbolTag_OnSelected"
|
|
ShowCloseButton="False" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</hc:ScrollViewer>
|
|
|
|
<StackPanel Grid.Row="1" Margin="0,10">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="0" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="Auth"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=Auth}" />
|
|
</Grid>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="ایمیل"
|
|
IsReadOnly="True"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=Email}"
|
|
TextAlignment="Center" />
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Margin="5,10,0,10"
|
|
hc:InfoElement.Placeholder="شماره تلفن"
|
|
IsReadOnly="True"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=PhoneNumber}"
|
|
TextAlignment="Center" />
|
|
</Grid>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="100" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="isin"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=EasyTraderDraft.isin}" />
|
|
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Margin="5,10,0,10"
|
|
hc:InfoElement.Placeholder="نام سهم"
|
|
IsReadOnly="True"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=EasyTraderDraft.stockSymbol}"
|
|
TextAlignment="Center" />
|
|
</Grid>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="قیمت"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=EasyTraderDraft.price}" />
|
|
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Margin="10,10,0,10"
|
|
hc:InfoElement.Placeholder="تعداد"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=EasyTraderDraft.quantity}" />
|
|
</Grid>
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="نام دقیق نماد"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=EasyTraderDraft.stockSymbol}" />
|
|
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<Button
|
|
Padding="35,0"
|
|
Command="{Binding SendOrderCommand}"
|
|
Content="شروع ارسال سفارش"
|
|
Style="{StaticResource ButtonInfo}" />
|
|
|
|
<Button
|
|
Margin="10,0,0,0"
|
|
Padding="35,0"
|
|
Command="{Binding StopOrderCommand}"
|
|
Content="پایان"
|
|
Style="{StaticResource ButtonDanger}" />
|
|
|
|
<Button
|
|
Margin="10,0,0,0"
|
|
Padding="35,0"
|
|
Command="{Binding ClearOrdersCommand}"
|
|
Content="پاک کردن لیست"
|
|
Style="{StaticResource ButtonWarning}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<hc:ScrollViewer Grid.Row="2" helper:ScrollHelper.AutoScroll="True">
|
|
<ItemsControl ItemsSource="{Binding Results}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<materialDesign:Card
|
|
Width="200"
|
|
Height="250"
|
|
Margin="8"
|
|
Padding="8"
|
|
Background="#eee"
|
|
UniformCornerRadius="8">
|
|
<StackPanel>
|
|
<StackPanel Margin="0,10">
|
|
<TextBlock HorizontalAlignment="Center" Text="پیغام" />
|
|
<TextBlock HorizontalAlignment="Center" Text="{Binding message}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="0,10">
|
|
<TextBlock HorizontalAlignment="Center" Text="پیغام ثبت سفارش" />
|
|
<TextBlock HorizontalAlignment="Center" Text="{Binding omsErrorDescription}" />
|
|
</StackPanel>
|
|
|
|
|
|
<StackPanel Margin="0,10">
|
|
<TextBlock HorizontalAlignment="Center" Text="تاریخ : " />
|
|
<TextBlock HorizontalAlignment="Center" Text="{Binding orderEntryDate}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="0,10">
|
|
<TextBlock HorizontalAlignment="Center" Text="تاریخ : " />
|
|
<TextBlock HorizontalAlignment="Center" Text="{Binding orderEntryDate}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</materialDesign:Card>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</hc:ScrollViewer>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|