Merge commit '3cc407429e1d3d803b4aebf2525906d689d8f6a8'
@@ -47,7 +47,16 @@
|
||||
Width="200"
|
||||
Height="25"
|
||||
Margin="2.5,5,2.5,5"
|
||||
BorderThickness="1"/>
|
||||
BorderThickness="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding Image}" Stretch="Uniform"/>
|
||||
<TextBlock Text="{Binding Name}" Margin="10,0,0,0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="5,5,5,0">
|
||||
|
||||
@@ -388,11 +388,44 @@ Public Class EgtManageFileDialogVM
|
||||
|
||||
EgtFolder.SetEgtManageFileDialogVM(Me)
|
||||
|
||||
For i As Integer = 0 To drives.Count() - 1
|
||||
Dim directory As New EgtFolder(drives(i).RootDirectory, Nothing, "\Resources\EgtDialog\Root.png")
|
||||
m_RootList.Add(directory)
|
||||
' Aggiungo cartella di sistema
|
||||
Dim directoryFolder As EgtFolder = Nothing
|
||||
For Each driver As DriveInfo In drives
|
||||
Select Case driver.Name
|
||||
Case "C:\"
|
||||
directoryFolder = New EgtFolder(driver.RootDirectory, Nothing, "\Resources\EgtDialog\Windows.png")
|
||||
Case "I:\"
|
||||
directoryFolder = New EgtFolder(driver.RootDirectory, Nothing, "\Resources\EgtDialog\HardDrive.png")
|
||||
Case "R:\"
|
||||
directoryFolder = New EgtFolder(driver.RootDirectory, Nothing, "\Resources\EgtDialog\HardDrive.png")
|
||||
Case "S:\"
|
||||
directoryFolder = New EgtFolder(driver.RootDirectory, Nothing, "\Resources\EgtDialog\HardDrive.png")
|
||||
Case Else
|
||||
directoryFolder = New EgtFolder(driver.RootDirectory, Nothing, "\Resources\EgtDialog\Root.png")
|
||||
End Select
|
||||
m_RootList.Add(directoryFolder)
|
||||
Next
|
||||
|
||||
' Aggiungo Desktop
|
||||
Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
||||
Dim desktopFolder As New EgtFolder(New DirectoryInfo(desktopPath), Nothing, "\Resources\EgtDialog\Desktop.png")
|
||||
m_RootList.Add(desktopFolder)
|
||||
|
||||
' Aggiungo Download
|
||||
Dim downloadsPath As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) & "\Downloads"
|
||||
If Directory.Exists(downloadsPath) Then
|
||||
Dim downloadsFolder As New EgtFolder(New DirectoryInfo(downloadsPath), Nothing, "\Resources\EgtDialog\Download.png")
|
||||
m_RootList.Add(downloadsFolder)
|
||||
End If
|
||||
|
||||
' Aggiungo ultima cartella
|
||||
Dim lastPath As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, "LastImpDir", "", lastPath, IniFile.m_sIniFile)
|
||||
If Directory.Exists(lastPath) Then
|
||||
Dim lastFolder As New EgtFolder(New DirectoryInfo(lastPath), Nothing, "\Resources\EgtDialog\Folder.png")
|
||||
m_RootList.Add(lastFolder)
|
||||
End If
|
||||
|
||||
m_SelFilter = New EgtExstension()
|
||||
SetVisualizzationList()
|
||||
|
||||
@@ -418,17 +451,21 @@ Public Class EgtManageFileDialogVM
|
||||
m_ViewModeList = New ObservableCollection(Of IdNameStruct)
|
||||
Dim ItemVisualization As New IdNameStruct With {
|
||||
.Id = 0,
|
||||
.Name = EgtMsg(15067) ' Elenco
|
||||
.Name = EgtMsg(15067), ' Elenco
|
||||
.Image = "\Resources\EgtDialog\List.png"
|
||||
}
|
||||
m_ViewModeList.Add(ItemVisualization)
|
||||
ItemVisualization.Id = 3
|
||||
ItemVisualization.Name = EgtMsg(15068) ' Dettagli
|
||||
ItemVisualization.Image = "\Resources\EgtDialog\Details.png"
|
||||
m_ViewModeList.Add(ItemVisualization)
|
||||
ItemVisualization.Id = 1
|
||||
ItemVisualization.Name = EgtMsg(15069) ' Riquadri
|
||||
ItemVisualization.Image = "\Resources\EgtDialog\Tiles.png"
|
||||
m_ViewModeList.Add(ItemVisualization)
|
||||
ItemVisualization.Id = 2
|
||||
ItemVisualization.Name = EgtMsg(15070) ' Contenuto
|
||||
ItemVisualization.Image = "\Resources\EgtDialog\Content.png"
|
||||
m_ViewModeList.Add(ItemVisualization)
|
||||
End Sub
|
||||
|
||||
@@ -822,7 +859,7 @@ Public Class EgtFolder
|
||||
Private Function ItemFilter(Item As Object) As Boolean
|
||||
Dim CurrItem As EgtItem = TryCast(Item, EgtItem)
|
||||
If Not IsNothing(CurrItem) AndAlso Not IsNothing(m_refEgtManageFileDialogVM.m_SelFilter.m_sExstension) Then
|
||||
If CurrItem.sTypeItem = m_refEgtManageFileDialogVM.m_SelFilter.m_sExstension.TrimStart("*"c) Then
|
||||
If String.Equals(CurrItem.sTypeItem, m_refEgtManageFileDialogVM.m_SelFilter.m_sExstension.TrimStart("*"c), StringComparison.OrdinalIgnoreCase) Then
|
||||
Return True
|
||||
ElseIf m_refEgtManageFileDialogVM.m_SelFilter.m_sExstension.TrimStart("*"c) = ".*" Then
|
||||
Return True
|
||||
|
||||
@@ -624,6 +624,30 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtMessageBox\Hand.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Desktop.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Download.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Windows.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\HardDrive.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Content.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Details.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\List.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDialog\Tiles.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Dll32\EgtWPFLib5.dll
|
||||
|
||||
|
After Width: | Height: | Size: 658 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 576 B |
|
After Width: | Height: | Size: 662 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 627 B |
|
After Width: | Height: | Size: 634 B |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -3749,8 +3749,29 @@ Public Class ToolTreeViewItem
|
||||
'}
|
||||
'If OpenFileDialog.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return
|
||||
m_Draw = Path.GetFileName(OpenFileDialog.FileName)
|
||||
Dim NameList As New List(Of String)
|
||||
Dim DbName As String = String.Empty
|
||||
' Se il file è preso da una cartella diversa da quella degli utensili viene copiato nella cartella degli utensili
|
||||
Dim sFilePath As String = Path.GetDirectoryName(OpenFileDialog.FileName)
|
||||
For Each ItemsTool As FamilyToolTreeViewItem In LibMap.refToolDbWindowVM.ToolsList
|
||||
If ItemsTool.IsExpanded Then
|
||||
For Each ItemTool As ToolTreeViewItem In ItemsTool.Items
|
||||
If String.IsNullOrEmpty(ItemTool.Draw) Then
|
||||
EgtTdbSetCurrTool(ItemTool.Name)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DRAW, ItemTool.Draw)
|
||||
End If
|
||||
If Not String.IsNullOrWhiteSpace(ItemTool.Draw) AndAlso Not ItemTool.IsSelected AndAlso m_Draw.Equals(ItemTool.Draw) Then
|
||||
NameList.Add(ItemTool.Name)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
EgtTdbSetCurrTool(LibMap.refToolDbWindowVM.SelTool.Name)
|
||||
If NameList.Count > 0 Then
|
||||
Dim sNameTool As String = String.Join(Environment.NewLine, NameList)
|
||||
MessageBox.Show(EgtMsg(6082) & Environment.NewLine & sNameTool & EgtMsg(6083), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
Return
|
||||
End If
|
||||
If sFilePath <> ToolDbWindowVM.m_sToolDirPath Then
|
||||
File.Copy(OpenFileDialog.FileName, Path.Combine(ToolDbWindowVM.m_sToolDirPath, m_Draw))
|
||||
End If
|
||||
|
||||
@@ -22,11 +22,27 @@ Public Structure IdNameStruct
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Image As String
|
||||
Public Property Image As String
|
||||
Get
|
||||
Return m_Image
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Image = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Id As Integer, Name As String)
|
||||
m_Id = Id
|
||||
m_Name = Name
|
||||
End Sub
|
||||
|
||||
Sub New(Id As Integer, Name As String, Image As String)
|
||||
m_Id = Id
|
||||
m_Name = Name
|
||||
m_Image = Image
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return Name
|
||||
End Function
|
||||
|
||||