diff --git a/VECTO/GUI/GearboxForm.Designer.vb b/VECTO/GUI/GearboxForm.Designer.vb index c89fef41700568bacdd8c8c0bd8077b3dfeb9100..6f80f975570445064d248f5c1693c91365da8dae 100644 --- a/VECTO/GUI/GearboxForm.Designer.vb +++ b/VECTO/GUI/GearboxForm.Designer.vb @@ -100,6 +100,19 @@ Partial Class GearboxForm Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.gbTC = New System.Windows.Forms.GroupBox() + Me.pnTcEngineering = New System.Windows.Forms.Panel() + Me.Label26 = New System.Windows.Forms.Label() + Me.TBTCShiftPolygon = New System.Windows.Forms.TextBox() + Me.tbTCmaxSpeed = New System.Windows.Forms.TextBox() + Me.TbTCrefrpm = New System.Windows.Forms.TextBox() + Me.Label27 = New System.Windows.Forms.Label() + Me.Label14 = New System.Windows.Forms.Label() + Me.BtTCShiftFileBrowse = New System.Windows.Forms.Button() + Me.Label1 = New System.Windows.Forms.Label() + Me.TbTCinertia = New System.Windows.Forms.TextBox() + Me.Label15 = New System.Windows.Forms.Label() + Me.Label18 = New System.Windows.Forms.Label() + Me.LblTCShiftFile = New System.Windows.Forms.Label() Me.BtTCfileOpen = New System.Windows.Forms.Button() Me.TbTCfile = New System.Windows.Forms.TextBox() Me.BtTCfileBrowse = New System.Windows.Forms.Button() @@ -125,19 +138,6 @@ Partial Class GearboxForm Me.lblGbxInfo = New System.Windows.Forms.Label() Me.btnExportXML = New System.Windows.Forms.Button() Me.btnExportAxlGearXML = New System.Windows.Forms.Button() - Me.pnTcEngineering = New System.Windows.Forms.Panel() - Me.Label26 = New System.Windows.Forms.Label() - Me.TBTCShiftPolygon = New System.Windows.Forms.TextBox() - Me.tbTCmaxSpeed = New System.Windows.Forms.TextBox() - Me.TbTCrefrpm = New System.Windows.Forms.TextBox() - Me.Label27 = New System.Windows.Forms.Label() - Me.Label14 = New System.Windows.Forms.Label() - Me.BtTCShiftFileBrowse = New System.Windows.Forms.Button() - Me.Label1 = New System.Windows.Forms.Label() - Me.TbTCinertia = New System.Windows.Forms.TextBox() - Me.Label15 = New System.Windows.Forms.Label() - Me.Label18 = New System.Windows.Forms.Label() - Me.LblTCShiftFile = New System.Windows.Forms.Label() Me.ToolStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -147,12 +147,12 @@ Partial Class GearboxForm Me.GroupBox2.SuspendLayout() Me.CmOpenFile.SuspendLayout() Me.gbTC.SuspendLayout() + Me.pnTcEngineering.SuspendLayout() Me.GroupBox4.SuspendLayout() Me.PnInertiaTI.SuspendLayout() CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit() Me.gbPowershiftLosses.SuspendLayout() Me.gbTCAccMin.SuspendLayout() - Me.pnTcEngineering.SuspendLayout() Me.SuspendLayout() ' 'ToolStrip1 @@ -711,6 +711,132 @@ Partial Class GearboxForm Me.gbTC.TabStop = False Me.gbTC.Text = "Torque Converter" ' + 'pnTcEngineering + ' + Me.pnTcEngineering.Controls.Add(Me.Label26) + Me.pnTcEngineering.Controls.Add(Me.TBTCShiftPolygon) + Me.pnTcEngineering.Controls.Add(Me.tbTCmaxSpeed) + Me.pnTcEngineering.Controls.Add(Me.TbTCrefrpm) + Me.pnTcEngineering.Controls.Add(Me.Label27) + Me.pnTcEngineering.Controls.Add(Me.Label14) + Me.pnTcEngineering.Controls.Add(Me.BtTCShiftFileBrowse) + Me.pnTcEngineering.Controls.Add(Me.Label1) + Me.pnTcEngineering.Controls.Add(Me.TbTCinertia) + Me.pnTcEngineering.Controls.Add(Me.Label15) + Me.pnTcEngineering.Controls.Add(Me.Label18) + Me.pnTcEngineering.Controls.Add(Me.LblTCShiftFile) + Me.pnTcEngineering.Location = New System.Drawing.Point(7, 63) + Me.pnTcEngineering.Name = "pnTcEngineering" + Me.pnTcEngineering.Size = New System.Drawing.Size(399, 93) + Me.pnTcEngineering.TabIndex = 3 + ' + 'Label26 + ' + Me.Label26.AutoSize = True + Me.Label26.Location = New System.Drawing.Point(1, 29) + Me.Label26.Name = "Label26" + Me.Label26.Size = New System.Drawing.Size(64, 13) + Me.Label26.TabIndex = 50 + Me.Label26.Text = "Max. Speed" + ' + 'TBTCShiftPolygon + ' + Me.TBTCShiftPolygon.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TBTCShiftPolygon.Location = New System.Drawing.Point(4, 70) + Me.TBTCShiftPolygon.Name = "TBTCShiftPolygon" + Me.TBTCShiftPolygon.Size = New System.Drawing.Size(349, 20) + Me.TBTCShiftPolygon.TabIndex = 49 + ' + 'tbTCmaxSpeed + ' + Me.tbTCmaxSpeed.Location = New System.Drawing.Point(75, 26) + Me.tbTCmaxSpeed.Name = "tbTCmaxSpeed" + Me.tbTCmaxSpeed.Size = New System.Drawing.Size(57, 20) + Me.tbTCmaxSpeed.TabIndex = 52 + ' + 'TbTCrefrpm + ' + Me.TbTCrefrpm.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TbTCrefrpm.Location = New System.Drawing.Point(296, 0) + Me.TbTCrefrpm.Name = "TbTCrefrpm" + Me.TbTCrefrpm.Size = New System.Drawing.Size(57, 20) + Me.TbTCrefrpm.TabIndex = 46 + ' + 'Label27 + ' + Me.Label27.AutoSize = True + Me.Label27.Location = New System.Drawing.Point(138, 29) + Me.Label27.Name = "Label27" + Me.Label27.Size = New System.Drawing.Size(30, 13) + Me.Label27.TabIndex = 51 + Me.Label27.Text = "[rpm]" + ' + 'Label14 + ' + Me.Label14.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Label14.AutoSize = True + Me.Label14.Location = New System.Drawing.Point(357, 3) + Me.Label14.Name = "Label14" + Me.Label14.Size = New System.Drawing.Size(40, 13) + Me.Label14.TabIndex = 41 + Me.Label14.Text = "[1/min]" + ' + 'BtTCShiftFileBrowse + ' + Me.BtTCShiftFileBrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtTCShiftFileBrowse.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.BtTCShiftFileBrowse.Location = New System.Drawing.Point(354, 68) + Me.BtTCShiftFileBrowse.Name = "BtTCShiftFileBrowse" + Me.BtTCShiftFileBrowse.Size = New System.Drawing.Size(24, 24) + Me.BtTCShiftFileBrowse.TabIndex = 47 + Me.BtTCShiftFileBrowse.TabStop = False + Me.BtTCShiftFileBrowse.UseVisualStyleBackColor = True + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(138, 3) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(36, 13) + Me.Label1.TabIndex = 43 + Me.Label1.Text = "[kgm²]" + ' + 'TbTCinertia + ' + Me.TbTCinertia.Location = New System.Drawing.Point(75, 0) + Me.TbTCinertia.Name = "TbTCinertia" + Me.TbTCinertia.Size = New System.Drawing.Size(57, 20) + Me.TbTCinertia.TabIndex = 45 + ' + 'Label15 + ' + Me.Label15.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Label15.AutoSize = True + Me.Label15.Location = New System.Drawing.Point(213, 3) + Me.Label15.Name = "Label15" + Me.Label15.Size = New System.Drawing.Size(77, 13) + Me.Label15.TabIndex = 42 + Me.Label15.Text = "Reference rpm" + ' + 'Label18 + ' + Me.Label18.AutoSize = True + Me.Label18.Location = New System.Drawing.Point(1, 3) + Me.Label18.Name = "Label18" + Me.Label18.Size = New System.Drawing.Size(36, 13) + Me.Label18.TabIndex = 44 + Me.Label18.Text = "Inertia" + ' + 'LblTCShiftFile + ' + Me.LblTCShiftFile.AutoSize = True + Me.LblTCShiftFile.Location = New System.Drawing.Point(1, 55) + Me.LblTCShiftFile.Name = "LblTCShiftFile" + Me.LblTCShiftFile.Size = New System.Drawing.Size(207, 13) + Me.LblTCShiftFile.TabIndex = 48 + Me.LblTCShiftFile.Text = "Torque converter shift polygons file (.vgbs)" + ' 'BtTCfileOpen ' Me.BtTCfileOpen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) @@ -951,132 +1077,6 @@ Partial Class GearboxForm Me.btnExportAxlGearXML.Text = "Exp. AxlGear as XML" Me.btnExportAxlGearXML.UseVisualStyleBackColor = True ' - 'pnTcEngineering - ' - Me.pnTcEngineering.Controls.Add(Me.Label26) - Me.pnTcEngineering.Controls.Add(Me.TBTCShiftPolygon) - Me.pnTcEngineering.Controls.Add(Me.tbTCmaxSpeed) - Me.pnTcEngineering.Controls.Add(Me.TbTCrefrpm) - Me.pnTcEngineering.Controls.Add(Me.Label27) - Me.pnTcEngineering.Controls.Add(Me.Label14) - Me.pnTcEngineering.Controls.Add(Me.BtTCShiftFileBrowse) - Me.pnTcEngineering.Controls.Add(Me.Label1) - Me.pnTcEngineering.Controls.Add(Me.TbTCinertia) - Me.pnTcEngineering.Controls.Add(Me.Label15) - Me.pnTcEngineering.Controls.Add(Me.Label18) - Me.pnTcEngineering.Controls.Add(Me.LblTCShiftFile) - Me.pnTcEngineering.Location = New System.Drawing.Point(7, 63) - Me.pnTcEngineering.Name = "pnTcEngineering" - Me.pnTcEngineering.Size = New System.Drawing.Size(399, 93) - Me.pnTcEngineering.TabIndex = 3 - ' - 'Label26 - ' - Me.Label26.AutoSize = True - Me.Label26.Location = New System.Drawing.Point(1, 29) - Me.Label26.Name = "Label26" - Me.Label26.Size = New System.Drawing.Size(64, 13) - Me.Label26.TabIndex = 50 - Me.Label26.Text = "Max. Speed" - ' - 'TBTCShiftPolygon - ' - Me.TBTCShiftPolygon.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TBTCShiftPolygon.Location = New System.Drawing.Point(4, 70) - Me.TBTCShiftPolygon.Name = "TBTCShiftPolygon" - Me.TBTCShiftPolygon.Size = New System.Drawing.Size(349, 20) - Me.TBTCShiftPolygon.TabIndex = 49 - ' - 'tbTCmaxSpeed - ' - Me.tbTCmaxSpeed.Location = New System.Drawing.Point(75, 26) - Me.tbTCmaxSpeed.Name = "tbTCmaxSpeed" - Me.tbTCmaxSpeed.Size = New System.Drawing.Size(57, 20) - Me.tbTCmaxSpeed.TabIndex = 52 - ' - 'TbTCrefrpm - ' - Me.TbTCrefrpm.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TbTCrefrpm.Location = New System.Drawing.Point(296, 0) - Me.TbTCrefrpm.Name = "TbTCrefrpm" - Me.TbTCrefrpm.Size = New System.Drawing.Size(57, 20) - Me.TbTCrefrpm.TabIndex = 46 - ' - 'Label27 - ' - Me.Label27.AutoSize = True - Me.Label27.Location = New System.Drawing.Point(138, 29) - Me.Label27.Name = "Label27" - Me.Label27.Size = New System.Drawing.Size(30, 13) - Me.Label27.TabIndex = 51 - Me.Label27.Text = "[rpm]" - ' - 'Label14 - ' - Me.Label14.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label14.AutoSize = True - Me.Label14.Location = New System.Drawing.Point(357, 3) - Me.Label14.Name = "Label14" - Me.Label14.Size = New System.Drawing.Size(40, 13) - Me.Label14.TabIndex = 41 - Me.Label14.Text = "[1/min]" - ' - 'BtTCShiftFileBrowse - ' - Me.BtTCShiftFileBrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtTCShiftFileBrowse.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon - Me.BtTCShiftFileBrowse.Location = New System.Drawing.Point(354, 68) - Me.BtTCShiftFileBrowse.Name = "BtTCShiftFileBrowse" - Me.BtTCShiftFileBrowse.Size = New System.Drawing.Size(24, 24) - Me.BtTCShiftFileBrowse.TabIndex = 47 - Me.BtTCShiftFileBrowse.TabStop = False - Me.BtTCShiftFileBrowse.UseVisualStyleBackColor = True - ' - 'Label1 - ' - Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(138, 3) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(36, 13) - Me.Label1.TabIndex = 43 - Me.Label1.Text = "[kgm²]" - ' - 'TbTCinertia - ' - Me.TbTCinertia.Location = New System.Drawing.Point(75, 0) - Me.TbTCinertia.Name = "TbTCinertia" - Me.TbTCinertia.Size = New System.Drawing.Size(57, 20) - Me.TbTCinertia.TabIndex = 45 - ' - 'Label15 - ' - Me.Label15.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label15.AutoSize = True - Me.Label15.Location = New System.Drawing.Point(213, 3) - Me.Label15.Name = "Label15" - Me.Label15.Size = New System.Drawing.Size(77, 13) - Me.Label15.TabIndex = 42 - Me.Label15.Text = "Reference rpm" - ' - 'Label18 - ' - Me.Label18.AutoSize = True - Me.Label18.Location = New System.Drawing.Point(1, 3) - Me.Label18.Name = "Label18" - Me.Label18.Size = New System.Drawing.Size(36, 13) - Me.Label18.TabIndex = 44 - Me.Label18.Text = "Inertia" - ' - 'LblTCShiftFile - ' - Me.LblTCShiftFile.AutoSize = True - Me.LblTCShiftFile.Location = New System.Drawing.Point(1, 55) - Me.LblTCShiftFile.Name = "LblTCShiftFile" - Me.LblTCShiftFile.Size = New System.Drawing.Size(207, 13) - Me.LblTCShiftFile.TabIndex = 48 - Me.LblTCShiftFile.Text = "Torque converter shift polygons file (.vgbs)" - ' 'GearboxForm ' Me.AcceptButton = Me.ButOK @@ -1125,6 +1125,8 @@ Partial Class GearboxForm Me.CmOpenFile.ResumeLayout(False) Me.gbTC.ResumeLayout(False) Me.gbTC.PerformLayout() + Me.pnTcEngineering.ResumeLayout(False) + Me.pnTcEngineering.PerformLayout() Me.GroupBox4.ResumeLayout(False) Me.GroupBox4.PerformLayout() Me.PnInertiaTI.ResumeLayout(False) @@ -1134,8 +1136,6 @@ Partial Class GearboxForm Me.gbPowershiftLosses.PerformLayout() Me.gbTCAccMin.ResumeLayout(False) Me.gbTCAccMin.PerformLayout() - Me.pnTcEngineering.ResumeLayout(False) - Me.pnTcEngineering.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb index 3e3e89ec900952ab14c86b4eec290ae6d0b47b01..ce627dd40915b78c8d2e58edd4715bf7225c11da 100644 --- a/VECTO/GUI/GearboxForm.vb +++ b/VECTO/GUI/GearboxForm.vb @@ -13,11 +13,8 @@ Imports System.Drawing.Imaging Imports System.Globalization Imports System.IO Imports System.Linq -Imports System.Text.RegularExpressions Imports System.Windows.Forms.DataVisualization.Charting Imports System.Xml.Linq -Imports Microsoft.WindowsAPICodePack.Dialogs -Imports TUGraz.IVT.VectoXML.Writer Imports TUGraz.VECTO.Input_Files Imports TUGraz.VectoCommon.InputData Imports TUGraz.VectoCommon.Models @@ -965,7 +962,7 @@ Public Class GearboxForm ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. End Sub - Private Sub BtTCShiftFileBrowse_Click(sender As Object, e As EventArgs) + Private Sub BtTCShiftFileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCShiftFileBrowse.Click If TorqueConverterShiftPolygonFileBrowser.OpenDialog(FileRepl(TBTCShiftPolygon.Text, GetPath(_gbxFile))) Then TBTCShiftPolygon.Text = GetFilenameWithoutDirectory(TorqueConverterShiftPolygonFileBrowser.Files(0), GetPath(_gbxFile)) @@ -973,35 +970,35 @@ Public Class GearboxForm End Sub Private Sub btnExportXML_Click(sender As Object, e As EventArgs) Handles btnExportXML.Click - Dim dialog As CommonOpenFileDialog = New CommonOpenFileDialog() - dialog.IsFolderPicker = True - If (dialog.ShowDialog() = CommonFileDialogResult.Cancel) Then + If Not FolderFileBrowser.OpenDialog("") Then Exit Sub End If + Dim filePath As String = FolderFileBrowser.Files(0) + Dim data As Gearbox = FillGearboxData(_gbxFile) If (Cfg.DeclMode) Then Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data, data) - export.Save(Path.Combine(dialog.FileName, data.ModelName + ".xml")) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) Else Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data, data) - export.Save(Path.Combine(dialog.FileName, data.ModelName + ".xml")) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) End If End Sub Private Sub btnExportAxlGearXML_Click(sender As Object, e As EventArgs) Handles btnExportAxlGearXML.Click - Dim dialog As CommonOpenFileDialog = New CommonOpenFileDialog() - dialog.IsFolderPicker = True - If (dialog.ShowDialog() = CommonFileDialogResult.Cancel) Then + If Not FolderFileBrowser.OpenDialog("") Then Exit Sub End If + Dim filePath As String = FolderFileBrowser.Files(0) + Dim data As Gearbox = FillGearboxData(_gbxFile) If (Cfg.DeclMode) Then Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data) - export.Save(Path.Combine(dialog.FileName, data.ModelName + ".xml")) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) Else Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data) - export.Save(Path.Combine(dialog.FileName, data.ModelName + ".xml")) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) End If End Sub End Class diff --git a/VECTO/GUI/XMLExportJobDialog.Designer.vb b/VECTO/GUI/XMLExportJobDialog.Designer.vb index 723ab9d9a6b0168ab28dd64f77332c8c06a38240..49e75db030f68deb02b84cd10affaa91fcd84085 100644 --- a/VECTO/GUI/XMLExportJobDialog.Designer.vb +++ b/VECTO/GUI/XMLExportJobDialog.Designer.vb @@ -28,7 +28,6 @@ Partial Class XMLExportJobDialog Me.btnExport = New System.Windows.Forms.Button() Me.cbSingleFile = New System.Windows.Forms.CheckBox() Me.label1 = New System.Windows.Forms.Label() - Me.btnBrowseOutputDir = New System.Windows.Forms.Button() Me.tbJobfile = New System.Windows.Forms.TextBox() Me.tbMode = New System.Windows.Forms.TextBox() Me.lblJobfile = New System.Windows.Forms.Label() @@ -36,6 +35,7 @@ Partial Class XMLExportJobDialog Me.tbDestination = New System.Windows.Forms.TextBox() Me.lblMode = New System.Windows.Forms.Label() Me.btnCancel = New System.Windows.Forms.Button() + Me.BtTCfileBrowse = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'lbVendor @@ -49,14 +49,14 @@ Partial Class XMLExportJobDialog ' 'tbVendor ' - Me.tbVendor.Location = New System.Drawing.Point(120, 94) + Me.tbVendor.Location = New System.Drawing.Point(131, 94) Me.tbVendor.Name = "tbVendor" Me.tbVendor.Size = New System.Drawing.Size(231, 20) Me.tbVendor.TabIndex = 24 ' 'btnExport ' - Me.btnExport.Location = New System.Drawing.Point(276, 150) + Me.btnExport.Location = New System.Drawing.Point(224, 150) Me.btnExport.Name = "btnExport" Me.btnExport.Size = New System.Drawing.Size(75, 23) Me.btnExport.TabIndex = 23 @@ -81,18 +81,9 @@ Partial Class XMLExportJobDialog Me.label1.TabIndex = 21 Me.label1.Text = "Output single XML File:" ' - 'btnBrowseOutputDir - ' - Me.btnBrowseOutputDir.Location = New System.Drawing.Point(357, 65) - Me.btnBrowseOutputDir.Name = "btnBrowseOutputDir" - Me.btnBrowseOutputDir.Size = New System.Drawing.Size(75, 23) - Me.btnBrowseOutputDir.TabIndex = 20 - Me.btnBrowseOutputDir.Text = "Browse" - Me.btnBrowseOutputDir.UseVisualStyleBackColor = True - ' 'tbJobfile ' - Me.tbJobfile.Location = New System.Drawing.Point(120, 20) + Me.tbJobfile.Location = New System.Drawing.Point(131, 20) Me.tbJobfile.Name = "tbJobfile" Me.tbJobfile.ReadOnly = True Me.tbJobfile.Size = New System.Drawing.Size(231, 20) @@ -100,7 +91,7 @@ Partial Class XMLExportJobDialog ' 'tbMode ' - Me.tbMode.Location = New System.Drawing.Point(120, 43) + Me.tbMode.Location = New System.Drawing.Point(131, 43) Me.tbMode.Name = "tbMode" Me.tbMode.ReadOnly = True Me.tbMode.Size = New System.Drawing.Size(231, 20) @@ -126,7 +117,7 @@ Partial Class XMLExportJobDialog ' 'tbDestination ' - Me.tbDestination.Location = New System.Drawing.Point(120, 68) + Me.tbDestination.Location = New System.Drawing.Point(131, 68) Me.tbDestination.Name = "tbDestination" Me.tbDestination.Size = New System.Drawing.Size(231, 20) Me.tbDestination.TabIndex = 15 @@ -142,24 +133,34 @@ Partial Class XMLExportJobDialog ' 'btnCancel ' - Me.btnCancel.Location = New System.Drawing.Point(357, 150) + Me.btnCancel.Location = New System.Drawing.Point(305, 150) Me.btnCancel.Name = "btnCancel" Me.btnCancel.Size = New System.Drawing.Size(75, 23) Me.btnCancel.TabIndex = 13 Me.btnCancel.Text = "Cancel" Me.btnCancel.UseVisualStyleBackColor = True ' + 'BtTCfileBrowse + ' + Me.BtTCfileBrowse.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.BtTCfileBrowse.Location = New System.Drawing.Point(362, 66) + Me.BtTCfileBrowse.Name = "BtTCfileBrowse" + Me.BtTCfileBrowse.Size = New System.Drawing.Size(24, 24) + Me.BtTCfileBrowse.TabIndex = 26 + Me.BtTCfileBrowse.TabStop = False + Me.BtTCfileBrowse.UseVisualStyleBackColor = True + ' 'XMLExportJobDialog ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(449, 185) + Me.ClientSize = New System.Drawing.Size(392, 185) + Me.Controls.Add(Me.BtTCfileBrowse) Me.Controls.Add(Me.lbVendor) Me.Controls.Add(Me.tbVendor) Me.Controls.Add(Me.btnExport) Me.Controls.Add(Me.cbSingleFile) Me.Controls.Add(Me.label1) - Me.Controls.Add(Me.btnBrowseOutputDir) Me.Controls.Add(Me.tbJobfile) Me.Controls.Add(Me.tbMode) Me.Controls.Add(Me.lblJobfile) @@ -179,7 +180,6 @@ Partial Class XMLExportJobDialog Private WithEvents btnExport As System.Windows.Forms.Button Private WithEvents cbSingleFile As System.Windows.Forms.CheckBox Private WithEvents label1 As System.Windows.Forms.Label - Private WithEvents btnBrowseOutputDir As System.Windows.Forms.Button Private WithEvents tbJobfile As System.Windows.Forms.TextBox Private WithEvents tbMode As System.Windows.Forms.TextBox Private WithEvents lblJobfile As System.Windows.Forms.Label @@ -187,4 +187,5 @@ Partial Class XMLExportJobDialog Private WithEvents tbDestination As System.Windows.Forms.TextBox Private WithEvents lblMode As System.Windows.Forms.Label Private WithEvents btnCancel As System.Windows.Forms.Button + Friend WithEvents BtTCfileBrowse As System.Windows.Forms.Button End Class diff --git a/VECTO/GUI/XMLExportJobDialog.vb b/VECTO/GUI/XMLExportJobDialog.vb index c5fb05335d1465647490cc68618c0680687e0cd2..8072b66ce3046925fc75ba1dc90a15e5f7e49727 100644 --- a/VECTO/GUI/XMLExportJobDialog.vb +++ b/VECTO/GUI/XMLExportJobDialog.vb @@ -1,11 +1,8 @@ Imports System.IO Imports System.Xml.Linq -Imports Microsoft.WindowsAPICodePack.Dialogs -Imports TUGraz.IVT.VectoXML.Writer Imports TUGraz.VectoCommon.Exceptions Imports TUGraz.VectoCommon.InputData Imports TUGraz.VectoCommon.Models -Imports TUGraz.VectoCore.Models.Declaration Imports TUGraz.VectoCore.OutputData.XML Public Class XMLExportJobDialog @@ -37,12 +34,13 @@ Public Class XMLExportJobDialog cbSingleFile.Enabled = allowSingleFile End Sub - Private Sub btnBrowseOutputDir_Click(sender As Object, e As EventArgs) Handles btnBrowseOutputDir.Click - Dim dialog As CommonOpenFileDialog = New CommonOpenFileDialog() - dialog.IsFolderPicker = True - If (dialog.ShowDialog() = CommonFileDialogResult.Ok) Then - tbDestination.Text = Path.GetFullPath(dialog.FileName) + Private Sub btnBrowseOutputDir_Click(sender As Object, e As EventArgs) Handles BtTCfileBrowse.Click + If Not FolderFileBrowser.OpenDialog("") Then + Exit Sub End If + + Dim filePath As String = FolderFileBrowser.Files(0) + tbDestination.Text = Path.GetFullPath(filePath) End Sub Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click diff --git a/VECTO/GUI/XMLImportJobDialog.vb b/VECTO/GUI/XMLImportJobDialog.vb index 50c7dded4da162cf135f7d6d160f9278169b562d..d462a579bde57f6623279b9fab1c509caee61582 100644 --- a/VECTO/GUI/XMLImportJobDialog.vb +++ b/VECTO/GUI/XMLImportJobDialog.vb @@ -1,5 +1,4 @@ Imports System.IO -Imports Microsoft.WindowsAPICodePack.Dialogs Public Class XMLImportJobDialog Private Sub btnBrowseJob_Click(sender As Object, e As EventArgs) Handles btnBrowseJob.Click @@ -10,11 +9,12 @@ Public Class XMLImportJobDialog End Sub Private Sub btnBrowseOutput_Click(sender As Object, e As EventArgs) Handles btnBrowseOutput.Click - Dim dialog As CommonOpenFileDialog = New CommonOpenFileDialog() - dialog.IsFolderPicker = True - If (dialog.ShowDialog() = CommonFileDialogResult.Ok) Then - tbDestination.Text = Path.GetFullPath(dialog.FileName) + If Not FolderFileBrowser.OpenDialog("") Then + Exit Sub End If + + Dim filePath As String = FolderFileBrowser.Files(0) + tbDestination.Text = Path.GetFullPath(filePath) End Sub Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click diff --git a/VECTO/VECTO.vbproj b/VECTO/VECTO.vbproj index 45117444d503eaa2e50ec337195b3d77a0a2dab7..3f965fcd2db740151a699b4e80e0e52dc769bfad 100644 --- a/VECTO/VECTO.vbproj +++ b/VECTO/VECTO.vbproj @@ -132,14 +132,6 @@ </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.Build.Framework" /> - <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\packages\Microsoft.WindowsAPICodePack.Core.1.1.0\lib\Microsoft.WindowsAPICodePack.dll</HintPath> - </Reference> - <Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\packages\Microsoft.WindowsAPICodePack.Shell.1.1.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath> - </Reference> <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> diff --git a/VECTO/packages.config b/VECTO/packages.config index 47375c31f95c9d83c04f58d7834b9488b6bb45b7..2f28545ebadb0a1ddd6f4d99a5a49309b01e8daf 100644 --- a/VECTO/packages.config +++ b/VECTO/packages.config @@ -1,7 +1,5 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="Microsoft.WindowsAPICodePack.Core" version="1.1.0" targetFramework="net45" /> - <package id="Microsoft.WindowsAPICodePack.Shell" version="1.1.0" targetFramework="net45" /> - <package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" /> - <package id="NLog" version="4.2.3" targetFramework="net45" /> +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" /> + <package id="NLog" version="4.2.3" targetFramework="net45" /> </packages> \ No newline at end of file diff --git a/packages/repositories.config b/packages/repositories.config index 96750bd818fd83effc632b7bb600d511c3f3c3a6..4602b99be1aafb216e83dfc07a5271d8caf8017c 100644 --- a/packages/repositories.config +++ b/packages/repositories.config @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <repositories> - <repository path="..\..\VECTO_API\Excel2XML\packages.config" /> - <repository path="..\..\VECTO_API\VectoDB\packages.config" /> - <repository path="..\..\VECTO-Bugreports\BugReportTests\packages.config" /> <repository path="..\VECTO\packages.config" /> <repository path="..\VECTOAux\VectoAuxiliaries\packages.config" /> <repository path="..\VECTOAux\VectoAuxiliariesTests\packages.config" />