2024-09-25 V1.0.0.0
parent
e63d5a0095
commit
2541f3f8cc
@ -0,0 +1,50 @@
|
|||||||
|
<UserControl x:Class="Txgy.DataStat.Views.LoadDataFromFileView"
|
||||||
|
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:Txgy.DataStat.Views"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<StackPanel>
|
||||||
|
<WrapPanel HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<TextBlock Text="导入文件"
|
||||||
|
FontSize="24"
|
||||||
|
Margin="5" />
|
||||||
|
<TextBox Text="{Binding SelectedFilePath}"
|
||||||
|
Width="450"
|
||||||
|
Margin="5" />
|
||||||
|
<Button Content="..."
|
||||||
|
Width="80"
|
||||||
|
Margin="5"
|
||||||
|
Command="{Binding ChooseFileCommand}" />
|
||||||
|
<Button Content="导入"
|
||||||
|
Width="80"
|
||||||
|
Margin="5"
|
||||||
|
Command="{Binding LoadCitiesCommand}" />
|
||||||
|
</WrapPanel>
|
||||||
|
<WrapPanel HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<TextBlock Text="导出文件"
|
||||||
|
FontSize="24"
|
||||||
|
Margin="5" />
|
||||||
|
<TextBox Text="{Binding SaveFilePath}"
|
||||||
|
Width="450"
|
||||||
|
Margin="5" />
|
||||||
|
<Button Content="..."
|
||||||
|
Width="80"
|
||||||
|
Margin="5"
|
||||||
|
Command="{Binding ChooseSaveFileCommand}" />
|
||||||
|
<Button Content="导出"
|
||||||
|
Width="80"
|
||||||
|
Margin="5"
|
||||||
|
Command="{Binding SaveCitiesCommand}" />
|
||||||
|
</WrapPanel>
|
||||||
|
<WrapPanel >
|
||||||
|
<local:TestItemsSource ItemsSource="{Binding Cities}" />
|
||||||
|
</WrapPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
@ -1,16 +1,299 @@
|
|||||||
<Window x:Class="Txgy.DataStat.Views.MainWindow"
|
<Window xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
x:Class="Txgy.DataStat.Views.MainWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:vm="clr-namespace:Txgy.DataStat.ViewModels"
|
xmlns:vm="clr-namespace:Txgy.DataStat.ViewModels"
|
||||||
xmlns:local="clr-namespace:Txgy.DataStat"
|
xmlns:vms="clr-namespace:Txgy.DataStat.Models"
|
||||||
|
xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"
|
||||||
|
xmlns:local="clr-namespace:Txgy.DataStat.Views"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MainWindow" Height="450" Width="800">
|
Title="MainWindow"
|
||||||
|
Height="800"
|
||||||
|
Width="800"
|
||||||
|
WindowState="Maximized">
|
||||||
<Window.DataContext>
|
<Window.DataContext>
|
||||||
<vm:MainWindowViewModel />
|
<vm:MainWindowViewModel />
|
||||||
</Window.DataContext>
|
</Window.DataContext>
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBlock Text="{Binding Message}" FontSize="50"/>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="300" />
|
||||||
|
<ColumnDefinition />
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Margin="20,0,0,0" VerticalAlignment="Center" Background="AliceBlue">
|
||||||
|
<TextBlock Text="{Binding Message}"
|
||||||
|
FontSize="24" />
|
||||||
|
<GroupBox Header="FracData">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="数据行"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
<TextBox Text="{Binding FracReader.FirstDataRow}"
|
||||||
|
d:Text="3"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="1" />
|
||||||
|
<TextBlock Text="分隔符"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="2"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
<TextBox Text="{Binding FracReader.Separator}"
|
||||||
|
d:Text="TAB"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="3" />
|
||||||
|
<TextBlock Text="时间列"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
<TextBox Text="{Binding FracReader.TimeCol}"
|
||||||
|
d:Text="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="1" />
|
||||||
|
<TextBlock Text="井口压力列"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="2"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
<TextBox Text="{Binding FracReader.SurPreCol}"
|
||||||
|
d:Text="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="3" />
|
||||||
|
|
||||||
|
<TextBlock Text="套管压力列"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
<TextBox Text="{Binding FracReader.CasingPreCol}"
|
||||||
|
d:Text="2"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="1" />
|
||||||
|
<TextBlock Text="流量"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="2"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
<TextBox Text="{Binding FracReader.SlurryRateCol}"
|
||||||
|
d:Text="7"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="3" />
|
||||||
|
|
||||||
|
<TextBlock Text="小数点"
|
||||||
|
Grid.Row="3"
|
||||||
|
Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
<TextBox Text="{Binding FracReader.DPoint}"
|
||||||
|
d:Text="."
|
||||||
|
Grid.Row="3"
|
||||||
|
Grid.Column="1" />
|
||||||
|
<CheckBox Content="绝对时刻"
|
||||||
|
IsChecked="{Binding FracReader.AbsoluteTime}"
|
||||||
|
Grid.Row="3"
|
||||||
|
Grid.Column="2" />
|
||||||
|
<Button Content="导入"
|
||||||
|
Command="{Binding InputFracDataCommand}"
|
||||||
|
Grid.Column="3"
|
||||||
|
Grid.Row="3" />
|
||||||
|
<TextBlock Text="文件"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
<TextBox Text="{Binding FracReader.FilePath}"
|
||||||
|
d:Text="c:\\1.txt"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.ColumnSpan="2" />
|
||||||
|
<Button Content="..."
|
||||||
|
Command="{Binding SelectFracFileCommand}"
|
||||||
|
Grid.Column="3"
|
||||||
|
Grid.Row="4" />
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
<GroupBox Header="pos" Margin="0,10,0,0">
|
||||||
|
<StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="PosFile"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<TextBox Width="200"
|
||||||
|
Text="{Binding PosFilePath}" />
|
||||||
|
<Button Content="..."
|
||||||
|
Command="{Binding SelectPosFileCommand}" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Button Content="统计"
|
||||||
|
Width="80"
|
||||||
|
Command="{Binding CountEventFrequencyCommand}" />
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</GroupBox>
|
||||||
|
<GroupBox Header="DrawConfig"
|
||||||
|
Margin="0,10,0,0">
|
||||||
|
<StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="开始时间"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Width="50" />
|
||||||
|
<TextBox Width="80"
|
||||||
|
Text="{Binding StartTime}" />
|
||||||
|
<TextBlock Text="统计间隔"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Width="50"
|
||||||
|
Margin="10,0,0,0" />
|
||||||
|
<ComboBox Margin="5,0,0,0"
|
||||||
|
ItemsSource="{Binding Path=TimeUnits}"
|
||||||
|
SelectedItem="{Binding TimeUnitSelected}"
|
||||||
|
Width="80" />
|
||||||
|
<!--<TextBlock Text="秒"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Width="50" />-->
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
Margin="0,5,0,0">
|
||||||
|
<TextBlock Text="结束时间"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Width="50" />
|
||||||
|
<TextBox Width="80"
|
||||||
|
Text="{Binding EndTime}" />
|
||||||
|
<TextBlock Text="井号"
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Width="50" />
|
||||||
|
<TextBox Margin="5,0,0,0"
|
||||||
|
Text="{Binding WellName}"
|
||||||
|
Width="80" />
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<GroupBox Header="YAxis"
|
||||||
|
Margin="0,10,0,0">
|
||||||
|
<StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="EventFreq"
|
||||||
|
Margin="5,0,5,0"
|
||||||
|
Width="60"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<CheckBox Content="Visible"
|
||||||
|
IsChecked="{Binding YAxes[0].IsVisible}" />
|
||||||
|
<TextBlock Text="最大值"
|
||||||
|
Margin="10,0,10,0"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<hc:NumericUpDown Minimum="3"
|
||||||
|
Maximum="20"
|
||||||
|
Increment="1"
|
||||||
|
Width="80"
|
||||||
|
Value="{Binding YAxes[0].MaxLimit}" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
Margin="0,5,0,0">
|
||||||
|
<TextBlock Text="Surface"
|
||||||
|
Margin="5,0,5,0"
|
||||||
|
Width="60"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<CheckBox Content="Visible"
|
||||||
|
IsChecked="{Binding YAxes[1].IsVisible}" />
|
||||||
|
<TextBlock Text="最大值"
|
||||||
|
Margin="10,0,10,0"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<hc:NumericUpDown Minimum="0"
|
||||||
|
Maximum="2000"
|
||||||
|
Increment="50"
|
||||||
|
Width="80"
|
||||||
|
Value="{Binding YAxes[1].MaxLimit}" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
Margin="0,5,0,0">
|
||||||
|
<TextBlock Text="Casing"
|
||||||
|
Margin="5,0,5,0"
|
||||||
|
Width="60"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<CheckBox Content="Visible"
|
||||||
|
IsChecked="{Binding YAxes[2].IsVisible}" />
|
||||||
|
<TextBlock Text="最大值"
|
||||||
|
Margin="10,0,10,0"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<hc:NumericUpDown Minimum="0"
|
||||||
|
Maximum="2000"
|
||||||
|
Increment="50"
|
||||||
|
Width="80"
|
||||||
|
Value="{Binding YAxes[2].MaxLimit}" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
Margin="0,5,0,0">
|
||||||
|
<TextBlock Text="Slurry"
|
||||||
|
Margin="5,0,5,0"
|
||||||
|
Width="60"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<CheckBox Content="Visible"
|
||||||
|
IsChecked="{Binding YAxes[3].IsVisible}" />
|
||||||
|
<TextBlock Text="最大值"
|
||||||
|
Margin="10,0,10,0"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<hc:NumericUpDown Minimum="1"
|
||||||
|
Maximum="20"
|
||||||
|
Increment="1"
|
||||||
|
Width="80"
|
||||||
|
Value="{Binding YAxes[3].MaxLimit}" />
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</GroupBox>
|
||||||
|
</StackPanel>
|
||||||
|
<Grid Grid.Column="1">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="40" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock x:Name="tbChartTitle"
|
||||||
|
Text="{Binding WellName,StringFormat=KKM-{0} Fracturing Trends vs Microseismic Frequency}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
FontSize="28"
|
||||||
|
FontFamily="微软雅黑"
|
||||||
|
FontWeight="Bold" />
|
||||||
|
<lvc:CartesianChart Series="{Binding Series}"
|
||||||
|
YAxes="{Binding YAxes}"
|
||||||
|
LegendPosition="Top"
|
||||||
|
LegendBackgroundPaint="{Binding LedgendBackgroundPaint}"
|
||||||
|
LegendTextPaint="{Binding LegendTextPaint}"
|
||||||
|
LegendTextSize="16"
|
||||||
|
XAxes="{Binding XAxis}"
|
||||||
|
TooltipPosition="Hidden"
|
||||||
|
ZoomMode="X"
|
||||||
|
Grid.Row="1">
|
||||||
|
<!--<lvc:CartesianChart.Legend>
|
||||||
|
<vms:CustomLegend/>
|
||||||
|
</lvc:CartesianChart.Legend>-->
|
||||||
|
</lvc:CartesianChart>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Column="2">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<!--<local:UserControlA />
|
||||||
|
<local:UserControlB Grid.Row="1"/>
|
||||||
|
<local:LoadDataFromFileView Grid.Row="2" />-->
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
<UserControl x:Class="Txgy.DataStat.Views.UserControlA"
|
||||||
|
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:Txgy.DataStat.Views"
|
||||||
|
xmlns:vm="clr-namespace:Txgy.DataStat.ViewModels"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<DataGrid ItemsSource="{Binding Cities}">
|
||||||
|
|
||||||
|
</DataGrid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
@ -0,0 +1,14 @@
|
|||||||
|
<UserControl x:Class="Txgy.DataStat.Views.UserControlB"
|
||||||
|
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:Txgy.DataStat.Views"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<DataGrid ItemsSource="{Binding Cities}">
|
||||||
|
|
||||||
|
</DataGrid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
Loading…
Reference in New Issue