<UserControl x:Class="BOB.Views.MonitorView"
             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:i="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:vs="clr-namespace:BOB.Views"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:oxy="http://oxyplot.org/wpf"
             mc:Ignorable="d"
             xmlns:prism="http://prismlibrary.com/"
             prism:ViewModelLocator.AutoWireViewModel="True"
             d:DesignHeight="1080"
             d:DesignWidth="1920">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        
        <GroupBox Header="自定义监视曲线"
                  Grid.Row="0"
                  Margin="5"
                  Padding="0">
            <oxy:PlotView x:Name="CustomPlotView"
                          
                          Model="{Binding CurveModel}"
                          Background="Transparent">
                <oxy:PlotView.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="视图复位"
                                  Command="{Binding ResetViewCommand}" />
                        
                    </ContextMenu>
                </oxy:PlotView.ContextMenu>
            </oxy:PlotView>
        </GroupBox>


        <GroupBox Header="编辑曲线"
                  Grid.Row="1"
                  Margin="5"
                  Padding="0"
                  Height="120">
            <Grid>
                <!-- 创建4个列来平分区域 -->
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <!-- 第一个 StackPanel -->
                    <ColumnDefinition Width="*" />
                    <!-- 第二个 StackPanel -->
                    <ColumnDefinition Width="*" />
                    <!-- 第三个 StackPanel -->
                    <ColumnDefinition Width="*" />
                    <!-- 第四个 StackPanel -->
                </Grid.ColumnDefinitions>

                <!-- 第一个 StackPanel - 曲线名称和添加曲线按钮 -->
                <StackPanel Orientation="Horizontal"
                            Grid.Column="0"
                            Margin="30 10">
                    <TextBlock Text="曲线名称:"
                               VerticalAlignment="Center" />
                    <ComboBox Name="SignalComboBox"
                              SelectedItem="{Binding SelectCurve,Mode=TwoWay}"
                              MaxWidth="200"
                              MinWidth="120"
                              Margin="10"
                              ItemsSource="{Binding DeviceSingleList}"
                              VerticalAlignment="Center"
                              materialDesign:HintAssist.Hint="曲线名称" />

                    <Button Content="添加曲线"
                            Height="40"
                            Command="{Binding AddSignalCommand}"
                            Margin="10,0,10,0" />
                </StackPanel>

                <!-- 第二个 StackPanel - 已有曲线和删除曲线按钮 -->
                <StackPanel Orientation="Horizontal"
                            Grid.Column="1"
                            Margin="30 10">
                    <TextBlock Text="已有曲线:"
                               materialDesign:HintAssist.Hint="已有曲线"
                               VerticalAlignment="Center" />
                    <ComboBox  MaxWidth="200"
                               MinWidth="120"
                               SelectedItem="{Binding SelectDeleteCurve,Mode=TwoWay}"
                               Margin="10"
                               ItemsSource="{Binding CurSingleList}"
                               materialDesign:HintAssist.Hint="已有曲线"
                               VerticalAlignment="Center" />


                    <Button Content="删除曲线"
                            Height="40"
                            Command="{Binding RemoveSignalCommand}"
                            Margin="10,0,10,0" />
                </StackPanel>

                <!-- 第三个 StackPanel - 曲线默认保存路径 -->
                <StackPanel Orientation="Horizontal"
                            Grid.Column="2"
                            Margin="30 10">
                    <TextBlock Text="曲线保存路径:"
                               VerticalAlignment="Center" />
                    <TextBlock Text="{Binding FilePath}"
                               MaxWidth="200"
                               MinWidth="90"
                               Margin="15 0"
                               VerticalAlignment="Center"
                               Cursor="" />
                    <Button Content="更改"
                            Command="{Binding ChanegPathCommand}" />
                </StackPanel>

                <!-- 第四个 StackPanel - 保存时间选中 -->
                <StackPanel Orientation="Horizontal"
                            Grid.Column="3"
                            Margin="30 10">
                    <TextBlock Text="保存时间选中:"
                               VerticalAlignment="Center" />
                    <TextBox  MaxWidth="100"
                              MinWidth="60"
                              Margin="10"
                              Text="{Binding SelectedSaveDays,Mode=TwoWay}"
                              VerticalAlignment="Center"
                              materialDesign:HintAssist.Hint="保存天数" />
                    <Button Content="保存"
                            Command="{Binding SaveCommand}" />
                </StackPanel>

            </Grid>
        </GroupBox>


    </Grid>
</UserControl>
