iWOWS/WolfOfWallStreet/Views/Controllers/OnlinePlusController.xaml

217 lines
9.8 KiB
XML

<UserControl
x:Class="WolfOfWallStreet.Views.Controllers.OnlinePlusController"
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:models="clr-namespace:WolfOfWallStreet.Models"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
FlowDirection="RightToLeft">
<Grid Margin="10,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Margin="0,10">
<hc:ButtonGroup Grid.Row="1" Style="{StaticResource ButtonGroupSolid}">
<RadioButton
Checked="StackToggleButton_OnChecked"
Content="500 هزاری"
DataContext="{x:Static models:Stock.PoonsadHezari}" />
<RadioButton
Checked="StackToggleButton_OnChecked"
Content="1 ملیونی"
DataContext="{x:Static models:Stock.YekMelioni}"
IsChecked="True" />
<RadioButton
Checked="StackToggleButton_OnChecked"
Content="1.5 ملیونی"
DataContext="{x:Static models:Stock.YekONimMelioni}" />
<RadioButton
Checked="StackToggleButton_OnChecked"
Content="2 ملیونی"
DataContext="{x:Static models:Stock.DoMelioni}" />
<RadioButton
Checked="StackToggleButton_OnChecked"
Content="2.5 ملیون"
DataContext="{x:Static models:Stock.DoONimMelioni}" />
<RadioButton
Checked="StackToggleButton_OnChecked"
Content="3 ملیون"
DataContext="{x:Static models:Stock.SeMelioni}" />
</hc:ButtonGroup>
<TextBox
Margin="0,10"
hc:InfoElement.Placeholder="Cookies"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=Cookies, Mode=TwoWay}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBox
Margin="0,10"
hc:InfoElement.Placeholder="نام"
IsReadOnly="True"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=Account.email}"
TextAlignment="Center" />
<TextBox
Grid.Column="1"
Margin="5,10,0,10"
hc:InfoElement.Placeholder="ایمیل"
IsReadOnly="True"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=Account.Title}"
TextAlignment="Center" />
</Grid>
<TextBox
Margin="0,10"
hc:InfoElement.Placeholder="isin"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=OnlinePlusSymbol.symbolinfo.nc}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBox
Margin="0,10"
hc:InfoElement.Placeholder="قیمت"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=OnlinePlusSymbol.symbolinfo.ht}" />
<TextBox
Grid.Column="1"
Margin="10,10,0,10"
hc:InfoElement.Placeholder="تعداد"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=OnlinePlusSymbol.Quantity}" />
</Grid>
<TextBox
Margin="0,10"
hc:InfoElement.Placeholder="نام دقیق نماد"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=OnlinePlusSymbol.symbolinfo.est}" />
<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="0"
Padding="0,0,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>
<hc:ScrollViewer Grid.Row="2" helper:ScrollHelper.AutoScroll="True">
<ItemsControl ItemsSource="{Binding PlusOrderResults}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<materialDesign:Card
Width="200"
Height="220"
Margin="8"
Padding="8"
Background="{Binding StatusColor}"
Foreground="White"
UniformCornerRadius="8">
<StackPanel VerticalAlignment="Center">
<StackPanel Margin="0,10">
<TextBlock
HorizontalAlignment="Center"
FontFamily="{StaticResource ShabnamBold}"
FontSize="15"
Text="موفقیت امیز"
TextAlignment="Center" />
<TextBlock
HorizontalAlignment="Center"
Text="{Binding IsSuccessStr}"
TextWrapping="Wrap" />
</StackPanel>
<StackPanel Margin="0,10">
<TextBlock
HorizontalAlignment="Center"
FontFamily="{StaticResource ShabnamBold}"
FontSize="15"
Text="پیغام"
TextAlignment="Center" />
<TextBlock
HorizontalAlignment="Center"
Text="{Binding MessageDesc}"
TextAlignment="Center"
TextWrapping="Wrap" />
</StackPanel>
<StackPanel Margin="0,10">
<TextBlock
HorizontalAlignment="Center"
FontFamily="{StaticResource ShabnamBold}"
FontSize="15"
Text="زمان دریافت"
TextAlignment="Center" />
<TextBlock
HorizontalAlignment="Center"
Text="{Binding GetDateTimeStr}"
TextAlignment="Center"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</materialDesign:Card>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</hc:ScrollViewer>
</Grid>
</UserControl>