- aggiornati bottoni Ok, Cancel su molte pagine

- cambiate icone Reference
- aggiunte icone in slice manager
- spostato Update in TFS vicino a Reset
This commit is contained in:
Emmanuele Sassi
2023-04-07 09:49:44 +02:00
parent 209cab548b
commit e67c79992c
43 changed files with 621 additions and 146 deletions
@@ -90,12 +90,19 @@
<UniformGrid Grid.Row="1"
Rows="1"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
+44
View File
@@ -208,6 +208,9 @@
<DependentUpon>MaterialDbV.xaml</DependentUpon>
</Compile>
<Compile Include="MaterialDb\MaterialDbVM.vb" />
<Compile Include="TSFEditor\ColumnHeader.xaml.vb">
<DependentUpon>ColumnHeader.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateMachine\UpdateMachineV.xaml.vb">
<DependentUpon>UpdateMachineV.xaml</DependentUpon>
</Compile>
@@ -429,6 +432,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="TSFEditor\ColumnHeader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UpdateMachine\UpdateMachineV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -813,6 +820,43 @@
<ItemGroup>
<Resource Include="Resources\SplashScreen\BlueSplashscreen.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Dimensions.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TFSEditor\Reduce.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ReferencePanel\BC.png" />
<Resource Include="Resources\ReferencePanel\BL.png" />
<Resource Include="Resources\ReferencePanel\BR.png" />
<Resource Include="Resources\ReferencePanel\MC.png" />
<Resource Include="Resources\ReferencePanel\ML.png" />
<Resource Include="Resources\ReferencePanel\MR.png" />
<Resource Include="Resources\ReferencePanel\TC.png" />
<Resource Include="Resources\ReferencePanel\TL.png" />
<Resource Include="Resources\ReferencePanel\TR.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ReferencePanel\White_BC.png" />
<Resource Include="Resources\ReferencePanel\White_BL.png" />
<Resource Include="Resources\ReferencePanel\White_BR.png" />
<Resource Include="Resources\ReferencePanel\White_MC.png" />
<Resource Include="Resources\ReferencePanel\White_ML.png" />
<Resource Include="Resources\ReferencePanel\White_MR.png" />
<Resource Include="Resources\ReferencePanel\White_TC.png" />
<Resource Include="Resources\ReferencePanel\White_TL.png" />
<Resource Include="Resources\ReferencePanel\White_TR.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Mass.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Time.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\RibParamPanel\CopyFrom.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
+13 -6
View File
@@ -145,13 +145,20 @@
Rows="1"
IsEnabled="{Binding IsEnabled}"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Visibility="{Binding IsImport_Visibility}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
+29 -7
View File
@@ -1,6 +1,7 @@
<UserControl x:Class="ReferencePanelV"
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:PrintApp="clr-namespace:Icarus">
<Border Padding="2.5"
Style="{StaticResource LeftPanel_PopupButton_Border}">
<Grid>
@@ -33,12 +34,33 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton Content="{Binding sText}"
IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
FontSize="40"
GroupName="ReferenceRadio"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource OptionPanel_NestingToggleButton}"/>
<PrintApp:CheckedImageRadioButton IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
ImageSource="{Binding sText}"
CheckedImageSource="{Binding sSelText}"
FontSize="40"
GroupName="ReferenceRadio"
Margin="2.5,2.5,2.5,2.5">
<!--<RadioButton.Resources>
<DataTemplate x:Key="Normal">
<Image Source="{Binding sText}"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
<DataTemplate x:Key="Selected">
<Image Source="{Binding sSelText}"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
</RadioButton.Resources>
<RadioButton.Style>
<Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource OptionPanel_NestingToggleButton}">
<Setter Property="ContentTemplate" Value="{StaticResource Normal}"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="ContentTemplate" Value="{StaticResource Selected}"/>
</Trigger>
</Style.Triggers>
</Style>
</RadioButton.Style>-->
</PrintApp:CheckedImageRadioButton>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
+37 -10
View File
@@ -190,25 +190,52 @@ Public Class ReferenceBtn
Get
Select Case Type
Case References.TL
Return ""
Return "/Resources/ReferencePanel/TL.png" '"┌"
Case References.TR
Return ""
Return "/Resources/ReferencePanel/TR.png" '"┐"
Case References.BL
Return ""
Return "/Resources/ReferencePanel/BL.png" '"└"
Case References.BR
Return ""
Return "/Resources/ReferencePanel/BR.png" '"┘"
Case References.TC
Return ""
Return "/Resources/ReferencePanel/TC.png" '"┬"
Case References.ML
Return ""
Return "/Resources/ReferencePanel/ML.png" '"├"
Case References.MR
Return ""
Return "/Resources/ReferencePanel/MR.png" '"┤"
Case References.BC
Return ""
Return "/Resources/ReferencePanel/BC.png" '"┴"
Case References.MC
Return ""
Return "/Resources/ReferencePanel/MC.png" '"┼"
Case Else
Return "X"
Return "" '"X"
End Select
End Get
End Property
Public ReadOnly Property sSelText As String
Get
Select Case Type
Case References.TL
Return "/Resources/ReferencePanel/White_TL.png" '"┌"
Case References.TR
Return "/Resources/ReferencePanel/White_TR.png" '"┐"
Case References.BL
Return "/Resources/ReferencePanel/White_BL.png" '"└"
Case References.BR
Return "/Resources/ReferencePanel/White_BR.png" '"┘"
Case References.TC
Return "/Resources/ReferencePanel/White_TC.png" '"┬"
Case References.ML
Return "/Resources/ReferencePanel/White_ML.png" '"├"
Case References.MR
Return "/Resources/ReferencePanel/White_MR.png" '"┤"
Case References.BC
Return "/Resources/ReferencePanel/White_BC.png" '"┴"
Case References.MC
Return "/Resources/ReferencePanel/White_MC.png" '"┼"
Case Else
Return "" '"X"
End Select
End Get
End Property
Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

