123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <UserControl x:Class="Aitex.UI.Charting.View.DataSourceView"
- 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"
- mc:Ignorable="d" d:DesignHeight="346" d:DesignWidth="687">
- <UserControl.Resources>
- <Style TargetType="{x:Type Label}">
- <Setter Property="Foreground" Value="Black"/>
- <Setter Property="FontSize" Value="12"/>
- </Style>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="25" />
- <RowDefinition Height="256*" />
- </Grid.RowDefinitions>
- <StackPanel Name="TopView_TopToolbar" Grid.Row="0" Background="#FFF0F0F0" Orientation="Horizontal">
- <Button Height="23" HorizontalAlignment="Left" VerticalAlignment="Top" Width="110" Command="{Binding CommonViewModel.Switch2DataDisplayViewCommand}" Margin="1,0,0,0">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Image Source="/DataAnalysisControl;component/Charting/Images/Chart.png" Stretch="Fill" Height="16" Width="16" HorizontalAlignment="Left" />
- <Label Content="{DynamicResource GlobalLableSwitchToChart}" VerticalContentAlignment="Center" Padding="0" />
- </StackPanel>
- </Button.Content>
- </Button>
- <Button Height="23" HorizontalAlignment="Left" VerticalAlignment="Top" Width="92" Command="{Binding ConfigDbConnectionCommand}"
- ToolTip="{DynamicResource GlobalLableDatabaseConnection}" Margin="5,0">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Image Source="/DataAnalysisControl;component/Charting/Images/DatabaseCfg.png" Stretch="Fill" Height="16" Width="16" HorizontalAlignment="Left" />
- <Label Content="{DynamicResource GlobalLableDatabaseConfig}" VerticalContentAlignment="Center" Padding="0" />
- </StackPanel>
- </Button.Content>
- </Button>
- <Button Height="23" HorizontalAlignment="Left" VerticalAlignment="Top" Width="92" Command="{Binding SelectDataSourceCommand}" Margin="5,0"
- ToolTip="{DynamicResource GlobalLableLoadData}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Image Source="/DataAnalysisControl;component/Charting/Images/LoadFromDb.png" Stretch="Fill" Height="17" Width="17" HorizontalAlignment="Left" />
- <Label Content="{DynamicResource GlobalLableDatabaseLoad}" VerticalContentAlignment="Center" Padding="0" />
- </StackPanel>
- </Button.Content>
- </Button>
- <!--<Button Height="23" HorizontalAlignment="Left" VerticalAlignment="Top" Width="92" Command="{Binding SelectFileSourceCommand}"
- ToolTip="{DynamicResource GlobalLableGetDataFromFile} ">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Image Source="/DataAnalysisControl;component/Charting/Images/LoadFromFile.png" Stretch="Fill" Height="19" Width="19" HorizontalAlignment="Left" />
- <Label Content="{DynamicResource GlobalLableFileLoad}" VerticalContentAlignment="Center" Padding="0" />
- </StackPanel>
- </Button.Content>
- </Button>-->
- <Button Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="92" Command="{Binding RemoveAllDataSourceCommand}" Margin="5,0"
- ToolTip=" {DynamicResource GlobalLableDeleteAllDataSource} ">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Image Source="/DataAnalysisControl;component/Charting/Images/deletered.png" Stretch="Fill" Height="19" Width="19" HorizontalAlignment="Left" />
- <Label Content="{DynamicResource GlobalLableDeleteAll}" VerticalContentAlignment="Center" Padding="0" />
- </StackPanel>
- </Button.Content>
- </Button>
- </StackPanel>
- <DataGrid Grid.Row="1"
- AutoGenerateColumns="False"
- Background="#FFF0F0F0"
- ItemsSource="{Binding CommonViewModel.DataSourceList, Mode=OneWay}"
- Name="dataGrid_DataSources"
- SelectionChanged="DataSource_SelectionChanged"
- SelectionMode="Single"
- SelectionUnit="FullRow" AlternationCount="1"
- SelectedItem="{Binding CommonViewModel.CurrentSelectedDataSource}">
- <DataGrid.Columns>
- <DataGridTextColumn Binding="{Binding Title,Mode=OneWay}" CanUserReorder="True" CanUserSort="False" IsReadOnly="True" Width="600*">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="{DynamicResource GlobalLableDataSourceName}" />
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- <DataGridTextColumn.CellStyle>
- <Style TargetType="DataGridCell">
- <Setter Property="ToolTip" Value="{Binding Title}" />
- </Style>
- </DataGridTextColumn.CellStyle>
- </DataGridTextColumn>
- <DataGridTextColumn Binding="{Binding BeginTime,Mode=OneWay,StringFormat={}\{0:yyyy/MM/dd HH:mm:ss\}}" CanUserSort="False" IsReadOnly="True" Width="150" >
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="{DynamicResource GlobalLableBeginTime}" />
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTextColumn Binding="{Binding EndTime,Mode=OneWay,StringFormat={}\{0:yyyy/MM/dd HH:mm:ss\}}" CanUserSort="False" IsReadOnly="True" Width="150">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="{DynamicResource GlobalLableEndTime}" />
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTemplateColumn Width="300" CanUserSort="False">
- <DataGridTemplateColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="{DynamicResource GlobalLableSyncTime}" />
- </DataTemplate>
- </DataGridTemplateColumn.HeaderTemplate>
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <ComboBox ItemsSource="{Binding RecipeSteps}" Tag="{Binding Title}" SelectedItem="{Binding SyncPoint,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <!--<DataGridTemplateColumn Header="文件" Width="50" CanUserSort="False">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Content="导出" FontSize="11" Height="20" Tag="{Binding Title}" Click="DataSource_Export"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- <DataGridTemplateColumn Header=" " Width="50" CanUserSort="False">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Content="{DynamicResource GlobalLableDelete}" FontSize="11" Height="20" Tag="{Binding Title}" Click="DataSource_Remove"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- </UserControl>
|