6c2d3bb7b5
- Settato HorizontalScrollBarVisibility="Auto" per tutte le EgtDataGrid
208 lines
10 KiB
XML
208 lines
10 KiB
XML
<EgtWPFLib5:EgtCustomWindow x:Class="OpenProjectFileDialogV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
|
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
|
Title="{Binding Title}"
|
|
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
|
Height="500" Width="500" Topmost="True"
|
|
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
|
|
|
<EgtWPFLib5:EgtCustomWindow.Resources>
|
|
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
|
</EgtWPFLib5:EgtCustomWindow.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="5*"/>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel>
|
|
<Grid Grid.Row="0" Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*" />
|
|
<RowDefinition Height="1*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*" />
|
|
<ColumnDefinition Width="1*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Text="{Binding FilterType_Msg}"
|
|
Grid.Row="0" Grid.Column="0"
|
|
Style="{StaticResource OptionTextBlock}"/>
|
|
<ComboBox ItemsSource="{Binding SearchColumnList}"
|
|
SelectedItem="{Binding SelSearchColumn}"
|
|
Width="Auto"
|
|
Margin="5"
|
|
Grid.Row="0" Grid.Column="1"
|
|
Style="{StaticResource FeatureComboBox}"/>
|
|
<TextBlock Text="{Binding Search_Msg}"
|
|
Margin="0,5,0,0"
|
|
Grid.Row="1" Grid.Column="0"
|
|
Style="{StaticResource OptionTextBlock}"/>
|
|
<EgtWPFLib5:EgtTextBox Text="{Binding SearchText}"
|
|
Margin="5"
|
|
Grid.Row="1" Grid.Column="1"
|
|
Visibility="{Binding SearchText_Visibility}"/>
|
|
<Calendar SelectedDatesChanged="Calendar_SelectedDatesChanged"
|
|
SelectionMode="MultipleRange"
|
|
Grid.Row="1" Grid.Column="1"
|
|
Visibility="{Binding SearchDate_Visibility}"/>
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
|
ItemsSource="{Binding ProjectList}"
|
|
SelectedItem="{Binding SelProject}"
|
|
CanUserAddRows="False"
|
|
AutoGenerateColumns="False"
|
|
CanUserResizeRows="False"
|
|
SelectionMode="Single"
|
|
ScrollViewer.CanContentScroll="True"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
|
Margin="5"
|
|
BindingColumns="{Binding ProjectColumns}">
|
|
<DataGrid.Resources>
|
|
<!-- ProjId -->
|
|
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
|
|
<DataGridTextColumn.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
</DataTemplate>
|
|
</DataGridTextColumn.HeaderTemplate>
|
|
</DataGridTextColumn>
|
|
<!-- ProdId -->
|
|
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
|
|
<DataGridTextColumn.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
</DataTemplate>
|
|
</DataGridTextColumn.HeaderTemplate>
|
|
</DataGridTextColumn>
|
|
<!-- BTL FileName -->
|
|
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}">
|
|
<DataGridTextColumn.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
</DataTemplate>
|
|
</DataGridTextColumn.HeaderTemplate>
|
|
</DataGridTextColumn>
|
|
<!-- ListName -->
|
|
<DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}">
|
|
<DataGridTextColumn.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
</DataTemplate>
|
|
</DataGridTextColumn.HeaderTemplate>
|
|
</DataGridTextColumn>
|
|
<!-- Exported date -->
|
|
<DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}">
|
|
<DataGridTextColumn.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
</DataTemplate>
|
|
</DataGridTextColumn.HeaderTemplate>
|
|
</DataGridTextColumn>
|
|
<!-- Creation date -->
|
|
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
|
|
<DataGridTextColumn.Header>
|
|
<TextBlock Text="{Binding Path=DataContext.CreateDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
</DataGridTextColumn.Header>
|
|
</DataGridTextColumn>
|
|
<!-- Machine -->
|
|
<DataGridTextColumn x:Key="colMACHINE" Binding="{Binding sMachine}">
|
|
<DataGridTextColumn.Header>
|
|
<TextBlock Text="{Binding Path=DataContext.Machine_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
</DataGridTextColumn.Header>
|
|
</DataGridTextColumn>
|
|
<!-- Name (per Prod) -->
|
|
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
|
<DataGridTextColumn.Header>
|
|
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
</DataGridTextColumn.Header>
|
|
</DataGridTextColumn>
|
|
<!-- Delete -->
|
|
<!--
|
|
<DataGridTemplateColumn x:Key="colDELETE"
|
|
Width="Auto"
|
|
IsReadOnly="True">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<Button Content="X"
|
|
Command="{Binding Delete_Command}"/>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>-->
|
|
</DataGrid.Resources>
|
|
<!--<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding OpenFileName}"
|
|
Padding="4,1,4,1">
|
|
<TextBlock.InputBindings>
|
|
<MouseBinding MouseAction="LeftDoubleClick"
|
|
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
|
CommandParameter="{Binding nProjId}" />
|
|
</TextBlock.InputBindings>
|
|
</TextBlock>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>-->
|
|
<DataGrid.RowStyle>
|
|
<Style TargetType="DataGridRow">
|
|
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
</EgtBEAMWALL:EgtDataGrid>
|
|
|
|
<!--<ListBox Grid.Row="0"
|
|
ItemsSource="{Binding ProjectList}"
|
|
SelectedItem="{Binding SelProject}"
|
|
Margin="5">
|
|
-->
|
|
<!--<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding ProjFileName}"/>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>-->
|
|
<!--
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
|
|
<Setter Property="Padding" Value="0"></Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding OpenFileName}"
|
|
Padding="4,1,4,1">
|
|
<TextBlock.InputBindings>
|
|
<MouseBinding MouseAction="LeftDoubleClick"
|
|
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
|
CommandParameter="{Binding nProjId}" />
|
|
</TextBlock.InputBindings>
|
|
</TextBlock>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>-->
|
|
|
|
|
|
<UniformGrid Columns="3" Grid.Row="2" Margin="0,0,0,5">
|
|
<Button IsDefault="True" Name="OpenBtn"
|
|
Content="{Binding Open_Msg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
|
<Button Content="{Binding Delete_Msg}"
|
|
Command="{Binding Delete_Command}"
|
|
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
|
<Button IsCancel="True"
|
|
Content="{Binding Cancel_Msg}"
|
|
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
|
</UniformGrid>
|
|
|
|
</Grid>
|
|
|
|
</EgtWPFLib5:EgtCustomWindow>
|