+19 -9
View File
@@ -114,15 +114,25 @@
<UniformGrid Grid.Row="1"
Rows="1"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Copy From"
Command="{Binding CopyFrom_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Command="{Binding Ok_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding CopyFrom_Command}"
ToolTip="Copy From"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\RibParamPanel\CopyFrom.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
+59 -17
View File
@@ -15,21 +15,63 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ghTime}"
Visibility="{Binding Time_Visibility}"
FontSize="35"
Style="{StaticResource SliceManager_TextBlock}"/>
<TextBlock Grid.Row="1"
Text="{Binding ghDimensions}"
FontSize="18"
Margin="0,0,0,5"
Style="{StaticResource SliceManager_TextBlock}"/>
<TextBlock Grid.Row="2"
Text="{Binding ghMass}"
Visibility="{Binding Mass_Visibility}"
FontSize="18"
Margin="0,0,0,5"
Style="{StaticResource SliceManager_TextBlock}"/>
<Grid HorizontalAlignment="Center"
Visibility="{Binding Time_Visibility}"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Time.png"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghTime}"
FontSize="35"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<Grid Grid.Row="1"
HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Dimensions.png"
Visibility="{Binding ghDimensions, Converter={StaticResource StringToVisibilityConverter}}"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghDimensions}"
FontSize="18"
HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<Grid Grid.Row="2"
HorizontalAlignment="Center"
Visibility="{Binding Mass_Visibility}"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Mass.png"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghMass}"
FontSize="18"
HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<TextBlock Grid.Row="3"
Text="{Binding sLoadingText}"
Visibility="{Binding Loading_Visibility}"
@@ -76,12 +118,12 @@
Visibility="{Binding ModifyMode_Visibility}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SliceMannager_Button}"/>
<Button Content="Update"
<!--<Button Content="Update"
Command="{Binding Update_Command}"
IsEnabled="{Binding Buttons_IsEnabled}"
Visibility="{Binding SliceMode_Visibility}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SliceMannager_Button}"/>
Style="{StaticResource SliceMannager_Button}"/>-->
<Button Content="Generate"
Command="{Binding Generate_Command}"
IsEnabled="{Binding Buttons_IsEnabled}"
+2 -2
View File
@@ -123,7 +123,7 @@ Public Class SliceManagerVM
Public ReadOnly Property ghTime As String
Get
Dim dtTime As TimeSpan = TimeSpan.FromSeconds(m_dTime)
Return Math.Floor(dtTime.TotalHours) & ":" & (Math.Floor(dtTime.Minutes)).ToString("00") & ":" & (Math.Ceiling(dtTime.Seconds)).ToString("00")
Return Math.Floor(dtTime.TotalHours) & "h " & (Math.Floor(dtTime.Minutes)).ToString("00") & "m" '& (Math.Ceiling(dtTime.Seconds)).ToString("00")
End Get
End Property
@@ -138,7 +138,7 @@ Public Class SliceManagerVM
Get
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
Return "[ " & DoubleToString(b3Print.DimX, 1) & " x " & DoubleToString(b3Print.DimY, 1) & " x " & DoubleToString(b3Print.DimZ, 1) & " ]"
Return DoubleToString(b3Print.DimX, 1) & " x " & DoubleToString(b3Print.DimY, 1) & " x " & DoubleToString(b3Print.DimZ, 1) & " mm"
End If
Return ""
End Get
+2 -2
View File
@@ -18,11 +18,11 @@
Foreground="White"
HorizontalAlignment="Center"
Margin="591,140,0,0"/>
<TextBlock Text="2022-2023"
<!--<TextBlock Text="2022-2023"
FontSize="6"
FontFamily="/Resources/Fonts/#Roboto"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="0,0,254,60"/>
Margin="0,0,254,60"/>-->
</Grid>
</Window>
+1
View File
@@ -42,6 +42,7 @@
IsChecked="{Binding bGridVisibility}"
ImageSource="/Resources/StatusBar/GridVisibility.png"
CheckedImageSource="/Resources/StatusBar/GridVisibilityWhite.png"
ToolTip="Grid Visibility"
Margin="0,2.5,0,0"
Style="{StaticResource StatusBar_ToggleButton}"/>
</Grid>
+13
View File
@@ -0,0 +1,13 @@
<Grid x:Class="ColumnHeader"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"
Style="{StaticResource BaseTextBlock}"/>
<TextBlock Grid.Row="1"
Text="{Binding MeasureUnit, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"
Style="{StaticResource MeasureUnit_TextBlock}"/>
</Grid>
+25
View File
@@ -0,0 +1,25 @@
Public Class ColumnHeader
Public Shared ReadOnly HeaderProperty As DependencyProperty = DependencyProperty.Register("Header", GetType(String), GetType(ColumnHeader), New FrameworkPropertyMetadata(""))
Public Property Header As String
Get
Return CStr(MyBase.GetValue(HeaderProperty))
End Get
Set(value As String)
MyBase.SetValue(HeaderProperty, value)
End Set
End Property
Public Shared ReadOnly MeasureUnitProperty As DependencyProperty = DependencyProperty.Register("MeasureUnit", GetType(String), GetType(ColumnHeader), New FrameworkPropertyMetadata(""))
Public Property MeasureUnit As String
Get
Return CStr(MyBase.GetValue(MeasureUnitProperty))
End Get
Set(value As String)
MyBase.SetValue(MeasureUnitProperty, value)
End Set
End Property
End Class
+161 -41
View File
@@ -29,13 +29,13 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.ColumnSpan="2"
Orientation="Horizontal"
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,2.5,0,2.5">
<TextBlock Text="Modify"
@@ -45,7 +45,7 @@
<ComboBox ItemsSource="{Binding MediaTypeList}"
SelectedIndex="{Binding ghSelMediaType}"
Margin="2.5,0,0,0"
Width="160"
Width="150"
Style="{StaticResource RightPanel_ComboBox}"/>
</StackPanel>
<StackPanel Grid.Row="1"
@@ -77,12 +77,20 @@
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
<Button Grid.Column="1"
Grid.RowSpan="2"
Content="Update"
Command="{Binding Update_Command}"
Height="45"
Width="45"
Margin="0,2.5,2.5,2.5"
Style="{StaticResource RightPanel_Button}"/>
<Button Grid.Column="2"
Grid.RowSpan="2"
Content="Reset"
Command="{Binding Reset_Command}"
Height="45"
Width="45"
Margin="0,2.5,5,2.5"
Margin="2.5,2.5,5,2.5"
Style="{StaticResource RightPanel_Button}"/>
</Grid>
<ContentControl.Style>
@@ -106,7 +114,7 @@
<ComboBox ItemsSource="{Binding MediaTypeList}"
SelectedIndex="{Binding ghSelMediaType}"
Margin="2.5,0,2.5,0"
Width="160"
Width="150"
Style="{StaticResource RightPanel_ComboBox}"/>
</StackPanel>
<StackPanel Grid.Column="1"
@@ -136,12 +144,22 @@
Margin="2.5,0,0,0"
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
<Button Grid.Column="1"
Content="Reset"
Command="{Binding Reset_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
<StackPanel Grid.Column="1"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Grid.Column="1"
Content="Update"
Command="{Binding Update_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
<Button Grid.Column="1"
Content="Reset"
Command="{Binding Reset_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
@@ -158,69 +176,150 @@
SelectionMode="Extended"
HorizontalGridLinesBrush="White"
VerticalGridLinesBrush="White"
ColumnHeaderHeight="40"
Margin="0,2.5,0,2.5">
<DataGrid.Columns>
<DataGridTextColumn Header="Index"
<DataGridTextColumn Header="Layer"
Binding="{Binding nIndex}"
IsReadOnly="True"
Width="Auto"/>
Width="Auto">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Layer_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Index_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="Length"
Binding="{Binding sLength}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="2*"
TextBlock.TextAlignment="Center"/>
Width="1.5*"
TextBlock.TextAlignment="Center">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Length_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Millimeters_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TMin"
Binding="{Binding sTMin}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TTrg"
Binding="{Binding sTTrg}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TTrg_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TMax"
Binding="{Binding sTMax}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TMax_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TCurr"
Binding="{Binding sTCurr}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TCurr_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TWait"
Binding="{Binding sTWait}"
Visibility="{Binding DataContext.ColWait_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TWait_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="FMin"
Binding="{Binding sFMin}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FTrg"
Binding="{Binding sFTrg}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFTrg}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FMax"
Binding="{Binding sFMax}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FTrg_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFMax}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FCurr"
Binding="{Binding sFCurr}"
Width="1*"/>
<DataGridTextColumn Header="Speed"
Binding="{Binding sSpeed}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FMax_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFCurr}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FCurr_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sSpeed}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Speed_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Rpm_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
@@ -243,16 +342,37 @@
SelectedIndex="{Binding nSelFilter}"
Width="125"
Margin="2.5,0,2.5,0"
ToolTip="Filter"
Style="{StaticResource RightPanel_ComboBox}"/>
<Button DockPanel.Dock="Right"
Command="{Binding Extend_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/TFSEditor/Expand.png"
Style="{StaticResource Button_Image}"/>
</Button>
<ToggleButton DockPanel.Dock="Right"
IsChecked="{Binding bColExtend}"
Margin="2.5,0,2.5,0">
<ToggleButton.Resources>
<DataTemplate x:Key="Expand">
<Image Source="/Resources/TFSEditor/Expand.png"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
<DataTemplate x:Key="Reduce">
<Image Source="/Resources/TFSEditor/Reduce.png"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
</ToggleButton.Resources>
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ToolBar_ToggleButton}">
<Setter Property="ContentTemplate" Value="{StaticResource Expand}"/>
<Setter Property="ToolTip" Value="Expand"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="ContentTemplate" Value="{StaticResource Reduce}"/>
<Setter Property="ToolTip" Value="Reduce"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<Grid VerticalAlignment="Center"
HorizontalAlignment="Center">
HorizontalAlignment="Left"
Margin="2.5,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
+190 -46
View File
@@ -14,10 +14,10 @@ Public Class TFSEditorVM
Public Enum MediaTypes As Integer
HEIGHT = 1
SECTIONCHANGE = 2
SELECTION = 3
FEED_INCREMENT = 4
SELECTION_WAIT = 5
'SECTIONCHANGE = 2
SELECTION = 2
FEED_INCREMENT = 3
SELECTION_WAIT = 4
End Enum
Public Enum Filters As Integer
@@ -60,13 +60,13 @@ Public Class TFSEditorVM
End Set
End Property
Private m_MediaTypeList As New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Wait by Selection", "Feed by Increment"})
Private m_MediaTypeList As New List(Of String)({"Feed by Slice Number", "Feed by Selection", "Wait by Selection", "Feed by Increment"})
Public ReadOnly Property MediaTypeList As List(Of String)
Get
If bWaitingTime Then
Return New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Feed by Increment", "Wait by Selection"})
Return New List(Of String)({"Feed by Slice Number", "Feed by Selection", "Feed by Increment", "Wait by Selection"})
Else
Return New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Feed by Increment"})
Return New List(Of String)({"Feed by Slice Number", "Feed by Selection", "Feed by Increment"})
End If
' Return m_MediaTypeList
End Get
@@ -83,12 +83,12 @@ Public Class TFSEditorVM
Case MediaTypes.HEIGHT
SetSetVisibility(False)
SetMediaVisibility(True)
Case MediaTypes.SECTIONCHANGE
SetSetVisibility(False)
SetMediaVisibility(True)
'Case MediaTypes.SECTIONCHANGE
' SetSetVisibility(False)
' SetMediaVisibility(True)
Case MediaTypes.SELECTION
SetSetVisibility(True)
SetMediaVisibility(True)
SetMediaVisibility(False)
Case MediaTypes.SELECTION_WAIT
SetSetVisibility(True)
SetMediaVisibility(False)
@@ -170,10 +170,16 @@ Public Class TFSEditorVM
End Property
Private m_bColExtend As Boolean = False
Public ReadOnly Property bColExtend As Boolean
Public Property bColExtend As Boolean
Get
Return m_bColExtend
End Get
Set(value As Boolean)
m_bColExtend = value
NotifyPropertyChanged(NameOf(bColExtend))
NotifyPropertyChanged(NameOf(ColExtend_Visibility))
NotifyPropertyChanged(NameOf(ControlWidth))
End Set
End Property
Public ReadOnly Property ColExtend_Visibility As Visibility
Get
@@ -229,8 +235,8 @@ Public Class TFSEditorVM
Select Case m_nSelMediaType
Case MediaTypes.HEIGHT
Return "Slice Number:"
Case MediaTypes.SECTIONCHANGE
Return "Difference:"
'Case MediaTypes.SECTIONCHANGE
' Return "Difference:"
Case MediaTypes.SELECTION
Return "Feed:"
Case MediaTypes.SELECTION_WAIT
@@ -243,9 +249,116 @@ Public Class TFSEditorVM
End Get
End Property
#Region "Messages"
Public ReadOnly Property Layer_Msg As String
Get
Return "Layer"
End Get
End Property
Public ReadOnly Property Length_Msg As String
Get
Return "Length"
End Get
End Property
Public ReadOnly Property TMin_Msg As String
Get
Return "TMin"
End Get
End Property
Public ReadOnly Property TTrg_Msg As String
Get
Return "TTrg"
End Get
End Property
Public ReadOnly Property TMax_Msg As String
Get
Return "TMax"
End Get
End Property
Public ReadOnly Property TCurr_Msg As String
Get
Return "TCurr"
End Get
End Property
Public ReadOnly Property TWait_Msg As String
Get
Return "TWait"
End Get
End Property
Public ReadOnly Property FMin_Msg As String
Get
Return "FMin"
End Get
End Property
Public ReadOnly Property FTrg_Msg As String
Get
Return "FTrg"
End Get
End Property
Public ReadOnly Property FMax_Msg As String
Get
Return "FMax"
End Get
End Property
Public ReadOnly Property FCurr_Msg As String
Get
Return "FCurr"
End Get
End Property
Public ReadOnly Property Speed_Msg As String
Get
Return "Speed"
End Get
End Property
Public ReadOnly Property Index_Msg As String
Get
Return ""
End Get
End Property
Public ReadOnly Property Millimeters_Msg As String
Get
Return "mm"
End Get
End Property
Public ReadOnly Property Seconds_Msg As String
Get
Return "s"
End Get
End Property
Public ReadOnly Property MmPerMin_Msg As String
Get
Return "mm/min"
End Get
End Property
Public ReadOnly Property Rpm_Msg As String
Get
Return "rpm"
End Get
End Property
#End Region ' Messages
' Definizione comandi
Private m_cmdSet As ICommand
Private m_cmdMedia As ICommand
Private m_cmdUpdate As ICommand
Private m_cmdReset As ICommand
Private m_cmdExtend As ICommand
@@ -417,33 +530,33 @@ Public Class TFSEditorVM
m_LayerList(Index2).SetFCurr(dNewFCurr)
Next
Next
Case MediaTypes.SECTIONCHANGE
Dim ChangeIndexList As New List(Of Integer)({0})
Dim dPrevLength As Double = m_LayerList(0).dLength
' recupero punti di rottura
For Index = 1 To m_LayerList.Count() - 1
Dim dCurrLength = m_LayerList(Index)
If dPrevLength < m_LayerList(Index).dLength * (1 - (m_dModifyValue / 100)) OrElse dPrevLength > m_LayerList(Index).dLength * (1 + (m_dModifyValue / 100)) Then
ChangeIndexList.Add(Index)
End If
dPrevLength = m_LayerList(Index).dLength
Next
If ChangeIndexList(ChangeIndexList.Count - 1) <> m_LayerList.Count() - 1 Then
ChangeIndexList.Add(m_LayerList.Count() - 1)
End If
' ricalcolo media sugli intervalli trovati
For Index = 0 To ChangeIndexList.Count() - 2
Dim dFSum As Double = 0
Dim dFIndex As Double = 0
For Index2 = ChangeIndexList(Index) To ChangeIndexList(Index + 1)
dFSum += m_LayerList(Index2).sFCurr
dFIndex += 1
Next
Dim dNewFCurr As Double = dFSum / dFIndex
For Index2 = ChangeIndexList(Index) To ChangeIndexList(Index + 1)
m_LayerList(Index2).SetFCurr(dNewFCurr)
Next
Next
'Case MediaTypes.SECTIONCHANGE
' Dim ChangeIndexList As New List(Of Integer)({0})
' Dim dPrevLength As Double = m_LayerList(0).dLength
' ' recupero punti di rottura
' For Index = 1 To m_LayerList.Count() - 1
' Dim dCurrLength = m_LayerList(Index)
' If dPrevLength < m_LayerList(Index).dLength * (1 - (m_dModifyValue / 100)) OrElse dPrevLength > m_LayerList(Index).dLength * (1 + (m_dModifyValue / 100)) Then
' ChangeIndexList.Add(Index)
' End If
' dPrevLength = m_LayerList(Index).dLength
' Next
' If ChangeIndexList(ChangeIndexList.Count - 1) <> m_LayerList.Count() - 1 Then
' ChangeIndexList.Add(m_LayerList.Count() - 1)
' End If
' ' ricalcolo media sugli intervalli trovati
' For Index = 0 To ChangeIndexList.Count() - 2
' Dim dFSum As Double = 0
' Dim dFIndex As Double = 0
' For Index2 = ChangeIndexList(Index) To ChangeIndexList(Index + 1)
' dFSum += m_LayerList(Index2).sFCurr
' dFIndex += 1
' Next
' Dim dNewFCurr As Double = dFSum / dFIndex
' For Index2 = ChangeIndexList(Index) To ChangeIndexList(Index + 1)
' m_LayerList(Index2).SetFCurr(dNewFCurr)
' Next
' Next
Case MediaTypes.SELECTION
If m_SelLayers.Count <= 0 Then Return
Dim dFSum As Double = 0
@@ -475,6 +588,29 @@ Public Class TFSEditorVM
#End Region ' Media
#Region "Update"
''' <summary>
''' Returns a command that do CPlaneTop.
''' </summary>
Public ReadOnly Property Update_Command As ICommand
Get
If m_cmdUpdate Is Nothing Then
m_cmdUpdate = New Command(AddressOf Update)
End If
Return m_cmdUpdate
End Get
End Property
''' <summary>
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Update()
Map.refSliceManagerVM.Update()
End Sub
#End Region ' Update
#Region "Reset"
''' <summary>
@@ -571,14 +707,14 @@ Public Class TFSLayer
End Property
Public ReadOnly Property sTMin As String
Get
Return DoubleToString(m_dTMin, 0)
Return SecondsToStringConverter(m_dTMin)
End Get
End Property
Private m_dTTrg As Double
Public ReadOnly Property sTTrg As String
Get
Return DoubleToString(m_dTTrg, 0)
Return SecondsToStringConverter(m_dTTrg)
End Get
End Property
@@ -590,7 +726,7 @@ Public Class TFSLayer
End Property
Public ReadOnly Property sTMax As String
Get
Return DoubleToString(m_dTMax, 0)
Return SecondsToStringConverter(m_dTMax)
End Get
End Property
@@ -602,14 +738,14 @@ Public Class TFSLayer
End Property
Public ReadOnly Property sTCurr As String
Get
Return DoubleToString(m_dTCurr, 0)
Return SecondsToStringConverter(m_dTCurr)
End Get
End Property
Private m_dTWait As Double
Public Property sTWait As String
Get
Return LenToString(m_dTWait, 0)
Return SecondsToStringConverter(m_dTWait)
End Get
Set(value As String)
Dim dNewValue As Double
@@ -818,4 +954,12 @@ Public Class TFSLayer
m_dSpeed = dSpeed
End Sub
Private Function SecondsToStringConverter(value As Double) As String
Dim dtTime As TimeSpan = TimeSpan.FromSeconds(value)
Dim dHours As Double = Math.Floor(dtTime.TotalHours)
Dim dMinutes As Double = Math.Floor(dtTime.Minutes)
Dim dSeconds As Double = Math.Ceiling(dtTime.Seconds)
Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00")
End Function
End Class
+13
View File
@@ -703,6 +703,14 @@
<Setter Property="Template" Value="{StaticResource ToggleButton.NoBackgroundButton}"/>
</Style>
<Style x:Key="TFSExpand_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template" Value="{StaticResource ToggleButton.NoBackgroundButton}"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- TextBlock -->
@@ -828,6 +836,11 @@
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="MeasureUnit_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseTextBlock}">
<Setter Property="FontSize" Value="10"/>
<Setter Property="FontStyle" Value="Italic"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- TextBox -->