Creation of files structure
This commit is contained in:
parent
018a381f5d
commit
3e8fe756d4
Binary file not shown.
Binary file not shown.
|
|
@ -25,46 +25,57 @@ Partial Class Main_Menu
|
|||
Me.Button_Settings = New System.Windows.Forms.Button()
|
||||
Me.Button_Multiple = New System.Windows.Forms.Button()
|
||||
Me.Button_Individual = New System.Windows.Forms.Button()
|
||||
Me.Button_FilePath = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Button_Settings
|
||||
'
|
||||
Me.Button_Settings.Location = New System.Drawing.Point(91, 73)
|
||||
Me.Button_Settings.Location = New System.Drawing.Point(68, 59)
|
||||
Me.Button_Settings.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.Button_Settings.Name = "Button_Settings"
|
||||
Me.Button_Settings.Size = New System.Drawing.Size(169, 51)
|
||||
Me.Button_Settings.Size = New System.Drawing.Size(127, 41)
|
||||
Me.Button_Settings.TabIndex = 5
|
||||
Me.Button_Settings.Text = "Settings"
|
||||
Me.Button_Settings.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button_Multiple
|
||||
'
|
||||
Me.Button_Multiple.Location = New System.Drawing.Point(978, 540)
|
||||
Me.Button_Multiple.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.Button_Multiple.Location = New System.Drawing.Point(734, 439)
|
||||
Me.Button_Multiple.Name = "Button_Multiple"
|
||||
Me.Button_Multiple.Size = New System.Drawing.Size(156, 114)
|
||||
Me.Button_Multiple.Size = New System.Drawing.Size(117, 93)
|
||||
Me.Button_Multiple.TabIndex = 4
|
||||
Me.Button_Multiple.Text = "Multiple"
|
||||
Me.Button_Multiple.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button_Individual
|
||||
'
|
||||
Me.Button_Individual.Location = New System.Drawing.Point(978, 372)
|
||||
Me.Button_Individual.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.Button_Individual.Location = New System.Drawing.Point(734, 302)
|
||||
Me.Button_Individual.Name = "Button_Individual"
|
||||
Me.Button_Individual.Size = New System.Drawing.Size(156, 114)
|
||||
Me.Button_Individual.Size = New System.Drawing.Size(117, 93)
|
||||
Me.Button_Individual.TabIndex = 3
|
||||
Me.Button_Individual.Text = "Individual"
|
||||
Me.Button_Individual.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button_FilePath
|
||||
'
|
||||
Me.Button_FilePath.Location = New System.Drawing.Point(240, 59)
|
||||
Me.Button_FilePath.Name = "Button_FilePath"
|
||||
Me.Button_FilePath.Size = New System.Drawing.Size(123, 41)
|
||||
Me.Button_FilePath.TabIndex = 6
|
||||
Me.Button_FilePath.Text = "Filepath"
|
||||
Me.Button_FilePath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Main_Menu
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1395, 772)
|
||||
Me.ClientSize = New System.Drawing.Size(1046, 627)
|
||||
Me.Controls.Add(Me.Button_FilePath)
|
||||
Me.Controls.Add(Me.Button_Settings)
|
||||
Me.Controls.Add(Me.Button_Multiple)
|
||||
Me.Controls.Add(Me.Button_Individual)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
|
||||
Me.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.Name = "Main_Menu"
|
||||
Me.Text = "Main_Menu"
|
||||
Me.ResumeLayout(False)
|
||||
|
|
@ -74,4 +85,5 @@ Partial Class Main_Menu
|
|||
Friend WithEvents Button_Settings As Button
|
||||
Friend WithEvents Button_Multiple As Button
|
||||
Friend WithEvents Button_Individual As Button
|
||||
Friend WithEvents Button_FilePath As Button
|
||||
End Class
|
||||
|
|
|
|||
|
|
@ -31,5 +31,29 @@
|
|||
Settings.ButtonClicked(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub Button_FilePath_Click(sender As Object, e As EventArgs) Handles Button_FilePath.Click
|
||||
Dim ofd As FolderBrowserDialog = New FolderBrowserDialog
|
||||
If ofd.ShowDialog() <> DialogResult.Cancel Then
|
||||
Settings.exportFolder = ofd.SelectedPath
|
||||
|
||||
Settings.folderPaths.Add("order", Settings.exportFolder & "\Order " & GUI_Export.Get_RandomNumber(1000, 9999))
|
||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("order"))
|
||||
|
||||
Settings.folderPaths.Add("object_" & 1, Settings.folderPaths("order") & "\Object " & 1) 'FIXA
|
||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1))
|
||||
|
||||
Settings.folderPaths.Add("object_" & 1 & "_models3D", Settings.folderPaths("object_" & 1) & "\3D-models") 'FIXA
|
||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1 & "_models3D"))
|
||||
|
||||
Settings.folderPaths.Add("object_" & 1 & "_models3D_grating", Settings.folderPaths("object_" & 1 & "_models3D") & "\Floor gratings") 'FIXA
|
||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1 & "_models3D_grating"))
|
||||
|
||||
Settings.folderPaths.Add("object_" & 1 & "_models3D_grating_support", Settings.folderPaths("object_" & 1 & "_models3D_grating") & "\Support models") 'FIXA
|
||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1 & "_models3D_grating_support"))
|
||||
|
||||
Settings.folderPaths.Add("object_" & 1 & "_models3D_frame", Settings.folderPaths("object_" & 1 & "_models3D") & "\Frames") 'FIXA
|
||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1 & "_models3D_frame"))
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
Public Class Settings
|
||||
Public Shared filesFolder As String '= Individual.filepath ' Hämta från settings
|
||||
Public Shared HLCtFolder As String '= Individual.filepath & "\X2021" ' Hämta från settings
|
||||
Public Shared exportFolder As String
|
||||
Public Shared folderPaths As New Dictionary(Of String, String)
|
||||
|
||||
' --- Settings button clicked ---
|
||||
Public Shared Sub ButtonClicked(sender As Object, e As EventArgs)
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ Public Class GUI_Export
|
|||
End Sub
|
||||
|
||||
|
||||
Private Shared Function Get_RandomNumber(Min As Integer, Max As Integer) As Integer '
|
||||
Public Shared Function Get_RandomNumber(Min As Integer, Max As Integer) As Integer '
|
||||
Static Generator As System.Random = New System.Random()
|
||||
Return Generator.Next(Min, Max)
|
||||
End Function
|
||||
|
|
|
|||
Loading…
Reference in New Issue