Compare commits

..

3 Commits

Author SHA1 Message Date
markvitariusfamex
b7e43ffddb Merge branch 'master' of https://gitea.vitarius.hu/svhs/Robotizalunk---doksikeszito 2025-09-24 13:52:42 +02:00
2885e38ee5 working fejléc for excel 2025-06-26 10:38:19 +02:00
9d8e9864ae mai 2025-06-20 15:05:28 +02:00
4 changed files with 265 additions and 146 deletions

View File

@@ -19,7 +19,7 @@
WindowStyle="None"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen" Height="283">
WindowStartupLocation="CenterScreen" Height="329">
<!-- ******** THEME ******** -->
@@ -75,10 +75,24 @@
<!-- listbox placeholder -->
<ListBox x:Name="ListBox1"
Margin="265,126,10,0"
Margin="400,10,10,0"
Background="{x:Null}"
BorderThickness="2"
BorderBrush="#FFECE0E0" Height="70" VerticalAlignment="Top"/>
BorderBrush="#FFECE0E0"
Height="191"
VerticalAlignment="Top"
FontSize="14">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
<Setter Property="Height" Value="64"/>
<Setter Property="MinHeight" Value="64"/>
<Setter Property="Padding" Value="10,0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
<!-- BAL OLDALI CSOPORTOK -->
<StackPanel Margin="10,10,0,0" HorizontalAlignment="Left" Width="180">
@@ -92,7 +106,7 @@
</GroupBox>
</StackPanel>
<StackPanel Margin="0,10,215,252" HorizontalAlignment="Right" Width="190">
<StackPanel Margin="0,122,410,140" HorizontalAlignment="Right" Width="180" Visibility="Collapsed">
<GroupBox Header="Dokumentáció " Padding="5" Height="73">
<StackPanel>
<RadioButton x:Name="NamingSyntaxStefani" Content="Robotizálunk"/>
@@ -101,7 +115,8 @@
</GroupBox>
</StackPanel>
<StackPanel Margin="10,126,0,71" HorizontalAlignment="Left" Width="250">
<StackPanel Margin="10,126,0,71" HorizontalAlignment="Left" Width="250" Visibility="Collapsed">
<GroupBox Header="Egyéb" Padding="5">
<StackPanel>
<CheckBox x:Name="AutomaticFolderSelect" Content="Automatikus mappa választás"/>
@@ -112,18 +127,25 @@
<!-- Rajz használat módja -->
<GroupBox Header="Rajz használat módja"
Margin="390,10,0,235" Width="200" HorizontalAlignment="Left" Padding="5">
Margin="195,10,0,235"
Width="200"
HorizontalAlignment="Left"
Padding="5">
<StackPanel>
<RadioButton x:Name="MaterialRadioButton3" Content="Aktív rajz használata"/>
<RadioButton x:Name="KulonAloRajzok" Content="Különálló rajzok használata"/>
<RadioButton x:Name="MaterialRadioButton3"
Content="Aktív rajz használata"
IsChecked="True"/>
<RadioButton x:Name="KulonAloRajzok"
Content="Különálló rajzok használata"/>
</StackPanel>
</GroupBox>
<!-- Böngészés gomb -->
<Button x:Name="Files_Browse"
Content="Böngészés"
HorizontalAlignment="Left"
Margin="390,87,0,0"
Margin="195,112,0,0"
VerticalAlignment="Top"
Width="200" Height="30"
FontSize="10"/>

View File

