diff --git a/VECTO/GUI/MainForm.Designer.vb b/VECTO/GUI/MainForm.Designer.vb index c2574209af51bce6640c5dce1fb644ae2b17d0a1..159fa53a5e68fc64f7182a2ef6d78fbd6fcd918f 100644 --- a/VECTO/GUI/MainForm.Designer.vb +++ b/VECTO/GUI/MainForm.Designer.vb @@ -75,6 +75,7 @@ Partial Class MainForm Me.ColumnHeader8 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.ColumnHeader9 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.ConMenFilelist = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.ShowInFolderMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.SaveListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.LoadListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.LoadDefaultListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -517,32 +518,39 @@ Partial Class MainForm ' 'ConMenFilelist ' - Me.ConMenFilelist.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.SaveListToolStripMenuItem, Me.LoadListToolStripMenuItem, Me.LoadDefaultListToolStripMenuItem, Me.ClearListToolStripMenuItem}) + Me.ConMenFilelist.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ShowInFolderMenuItem, Me.SaveListToolStripMenuItem, Me.LoadListToolStripMenuItem, Me.LoadDefaultListToolStripMenuItem, Me.ClearListToolStripMenuItem}) Me.ConMenFilelist.Name = "ConMenFilelist" - Me.ConMenFilelist.Size = New System.Drawing.Size(176, 92) + Me.ConMenFilelist.ShowImageMargin = False + Me.ConMenFilelist.Size = New System.Drawing.Size(151, 136) + ' + 'ShowInFolderMenuItem + ' + Me.ShowInFolderMenuItem.Name = "ShowInFolderMenuItem" + Me.ShowInFolderMenuItem.Size = New System.Drawing.Size(150, 22) + Me.ShowInFolderMenuItem.Text = "Show in Folder" ' 'SaveListToolStripMenuItem ' Me.SaveListToolStripMenuItem.Name = "SaveListToolStripMenuItem" - Me.SaveListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) + Me.SaveListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) Me.SaveListToolStripMenuItem.Text = "Save List..." ' 'LoadListToolStripMenuItem ' Me.LoadListToolStripMenuItem.Name = "LoadListToolStripMenuItem" - Me.LoadListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) + Me.LoadListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) Me.LoadListToolStripMenuItem.Text = "Load List..." ' 'LoadDefaultListToolStripMenuItem ' Me.LoadDefaultListToolStripMenuItem.Name = "LoadDefaultListToolStripMenuItem" - Me.LoadDefaultListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) + Me.LoadDefaultListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) Me.LoadDefaultListToolStripMenuItem.Text = "Load Autosave-List" ' 'ClearListToolStripMenuItem ' Me.ClearListToolStripMenuItem.Name = "ClearListToolStripMenuItem" - Me.ClearListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) + Me.ClearListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) Me.ClearListToolStripMenuItem.Text = "Clear List" ' 'LvMsg @@ -912,5 +920,6 @@ Partial Class MainForm Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents btnExportXML As System.Windows.Forms.Button Friend WithEvents btnImportXML As System.Windows.Forms.Button + Friend WithEvents ShowInFolderMenuItem As System.Windows.Forms.ToolStripMenuItem End Class diff --git a/VECTO/GUI/MainForm.vb b/VECTO/GUI/MainForm.vb index 2ddc299a2ec2167386fe195e417a0349670adacc..a158592baff9e6594f471500f69f6cf2d29ab09a 100644 --- a/VECTO/GUI/MainForm.vb +++ b/VECTO/GUI/MainForm.vb @@ -293,7 +293,6 @@ Imports VectoAuxiliaries VectoWorkerV3.ReportProgress(100, New VectoProgress With {.Target = "ListBoxWarning", .Message = message}) ElseIf level = "Error" Or level = "Fatal" Then VectoWorkerV3.ReportProgress(100, New VectoProgress With {.Target = "ListBoxError", .Message = message}) - End If End If End Sub @@ -1971,20 +1970,6 @@ Imports VectoAuxiliaries _mouseDownOnListView = False End Sub - Private Sub LvGEN_MouseUp(sender As Object, e As MouseEventArgs) Handles LvGEN.MouseUp - If e.Button = MouseButtons.Right Then - _conMenTarget = LvGEN - _conMenTarJob = True - - 'Locked functions show/hide - LoadListToolStripMenuItem.Enabled = Not _guIlocked - LoadDefaultListToolStripMenuItem.Enabled = Not _guIlocked - ClearListToolStripMenuItem.Enabled = Not _guIlocked - - ConMenFilelist.Show(MousePosition) - End If - End Sub - Private Sub RbDev_CheckedChanged(sender As Object, e As EventArgs) Handles RbDev.CheckedChanged End Sub @@ -1995,9 +1980,6 @@ Imports VectoAuxiliaries Public Link As String End Class - Private Sub CbExportJob_SelectedIndexChanged(sender As Object, e As EventArgs) - End Sub - Private Sub btnExportXML_Click(sender As Object, e As EventArgs) Handles btnExportXML.Click If LvGEN.SelectedItems.Count < 1 Then @@ -2046,6 +2028,36 @@ Imports VectoAuxiliaries MsgBox("Importing job failed: " + ex.Message) End Try End Sub + + Private Sub LvGEN_MouseClick(sender As Object, e As MouseEventArgs) Handles LvGEN.MouseClick + If e.Button = MouseButtons.Right Then + _conMenTarget = LvGEN + _conMenTarJob = True + + 'Locked functions show/hide + LoadListToolStripMenuItem.Enabled = Not _guIlocked + LoadDefaultListToolStripMenuItem.Enabled = Not _guIlocked + ClearListToolStripMenuItem.Enabled = Not _guIlocked + + ConMenFilelist.Show(MousePosition) + End If + End Sub + + Private Sub ShowInFolderMenuItem_Click(sender As Object, e As EventArgs) Handles ShowInFolderMenuItem.Click + + For Each item As ListViewItem In LvGEN.SelectedItems + Dim fileName As String = FileRepl(item.SubItems(0).Text) + If File.Exists(fileName) Then + Try + Process.Start("explorer", "/select,""" & fileName & "") + Catch ex As Exception + MsgBox("Failed to open file!") + End Try + Else + MsgBox("File not found: " & fileName) + End If + Next + End Sub End Class diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb index da55c0d0a0d9e43bce8563e7dd0bf0d4bb4c8b9b..58a8ba57e2c3847046c3c23e316c11d265b01111 100644 --- a/VECTO/GUI/VectoJobForm.vb +++ b/VECTO/GUI/VectoJobForm.vb @@ -1519,7 +1519,13 @@ lbDlog: GetPath(VectoFile)) End Sub - Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click + Private Sub LvCycles_MouseClick(sender As Object, e As MouseEventArgs) Handles LvCycles.MouseClick + If e.Button = MouseButtons.Right AndAlso LvCycles.SelectedItems.Count > 0 Then + OpenFiles(FileRepl(LvCycles.SelectedItems(0).SubItems(0).Text, GetPath(VectoFile))) + End If + End Sub + + Private Sub LvCycles_SelectedIndexChanged(sender As Object, e As EventArgs) Handles LvCycles.SelectedIndexChanged End Sub End Class diff --git a/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs b/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs index 91f78a7cbd89fcba766af77d05d3656f20f93cd4..90149c169de7fd43d9ea0b0c660cabd9c3719b09 100644 --- a/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs +++ b/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs @@ -78,14 +78,14 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl /// <summary> /// Response when a request was successful. /// </summary> - public class ResponseSuccess : AbstractResponse { - } + public class ResponseSuccess : AbstractResponse {} /// <summary> /// Response when the request resulted in an engine or gearbox overload. /// </summary> public class ResponseOverload : AbstractResponse { + public ResponseOverload() {} public Watt Delta { get; set; } public double Gradient { get; set; } } @@ -125,7 +125,10 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl public NewtonMeter EngineDragTorque { get; set; } } - internal class ResponseGearShift : AbstractResponse {} + internal class ResponseGearShift : AbstractResponse + { + public ResponseGearShift() {} + } internal class ResponseEngineSpeedTooLow : ResponseDryRun {} } \ No newline at end of file