Files
omagoffice/DxfImportWindow/DxfImportWindowV.xaml
T
2024-02-14 18:57:19 +01:00

385 lines
22 KiB
XML

<EgtWPFLib5:EgtCustomWindow x:Class="DxfImportWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding TitleMsg}"
IsMinimizable="False"
ShowInTaskbar="False"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}" WindowStartupLocation="CenterOwner"
xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
<EgtWPFLib5:EgtCustomWindow.Resources>
<!--gradiente colore-->
<!--<Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<theme:ScrollChrome x:Name="Chrome" RenderPressed="{TemplateBinding IsPressed}" RenderMouseOver="{TemplateBinding IsMouseOver}" SnapsToDevicePixels="true" theme:ScrollChrome.ScrollGlyph="{TemplateBinding theme:ScrollChrome.ScrollGlyph}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>-->
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border x:Name="Background" CornerRadius="0" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<Grid Background="Transparent" Margin="1">
<Border Opacity="0" x:Name="BackgroundAnimation" Background="Transparent" />
<Rectangle x:Name="BackgroundGradient" RadiusX="8" RadiusY="8" Fill="#FF095CA8" Stroke="#1C1D22" StrokeThickness="0.5">
<!--<Rectangle.Fill>
<LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
<GradientStop Color="#1C1D22" Offset="0.375" />
<GradientStop Color="#1C1D22" Offset="0.625" />
</LinearGradientBrush>
</Rectangle.Fill>-->
</Rectangle>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>-->
<Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ScrollBarStyle1" TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
<Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid x:Name="Bg" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<Grid.RowDefinitions>
<RowDefinition MaxHeight="1"/>
<RowDefinition Height="0.00001*"/>
<RowDefinition MaxHeight="1"/>
</Grid.RowDefinitions>
<!--<RepeatButton Command="{x:Static ScrollBar.LineUpCommand}" IsEnabled="{TemplateBinding IsMouseOver}" />-->
<Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
<Track.DecreaseRepeatButton>
<RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumb}"/>
</Track.Thumb>
</Track>
<!--<RepeatButton Command="{x:Static ScrollBar.LineDownCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="2" theme:ScrollChrome.ScrollGlyph="DownArrow"/>-->
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="Bg" Value="Transparent"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<!--<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Width" Value="Auto"/>
<Setter Property="MinWidth" Value="0"/>
<Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
<Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid x:Name="Bg" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
<ColumnDefinition Width="0.00001*"/>
<ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
</Grid.ColumnDefinitions>
<RepeatButton Command="{x:Static ScrollBar.LineLeftCommand}" IsEnabled="{TemplateBinding IsMouseOver}" theme:ScrollChrome.ScrollGlyph="LeftArrow" Style="{StaticResource CustomScrollBarButton}"/>
<Track x:Name="PART_Track" Grid.Column="1" IsEnabled="{TemplateBinding IsMouseOver}">
<Track.DecreaseRepeatButton>
<RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource CustomScrollBarButton}"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource CustomScrollBarButton}"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumb}"/>
</Track.Thumb>
</Track>
<RepeatButton Command="{x:Static ScrollBar.LineRightCommand}" Grid.Column="2" IsEnabled="{TemplateBinding IsMouseOver}" theme:ScrollChrome.ScrollGlyph="RightArrow" Style="{StaticResource CustomScrollBarButton}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="Bg" Value="Transparent"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>-->
</Style>
<Style x:Key="ScrollViewerStyle1" TargetType="{x:Type ScrollViewer}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Rectangle x:Name="Corner" Grid.Column="1" Fill="{StaticResource Omag_Black}" Grid.Row="1"/>
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanHorizontallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" CanVerticallyScroll="False" Grid.Column="0" Content="{TemplateBinding Content}" CanContentScroll="{TemplateBinding CanContentScroll}" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
<ScrollBar Style="{DynamicResource ScrollBarStyle1}" x:Name="PART_VerticalScrollBar"
AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1"
Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0"
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
Margin="2,0,0,0"/>
<ScrollBar Style="{DynamicResource ScrollBarStyle1}" x:Name="PART_HorizontalScrollBar"
AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0"
Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1"
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource Omag_Blue}"/>
</Trigger>
</Style.Triggers>
</Style>
</EgtWPFLib5:EgtCustomWindow.Resources>
<DockPanel>
<DockPanel DockPanel.Dock="Left"
Width="200"
Margin="5,5,5,0">
<UniformGrid Columns="{Binding nButton}" Rows="1"
Margin="0,0,0,5"
DockPanel.Dock="Top">
<!--OpenDxf-->
<Button
Command="{Binding OpenDxfCommand}"
IsEnabled="{Binding Open_IsEnabled}"
Style="{StaticResource OptionPanel_TextButton}"
Margin="0,0,0.875,0">
<Button.Content>
<AccessText TextWrapping="Wrap" Text="{Binding OpenDxfMsg}"/>
</Button.Content>
</Button>
<!--Cad 2D-->
<Button
Command="{Binding Cad2dBtnCommand}"
Style="{StaticResource OptionPanel_TextButton}"
Margin="0.875,0,0,0"
Visibility="{Binding Cad2d_IsVisible}">
<Button.Content>
<AccessText TextWrapping="Wrap" Text="{Binding Cad2dMsg}"/>
</Button.Content>
</Button>
</UniformGrid>
<GroupBox Header="{Binding TypeMsg}"
DockPanel.Dock="Top"
IsEnabled="{Binding Type_IsEnabled}"
BorderThickness="{StaticResource BorderGpBx_Thickness}"
Foreground="{StaticResource Omag_White}"
Margin="0,0,0,5">
<UniformGrid Columns="2" Rows="2">
<Button Content="{Binding UseRegionMsg}"
IsEnabled="{Binding UseRegionIsEnabled}"
Command="{Binding UseRegionCommand}"
Style="{StaticResource OptionPanel_TextButton}"/>
<Button Content="{Binding UseLayerMsg}"
IsEnabled="{Binding UseLayerIsEnabled}"
Command="{Binding UseLayerCommand}"
Style="{StaticResource OptionPanel_TextButton}"/>
<Button Content="{Binding UseClosedCurveMsg}"
IsEnabled="{Binding UseClosedCurveIsEnabled}"
Command="{Binding UseClosedCurveCommand}"
Style="{StaticResource OptionPanel_TextButton}"/>
<Button Content="{Binding ResetMsg}"
IsEnabled="{Binding ResetIsEnabled}"
Command="{Binding ResetCommand}"
Style="{StaticResource OptionPanel_TextButton}"/>
</UniformGrid>
</GroupBox>
<GroupBox Header="{Binding MeasureUnitMsg}"
IsEnabled="{Binding Measure_IsEnabled}"
DockPanel.Dock="Top"
BorderThickness="{StaticResource BorderGpBx_Thickness}"
Foreground="{StaticResource Omag_White}"
Margin="0,0,0,5">
<UniformGrid Columns="2">
<RadioButton Content="{Binding MmMsg}"
IsChecked="{Binding MmIsChecked}"
Style="{StaticResource OptionPanel_ToggleButton}"/>
<RadioButton Content="{Binding InchMsg}"
IsChecked="{Binding InchIsChecked, Mode=OneWay}"
Style="{StaticResource OptionPanel_ToggleButton}"/>
</UniformGrid>
</GroupBox>
<UniformGrid Columns="5"
DockPanel.Dock="Top"
IsEnabled="{Binding SideEntity_IsEnabled}"
Margin="0,0,0,5">
<!--Inclina lati-->
<ToggleButton Content="{Binding SideAngleMsg}"
IsChecked="{Binding SideAngle_IsChecked}"
Style="{StaticResource CompoWindow_WrapToggleButton}"/>
<!--Filo Top-->
<ToggleButton Content="{Binding FiloTopMsg}"
IsChecked="{Binding FiloTop_IsChecked}"
Style="{StaticResource CompoWindow_WrapToggleButton}"/>
<ToggleButton Content="{Binding EngraveMsg}"
IsChecked="{Binding Engrave_IsChecked}"
Style="{StaticResource CompoWindow_WrapToggleButton}"/>
<!--Incidi da sotto-->
<ToggleButton Content="{Binding DripMsg}"
IsChecked="{Binding Drip_IsChecked}"
Style="{StaticResource CompoWindow_WrapToggleButton}"
IsEnabled="{Binding Drip_IsEnabled}"/>
<!--Fora da sotto-->
<ToggleButton Content="{Binding UnderDrillMsg}"
IsChecked="{Binding UnderDrill_IsChecked}"
Style="{StaticResource CompoWindow_WrapToggleButton}"
IsEnabled="{Binding Drip_IsEnabled}"/>
</UniformGrid>
<UniformGrid DockPanel.Dock="Bottom"
Columns="2"
Margin="0,0,0,5">
<Button x:Name="OkBtn"
Content="{Binding OkMsg}"
IsEnabled="{Binding OkIsEnabled}"
Style="{StaticResource OptionPanel_TextButton}"/>
<Button x:Name="CancelBtn"
Content="{Binding CancelMsg}"
Style="{StaticResource OptionPanel_TextButton}"/>
</UniformGrid>
<GroupBox Header="Dati pezzo"
BorderThickness="{StaticResource BorderGpBx_Thickness}"
Foreground="{StaticResource Omag_White}"
Margin="0">
<ScrollViewer Style="{DynamicResource ScrollViewerStyle1}" VerticalScrollBarVisibility="Auto" Focusable="False">
<StackPanel>
<Grid Visibility="{Binding PartData_Visibility}"
Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.8*"/>
<ColumnDefinition Width="1.2*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding PartNumMsg}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding PartNum}"
Grid.Column="1"/>
</Grid>
<Grid Visibility="{Binding PartData_Visibility}"
Margin="0,0,0,10">
<TextBlock Text="{Binding TopMsg}"/>
<CheckBox IsChecked="{Binding TopIsChecked}"
HorizontalAlignment="Right" Margin="6,0,6,0"/>
</Grid>
<Grid Visibility="{Binding OrderList_Visibility}"
Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.8*"/>
<ColumnDefinition Width="1.2*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding ListMsg}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding List}"
Grid.Column="1"/>
</Grid>
<Grid Visibility="{Binding OrderList_Visibility}"
Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.8*"/>
<ColumnDefinition Width="1.2*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding OrderMsg}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Order}"
Grid.Column="1"/>
</Grid>
<TextBlock Text="{Binding OutputMessage}"
Foreground="{Binding MsgColor}"
DockPanel.Dock="Bottom"
TextWrapping="Wrap"
TextAlignment="Center"
Margin="0,0,0,20"/>
<ContentControl VerticalAlignment="Center"
Content="{Binding SideEntityControl}" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
</StackPanel>
</ScrollViewer>
</GroupBox>
</DockPanel>
<OmagOFFICE:DxfImportSceneHostV/>
</DockPanel>
</EgtWPFLib5:EgtCustomWindow>