EgtWPFLib5 2.7f2 :
- modifiche per aggiunta utensile di tipo Probe e lavorazione Probing.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Public Module EstConstMachIni
|
||||
|
||||
Public Const S_TOOLS As String = "Tools"
|
||||
Public Const K_PROBE As String = "Probe"
|
||||
Public Const K_DRILLBIT As String = "Drillbit"
|
||||
Public Const K_SAWBLADE As String = "Sawblade"
|
||||
Public Const K_MILL As String = "Mill"
|
||||
@@ -10,6 +11,7 @@
|
||||
Public Const K_CHISEL As String = "Chisel"
|
||||
Public Const K_COMPO As String = "Compo"
|
||||
Public Const K_WATERJET As String = "Waterjet"
|
||||
Public Const K_PROBEMAKER As String = "ProbeMaker"
|
||||
Public Const K_DRILLMAKER As String = "DrillMaker"
|
||||
Public Const K_SAWBLADEMAKER As String = "SawbladeMaker"
|
||||
Public Const K_MILLMAKER As String = "MillMaker"
|
||||
@@ -19,6 +21,7 @@
|
||||
Public Const S_TOOLHOLDER As String = "ToolHolder"
|
||||
|
||||
Public Const S_MACHININGS As String = "Machinings"
|
||||
Public Const K_PROBING As String = "Probing"
|
||||
Public Const K_SAWING As String = "Sawing"
|
||||
Public Const K_DRILLING As String = "Drilling"
|
||||
Public Const K_MILLING As String = "Milling"
|
||||
@@ -34,6 +37,9 @@
|
||||
Public Const K_5AXMILLING As String = "5AxMilling"
|
||||
Public Const K_WATERJETTING As String = "Waterjetting"
|
||||
|
||||
Public Const S_PROBING As String = "Probing"
|
||||
Public Const K_PRBSCRIPT As String = "PrbScript"
|
||||
|
||||
Public Const S_GENMACHINING As String = "GenMachining"
|
||||
Public Const K_GENSCRIPT As String = "GenScript"
|
||||
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
<Compile Include="MachiningDbWindow\FiveAxisMachinigParamPageV.xaml.vb">
|
||||
<DependentUpon>FiveAxisMachinigParamPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachiningDbWindow\ProbingParamPageV.xaml.vb">
|
||||
<DependentUpon>ProbingParamPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachiningDbWindow\ImportExportMachiningWindowV.xaml.vb">
|
||||
<DependentUpon>ImportExportMachiningWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -232,6 +235,9 @@
|
||||
<Compile Include="ToolDbWindow\MortiseParamPageV.xaml.vb">
|
||||
<DependentUpon>MortiseParamPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ToolDbWindow\ProbeParamPageV.xaml.vb">
|
||||
<DependentUpon>ProbeParamPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ToolDbWindow\StoneDrillParamPageV.xaml.vb">
|
||||
<DependentUpon>StoneDrillParamPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -376,6 +382,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MachiningDbWindow\ProbingParamPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MachiningDbWindow\ImportExportMachiningWindowV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -512,6 +522,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ToolDbWindow\ProbeParamPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ToolDbWindow\StoneDrillParamPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -553,6 +553,7 @@ Public Class MachiningDbWindowVM
|
||||
Private Stone5WjParamPageV As Stone5WaterjettingParamPageV
|
||||
Private FiveAxParamPageV As FiveAxisMachinigParamPageV
|
||||
Private SurfRoughParamPageV As SurfRoughingParamPageV
|
||||
Private ProbParamPageV As ProbingParamPageV
|
||||
|
||||
Public ReadOnly Property ParamPageV As ContentControl
|
||||
Get
|
||||
@@ -1289,6 +1290,11 @@ Public Class MachiningDbWindowVM
|
||||
SurfRoughParamPageV.DataContext = selMachining
|
||||
Return SurfRoughParamPageV
|
||||
|
||||
Case MCH_MY.PROBING
|
||||
If IsNothing(ProbParamPageV) Then ProbParamPageV = New ProbingParamPageV
|
||||
ProbParamPageV.DataContext = selMachining
|
||||
Return ProbParamPageV
|
||||
|
||||
End Select
|
||||
|
||||
Return Nothing
|
||||
|
||||
@@ -1163,6 +1163,17 @@ Public Class MachiningTreeViewItem
|
||||
If m_SubTypeList.Count = 0 Then
|
||||
m_SubTypeList.Add(New IdNameStruct(0, ""))
|
||||
End If
|
||||
Case MCH_MY.PROBING
|
||||
Dim Index = 1
|
||||
Dim sPrbScript As String = String.Empty
|
||||
m_SubTypeList = New ObservableCollection(Of Object)
|
||||
While EgtUILib.GetPrivateProfileString(S_PROBING, K_PRBSCRIPT & Index, "", sPrbScript, MachiningDbWindowVM.m_sMachineIniPath) > 0
|
||||
m_SubTypeList.Add(New IdNameStruct(Index, sPrbScript))
|
||||
Index += 1
|
||||
End While
|
||||
If m_SubTypeList.Count = 0 Then
|
||||
m_SubTypeList.Add(New IdNameStruct(0, ""))
|
||||
End If
|
||||
Case Else
|
||||
m_SubTypeList = Nothing
|
||||
End Select
|
||||
@@ -3521,6 +3532,9 @@ Public Class MachiningTreeViewItem
|
||||
Case MCH_MY.WATERJETTING
|
||||
m_ToolList = New ObservableCollection(Of String)
|
||||
FindToolByType(MCH_TY.WATERJET, m_ToolList)
|
||||
Case MCH_MY.PROBING
|
||||
m_ToolList = New ObservableCollection(Of String)
|
||||
FindToolByType(MCH_TY.PROBE, m_ToolList)
|
||||
Case Else
|
||||
m_ToolList = Nothing
|
||||
End Select
|
||||
|
||||
@@ -0,0 +1,334 @@
|
||||
<UserControl x:Class="ProbingParamPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5">
|
||||
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/EgtWPFLib5;component/EgtWPFLib5Resources.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.Resources>
|
||||
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||
</Grid.Resources>
|
||||
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin_NoBorder_SingleParam}">
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding NameParTxBl}"
|
||||
ParamTxBx="{Binding Path=NamePar,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=NameErrorMsg}"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.Row="1">
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin_NoBorder}">
|
||||
<UniformGrid Columns="2">
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding DepthStrTxBl}"
|
||||
ParamTxBx="{Binding Path=DepthStr,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
|
||||
ParamChBx="{Binding Path=Invert,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin}">
|
||||
<GroupBox.Header>
|
||||
<Label Content="{Binding GenericGpBxLbl}"/>
|
||||
</GroupBox.Header>
|
||||
<UniformGrid Columns="2">
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
|
||||
ParamTxBx="{Binding Path=StartPos,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
|
||||
ParamCmBxList="{Binding Path=SubTypeList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedSubType}" />
|
||||
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin}">
|
||||
<GroupBox.Header>
|
||||
<Label Content="{Binding AdvancedGpBxLbl}"></Label>
|
||||
</GroupBox.Header>
|
||||
<UniformGrid Columns="2">
|
||||
|
||||
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
|
||||
ParamChBx="{Binding Path=InvertToolDir,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
|
||||
ParamTxBx="{Binding Path=InitAngs,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
|
||||
ParamTxBx="{Binding Path=BlockedAxis,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SolChoiceTypeTxBl}"
|
||||
ParamCmBxList="{Binding Path=SolChoiceTypeList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" />
|
||||
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin_NoBorder}">
|
||||
<UniformGrid Columns="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding UserNotesTxBl}"
|
||||
ParamTxBx="{Binding Path=UserNotes,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<Button Grid.Column="1"
|
||||
Content="+"
|
||||
Command="{Binding ShowNoteListComboCommand}"
|
||||
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
|
||||
Visibility="{Binding ShowNoteListCombo_Visibility}"
|
||||
Width="20"
|
||||
Height="20"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SystemNotesTxBl}"
|
||||
ParamTxBx="{Binding Path=SystemNotes,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding SysNotes_Visibility}"
|
||||
IsParamReadOnly="True"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Visibility="{Binding ComboAddVisibility}" Style="{DynamicResource GroupBoxStyle_NoHeader}">
|
||||
|
||||
<UniformGrid Columns="2">
|
||||
<TextBlock Text="{Binding ToolNotesBxLbl,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="5,3,0,0"/>
|
||||
|
||||
<ComboBox ItemsSource="{Binding NotesListCombo,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
SelectedItem="{Binding SelNoteItemCombo,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="-13,1,2,1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Description,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="2.5"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Visibility="{Binding ToolNoteVisibility}" Style="{DynamicResource GroupBoxStyle_Margin}">
|
||||
<GroupBox.Header>
|
||||
<Label Content="{Binding ToolNotesBxLbl}"/>
|
||||
</GroupBox.Header>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding NotesList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Description,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="5,10,25,0"
|
||||
Width="250"/>
|
||||
<TabControl SelectedIndex="{Binding SelTypeValue}"
|
||||
Grid.Column="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="TEXT">
|
||||
<TextBox Text="{Binding Value,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="0,5,0,0"
|
||||
IsReadOnly="False"/>
|
||||
</TabItem>
|
||||
<TabItem Header="CHECKBOX">
|
||||
<CheckBox IsChecked="{Binding Value,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="0,7,0,0"/>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||
Content="-"
|
||||
Grid.Column="2"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="5,5.5,2,0"/>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</GroupBox>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Grid.Column="1">
|
||||
|
||||
<StackPanel.Resources>
|
||||
<!--Stile che modifica l'aspetto del messaggio d'errore-->
|
||||
<DataTemplate DataType="{x:Type ValidationError}">
|
||||
<TextBlock FontStyle="Italic"
|
||||
Foreground="Red"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,1"
|
||||
Text="{Binding Path=ErrorContent}"/>
|
||||
</DataTemplate>
|
||||
</StackPanel.Resources>
|
||||
|
||||
<GroupBox Grid.Column="1" Style="{DynamicResource MachToolGroupBoxStyle_NoHeader}">
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding ToolTxBl}" Style="{DynamicResource MachiningsToolTextBlock}"/>
|
||||
<ComboBox Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
ItemsSource="{Binding Path=ToolList,
|
||||
Mode=OneWay}"
|
||||
Style="{DynamicResource MachiningsToolComboBox}"
|
||||
SelectedIndex="{Binding Path=SelectedTool}"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
Margin="0,3,3,3"/>
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<EgtWPFLib5:StringParamWithButtonV Grid.Row="0"
|
||||
ParamTxBl="{Binding FeedTxBl}"
|
||||
ParamTxBx="{Binding Path=Feed,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
AutoToolParamChecked="{Binding Path=FeedChecked}"
|
||||
AutoToolParamEnabled="{Binding Path=FeedEnabled}" />
|
||||
|
||||
<EgtWPFLib5:StringParamWithButtonV Grid.Row="1"
|
||||
ParamTxBl="{Binding Path=TipFeedTxBl}"
|
||||
ParamTxBx="{Binding Path=TipFeed,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
AutoToolParamChecked="{Binding Path=TipFeedChecked}"
|
||||
AutoToolParamEnabled="{Binding Path=TipFeedEnabled}" />
|
||||
|
||||
<EgtWPFLib5:StringParamWithButtonV Grid.Row="2"
|
||||
ParamTxBl="{Binding StartFeedTxBl}"
|
||||
ParamTxBx="{Binding Path=StartFeed,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
AutoToolParamChecked="{Binding Path=StartFeedChecked}"
|
||||
AutoToolParamEnabled="{Binding Path=StartFeedEnabled}" />
|
||||
|
||||
<EgtWPFLib5:StringParamWithButtonV Grid.Row="3"
|
||||
ParamTxBl="{Binding EndFeedTxBl}"
|
||||
ParamTxBx="{Binding Path=EndFeed,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
AutoToolParamChecked="{Binding Path=EndFeedChecked}"
|
||||
AutoToolParamEnabled="{Binding Path=EndFeedEnabled}" />
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ProbingParamPageV
|
||||
|
||||
End Class
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.6.1")>
|
||||
<Assembly: AssemblyVersion("2.7.6.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.6.2")>
|
||||
|
||||
@@ -0,0 +1,372 @@
|
||||
<UserControl x:Class="ProbeParamPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5">
|
||||
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/EgtWPFLib5;component/EgtWPFLib5Resources.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.Resources>
|
||||
<EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
</Grid.Resources>
|
||||
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin_NoBorder}">
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding NameParTxBl}"
|
||||
ParamTxBx="{Binding Path=NamePar,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=NameErrorMsg}"/>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding DrawTxBl}"
|
||||
Style="{DynamicResource MachiningsToolTextBlock}"/>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderThickness="0.5,1,0.5,0.5" Margin="0,3,0,0" BorderBrush="#FFABAdB3">
|
||||
<TextBlock Name="DrawTxBx" Grid.Column="0" Margin="3,0,0,0"
|
||||
VerticalAlignment="Center" Foreground="Gray"
|
||||
ToolTip="{Binding Path=Draw, UpdateSourceTrigger=PropertyChanged,
|
||||
Converter={StaticResource ToolDrawUUIDConverter}}"
|
||||
Text="{Binding Path=Draw,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True,
|
||||
Converter={StaticResource ToolDrawUUIDConverter}}"/>
|
||||
</Border>
|
||||
<Button Grid.Column="1" Style="{DynamicResource AutoDrawButtonMargin}" Content="A"
|
||||
Command="{Binding Path=AutoDrawCommand}"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"/>
|
||||
<Button Grid.Column="2" Style="{DynamicResource OpenDrawFileButtonMargin}" Content=". . ."
|
||||
Command="{Binding Path=OpenDrawFileCommand}"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"/>
|
||||
</Grid>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=DrawErrorMsg}"
|
||||
Visibility="{Binding Path=DrawErrorMsg,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}"
|
||||
Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.Row="1">
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin}">
|
||||
<GroupBox.Header>
|
||||
<Label Content="{Binding FeedGpBxLbl}"/>
|
||||
</GroupBox.Header>
|
||||
<UniformGrid Columns="2">
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
|
||||
ParamTxBx="{Binding Path=Feed,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
|
||||
ParamTxBx="{Binding Path=TipFeed,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
|
||||
ParamTxBx="{Binding Path=StartFeed,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
|
||||
ParamTxBx="{Binding Path=EndFeed,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin_NoBorder}">
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<UniformGrid Columns="2" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2">
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TotLenTxBl}"
|
||||
ParamTxBx="{Binding Path=TotLen,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=TotLenErrorMsg}"/>
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LenTxBl}"
|
||||
ParamTxBx="{Binding Path=Len,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=LenErrorMsg}" />
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="2" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TotDiamTxBl}"
|
||||
ParamTxBx="{Binding Path=TotDiam,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=TotDiamErrorMsg}" />
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding DiamTxBl}"
|
||||
ParamTxBx="{Binding Path=Diam,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=DiamErrorMsg}" />
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin_NoBorder}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<UniformGrid Columns="2">
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StemDiamTxBl}"
|
||||
ParamTxBx="{Binding Path=StemDiam,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=StemDiamErrorMsg}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Row="1" Columns="2">
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ThickTxBl}"
|
||||
ParamTxBx="{Binding Path=Thick,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=ThickErrorMsg}" />
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding CornRadTxBl}"
|
||||
ParamTxBx="{Binding Path=CornRad,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamErrorMsg="{Binding Path=CornRadErrorMsg}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_NoHeader}">
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<UniformGrid Columns="2" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2">
|
||||
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadTxBl}"
|
||||
ParamCmBxList="{Binding Path=HeadList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedHead}"
|
||||
ParamDisplayMemberPath="HText"
|
||||
ParamErrorMsg="{Binding Path=SelectedHeadErrorMsg}"/>
|
||||
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExitParTxBl}"
|
||||
ParamCmBxList="{Binding Path=ExitList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedExit}"
|
||||
ParamErrorMsg="{Binding Path=SelectedExitErrorMsg}" />
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="2" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding CorrTxBl}"
|
||||
ParamTxBx="{Binding Path=Corr,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding TcPosTxBl}"
|
||||
ParamCmBxList="{Binding Path=TcPosList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedTcPos}" />
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Style="{DynamicResource GroupBoxStyle_Margin_NoBorder}">
|
||||
<UniformGrid Columns="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding UserNotesTxBl}"
|
||||
ParamTxBx="{Binding Path=UserNotes,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}" />
|
||||
|
||||
<Button Grid.Column="1"
|
||||
Content="+"
|
||||
Command="{Binding ShowNoteListComboCommand}"
|
||||
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
|
||||
Visibility="{Binding ShowNoteListCombo_Visibility}"
|
||||
Width="20"
|
||||
Height="20"/>
|
||||
|
||||
</Grid>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SystemNotesTxBl}"
|
||||
ParamTxBx="{Binding Path=SystemNotes,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding SysNotes_Visibility}"
|
||||
IsParamReadOnly="True"
|
||||
Margin="0,0,22,0"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Visibility="{Binding ComboAddVisibility}" Style="{DynamicResource GroupBoxStyle_NoHeader}">
|
||||
|
||||
<UniformGrid Columns="2">
|
||||
|
||||
<TextBlock Text="{Binding ToolNotesBxLbl,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="5,3,0,0"/>
|
||||
|
||||
<ComboBox ItemsSource="{Binding NotesListCombo,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
SelectedItem="{Binding SelNoteItemCombo,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="-13,1,2,1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Description,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="2.5"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="2" Visibility="{Binding ToolNoteVisibility}" Style="{DynamicResource GroupBoxStyle_Margin}">
|
||||
<GroupBox.Header>
|
||||
<Label Content="{Binding ToolNotesBxLbl}"/>
|
||||
</GroupBox.Header>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding NotesList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Description,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="2,8,10,0"/>
|
||||
<TabControl SelectedIndex="{Binding SelTypeValue}"
|
||||
Grid.Column="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="TEXT">
|
||||
<TextBox Text="{Binding Value,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
IsReadOnly="False"/>
|
||||
</TabItem>
|
||||
<TabItem Header="CHECKBOX">
|
||||
<CheckBox IsChecked="{Binding Value,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Margin="0,8,0,0"/>
|
||||
</TabItem>
|
||||
<TabItem Header="COMBOBOX">
|
||||
<ComboBox ItemsSource="{Binding ListValue,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
SelectedItem="{Binding SelListValue,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"/>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<Button Command="{Binding RemoveItemNoteCommand}"
|
||||
Content="-"
|
||||
Grid.Column="2"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="5,0,2,0"/>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</GroupBox>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ProbeParamPageV
|
||||
|
||||
End Class
|
||||
@@ -517,6 +517,7 @@ Public Class ToolDbWindowVM
|
||||
Private ChiselToolParamPageV As ChiselParamPageV
|
||||
Private MortiseToolParamPageV As MortiseParamPageV
|
||||
Private WaterjetToolParamPageV As WaterjetParamPageV
|
||||
Private ProbeToolParamPageV As ProbeParamPageV
|
||||
|
||||
Public ReadOnly Property ParamPageV As ContentControl
|
||||
Get
|
||||
@@ -843,6 +844,11 @@ Public Class ToolDbWindowVM
|
||||
WaterjetToolParamPageV.BorderBrushButton = m_BorderBrushButton
|
||||
WaterjetToolParamPageV.BorderThicknessButton = m_BorderThicknessButton
|
||||
Return WaterjetToolParamPageV
|
||||
|
||||
Case MCH_TF.PROBE
|
||||
If IsNothing(ProbeToolParamPageV) Then ProbeToolParamPageV = New ProbeParamPageV
|
||||
ProbeToolParamPageV.DataContext = selTool
|
||||
Return ProbeToolParamPageV
|
||||
End Select
|
||||
|
||||
' riattivo disegno utensile
|
||||
|
||||
@@ -20,6 +20,9 @@ Public Module MachineUtility
|
||||
''' </summary>
|
||||
Public Function ReadMachiningFamilies(sMachineIniPath As String) As MachiningsType()
|
||||
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_PROBING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.PROBING, .Name = EgtMsg(31220)}) ' Tastatura
|
||||
End If
|
||||
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Foratura e Taglio di lama nelle famiglie di lavorazioni attive è invertito
|
||||
If EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE Then
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachineIniPath) <> 0 Then
|
||||
@@ -123,6 +126,9 @@ Public Module MachineUtility
|
||||
Public Function ReadToolFamilies(sMachineIniPath As String) As ToolsFamily()
|
||||
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
|
||||
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_PROBE, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.PROBE, EgtMsg(31011))) ' Tastatore
|
||||
End If
|
||||
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Punta e Lama nelle famiglie di utensili attivi è invertito
|
||||
If EgtWPFLib5.ToolDbWindowVM.m_MatType = MaterialType.STONE Then
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, sMachineIniPath) <> 0 Then
|
||||
|
||||
Reference in New Issue
Block a user