@@ -675,11 +675,15 @@ Public Class MainWindow
If isSeperateDrawing = True Then
If y = 0 Then
Try
HandleNames(FileNameMod, y, i, ".xls", Model1)
CreateExcel(Session, FileNameMod)
End If
Catch ex As Exception
End Try
Else
HandleNames(FileNameMod, y, i, ".xls", Model1)
@@ -864,7 +868,7 @@ Public Class MainWindow
FileNamesWOExtention = sresult
Else
FileNamesWOExtention = "NO_VIEW_ON_SHEET"
FileNamesWOExtention = System.IO.Path.GetFileNameWithoutExtension(model1.FileName)
End If
@@ -1032,6 +1036,7 @@ Public Class MainWindow
'table.Erase()
End Sub
Private Sub HandleExcel(model1 As IpfcModel, FilnameMod As String, TableContent(,) As String)
xlApp = New Excel.Application
@@ -1043,6 +1048,53 @@ Public Class MainWindow
Dim ColCount As Integer = TableContent.GetLength(1) - 1
'Fill V-numbers...I think
Dim ColCount2 As Integer = TableContent.GetLength(1)
Dim o As Integer = 2
If ColCount2 > 13 Then
For row = 3 To RowCount - 3
Console.WriteLine(TableContent(row, 7))
' If TableContent(row, 7).Length < 2 Then
' TableContent(row, 7) = " "
' End If
'Ha "V-"-vel kezdődik a string akkor kitölti a
' If TableContent(row, 7).Substring(0, 2) <> "V-" Then
' For col = 1 To ColCount
' xlWorkSheet.Cells(row + 5, col) = TableContent(row, col)
'xt
' Else
Dim u As Integer = 0
xlWorkSheet.Cells(row + u, 1) = TableContent(row, 1)
xlWorkSheet.Cells(row + u, 2) = TableContent(row, 3)
'xlWorkSheet.Cells(row + u, 3) = TableContent(row, 3)
' xlWorkSheet.Cells(row + u, 3) = TableContent(row, 4)
xlWorkSheet.Cells(row + u, 3) = TableContent(row, 5)
xlWorkSheet.Cells(row + u, 4) = TableContent(row, 6)
xlWorkSheet.Cells(row + u, 5) = TableContent(row, 7)
xlWorkSheet.Cells(row + u, 6) = TableContent(row, 8)
xlWorkSheet.Cells(row + u, 9) = TableContent(row, 9).Replace("n", "ø")
' xlWorkSheet.Cells(row + u, 9) = TableContent(row, 9)
xlWorkSheet.Cells(row + u, 10) = TableContent(row, 10)
xlWorkSheet.Cells(row + u, 11) = TableContent(row, 11)
xlWorkSheet.Cells(row + u, 12) = TableContent(row, 12)
xlWorkSheet.Cells(row + u, 13) = TableContent(row, 13)
xlWorkSheet.Cells(row + u, 14) = TableContent(row, 14)
' End If
'
Next
'
Else
For row = 3 To RowCount - 3
Console.WriteLine(TableContent(row, 7))
@@ -1055,7 +1107,9 @@ Public Class MainWindow
' xlWorkSheet.Cells(row + 5, col) = TableContent(row, col)
'xt
' Else
Dim u As Integer = 1
xlWorkSheet.Cells(row + u, 1) = TableContent(row, 1)
xlWorkSheet.Cells(row + u, 2) = TableContent(row, 2)
xlWorkSheet.Cells(row + u, 3) = TableContent(row, 3)
@@ -1067,64 +1121,59 @@ Public Class MainWindow
xlWorkSheet.Cells(row + u, 9) = TableContent(row, 9).Replace("n", "ø")
' xlWorkSheet.Cells(row + u, 9) = TableContent(row, 9)
xlWorkSheet.Cells(row + u, 10) = TableContent(row, 10)
' End If
'
Next
'Do I really need this ?!
SHMNum = CellToString(table, 1, 5)
NameT = CellToString(table, 3, 5)
MachineName = CellToString(table, 3, 7)
SHMDate = CellToString(table, 4, 7)
SubMachineName = CellToString(table, 2, 7)
AudiNum = CellToString(table, 1, 7)
'A fejléc kitöltése
xlWorkSheet.Cells(1, 5) = SHMNum
' xlWorkSheet.Cells(4, 10) = SHMNum
xlWorkSheet.Cells(3, 5) = NameT
xlWorkSheet.Cells(4, 5) = NameT
xlWorkSheet.Cells(3, 7) = MachineName
xlWorkSheet.Cells(4, 7) = SHMDate
xlWorkSheet.Cells(4, 9) = SHMDate
xlWorkSheet.Cells(2, 7) = SubMachineName
If namingsyntax = "stefani" Then
xlWorkSheet.Cells(1, 7) = ""
ElseIf namingsyntax = "audi" Then
xlWorkSheet.Cells(1, 7) = AudiNum
Else
Try
Dim tempparam As String = ""
ReadParam(model1, "BESTELLER", tempparam)
xlWorkSheet.Cells(1, 7) = tempparam
Catch ex As Exception
xlWorkSheet.Cells(1, 7) = " "
End Try
'SHMNum = CellToString(table, 1, 5)
' NameT = CellToString(table, 3, 5)
' MachineName = CellToString(table, 3, 7)
' SHMDate = CellToString(table, 4, 7)
' SubMachineName = CellToString(table, 2, 7)
' AudiNum = CellToString(table, 1, 7)
End If
'Delete useless cells
xlWorkSheet.Range(xlWorkSheet.Cells(RowCount + 6, 1), xlWorkSheet.Cells(3000, 10)).Clear()
If namingsyntax = "audi" = True Then
xlApp.Run("Atalakitas_doksihoz")
'Check for hianyzik in "Herstellaradressen
xlWorkSheet = xlWorkBook.Worksheets("Herstelleradressen")
ddas = IsNothing(xlWorkSheet.Range(xlWorkSheet.Cells(1, 1), xlWorkSheet.Cells(100, 10)).Find("#HIÁNYZIK"))
' If ddas = False Then
' End If
'A fejléc kitöltéseű
xlWorkSheet.Cells(1, 4) = CellToString(table, 1, 4) 'rajszam
xlWorkSheet.Cells(1, 5) = CellToString(table, 1, 5) 'rajszam
xlWorkSheet.Cells(1, 7) = CellToString(table, 1, 7) 'megnevezés
xlWorkSheet.Cells(1, 6) = CellToString(table, 1, 6) 'megnevezés
xlWorkSheet.Cells(1, 10) = CellToString(table, 3, 5) 'tervező
xlWorkSheet.Cells(1, 9) = CellToString(table, 3, 1) 'tervező
xlWorkSheet.Cells(2, 5) = CellToString(table, 2, 5) 'gyártó
xlWorkSheet.Cells(2, 1) = CellToString(table, 2, 1) 'gyártó
xlWorkSheet.Cells(2, 7) = CellToString(table, 2, 7) 'projektszám
xlWorkSheet.Cells(2, 6) = CellToString(table, 2, 6) 'projektszám
xlWorkSheet.Cells(2, 10) = CellToString(table, 3, 7) 'dátum
xlWorkSheet.Cells(2, 9) = CellToString(table, 3, 6) 'dátum
xlWorkSheet.Cells(3, 1) = CellToString(table, 4, 1) 'lsz
xlWorkSheet.Cells(3, 2) = CellToString(table, 4, 2) 'po
xlWorkSheet.Cells(3, 3) = CellToString(table, 4, 3) 'db
xlWorkSheet.Cells(3, 4) = CellToString(table, 4, 4) 'kp
xlWorkSheet.Cells(3, 5) = CellToString(table, 4, 5) 'megnevezes
xlWorkSheet.Cells(3, 6) = CellToString(table, 4, 6) 'rajzszam
xlWorkSheet.Cells(3, 7) = CellToString(table, 4, 7) 'gyarto
xlWorkSheet.Cells(3, 8) = CellToString(table, 4, 8) 'anyagminoseg
xlWorkSheet.Cells(3, 9) = CellToString(table, 4, 9) 'méret
xlWorkSheet.Cells(3, 10) = CellToString(table, 4, 10) 'megjegyzes
End If
If xlstype = "hanon" Then
xlApp.Run("Atalakitas_doksihoz_hanon")
End If
'
'Save and close, set display alerts back to true
xlWorkBook.Save()
@@ -1346,12 +1395,22 @@ Public Class MainWindow
End If
HandleTable(session, TableContent, MoreThanOneTable)
' Generálja a temp fájl elérési útját
Dim tempPath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), Path.GetFileName(FilnameMod))
Dim currentDirectory As String = Directory.GetCurrentDirectory() ' Gets the running directory
currentDirectory = "C:\Creo_config\06 - Creo\18 - Utilities"
Dim sourcePath As String = Path.Combine(currentDirectory, "Darabjegyzek.xlsm")
currentDirectory = "C:\Creo11\18-Utilities\Dokumentacio"
Dim ColCount2 As Integer = TableContent.GetLength(1)
Dim sourcePath As String
If ColCount2 > 13 Then
sourcePath = Path.Combine(currentDirectory, "Darabjegyzek_beszerzes.xlsm")
Else
sourcePath = Path.Combine(currentDirectory, "Darabjegyzek.xlsm")
End If
' Generálja a temp fájl elérési útját
' Másolja az XLS-t az ideiglenes mappába
File.Copy(sourcePath, tempPath, True)
@@ -1764,7 +1823,7 @@ Public Class MainWindow
Try
Dim CellStr As String = CellToString(iTablea, 2, 5)
'MsgBox(CellStr)
If CellStr = "Famex Tools Kft." Or CellStr = "Famex Tools" Then
If CellStr = "Robotizalunk Kft." Or CellStr = "Robotizalunk" Then
MoreThanOne = MoreThanOne + 1
iTableRef = iTablea
End If
@@ -1779,6 +1838,8 @@ Public Class MainWindow
' iLayer.
End Sub
Private Sub HideShowTables(session As IpfcBaseSession, model1 As IpfcModel, HideShow As Boolean)
Try
Dim iTables As IpfcTables
Dim iTableOnwer As IpfcTableOwner
@@ -1812,7 +1873,7 @@ Public Class MainWindow
Cstringseq = iTablea.GetText(iTCells, 0)
If Cstringseq.Item(0) = "Stefani" Then
If Cstringseq.Item(0) = "Robot" Then
If HideShow = True Then
iLayer.AddItem(iTablea)
Else
@@ -1827,6 +1888,10 @@ Public Class MainWindow
End Try
Next
Catch ex As Exception
End Try
' iLayer.
End Sub

