@@ -538,6 +538,7 @@ | |||||
<Setter Property="SelectedDateFormat" Value="Short" /> | <Setter Property="SelectedDateFormat" Value="Short" /> | ||||
<Setter Property="Background" Value="Transparent" /> | <Setter Property="Background" Value="Transparent" /> | ||||
<Setter Property="Padding" Value="2" /> | <Setter Property="Padding" Value="2" /> | ||||
<Setter Property="Height" Value="24"/> | |||||
<Setter Property="BorderBrush" Value="#08335f" /> | <Setter Property="BorderBrush" Value="#08335f" /> | ||||
<Setter Property="BorderThickness" Value="1" /> | <Setter Property="BorderThickness" Value="1" /> | ||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> | <Setter Property="HorizontalContentAlignment" Value="Stretch" /> | ||||
@@ -558,11 +559,11 @@ | |||||
<ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}"> | <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}"> | ||||
<Grid> | <Grid> | ||||
<Grid | <Grid | ||||
Width="19" | |||||
Height="18" | |||||
Margin="0" | |||||
Width="15" | |||||
Height="15" | |||||
Margin="0,2,0,0" | |||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
VerticalAlignment="Center" | |||||
VerticalAlignment="Top" | |||||
Background="#11FFFFFF" | Background="#11FFFFFF" | ||||
FlowDirection="LeftToRight"> | FlowDirection="LeftToRight"> | ||||
<Grid.ColumnDefinitions> | <Grid.ColumnDefinitions> | ||||
@@ -27,21 +27,40 @@ namespace BPASmartClient.ViewModel | |||||
/// <summary> | /// <summary> | ||||
/// 选中变量 | /// 选中变量 | ||||
/// </summary> | /// </summary> | ||||
private bool _selectCombox = true; | |||||
public bool SelectCombox | |||||
private string _SelectCombox; | |||||
public string SelectCombox | |||||
{ | { | ||||
get | get | ||||
{ | { | ||||
return _selectCombox; | |||||
return _SelectCombox; | |||||
} | } | ||||
set | set | ||||
{ | { | ||||
if (_selectCombox == value) | |||||
if (_SelectCombox == value) | |||||
return; | return; | ||||
_selectCombox = value; | |||||
_SelectCombox = value; | |||||
OnPropertyChanged("SelectCombox"); | OnPropertyChanged("SelectCombox"); | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 时间条件 | |||||
/// </summary> | |||||
private DateTime _DateTime; | |||||
public DateTime DateTimeStr | |||||
{ | |||||
get | |||||
{ | |||||
return _DateTime; | |||||
} | |||||
set | |||||
{ | |||||
if (_DateTime == value) | |||||
return; | |||||
_DateTime = value; | |||||
OnPropertyChanged("DateTimeStr"); | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region Command | #region Command | ||||
@@ -52,6 +71,7 @@ namespace BPASmartClient.ViewModel | |||||
#region 函数 | #region 函数 | ||||
public void Init() | public void Init() | ||||
{ | { | ||||
DateTimeStr = DateTime.Now; | |||||
QueryCommand = new RelayCommand(() => | QueryCommand = new RelayCommand(() => | ||||
{ | { | ||||
@@ -20,7 +20,7 @@ | |||||
<Grid> | <Grid> | ||||
<Grid.RowDefinitions> | <Grid.RowDefinitions> | ||||
<RowDefinition Height="45" /> | <RowDefinition Height="45" /> | ||||
<RowDefinition /> | |||||
<RowDefinition Height="*" /> | |||||
</Grid.RowDefinitions> | </Grid.RowDefinitions> | ||||
<!-- 查询按钮栏 --> | <!-- 查询按钮栏 --> | ||||
@@ -31,10 +31,9 @@ | |||||
<ComboBoxItem Tag="Error">错误日志</ComboBoxItem> | <ComboBoxItem Tag="Error">错误日志</ComboBoxItem> | ||||
<ComboBoxItem Tag="DeviceAlarm">设备告警</ComboBoxItem> | <ComboBoxItem Tag="DeviceAlarm">设备告警</ComboBoxItem> | ||||
</ComboBox> | </ComboBox> | ||||
<TextBox Width="100"></TextBox> | |||||
<DatePicker HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,0,10,0"></DatePicker> | |||||
<Button Margin="10,0,0,0" Cursor="Hand" Command="{Binding QueryCommand}">查询</Button> | |||||
<Button Margin="10,0,0,0" Cursor="Hand" Command="{Binding OpenCommand}">源文件</Button> | |||||
<DatePicker Margin="10,0,10,0" Text="{Binding DateTimeStr,Mode=TwoWay,NotifyOnTargetUpdated=True}"></DatePicker> | |||||
<Button Margin="10,0,0,0" Cursor="Hand" Command="{Binding QueryCommand}" Style="{DynamicResource CommonBtn_返回}" Width="75">查询数据</Button> | |||||
<Button Margin="10,0,0,0" Cursor="Hand" Command="{Binding OpenCommand}" Style="{DynamicResource CommonBtn_返回}" Width="102">打开文件目录</Button> | |||||
</StackPanel> | </StackPanel> | ||||
<!-- 表格栏 --> | <!-- 表格栏 --> | ||||
@@ -27,8 +27,8 @@ | |||||
<StackPanel Orientation="Horizontal" Margin="10,0,10,0"> | <StackPanel Orientation="Horizontal" Margin="10,0,10,0"> | ||||
<!--<CheckBox Margin="10,0,0,0" IsChecked="{Binding RealTimeModel, UpdateSourceTrigger=PropertyChanged}" >实时模式</CheckBox> | <!--<CheckBox Margin="10,0,0,0" IsChecked="{Binding RealTimeModel, UpdateSourceTrigger=PropertyChanged}" >实时模式</CheckBox> | ||||
<CheckBox Margin="10,0,0,0" IsChecked="{Binding TimedClear, UpdateSourceTrigger=PropertyChanged}">定时清除</CheckBox>--> | <CheckBox Margin="10,0,0,0" IsChecked="{Binding TimedClear, UpdateSourceTrigger=PropertyChanged}">定时清除</CheckBox>--> | ||||
<Button Margin="10,0,0,0" Cursor="Hand" Command="{Binding ExcelCommand}">导出日志</Button> | |||||
<Button Margin="10,0,0,0" Cursor="Hand" Command="{Binding OpenCommand}">打开文件</Button> | |||||
<Button Margin="10,0,0,0" Cursor="Hand" Command="{Binding ExcelCommand}" Style="{DynamicResource CommonBtn_返回}" Width="75">导出日志</Button> | |||||
<Button Margin="10,0,0,0" Cursor="Hand" Command="{Binding OpenCommand}" Style="{DynamicResource CommonBtn_返回}" Width="75">打开文件</Button> | |||||
</StackPanel> | </StackPanel> | ||||
<!--表格栏--> | <!--表格栏--> | ||||