192 lines
8.6 KiB
XML
192 lines
8.6 KiB
XML
<UserControl
|
|
x:Class="WolfOfWallStreet.Views.Controllers.MofidOnlineController"
|
|
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="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<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: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}" />
|
|
</hc:ButtonGroup>
|
|
<StackPanel Grid.Row="2" Margin="0,10">
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="Cookies"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=MoOrder.Cookies, Mode=TwoWay}" />
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="isin"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=MofidOnlineSymbol.nc}" />
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="قیمت"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=MofidOnlineSymbol.ht}" />
|
|
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Margin="10,10,0,10"
|
|
hc:InfoElement.Placeholder="تعداد"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=MofidOnlineSymbol.Quantity}" />
|
|
</Grid>
|
|
<TextBox
|
|
Margin="0,10"
|
|
hc:InfoElement.Placeholder="نام دقیق نماد"
|
|
Style="{StaticResource TextBoxExtend}"
|
|
Text="{Binding Path=MofidOnlineSymbol.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="3" helper:ScrollHelper.AutoScroll="True">
|
|
<ItemsControl HorizontalAlignment="Center" ItemsSource="{Binding OrderResults}">
|
|
<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 Value}"
|
|
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>
|