View File

@@ -1,11 +1,4 @@
<Window x:Class="Form3"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -14,12 +7,51 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mde="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
mc:Ignorable="d"
Title="Elkészült" Height="183.994" Width="370.188" FontSize="13" WindowStyle="None" WindowStartupLocation="CenterScreen">
<Grid Height="178" VerticalAlignment="Top" HorizontalAlignment="Left" Width="370" Margin="0,0,-8,0">
<TextBox x:Name="TextBox1" HorizontalAlignment="Left" Height="68" Margin="0,63,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="360" IsReadOnly="True" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" BorderThickness="1" VerticalScrollBarVisibility="Auto"/>
<Button x:Name="MaterialRaisedButton1" Content="Ok" HorizontalAlignment="Left" Margin="10,136,0,0" VerticalAlignment="Top" Width="156" RenderTransformOrigin="0.785,1.101"/>
<Label x:Name="Label1" Content="A dokumentáció elkészült" Margin="0,10,10,0" FontSize="20" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Height="48" VerticalAlignment="Top"/>
<Button x:Name="MaterialRaisedButton2" Content="Tartalmazó mappa" HorizontalAlignment="Left" Margin="187,136,0,0" VerticalAlignment="Top" Width="156" RenderTransformOrigin="0.785,1.101"/>
Title="Elkészült"
Height="183.994"
Width="370.188"
FontSize="13"
WindowStyle="None"
WindowStartupLocation="CenterScreen"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
<!-- Téma beállítása Teal színnel -->
<Window.Resources>
<materialDesign:BundledTheme BaseTheme="Light"
PrimaryColor="Teal"
SecondaryColor="Teal"/>
</Window.Resources>
<Grid Height="178" VerticalAlignment="Top" HorizontalAlignment="Left" Width="370" Margin="0,0,-8,0">
<Button x:Name="MaterialRaisedButton1"
Content="Ok"
Style="{StaticResource MaterialDesignRaisedButton}"
HorizontalAlignment="Left"
Margin="10,106,0,0"
VerticalAlignment="Top"
Width="156"/>
<Label x:Name="Label1"
Content="A dokumentáció elkészült"
Margin="5,10,5,0"
FontSize="20"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Height="48"
VerticalAlignment="Top"/>
<Button x:Name="MaterialRaisedButton2"
Content="Tartalmazó mappa"
Style="{StaticResource MaterialDesignRaisedButton}"
HorizontalAlignment="Left"
Margin="185,106,0,0"
VerticalAlignment="Top"
Width="156"/>
</Grid>
</Window>

View File

@@ -2,7 +2,7 @@
Private Sub Form3_Loaded(ByVal sender As Object, ByVal e As EventArgs) Handles MyClass.Loaded
TextBox1.Text = MainWindow.sresult
' TextBox1.Text = MainWindow.sresult
' MaterialLabel2.Text = "Hibák száma: " & MainWindow.HibakSzama
If MainWindow.HibakSzama = 0 Then
@@ -25,9 +25,9 @@
Process.Start(MainWindow.workDir)
End Sub
Private Sub TextBox1_TextChanged(sender As Object, e As TextChangedEventArgs) Handles TextBox1.TextChanged
' Private Sub TextBox1_TextChanged(sender As Object, e As TextChangedEventArgs) Handles TextBox1.TextChanged
End Sub
' End Sub
Private Sub MaterialRaisedButton1_Click_1(sender As Object, e As RoutedEventArgs) Handles MaterialRaisedButton1.Click