diff --git a/VECTO/GUI/F_MAINForm.Designer.vb b/VECTO/GUI/F_MAINForm.Designer.vb index 777811090a6260791e4cc9e5d72125b03bd2fd5a..d355a8afce5c441960cb6ce5b1438c0452bf0f14 100644 --- a/VECTO/GUI/F_MAINForm.Designer.vb +++ b/VECTO/GUI/F_MAINForm.Designer.vb @@ -32,1007 +32,1020 @@ Partial Class F_MAINForm 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() - Me.components = New System.ComponentModel.Container() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(F_MAINForm)) - Me.StatusBAR = New System.Windows.Forms.StatusStrip() - Me.ToolStripLbStatus = New System.Windows.Forms.ToolStripStatusLabel() - Me.ToolStripProgBarJob = New System.Windows.Forms.ToolStripProgressBar() - Me.ToolStripProgBarOverall = New System.Windows.Forms.ToolStripProgressBar() - Me.TabControl1 = New System.Windows.Forms.TabControl() - Me.TabPageGEN = New System.Windows.Forms.TabPage() - Me.LbDecl = New System.Windows.Forms.Label() - Me.PictureBox1 = New System.Windows.Forms.PictureBox() - Me.BtGENdown = New System.Windows.Forms.Button() - Me.BtGENup = New System.Windows.Forms.Button() - Me.LbAutoShDown = New System.Windows.Forms.Label() - Me.ChBoxAllGEN = New System.Windows.Forms.CheckBox() - Me.LvGEN = New System.Windows.Forms.ListView() - Me.ColGENpath = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColGENstatus = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ButtonGENopt = New System.Windows.Forms.Button() - Me.ButtonGENremove = New System.Windows.Forms.Button() - Me.Button1 = New System.Windows.Forms.Button() - Me.ButtonGENadd = New System.Windows.Forms.Button() - Me.TabPageDRI = New System.Windows.Forms.TabPage() - Me.BtDRIdown = New System.Windows.Forms.Button() - Me.BtDRIup = New System.Windows.Forms.Button() - Me.ChBoxAllDRI = New System.Windows.Forms.CheckBox() - Me.LvDRI = New System.Windows.Forms.ListView() - Me.ColDRIpath = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColDRIstatus = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ButtonDRIedit = New System.Windows.Forms.Button() - Me.ButtonDRIremove = New System.Windows.Forms.Button() - Me.ButtonDRIadd = New System.Windows.Forms.Button() - Me.TabPgOptions = New System.Windows.Forms.TabPage() - Me.GrBoxBATCH = New System.Windows.Forms.GroupBox() - Me.ChBoxBatchSubD = New System.Windows.Forms.CheckBox() - Me.Label2 = New System.Windows.Forms.Label() - Me.ButBObrowse = New System.Windows.Forms.Button() - Me.CbBOmode = New System.Windows.Forms.ComboBox() - Me.TbBOpath = New System.Windows.Forms.TextBox() - Me.GrBoxSTD = New System.Windows.Forms.GroupBox() - Me.ChBoxAutoSD = New System.Windows.Forms.CheckBox() - Me.PanelOptAllg = New System.Windows.Forms.Panel() - Me.ChBoxModOut = New System.Windows.Forms.CheckBox() - Me.GroupBox1 = New System.Windows.Forms.GroupBox() - Me.RbDev = New System.Windows.Forms.RadioButton() - Me.RbDecl = New System.Windows.Forms.RadioButton() - Me.PnDeclOpt = New System.Windows.Forms.Panel() - Me.CbBatch = New System.Windows.Forms.CheckBox() - Me.ChBoxCyclDistCor = New System.Windows.Forms.CheckBox() - Me.ChBoxUseGears = New System.Windows.Forms.CheckBox() - Me.TabPageDEV = New System.Windows.Forms.TabPage() - Me.LvDEVoptions = New System.Windows.Forms.ListView() - Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader7 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - 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.SaveListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.LoadListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.LoadDefaultListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ClearListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() - Me.LvMsg = New System.Windows.Forms.ListView() - Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader2 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader3 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() - Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() - Me.ToolStripBtNew = New System.Windows.Forms.ToolStripButton() - Me.ToolStripBtOpen = New System.Windows.Forms.ToolStripButton() - Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() - Me.ToolStripDrDnBtTools = New System.Windows.Forms.ToolStripDropDownButton() - Me.GENEditorToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() - Me.VEHEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.EngineEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.GearboxEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.GraphToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator() - Me.SignOrVerifyFilesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator() - Me.OpenLogToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.SettingsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripDrDnBtInfo = New System.Windows.Forms.ToolStripDropDownButton() - Me.UserManualToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.UpdateNotesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() - Me.CreateActivationFileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.AboutVECTOToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() - Me.CmDEV = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.TmProgSec = New System.Windows.Forms.Timer(Me.components) - Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.OpenInGraphWindowToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.StatusBAR.SuspendLayout() - Me.TabControl1.SuspendLayout() - Me.TabPageGEN.SuspendLayout() - CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.TabPageDRI.SuspendLayout() - Me.TabPgOptions.SuspendLayout() - Me.GrBoxBATCH.SuspendLayout() - Me.PanelOptAllg.SuspendLayout() - Me.GroupBox1.SuspendLayout() - Me.PnDeclOpt.SuspendLayout() - Me.TabPageDEV.SuspendLayout() - Me.ConMenFilelist.SuspendLayout() - CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainer1.Panel1.SuspendLayout() - Me.SplitContainer1.Panel2.SuspendLayout() - Me.SplitContainer1.SuspendLayout() - Me.ToolStrip1.SuspendLayout() - Me.CmOpenFile.SuspendLayout() - Me.SuspendLayout() - ' - 'StatusBAR - ' - Me.StatusBAR.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLbStatus, Me.ToolStripProgBarJob, Me.ToolStripProgBarOverall}) - Me.StatusBAR.Location = New System.Drawing.Point(0, 616) - Me.StatusBAR.Name = "StatusBAR" - Me.StatusBAR.Size = New System.Drawing.Size(1136, 22) - Me.StatusBAR.TabIndex = 7 - Me.StatusBAR.Text = "StatusBAR" - ' - 'ToolStripLbStatus - ' - Me.ToolStripLbStatus.Name = "ToolStripLbStatus" - Me.ToolStripLbStatus.Size = New System.Drawing.Size(1121, 17) - Me.ToolStripLbStatus.Spring = True - Me.ToolStripLbStatus.Text = "Status Text" - Me.ToolStripLbStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - ' - 'ToolStripProgBarJob - ' - Me.ToolStripProgBarJob.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right - Me.ToolStripProgBarJob.AutoSize = False - Me.ToolStripProgBarJob.Name = "ToolStripProgBarJob" - Me.ToolStripProgBarJob.Size = New System.Drawing.Size(100, 16) - Me.ToolStripProgBarJob.Style = System.Windows.Forms.ProgressBarStyle.Continuous - Me.ToolStripProgBarJob.ToolTipText = "overall progress" - Me.ToolStripProgBarJob.Visible = False - ' - 'ToolStripProgBarOverall - ' - Me.ToolStripProgBarOverall.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right - Me.ToolStripProgBarOverall.AutoSize = False - Me.ToolStripProgBarOverall.Name = "ToolStripProgBarOverall" - Me.ToolStripProgBarOverall.Size = New System.Drawing.Size(100, 16) - Me.ToolStripProgBarOverall.Style = System.Windows.Forms.ProgressBarStyle.Continuous - Me.ToolStripProgBarOverall.ToolTipText = "job progress" - Me.ToolStripProgBarOverall.Visible = False - ' - 'TabControl1 - ' - Me.TabControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TabControl1.Controls.Add(Me.TabPageGEN) - Me.TabControl1.Controls.Add(Me.TabPageDRI) - Me.TabControl1.Controls.Add(Me.TabPgOptions) - Me.TabControl1.Controls.Add(Me.TabPageDEV) - Me.TabControl1.Location = New System.Drawing.Point(3, 3) - Me.TabControl1.Name = "TabControl1" - Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(1126, 372) - Me.TabControl1.TabIndex = 10 - ' - 'TabPageGEN - ' - Me.TabPageGEN.Controls.Add(Me.LbDecl) - Me.TabPageGEN.Controls.Add(Me.PictureBox1) - Me.TabPageGEN.Controls.Add(Me.BtGENdown) - Me.TabPageGEN.Controls.Add(Me.BtGENup) - Me.TabPageGEN.Controls.Add(Me.LbAutoShDown) - Me.TabPageGEN.Controls.Add(Me.ChBoxAllGEN) - Me.TabPageGEN.Controls.Add(Me.LvGEN) - Me.TabPageGEN.Controls.Add(Me.ButtonGENopt) - Me.TabPageGEN.Controls.Add(Me.ButtonGENremove) - Me.TabPageGEN.Controls.Add(Me.Button1) - Me.TabPageGEN.Controls.Add(Me.ButtonGENadd) - Me.TabPageGEN.Location = New System.Drawing.Point(4, 22) - Me.TabPageGEN.Name = "TabPageGEN" - Me.TabPageGEN.Padding = New System.Windows.Forms.Padding(3) - Me.TabPageGEN.Size = New System.Drawing.Size(1118, 346) - Me.TabPageGEN.TabIndex = 0 - Me.TabPageGEN.Text = "Job Files" - Me.TabPageGEN.UseVisualStyleBackColor = True - ' - 'LbDecl - ' - Me.LbDecl.AutoSize = True - Me.LbDecl.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.LbDecl.Location = New System.Drawing.Point(6, 97) - Me.LbDecl.Name = "LbDecl" - Me.LbDecl.Size = New System.Drawing.Size(107, 13) - Me.LbDecl.TabIndex = 19 - Me.LbDecl.Text = "Declaration Mode" - Me.LbDecl.Visible = False - ' - 'PictureBox1 - ' - Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image) - Me.PictureBox1.Location = New System.Drawing.Point(6, 6) - Me.PictureBox1.Name = "PictureBox1" - Me.PictureBox1.Size = New System.Drawing.Size(105, 44) - Me.PictureBox1.TabIndex = 18 - Me.PictureBox1.TabStop = False - ' - 'BtGENdown - ' - Me.BtGENdown.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtGENdown.Image = Global.VECTO.My.Resources.Resources.Actions_arrow_down_icon - Me.BtGENdown.Location = New System.Drawing.Point(996, 317) - Me.BtGENdown.Name = "BtGENdown" - Me.BtGENdown.Size = New System.Drawing.Size(30, 23) - Me.BtGENdown.TabIndex = 6 - Me.BtGENdown.UseVisualStyleBackColor = True - ' - 'BtGENup - ' - Me.BtGENup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtGENup.Image = Global.VECTO.My.Resources.Resources.Actions_arrow_up_icon - Me.BtGENup.Location = New System.Drawing.Point(960, 317) - Me.BtGENup.Name = "BtGENup" - Me.BtGENup.Size = New System.Drawing.Size(30, 23) - Me.BtGENup.TabIndex = 4 - Me.BtGENup.UseVisualStyleBackColor = True - ' - 'LbAutoShDown - ' - Me.LbAutoShDown.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.LbAutoShDown.AutoSize = True - Me.LbAutoShDown.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.LbAutoShDown.ForeColor = System.Drawing.Color.Red - Me.LbAutoShDown.Location = New System.Drawing.Point(253, 322) - Me.LbAutoShDown.Name = "LbAutoShDown" - Me.LbAutoShDown.Size = New System.Drawing.Size(225, 13) - Me.LbAutoShDown.TabIndex = 17 - Me.LbAutoShDown.Text = "!!! Automatic Shutdown is activated !!!" - Me.LbAutoShDown.Visible = False - ' - 'ChBoxAllGEN - ' - Me.ChBoxAllGEN.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.ChBoxAllGEN.AutoSize = True - Me.ChBoxAllGEN.Location = New System.Drawing.Point(129, 321) - Me.ChBoxAllGEN.Name = "ChBoxAllGEN" - Me.ChBoxAllGEN.Size = New System.Drawing.Size(37, 17) - Me.ChBoxAllGEN.TabIndex = 16 - Me.ChBoxAllGEN.Text = "All" - Me.ChBoxAllGEN.UseVisualStyleBackColor = True - ' - 'LvGEN - ' - Me.LvGEN.AllowDrop = True - Me.LvGEN.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.LvGEN.CheckBoxes = True - Me.LvGEN.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColGENpath, Me.ColGENstatus}) - Me.LvGEN.FullRowSelect = True - Me.LvGEN.GridLines = True - Me.LvGEN.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable - Me.LvGEN.HideSelection = False - Me.LvGEN.LabelEdit = True - Me.LvGEN.Location = New System.Drawing.Point(117, 6) - Me.LvGEN.Name = "LvGEN" - Me.LvGEN.Size = New System.Drawing.Size(995, 305) - Me.LvGEN.TabIndex = 14 - Me.LvGEN.UseCompatibleStateImageBehavior = False - Me.LvGEN.View = System.Windows.Forms.View.Details - ' - 'ColGENpath - ' - Me.ColGENpath.Text = "Filepath" - Me.ColGENpath.Width = 797 - ' - 'ColGENstatus - ' - Me.ColGENstatus.Text = "" - Me.ColGENstatus.Width = 175 - ' - 'ButtonGENopt - ' - Me.ButtonGENopt.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonGENopt.Location = New System.Drawing.Point(1032, 317) - Me.ButtonGENopt.Name = "ButtonGENopt" - Me.ButtonGENopt.Size = New System.Drawing.Size(80, 23) - Me.ButtonGENopt.TabIndex = 8 - Me.ButtonGENopt.Text = "List Options" - Me.ButtonGENopt.UseVisualStyleBackColor = True - ' - 'ButtonGENremove - ' - Me.ButtonGENremove.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonGENremove.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonGENremove.Image = Global.VECTO.My.Resources.Resources.minus_circle_icon - Me.ButtonGENremove.Location = New System.Drawing.Point(924, 317) - Me.ButtonGENremove.Name = "ButtonGENremove" - Me.ButtonGENremove.Size = New System.Drawing.Size(30, 23) - Me.ButtonGENremove.TabIndex = 2 - Me.ButtonGENremove.UseVisualStyleBackColor = True - ' - 'Button1 - ' - Me.Button1.Image = Global.VECTO.My.Resources.Resources.Play_icon - Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.Button1.Location = New System.Drawing.Point(6, 53) - Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(105, 41) - Me.Button1.TabIndex = 12 - Me.Button1.Text = "START" - Me.Button1.UseVisualStyleBackColor = True - ' - 'ButtonGENadd - ' - Me.ButtonGENadd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonGENadd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonGENadd.Image = Global.VECTO.My.Resources.Resources.plus_circle_icon - Me.ButtonGENadd.Location = New System.Drawing.Point(888, 317) - Me.ButtonGENadd.Name = "ButtonGENadd" - Me.ButtonGENadd.Size = New System.Drawing.Size(30, 23) - Me.ButtonGENadd.TabIndex = 1 - Me.ButtonGENadd.UseVisualStyleBackColor = True - ' - 'TabPageDRI - ' - Me.TabPageDRI.Controls.Add(Me.BtDRIdown) - Me.TabPageDRI.Controls.Add(Me.BtDRIup) - Me.TabPageDRI.Controls.Add(Me.ChBoxAllDRI) - Me.TabPageDRI.Controls.Add(Me.LvDRI) - Me.TabPageDRI.Controls.Add(Me.ButtonDRIedit) - Me.TabPageDRI.Controls.Add(Me.ButtonDRIremove) - Me.TabPageDRI.Controls.Add(Me.ButtonDRIadd) - Me.TabPageDRI.Location = New System.Drawing.Point(4, 22) - Me.TabPageDRI.Name = "TabPageDRI" - Me.TabPageDRI.Padding = New System.Windows.Forms.Padding(3) - Me.TabPageDRI.Size = New System.Drawing.Size(1118, 346) - Me.TabPageDRI.TabIndex = 1 - Me.TabPageDRI.Text = "Driving Cycles" - Me.TabPageDRI.UseVisualStyleBackColor = True - ' - 'BtDRIdown - ' - Me.BtDRIdown.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtDRIdown.Image = Global.VECTO.My.Resources.Resources.Actions_arrow_down_icon - Me.BtDRIdown.Location = New System.Drawing.Point(996, 317) - Me.BtDRIdown.Name = "BtDRIdown" - Me.BtDRIdown.Size = New System.Drawing.Size(30, 23) - Me.BtDRIdown.TabIndex = 3 - Me.BtDRIdown.UseVisualStyleBackColor = True - ' - 'BtDRIup - ' - Me.BtDRIup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtDRIup.Image = Global.VECTO.My.Resources.Resources.Actions_arrow_up_icon - Me.BtDRIup.Location = New System.Drawing.Point(960, 317) - Me.BtDRIup.Name = "BtDRIup" - Me.BtDRIup.Size = New System.Drawing.Size(30, 23) - Me.BtDRIup.TabIndex = 2 - Me.BtDRIup.UseVisualStyleBackColor = True - ' - 'ChBoxAllDRI - ' - Me.ChBoxAllDRI.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.ChBoxAllDRI.AutoSize = True - Me.ChBoxAllDRI.Location = New System.Drawing.Point(15, 321) - Me.ChBoxAllDRI.Name = "ChBoxAllDRI" - Me.ChBoxAllDRI.Size = New System.Drawing.Size(37, 17) - Me.ChBoxAllDRI.TabIndex = 7 - Me.ChBoxAllDRI.Text = "All" - Me.ChBoxAllDRI.UseVisualStyleBackColor = True - ' - 'LvDRI - ' - Me.LvDRI.AllowDrop = True - Me.LvDRI.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.LvDRI.CheckBoxes = True - Me.LvDRI.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColDRIpath, Me.ColDRIstatus}) - Me.LvDRI.FullRowSelect = True - Me.LvDRI.GridLines = True - Me.LvDRI.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable - Me.LvDRI.HideSelection = False - Me.LvDRI.LabelEdit = True - Me.LvDRI.Location = New System.Drawing.Point(6, 6) - Me.LvDRI.Name = "LvDRI" - Me.LvDRI.Size = New System.Drawing.Size(1106, 305) - Me.LvDRI.TabIndex = 6 - Me.LvDRI.UseCompatibleStateImageBehavior = False - Me.LvDRI.View = System.Windows.Forms.View.Details - ' - 'ColDRIpath - ' - Me.ColDRIpath.Text = "Filepath" - Me.ColDRIpath.Width = 915 - ' - 'ColDRIstatus - ' - Me.ColDRIstatus.Text = "" - Me.ColDRIstatus.Width = 150 - ' - 'ButtonDRIedit - ' - Me.ButtonDRIedit.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonDRIedit.Location = New System.Drawing.Point(1032, 317) - Me.ButtonDRIedit.Name = "ButtonDRIedit" - Me.ButtonDRIedit.Size = New System.Drawing.Size(80, 23) - Me.ButtonDRIedit.TabIndex = 4 - Me.ButtonDRIedit.Text = "List Options" - Me.ButtonDRIedit.UseVisualStyleBackColor = True - ' - 'ButtonDRIremove - ' - Me.ButtonDRIremove.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonDRIremove.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonDRIremove.Image = Global.VECTO.My.Resources.Resources.minus_circle_icon - Me.ButtonDRIremove.Location = New System.Drawing.Point(924, 317) - Me.ButtonDRIremove.Name = "ButtonDRIremove" - Me.ButtonDRIremove.Size = New System.Drawing.Size(30, 23) - Me.ButtonDRIremove.TabIndex = 1 - Me.ButtonDRIremove.UseVisualStyleBackColor = True - ' - 'ButtonDRIadd - ' - Me.ButtonDRIadd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonDRIadd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonDRIadd.Image = Global.VECTO.My.Resources.Resources.plus_circle_icon - Me.ButtonDRIadd.Location = New System.Drawing.Point(888, 317) - Me.ButtonDRIadd.Name = "ButtonDRIadd" - Me.ButtonDRIadd.Size = New System.Drawing.Size(30, 23) - Me.ButtonDRIadd.TabIndex = 0 - Me.ButtonDRIadd.UseVisualStyleBackColor = True - ' - 'TabPgOptions - ' - Me.TabPgOptions.Controls.Add(Me.GrBoxBATCH) - Me.TabPgOptions.Controls.Add(Me.GrBoxSTD) - Me.TabPgOptions.Controls.Add(Me.ChBoxAutoSD) - Me.TabPgOptions.Controls.Add(Me.PanelOptAllg) - Me.TabPgOptions.Location = New System.Drawing.Point(4, 22) - Me.TabPgOptions.Name = "TabPgOptions" - Me.TabPgOptions.Padding = New System.Windows.Forms.Padding(3) - Me.TabPgOptions.Size = New System.Drawing.Size(1118, 346) - Me.TabPgOptions.TabIndex = 2 - Me.TabPgOptions.Text = "Options" - Me.TabPgOptions.UseVisualStyleBackColor = True - ' - 'GrBoxBATCH - ' - Me.GrBoxBATCH.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.GrBoxBATCH.Controls.Add(Me.ChBoxBatchSubD) - Me.GrBoxBATCH.Controls.Add(Me.Label2) - Me.GrBoxBATCH.Controls.Add(Me.ButBObrowse) - Me.GrBoxBATCH.Controls.Add(Me.CbBOmode) - Me.GrBoxBATCH.Controls.Add(Me.TbBOpath) - Me.GrBoxBATCH.Location = New System.Drawing.Point(6, 224) - Me.GrBoxBATCH.Name = "GrBoxBATCH" - Me.GrBoxBATCH.Size = New System.Drawing.Size(1106, 116) - Me.GrBoxBATCH.TabIndex = 5 - Me.GrBoxBATCH.TabStop = False - Me.GrBoxBATCH.Text = "Batch Options" - ' - 'ChBoxBatchSubD - ' - Me.ChBoxBatchSubD.AutoSize = True - Me.ChBoxBatchSubD.Location = New System.Drawing.Point(14, 46) - Me.ChBoxBatchSubD.Name = "ChBoxBatchSubD" - Me.ChBoxBatchSubD.Size = New System.Drawing.Size(206, 17) - Me.ChBoxBatchSubD.TabIndex = 4 - Me.ChBoxBatchSubD.Text = "Create Subdirectories for modal results" - Me.ChBoxBatchSubD.UseVisualStyleBackColor = True - ' - 'Label2 - ' - Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(11, 22) - Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(64, 13) - Me.Label2.TabIndex = 2 - Me.Label2.Text = "Output Path" - ' - 'ButBObrowse - ' - Me.ButBObrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButBObrowse.Location = New System.Drawing.Point(1051, 18) - Me.ButBObrowse.Name = "ButBObrowse" - Me.ButBObrowse.Size = New System.Drawing.Size(28, 20) - Me.ButBObrowse.TabIndex = 3 - Me.ButBObrowse.Text = "..." - Me.ButBObrowse.UseVisualStyleBackColor = True - ' - 'CbBOmode - ' - Me.CbBOmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.CbBOmode.FormattingEnabled = True - Me.CbBOmode.Items.AddRange(New Object() {"Directory of .vecto File", "Custom Directory"}) - Me.CbBOmode.Location = New System.Drawing.Point(81, 19) - Me.CbBOmode.Name = "CbBOmode" - Me.CbBOmode.Size = New System.Drawing.Size(140, 21) - Me.CbBOmode.TabIndex = 0 - ' - 'TbBOpath - ' - Me.TbBOpath.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TbBOpath.Location = New System.Drawing.Point(227, 18) - Me.TbBOpath.Name = "TbBOpath" - Me.TbBOpath.Size = New System.Drawing.Size(818, 20) - Me.TbBOpath.TabIndex = 1 - ' - 'GrBoxSTD - ' - Me.GrBoxSTD.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.GrBoxSTD.Location = New System.Drawing.Point(6, 224) - Me.GrBoxSTD.Name = "GrBoxSTD" - Me.GrBoxSTD.Size = New System.Drawing.Size(1106, 116) - Me.GrBoxSTD.TabIndex = 14 - Me.GrBoxSTD.TabStop = False - Me.GrBoxSTD.Text = "Standard Options" - ' - 'ChBoxAutoSD - ' - Me.ChBoxAutoSD.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ChBoxAutoSD.AutoSize = True - Me.ChBoxAutoSD.Location = New System.Drawing.Point(943, 6) - Me.ChBoxAutoSD.Name = "ChBoxAutoSD" - Me.ChBoxAutoSD.Size = New System.Drawing.Size(169, 17) - Me.ChBoxAutoSD.TabIndex = 13 - Me.ChBoxAutoSD.Text = "Shutdown system after last job" - Me.ChBoxAutoSD.UseVisualStyleBackColor = True - ' - 'PanelOptAllg - ' - Me.PanelOptAllg.Controls.Add(Me.ChBoxModOut) - Me.PanelOptAllg.Controls.Add(Me.GroupBox1) - Me.PanelOptAllg.Controls.Add(Me.PnDeclOpt) - Me.PanelOptAllg.Location = New System.Drawing.Point(6, 6) - Me.PanelOptAllg.Name = "PanelOptAllg" - Me.PanelOptAllg.Size = New System.Drawing.Size(358, 212) - Me.PanelOptAllg.TabIndex = 0 - ' - 'ChBoxModOut - ' - Me.ChBoxModOut.AutoSize = True - Me.ChBoxModOut.Checked = True - Me.ChBoxModOut.CheckState = System.Windows.Forms.CheckState.Checked - Me.ChBoxModOut.Location = New System.Drawing.Point(9, 180) - Me.ChBoxModOut.Name = "ChBoxModOut" - Me.ChBoxModOut.Size = New System.Drawing.Size(115, 17) - Me.ChBoxModOut.TabIndex = 0 - Me.ChBoxModOut.Text = "Write modal results" - Me.ChBoxModOut.UseVisualStyleBackColor = True - ' - 'GroupBox1 - ' - Me.GroupBox1.Controls.Add(Me.RbDev) - Me.GroupBox1.Controls.Add(Me.RbDecl) - Me.GroupBox1.Location = New System.Drawing.Point(3, 3) - Me.GroupBox1.Name = "GroupBox1" - Me.GroupBox1.Size = New System.Drawing.Size(121, 72) - Me.GroupBox1.TabIndex = 15 - Me.GroupBox1.TabStop = False - Me.GroupBox1.Text = "Mode" - ' - 'RbDev - ' - Me.RbDev.AutoSize = True - Me.RbDev.Checked = True - Me.RbDev.Location = New System.Drawing.Point(6, 42) - Me.RbDev.Name = "RbDev" - Me.RbDev.Size = New System.Drawing.Size(111, 17) - Me.RbDev.TabIndex = 1 - Me.RbDev.TabStop = True - Me.RbDev.Text = "Engineering Mode" - Me.RbDev.UseVisualStyleBackColor = True - ' - 'RbDecl - ' - Me.RbDecl.AutoSize = True - Me.RbDecl.Location = New System.Drawing.Point(6, 19) - Me.RbDecl.Name = "RbDecl" - Me.RbDecl.Size = New System.Drawing.Size(109, 17) - Me.RbDecl.TabIndex = 0 - Me.RbDecl.TabStop = True - Me.RbDecl.Text = "Declaration Mode" - Me.RbDecl.UseVisualStyleBackColor = True - ' - 'PnDeclOpt - ' - Me.PnDeclOpt.Controls.Add(Me.CbBatch) - Me.PnDeclOpt.Controls.Add(Me.ChBoxCyclDistCor) - Me.PnDeclOpt.Controls.Add(Me.ChBoxUseGears) - Me.PnDeclOpt.Location = New System.Drawing.Point(3, 81) - Me.PnDeclOpt.Name = "PnDeclOpt" - Me.PnDeclOpt.Size = New System.Drawing.Size(202, 93) - Me.PnDeclOpt.TabIndex = 13 - ' - 'CbBatch - ' - Me.CbBatch.AutoSize = True - Me.CbBatch.Location = New System.Drawing.Point(6, 3) - Me.CbBatch.Name = "CbBatch" - Me.CbBatch.Size = New System.Drawing.Size(84, 17) - Me.CbBatch.TabIndex = 15 - Me.CbBatch.Text = "Batch Mode" - Me.CbBatch.UseVisualStyleBackColor = True - ' - 'ChBoxCyclDistCor - ' - Me.ChBoxCyclDistCor.AutoSize = True - Me.ChBoxCyclDistCor.Location = New System.Drawing.Point(6, 41) - Me.ChBoxCyclDistCor.Name = "ChBoxCyclDistCor" - Me.ChBoxCyclDistCor.Size = New System.Drawing.Size(148, 17) - Me.ChBoxCyclDistCor.TabIndex = 0 - Me.ChBoxCyclDistCor.Text = "Cycle Distance Correction" - Me.ChBoxCyclDistCor.UseVisualStyleBackColor = True - ' - 'ChBoxUseGears - ' - Me.ChBoxUseGears.AutoSize = True - Me.ChBoxUseGears.Location = New System.Drawing.Point(6, 64) - Me.ChBoxUseGears.Name = "ChBoxUseGears" - Me.ChBoxUseGears.Size = New System.Drawing.Size(188, 17) - Me.ChBoxUseGears.TabIndex = 0 - Me.ChBoxUseGears.Text = "Use gears/rpm's form driving cycle" - Me.ChBoxUseGears.UseVisualStyleBackColor = True - ' - 'TabPageDEV - ' - Me.TabPageDEV.Controls.Add(Me.LvDEVoptions) - Me.TabPageDEV.Location = New System.Drawing.Point(4, 22) - Me.TabPageDEV.Name = "TabPageDEV" - Me.TabPageDEV.Padding = New System.Windows.Forms.Padding(3) - Me.TabPageDEV.Size = New System.Drawing.Size(1118, 346) - Me.TabPageDEV.TabIndex = 3 - Me.TabPageDEV.Text = "DEV" - Me.TabPageDEV.UseVisualStyleBackColor = True - ' - 'LvDEVoptions - ' - Me.LvDEVoptions.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.LvDEVoptions.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader7, Me.ColumnHeader5, Me.ColumnHeader6, Me.ColumnHeader8, Me.ColumnHeader9}) - Me.LvDEVoptions.FullRowSelect = True - Me.LvDEVoptions.GridLines = True - Me.LvDEVoptions.Location = New System.Drawing.Point(6, 6) - Me.LvDEVoptions.MultiSelect = False - Me.LvDEVoptions.Name = "LvDEVoptions" - Me.LvDEVoptions.Size = New System.Drawing.Size(1106, 334) - Me.LvDEVoptions.TabIndex = 0 - Me.LvDEVoptions.UseCompatibleStateImageBehavior = False - Me.LvDEVoptions.View = System.Windows.Forms.View.Details - ' - 'ColumnHeader4 - ' - Me.ColumnHeader4.Text = "Property" - Me.ColumnHeader4.Width = 89 - ' - 'ColumnHeader7 - ' - Me.ColumnHeader7.Text = "Description" - Me.ColumnHeader7.Width = 527 - ' - 'ColumnHeader5 - ' - Me.ColumnHeader5.Text = "Type" - Me.ColumnHeader5.Width = 82 - ' - 'ColumnHeader6 - ' - Me.ColumnHeader6.Text = "Value" - Me.ColumnHeader6.Width = 134 - ' - 'ColumnHeader8 - ' - Me.ColumnHeader8.Text = "Default" - Me.ColumnHeader8.Width = 120 - ' - 'ColumnHeader9 - ' - Me.ColumnHeader9.Text = "Saved In DEVconfig.txt" - Me.ColumnHeader9.Width = 129 - ' - 'ConMenFilelist - ' - Me.ConMenFilelist.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.SaveListToolStripMenuItem, Me.LoadListToolStripMenuItem, Me.LoadDefaultListToolStripMenuItem, Me.ClearListToolStripMenuItem}) - Me.ConMenFilelist.Name = "ConMenFilelist" - Me.ConMenFilelist.Size = New System.Drawing.Size(176, 92) - ' - 'SaveListToolStripMenuItem - ' - Me.SaveListToolStripMenuItem.Name = "SaveListToolStripMenuItem" - Me.SaveListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) - Me.SaveListToolStripMenuItem.Text = "Save List..." - ' - 'LoadListToolStripMenuItem - ' - Me.LoadListToolStripMenuItem.Name = "LoadListToolStripMenuItem" - Me.LoadListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) - Me.LoadListToolStripMenuItem.Text = "Load List..." - ' - 'LoadDefaultListToolStripMenuItem - ' - Me.LoadDefaultListToolStripMenuItem.Name = "LoadDefaultListToolStripMenuItem" - Me.LoadDefaultListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) - Me.LoadDefaultListToolStripMenuItem.Text = "Load Autosave-List" - ' - 'ClearListToolStripMenuItem - ' - Me.ClearListToolStripMenuItem.Name = "ClearListToolStripMenuItem" - Me.ClearListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) - Me.ClearListToolStripMenuItem.Text = "Clear List" - ' - 'BackgroundWorker1 - ' - ' - 'LvMsg - ' - Me.LvMsg.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.LvMsg.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3}) - Me.LvMsg.Font = New System.Drawing.Font("Courier New", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.LvMsg.FullRowSelect = True - Me.LvMsg.GridLines = True - Me.LvMsg.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable - Me.LvMsg.LabelWrap = False - Me.LvMsg.Location = New System.Drawing.Point(3, 3) - Me.LvMsg.MultiSelect = False - Me.LvMsg.Name = "LvMsg" - Me.LvMsg.Size = New System.Drawing.Size(1126, 190) - Me.LvMsg.TabIndex = 0 - Me.LvMsg.UseCompatibleStateImageBehavior = False - Me.LvMsg.View = System.Windows.Forms.View.Details - ' - 'ColumnHeader1 - ' - Me.ColumnHeader1.Text = "Message" - Me.ColumnHeader1.Width = 779 - ' - 'ColumnHeader2 - ' - Me.ColumnHeader2.Text = "Time" - Me.ColumnHeader2.Width = 151 - ' - 'ColumnHeader3 - ' - Me.ColumnHeader3.Text = "Source" - Me.ColumnHeader3.Width = 138 - ' - 'SplitContainer1 - ' - Me.SplitContainer1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.SplitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D - Me.SplitContainer1.Location = New System.Drawing.Point(0, 27) - Me.SplitContainer1.Name = "SplitContainer1" - Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal - ' - 'SplitContainer1.Panel1 - ' - Me.SplitContainer1.Panel1.Controls.Add(Me.TabControl1) - ' - 'SplitContainer1.Panel2 - ' - Me.SplitContainer1.Panel2.Controls.Add(Me.LvMsg) - Me.SplitContainer1.Size = New System.Drawing.Size(1136, 586) - Me.SplitContainer1.SplitterDistance = 382 - Me.SplitContainer1.TabIndex = 12 - ' - 'ToolStrip1 - ' - Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden - Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripBtNew, Me.ToolStripBtOpen, Me.ToolStripSeparator2, Me.ToolStripDrDnBtTools, Me.ToolStripDrDnBtInfo}) - Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) - Me.ToolStrip1.Name = "ToolStrip1" - Me.ToolStrip1.Size = New System.Drawing.Size(1136, 25) - Me.ToolStrip1.TabIndex = 11 - Me.ToolStrip1.Text = "ToolStrip1" - ' - 'ToolStripBtNew - ' - Me.ToolStripBtNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtNew.Image = Global.VECTO.My.Resources.Resources.blue_document_icon - Me.ToolStripBtNew.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtNew.Name = "ToolStripBtNew" - Me.ToolStripBtNew.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtNew.Text = "ToolStripBtNew" - Me.ToolStripBtNew.ToolTipText = "New Job File" - ' - 'ToolStripBtOpen - ' - Me.ToolStripBtOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtOpen.Image = Global.VECTO.My.Resources.Resources.Open_icon - Me.ToolStripBtOpen.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtOpen.Name = "ToolStripBtOpen" - Me.ToolStripBtOpen.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtOpen.Text = "ToolStripButton1" - Me.ToolStripBtOpen.ToolTipText = "Open File..." - ' - 'ToolStripSeparator2 - ' - Me.ToolStripSeparator2.Name = "ToolStripSeparator2" - Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25) - ' - 'ToolStripDrDnBtTools - ' - Me.ToolStripDrDnBtTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.GENEditorToolStripMenuItem1, Me.VEHEditorToolStripMenuItem, Me.EngineEditorToolStripMenuItem, Me.GearboxEditorToolStripMenuItem, Me.GraphToolStripMenuItem, Me.ToolStripSeparator6, Me.SignOrVerifyFilesToolStripMenuItem, Me.ToolStripSeparator4, Me.OpenLogToolStripMenuItem, Me.SettingsToolStripMenuItem}) - Me.ToolStripDrDnBtTools.Image = Global.VECTO.My.Resources.Resources.Misc_Tools_icon - Me.ToolStripDrDnBtTools.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripDrDnBtTools.Name = "ToolStripDrDnBtTools" - Me.ToolStripDrDnBtTools.Size = New System.Drawing.Size(65, 22) - Me.ToolStripDrDnBtTools.Text = "Tools" - ' - 'GENEditorToolStripMenuItem1 - ' - Me.GENEditorToolStripMenuItem1.Image = Global.VECTO.My.Resources.Resources.F_VECTO - Me.GENEditorToolStripMenuItem1.Name = "GENEditorToolStripMenuItem1" - Me.GENEditorToolStripMenuItem1.Size = New System.Drawing.Size(170, 22) - Me.GENEditorToolStripMenuItem1.Text = "Job Editor" - ' - 'VEHEditorToolStripMenuItem - ' - Me.VEHEditorToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.F_VEH - Me.VEHEditorToolStripMenuItem.Name = "VEHEditorToolStripMenuItem" - Me.VEHEditorToolStripMenuItem.Size = New System.Drawing.Size(170, 22) - Me.VEHEditorToolStripMenuItem.Text = "Vehicle Editor" - ' - 'EngineEditorToolStripMenuItem - ' - Me.EngineEditorToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.F_ENG - Me.EngineEditorToolStripMenuItem.Name = "EngineEditorToolStripMenuItem" - Me.EngineEditorToolStripMenuItem.Size = New System.Drawing.Size(170, 22) - Me.EngineEditorToolStripMenuItem.Text = "Engine Editor" - ' - 'GearboxEditorToolStripMenuItem - ' - Me.GearboxEditorToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.F_GBX - Me.GearboxEditorToolStripMenuItem.Name = "GearboxEditorToolStripMenuItem" - Me.GearboxEditorToolStripMenuItem.Size = New System.Drawing.Size(170, 22) - Me.GearboxEditorToolStripMenuItem.Text = "Gearbox Editor" - ' - 'GraphToolStripMenuItem - ' - Me.GraphToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.F_Graph - Me.GraphToolStripMenuItem.Name = "GraphToolStripMenuItem" - Me.GraphToolStripMenuItem.Size = New System.Drawing.Size(170, 22) - Me.GraphToolStripMenuItem.Text = "Graph" - ' - 'ToolStripSeparator6 - ' - Me.ToolStripSeparator6.Name = "ToolStripSeparator6" - Me.ToolStripSeparator6.Size = New System.Drawing.Size(167, 6) - ' - 'SignOrVerifyFilesToolStripMenuItem - ' - Me.SignOrVerifyFilesToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.Status_dialog_password_icon - Me.SignOrVerifyFilesToolStripMenuItem.Name = "SignOrVerifyFilesToolStripMenuItem" - Me.SignOrVerifyFilesToolStripMenuItem.Size = New System.Drawing.Size(170, 22) - Me.SignOrVerifyFilesToolStripMenuItem.Text = "Sign or Verify Files" - ' - 'ToolStripSeparator4 - ' - Me.ToolStripSeparator4.Name = "ToolStripSeparator4" - Me.ToolStripSeparator4.Size = New System.Drawing.Size(167, 6) - Me.ToolStripSeparator4.Visible = False - ' - 'OpenLogToolStripMenuItem - ' - Me.OpenLogToolStripMenuItem.Name = "OpenLogToolStripMenuItem" - Me.OpenLogToolStripMenuItem.Size = New System.Drawing.Size(170, 22) - Me.OpenLogToolStripMenuItem.Text = "Open Log" - ' - 'SettingsToolStripMenuItem - ' - Me.SettingsToolStripMenuItem.Name = "SettingsToolStripMenuItem" - Me.SettingsToolStripMenuItem.Size = New System.Drawing.Size(170, 22) - Me.SettingsToolStripMenuItem.Text = "Settings" - ' - 'ToolStripDrDnBtInfo - ' - Me.ToolStripDrDnBtInfo.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UserManualToolStripMenuItem, Me.UpdateNotesToolStripMenuItem, Me.ToolStripSeparator3, Me.CreateActivationFileToolStripMenuItem, Me.AboutVECTOToolStripMenuItem1}) - Me.ToolStripDrDnBtInfo.Image = Global.VECTO.My.Resources.Resources.Help_icon - Me.ToolStripDrDnBtInfo.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripDrDnBtInfo.Name = "ToolStripDrDnBtInfo" - Me.ToolStripDrDnBtInfo.Size = New System.Drawing.Size(61, 22) - Me.ToolStripDrDnBtInfo.Text = "Help" - ' - 'UserManualToolStripMenuItem - ' - Me.UserManualToolStripMenuItem.Name = "UserManualToolStripMenuItem" - Me.UserManualToolStripMenuItem.Size = New System.Drawing.Size(186, 22) - Me.UserManualToolStripMenuItem.Text = "User Manual" - ' - 'UpdateNotesToolStripMenuItem - ' - Me.UpdateNotesToolStripMenuItem.Name = "UpdateNotesToolStripMenuItem" - Me.UpdateNotesToolStripMenuItem.Size = New System.Drawing.Size(186, 22) - Me.UpdateNotesToolStripMenuItem.Text = "Release Notes" - ' - 'ToolStripSeparator3 - ' - Me.ToolStripSeparator3.Name = "ToolStripSeparator3" - Me.ToolStripSeparator3.Size = New System.Drawing.Size(183, 6) - ' - 'CreateActivationFileToolStripMenuItem - ' - Me.CreateActivationFileToolStripMenuItem.Name = "CreateActivationFileToolStripMenuItem" - Me.CreateActivationFileToolStripMenuItem.Size = New System.Drawing.Size(186, 22) - Me.CreateActivationFileToolStripMenuItem.Text = "Create Activation File" - ' - 'AboutVECTOToolStripMenuItem1 - ' - Me.AboutVECTOToolStripMenuItem1.Name = "AboutVECTOToolStripMenuItem1" - Me.AboutVECTOToolStripMenuItem1.Size = New System.Drawing.Size(186, 22) - Me.AboutVECTOToolStripMenuItem1.Text = "About VECTO" - ' - 'CmDEV - ' - Me.CmDEV.Name = "CmDEV" - Me.CmDEV.Size = New System.Drawing.Size(61, 4) - ' - 'TmProgSec - ' - Me.TmProgSec.Interval = 1000 - ' - 'CmOpenFile - ' - Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.OpenInGraphWindowToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) - Me.CmOpenFile.Name = "CmOpenFile" - Me.CmOpenFile.Size = New System.Drawing.Size(199, 70) - ' - 'OpenWithToolStripMenuItem - ' - Me.OpenWithToolStripMenuItem.Name = "OpenWithToolStripMenuItem" - Me.OpenWithToolStripMenuItem.Size = New System.Drawing.Size(198, 22) - Me.OpenWithToolStripMenuItem.Text = "Open with ..." - ' - 'OpenInGraphWindowToolStripMenuItem - ' - Me.OpenInGraphWindowToolStripMenuItem.Name = "OpenInGraphWindowToolStripMenuItem" - Me.OpenInGraphWindowToolStripMenuItem.Size = New System.Drawing.Size(198, 22) - Me.OpenInGraphWindowToolStripMenuItem.Text = "Open in Graph Window" - ' - 'ShowInFolderToolStripMenuItem - ' - Me.ShowInFolderToolStripMenuItem.Name = "ShowInFolderToolStripMenuItem" - Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(198, 22) - Me.ShowInFolderToolStripMenuItem.Text = "Show in Folder" - ' - 'F_MAINForm - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(1136, 638) - Me.Controls.Add(Me.ToolStrip1) - Me.Controls.Add(Me.SplitContainer1) - Me.Controls.Add(Me.StatusBAR) - Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) - Me.MinimumSize = New System.Drawing.Size(785, 485) - Me.Name = "F_MAINForm" - Me.Text = "VECTO" - Me.StatusBAR.ResumeLayout(False) - Me.StatusBAR.PerformLayout() - Me.TabControl1.ResumeLayout(False) - Me.TabPageGEN.ResumeLayout(False) - Me.TabPageGEN.PerformLayout() - CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() - Me.TabPageDRI.ResumeLayout(False) - Me.TabPageDRI.PerformLayout() - Me.TabPgOptions.ResumeLayout(False) - Me.TabPgOptions.PerformLayout() - Me.GrBoxBATCH.ResumeLayout(False) - Me.GrBoxBATCH.PerformLayout() - Me.PanelOptAllg.ResumeLayout(False) - Me.PanelOptAllg.PerformLayout() - Me.GroupBox1.ResumeLayout(False) - Me.GroupBox1.PerformLayout() - Me.PnDeclOpt.ResumeLayout(False) - Me.PnDeclOpt.PerformLayout() - Me.TabPageDEV.ResumeLayout(False) - Me.ConMenFilelist.ResumeLayout(False) - Me.SplitContainer1.Panel1.ResumeLayout(False) - Me.SplitContainer1.Panel2.ResumeLayout(False) - CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainer1.ResumeLayout(False) - Me.ToolStrip1.ResumeLayout(False) - Me.ToolStrip1.PerformLayout() - Me.CmOpenFile.ResumeLayout(False) - Me.ResumeLayout(False) - Me.PerformLayout() + Me.components = New System.ComponentModel.Container() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(F_MAINForm)) + Me.StatusBAR = New System.Windows.Forms.StatusStrip() + Me.ToolStripLbStatus = New System.Windows.Forms.ToolStripStatusLabel() + Me.ToolStripProgBarJob = New System.Windows.Forms.ToolStripProgressBar() + Me.ToolStripProgBarOverall = New System.Windows.Forms.ToolStripProgressBar() + Me.TabControl1 = New System.Windows.Forms.TabControl() + Me.TabPageGEN = New System.Windows.Forms.TabPage() + Me.LbDecl = New System.Windows.Forms.Label() + Me.PictureBox1 = New System.Windows.Forms.PictureBox() + Me.BtGENdown = New System.Windows.Forms.Button() + Me.BtGENup = New System.Windows.Forms.Button() + Me.LbAutoShDown = New System.Windows.Forms.Label() + Me.ChBoxAllGEN = New System.Windows.Forms.CheckBox() + Me.LvGEN = New System.Windows.Forms.ListView() + Me.ColGENpath = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ColGENstatus = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ButtonGENopt = New System.Windows.Forms.Button() + Me.ButtonGENremove = New System.Windows.Forms.Button() + Me.Button1 = New System.Windows.Forms.Button() + Me.ButtonGENadd = New System.Windows.Forms.Button() + Me.TabPageDRI = New System.Windows.Forms.TabPage() + Me.BtDRIdown = New System.Windows.Forms.Button() + Me.BtDRIup = New System.Windows.Forms.Button() + Me.ChBoxAllDRI = New System.Windows.Forms.CheckBox() + Me.LvDRI = New System.Windows.Forms.ListView() + Me.ColDRIpath = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ColDRIstatus = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ButtonDRIedit = New System.Windows.Forms.Button() + Me.ButtonDRIremove = New System.Windows.Forms.Button() + Me.ButtonDRIadd = New System.Windows.Forms.Button() + Me.TabPgOptions = New System.Windows.Forms.TabPage() + Me.GrBoxBATCH = New System.Windows.Forms.GroupBox() + Me.ChBoxBatchSubD = New System.Windows.Forms.CheckBox() + Me.Label2 = New System.Windows.Forms.Label() + Me.ButBObrowse = New System.Windows.Forms.Button() + Me.CbBOmode = New System.Windows.Forms.ComboBox() + Me.TbBOpath = New System.Windows.Forms.TextBox() + Me.GrBoxSTD = New System.Windows.Forms.GroupBox() + Me.ChBoxAutoSD = New System.Windows.Forms.CheckBox() + Me.PanelOptAllg = New System.Windows.Forms.Panel() + Me.ChBoxModOut = New System.Windows.Forms.CheckBox() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.RbDev = New System.Windows.Forms.RadioButton() + Me.RbDecl = New System.Windows.Forms.RadioButton() + Me.PnDeclOpt = New System.Windows.Forms.Panel() + Me.CbBatch = New System.Windows.Forms.CheckBox() + Me.ChBoxCyclDistCor = New System.Windows.Forms.CheckBox() + Me.ChBoxUseGears = New System.Windows.Forms.CheckBox() + Me.TabPageDEV = New System.Windows.Forms.TabPage() + Me.Label1 = New System.Windows.Forms.Label() + Me.LvDEVoptions = New System.Windows.Forms.ListView() + Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader7 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + 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.SaveListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.LoadListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.LoadDefaultListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ClearListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() + Me.LvMsg = New System.Windows.Forms.ListView() + Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader2 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader3 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() + Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() + Me.ToolStripBtNew = New System.Windows.Forms.ToolStripButton() + Me.ToolStripBtOpen = New System.Windows.Forms.ToolStripButton() + Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripDrDnBtTools = New System.Windows.Forms.ToolStripDropDownButton() + Me.GENEditorToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() + Me.VEHEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.EngineEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.GearboxEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.GraphToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator() + Me.SignOrVerifyFilesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator() + Me.OpenLogToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.SettingsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripDrDnBtInfo = New System.Windows.Forms.ToolStripDropDownButton() + Me.UserManualToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.UpdateNotesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() + Me.CreateActivationFileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.AboutVECTOToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() + Me.CmDEV = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.TmProgSec = New System.Windows.Forms.Timer(Me.components) + Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.OpenInGraphWindowToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.StatusBAR.SuspendLayout() + Me.TabControl1.SuspendLayout() + Me.TabPageGEN.SuspendLayout() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.TabPageDRI.SuspendLayout() + Me.TabPgOptions.SuspendLayout() + Me.GrBoxBATCH.SuspendLayout() + Me.PanelOptAllg.SuspendLayout() + Me.GroupBox1.SuspendLayout() + Me.PnDeclOpt.SuspendLayout() + Me.TabPageDEV.SuspendLayout() + Me.ConMenFilelist.SuspendLayout() + CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainer1.Panel1.SuspendLayout() + Me.SplitContainer1.Panel2.SuspendLayout() + Me.SplitContainer1.SuspendLayout() + Me.ToolStrip1.SuspendLayout() + Me.CmOpenFile.SuspendLayout() + Me.SuspendLayout() + ' + 'StatusBAR + ' + Me.StatusBAR.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLbStatus, Me.ToolStripProgBarJob, Me.ToolStripProgBarOverall}) + Me.StatusBAR.Location = New System.Drawing.Point(0, 616) + Me.StatusBAR.Name = "StatusBAR" + Me.StatusBAR.Size = New System.Drawing.Size(1136, 22) + Me.StatusBAR.TabIndex = 7 + Me.StatusBAR.Text = "StatusBAR" + ' + 'ToolStripLbStatus + ' + Me.ToolStripLbStatus.Name = "ToolStripLbStatus" + Me.ToolStripLbStatus.Size = New System.Drawing.Size(1121, 17) + Me.ToolStripLbStatus.Spring = True + Me.ToolStripLbStatus.Text = "Status Text" + Me.ToolStripLbStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'ToolStripProgBarJob + ' + Me.ToolStripProgBarJob.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right + Me.ToolStripProgBarJob.AutoSize = False + Me.ToolStripProgBarJob.Name = "ToolStripProgBarJob" + Me.ToolStripProgBarJob.Size = New System.Drawing.Size(100, 16) + Me.ToolStripProgBarJob.Style = System.Windows.Forms.ProgressBarStyle.Continuous + Me.ToolStripProgBarJob.ToolTipText = "overall progress" + Me.ToolStripProgBarJob.Visible = False + ' + 'ToolStripProgBarOverall + ' + Me.ToolStripProgBarOverall.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right + Me.ToolStripProgBarOverall.AutoSize = False + Me.ToolStripProgBarOverall.Name = "ToolStripProgBarOverall" + Me.ToolStripProgBarOverall.Size = New System.Drawing.Size(100, 16) + Me.ToolStripProgBarOverall.Style = System.Windows.Forms.ProgressBarStyle.Continuous + Me.ToolStripProgBarOverall.ToolTipText = "job progress" + Me.ToolStripProgBarOverall.Visible = False + ' + 'TabControl1 + ' + Me.TabControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TabControl1.Controls.Add(Me.TabPageGEN) + Me.TabControl1.Controls.Add(Me.TabPageDRI) + Me.TabControl1.Controls.Add(Me.TabPgOptions) + Me.TabControl1.Controls.Add(Me.TabPageDEV) + Me.TabControl1.Location = New System.Drawing.Point(3, 3) + Me.TabControl1.Name = "TabControl1" + Me.TabControl1.SelectedIndex = 0 + Me.TabControl1.Size = New System.Drawing.Size(1126, 372) + Me.TabControl1.TabIndex = 10 + ' + 'TabPageGEN + ' + Me.TabPageGEN.Controls.Add(Me.LbDecl) + Me.TabPageGEN.Controls.Add(Me.PictureBox1) + Me.TabPageGEN.Controls.Add(Me.BtGENdown) + Me.TabPageGEN.Controls.Add(Me.BtGENup) + Me.TabPageGEN.Controls.Add(Me.LbAutoShDown) + Me.TabPageGEN.Controls.Add(Me.ChBoxAllGEN) + Me.TabPageGEN.Controls.Add(Me.LvGEN) + Me.TabPageGEN.Controls.Add(Me.ButtonGENopt) + Me.TabPageGEN.Controls.Add(Me.ButtonGENremove) + Me.TabPageGEN.Controls.Add(Me.Button1) + Me.TabPageGEN.Controls.Add(Me.ButtonGENadd) + Me.TabPageGEN.Location = New System.Drawing.Point(4, 22) + Me.TabPageGEN.Name = "TabPageGEN" + Me.TabPageGEN.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageGEN.Size = New System.Drawing.Size(1118, 346) + Me.TabPageGEN.TabIndex = 0 + Me.TabPageGEN.Text = "Job Files" + Me.TabPageGEN.UseVisualStyleBackColor = True + ' + 'LbDecl + ' + Me.LbDecl.AutoSize = True + Me.LbDecl.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LbDecl.Location = New System.Drawing.Point(6, 97) + Me.LbDecl.Name = "LbDecl" + Me.LbDecl.Size = New System.Drawing.Size(107, 13) + Me.LbDecl.TabIndex = 19 + Me.LbDecl.Text = "Declaration Mode" + Me.LbDecl.Visible = False + ' + 'PictureBox1 + ' + Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image) + Me.PictureBox1.Location = New System.Drawing.Point(6, 6) + Me.PictureBox1.Name = "PictureBox1" + Me.PictureBox1.Size = New System.Drawing.Size(105, 44) + Me.PictureBox1.TabIndex = 18 + Me.PictureBox1.TabStop = False + ' + 'BtGENdown + ' + Me.BtGENdown.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtGENdown.Image = Global.VECTO.My.Resources.Resources.Actions_arrow_down_icon + Me.BtGENdown.Location = New System.Drawing.Point(996, 317) + Me.BtGENdown.Name = "BtGENdown" + Me.BtGENdown.Size = New System.Drawing.Size(30, 23) + Me.BtGENdown.TabIndex = 6 + Me.BtGENdown.UseVisualStyleBackColor = True + ' + 'BtGENup + ' + Me.BtGENup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtGENup.Image = Global.VECTO.My.Resources.Resources.Actions_arrow_up_icon + Me.BtGENup.Location = New System.Drawing.Point(960, 317) + Me.BtGENup.Name = "BtGENup" + Me.BtGENup.Size = New System.Drawing.Size(30, 23) + Me.BtGENup.TabIndex = 4 + Me.BtGENup.UseVisualStyleBackColor = True + ' + 'LbAutoShDown + ' + Me.LbAutoShDown.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.LbAutoShDown.AutoSize = True + Me.LbAutoShDown.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LbAutoShDown.ForeColor = System.Drawing.Color.Red + Me.LbAutoShDown.Location = New System.Drawing.Point(253, 322) + Me.LbAutoShDown.Name = "LbAutoShDown" + Me.LbAutoShDown.Size = New System.Drawing.Size(225, 13) + Me.LbAutoShDown.TabIndex = 17 + Me.LbAutoShDown.Text = "!!! Automatic Shutdown is activated !!!" + Me.LbAutoShDown.Visible = False + ' + 'ChBoxAllGEN + ' + Me.ChBoxAllGEN.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.ChBoxAllGEN.AutoSize = True + Me.ChBoxAllGEN.Location = New System.Drawing.Point(129, 321) + Me.ChBoxAllGEN.Name = "ChBoxAllGEN" + Me.ChBoxAllGEN.Size = New System.Drawing.Size(37, 17) + Me.ChBoxAllGEN.TabIndex = 16 + Me.ChBoxAllGEN.Text = "All" + Me.ChBoxAllGEN.UseVisualStyleBackColor = True + ' + 'LvGEN + ' + Me.LvGEN.AllowDrop = True + Me.LvGEN.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LvGEN.CheckBoxes = True + Me.LvGEN.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColGENpath, Me.ColGENstatus}) + Me.LvGEN.FullRowSelect = True + Me.LvGEN.GridLines = True + Me.LvGEN.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable + Me.LvGEN.HideSelection = False + Me.LvGEN.LabelEdit = True + Me.LvGEN.Location = New System.Drawing.Point(117, 6) + Me.LvGEN.Name = "LvGEN" + Me.LvGEN.Size = New System.Drawing.Size(995, 305) + Me.LvGEN.TabIndex = 14 + Me.LvGEN.UseCompatibleStateImageBehavior = False + Me.LvGEN.View = System.Windows.Forms.View.Details + ' + 'ColGENpath + ' + Me.ColGENpath.Text = "Filepath" + Me.ColGENpath.Width = 797 + ' + 'ColGENstatus + ' + Me.ColGENstatus.Text = "" + Me.ColGENstatus.Width = 175 + ' + 'ButtonGENopt + ' + Me.ButtonGENopt.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButtonGENopt.Location = New System.Drawing.Point(1032, 317) + Me.ButtonGENopt.Name = "ButtonGENopt" + Me.ButtonGENopt.Size = New System.Drawing.Size(80, 23) + Me.ButtonGENopt.TabIndex = 8 + Me.ButtonGENopt.Text = "List Options" + Me.ButtonGENopt.UseVisualStyleBackColor = True + ' + 'ButtonGENremove + ' + Me.ButtonGENremove.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButtonGENremove.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.ButtonGENremove.Image = Global.VECTO.My.Resources.Resources.minus_circle_icon + Me.ButtonGENremove.Location = New System.Drawing.Point(924, 317) + Me.ButtonGENremove.Name = "ButtonGENremove" + Me.ButtonGENremove.Size = New System.Drawing.Size(30, 23) + Me.ButtonGENremove.TabIndex = 2 + Me.ButtonGENremove.UseVisualStyleBackColor = True + ' + 'Button1 + ' + Me.Button1.Image = Global.VECTO.My.Resources.Resources.Play_icon + Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button1.Location = New System.Drawing.Point(6, 53) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(105, 41) + Me.Button1.TabIndex = 12 + Me.Button1.Text = "START" + Me.Button1.UseVisualStyleBackColor = True + ' + 'ButtonGENadd + ' + Me.ButtonGENadd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButtonGENadd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.ButtonGENadd.Image = Global.VECTO.My.Resources.Resources.plus_circle_icon + Me.ButtonGENadd.Location = New System.Drawing.Point(888, 317) + Me.ButtonGENadd.Name = "ButtonGENadd" + Me.ButtonGENadd.Size = New System.Drawing.Size(30, 23) + Me.ButtonGENadd.TabIndex = 1 + Me.ButtonGENadd.UseVisualStyleBackColor = True + ' + 'TabPageDRI + ' + Me.TabPageDRI.Controls.Add(Me.BtDRIdown) + Me.TabPageDRI.Controls.Add(Me.BtDRIup) + Me.TabPageDRI.Controls.Add(Me.ChBoxAllDRI) + Me.TabPageDRI.Controls.Add(Me.LvDRI) + Me.TabPageDRI.Controls.Add(Me.ButtonDRIedit) + Me.TabPageDRI.Controls.Add(Me.ButtonDRIremove) + Me.TabPageDRI.Controls.Add(Me.ButtonDRIadd) + Me.TabPageDRI.Location = New System.Drawing.Point(4, 22) + Me.TabPageDRI.Name = "TabPageDRI" + Me.TabPageDRI.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageDRI.Size = New System.Drawing.Size(1118, 346) + Me.TabPageDRI.TabIndex = 1 + Me.TabPageDRI.Text = "Driving Cycles" + Me.TabPageDRI.UseVisualStyleBackColor = True + ' + 'BtDRIdown + ' + Me.BtDRIdown.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtDRIdown.Image = Global.VECTO.My.Resources.Resources.Actions_arrow_down_icon + Me.BtDRIdown.Location = New System.Drawing.Point(996, 317) + Me.BtDRIdown.Name = "BtDRIdown" + Me.BtDRIdown.Size = New System.Drawing.Size(30, 23) + Me.BtDRIdown.TabIndex = 3 + Me.BtDRIdown.UseVisualStyleBackColor = True + ' + 'BtDRIup + ' + Me.BtDRIup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtDRIup.Image = Global.VECTO.My.Resources.Resources.Actions_arrow_up_icon + Me.BtDRIup.Location = New System.Drawing.Point(960, 317) + Me.BtDRIup.Name = "BtDRIup" + Me.BtDRIup.Size = New System.Drawing.Size(30, 23) + Me.BtDRIup.TabIndex = 2 + Me.BtDRIup.UseVisualStyleBackColor = True + ' + 'ChBoxAllDRI + ' + Me.ChBoxAllDRI.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.ChBoxAllDRI.AutoSize = True + Me.ChBoxAllDRI.Location = New System.Drawing.Point(15, 321) + Me.ChBoxAllDRI.Name = "ChBoxAllDRI" + Me.ChBoxAllDRI.Size = New System.Drawing.Size(37, 17) + Me.ChBoxAllDRI.TabIndex = 7 + Me.ChBoxAllDRI.Text = "All" + Me.ChBoxAllDRI.UseVisualStyleBackColor = True + ' + 'LvDRI + ' + Me.LvDRI.AllowDrop = True + Me.LvDRI.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LvDRI.CheckBoxes = True + Me.LvDRI.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColDRIpath, Me.ColDRIstatus}) + Me.LvDRI.FullRowSelect = True + Me.LvDRI.GridLines = True + Me.LvDRI.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable + Me.LvDRI.HideSelection = False + Me.LvDRI.LabelEdit = True + Me.LvDRI.Location = New System.Drawing.Point(6, 6) + Me.LvDRI.Name = "LvDRI" + Me.LvDRI.Size = New System.Drawing.Size(1106, 305) + Me.LvDRI.TabIndex = 6 + Me.LvDRI.UseCompatibleStateImageBehavior = False + Me.LvDRI.View = System.Windows.Forms.View.Details + ' + 'ColDRIpath + ' + Me.ColDRIpath.Text = "Filepath" + Me.ColDRIpath.Width = 915 + ' + 'ColDRIstatus + ' + Me.ColDRIstatus.Text = "" + Me.ColDRIstatus.Width = 150 + ' + 'ButtonDRIedit + ' + Me.ButtonDRIedit.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButtonDRIedit.Location = New System.Drawing.Point(1032, 317) + Me.ButtonDRIedit.Name = "ButtonDRIedit" + Me.ButtonDRIedit.Size = New System.Drawing.Size(80, 23) + Me.ButtonDRIedit.TabIndex = 4 + Me.ButtonDRIedit.Text = "List Options" + Me.ButtonDRIedit.UseVisualStyleBackColor = True + ' + 'ButtonDRIremove + ' + Me.ButtonDRIremove.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButtonDRIremove.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.ButtonDRIremove.Image = Global.VECTO.My.Resources.Resources.minus_circle_icon + Me.ButtonDRIremove.Location = New System.Drawing.Point(924, 317) + Me.ButtonDRIremove.Name = "ButtonDRIremove" + Me.ButtonDRIremove.Size = New System.Drawing.Size(30, 23) + Me.ButtonDRIremove.TabIndex = 1 + Me.ButtonDRIremove.UseVisualStyleBackColor = True + ' + 'ButtonDRIadd + ' + Me.ButtonDRIadd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButtonDRIadd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.ButtonDRIadd.Image = Global.VECTO.My.Resources.Resources.plus_circle_icon + Me.ButtonDRIadd.Location = New System.Drawing.Point(888, 317) + Me.ButtonDRIadd.Name = "ButtonDRIadd" + Me.ButtonDRIadd.Size = New System.Drawing.Size(30, 23) + Me.ButtonDRIadd.TabIndex = 0 + Me.ButtonDRIadd.UseVisualStyleBackColor = True + ' + 'TabPgOptions + ' + Me.TabPgOptions.Controls.Add(Me.GrBoxBATCH) + Me.TabPgOptions.Controls.Add(Me.GrBoxSTD) + Me.TabPgOptions.Controls.Add(Me.ChBoxAutoSD) + Me.TabPgOptions.Controls.Add(Me.PanelOptAllg) + Me.TabPgOptions.Location = New System.Drawing.Point(4, 22) + Me.TabPgOptions.Name = "TabPgOptions" + Me.TabPgOptions.Padding = New System.Windows.Forms.Padding(3) + Me.TabPgOptions.Size = New System.Drawing.Size(1118, 346) + Me.TabPgOptions.TabIndex = 2 + Me.TabPgOptions.Text = "Options" + Me.TabPgOptions.UseVisualStyleBackColor = True + ' + 'GrBoxBATCH + ' + Me.GrBoxBATCH.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.GrBoxBATCH.Controls.Add(Me.ChBoxBatchSubD) + Me.GrBoxBATCH.Controls.Add(Me.Label2) + Me.GrBoxBATCH.Controls.Add(Me.ButBObrowse) + Me.GrBoxBATCH.Controls.Add(Me.CbBOmode) + Me.GrBoxBATCH.Controls.Add(Me.TbBOpath) + Me.GrBoxBATCH.Location = New System.Drawing.Point(6, 224) + Me.GrBoxBATCH.Name = "GrBoxBATCH" + Me.GrBoxBATCH.Size = New System.Drawing.Size(1106, 116) + Me.GrBoxBATCH.TabIndex = 5 + Me.GrBoxBATCH.TabStop = False + Me.GrBoxBATCH.Text = "Batch Options" + ' + 'ChBoxBatchSubD + ' + Me.ChBoxBatchSubD.AutoSize = True + Me.ChBoxBatchSubD.Location = New System.Drawing.Point(14, 46) + Me.ChBoxBatchSubD.Name = "ChBoxBatchSubD" + Me.ChBoxBatchSubD.Size = New System.Drawing.Size(206, 17) + Me.ChBoxBatchSubD.TabIndex = 4 + Me.ChBoxBatchSubD.Text = "Create Subdirectories for modal results" + Me.ChBoxBatchSubD.UseVisualStyleBackColor = True + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(11, 22) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(64, 13) + Me.Label2.TabIndex = 2 + Me.Label2.Text = "Output Path" + ' + 'ButBObrowse + ' + Me.ButBObrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButBObrowse.Location = New System.Drawing.Point(1051, 18) + Me.ButBObrowse.Name = "ButBObrowse" + Me.ButBObrowse.Size = New System.Drawing.Size(28, 20) + Me.ButBObrowse.TabIndex = 3 + Me.ButBObrowse.Text = "..." + Me.ButBObrowse.UseVisualStyleBackColor = True + ' + 'CbBOmode + ' + Me.CbBOmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.CbBOmode.FormattingEnabled = True + Me.CbBOmode.Items.AddRange(New Object() {"Directory of .vecto File", "Custom Directory"}) + Me.CbBOmode.Location = New System.Drawing.Point(81, 19) + Me.CbBOmode.Name = "CbBOmode" + Me.CbBOmode.Size = New System.Drawing.Size(140, 21) + Me.CbBOmode.TabIndex = 0 + ' + 'TbBOpath + ' + Me.TbBOpath.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TbBOpath.Location = New System.Drawing.Point(227, 18) + Me.TbBOpath.Name = "TbBOpath" + Me.TbBOpath.Size = New System.Drawing.Size(818, 20) + Me.TbBOpath.TabIndex = 1 + ' + 'GrBoxSTD + ' + Me.GrBoxSTD.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.GrBoxSTD.Location = New System.Drawing.Point(6, 224) + Me.GrBoxSTD.Name = "GrBoxSTD" + Me.GrBoxSTD.Size = New System.Drawing.Size(1106, 116) + Me.GrBoxSTD.TabIndex = 14 + Me.GrBoxSTD.TabStop = False + Me.GrBoxSTD.Text = "Standard Options" + ' + 'ChBoxAutoSD + ' + Me.ChBoxAutoSD.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ChBoxAutoSD.AutoSize = True + Me.ChBoxAutoSD.Location = New System.Drawing.Point(943, 6) + Me.ChBoxAutoSD.Name = "ChBoxAutoSD" + Me.ChBoxAutoSD.Size = New System.Drawing.Size(169, 17) + Me.ChBoxAutoSD.TabIndex = 13 + Me.ChBoxAutoSD.Text = "Shutdown system after last job" + Me.ChBoxAutoSD.UseVisualStyleBackColor = True + ' + 'PanelOptAllg + ' + Me.PanelOptAllg.Controls.Add(Me.ChBoxModOut) + Me.PanelOptAllg.Controls.Add(Me.GroupBox1) + Me.PanelOptAllg.Controls.Add(Me.PnDeclOpt) + Me.PanelOptAllg.Location = New System.Drawing.Point(6, 6) + Me.PanelOptAllg.Name = "PanelOptAllg" + Me.PanelOptAllg.Size = New System.Drawing.Size(358, 212) + Me.PanelOptAllg.TabIndex = 0 + ' + 'ChBoxModOut + ' + Me.ChBoxModOut.AutoSize = True + Me.ChBoxModOut.Checked = True + Me.ChBoxModOut.CheckState = System.Windows.Forms.CheckState.Checked + Me.ChBoxModOut.Location = New System.Drawing.Point(9, 180) + Me.ChBoxModOut.Name = "ChBoxModOut" + Me.ChBoxModOut.Size = New System.Drawing.Size(115, 17) + Me.ChBoxModOut.TabIndex = 0 + Me.ChBoxModOut.Text = "Write modal results" + Me.ChBoxModOut.UseVisualStyleBackColor = True + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.RbDev) + Me.GroupBox1.Controls.Add(Me.RbDecl) + Me.GroupBox1.Location = New System.Drawing.Point(3, 3) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(121, 72) + Me.GroupBox1.TabIndex = 15 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Mode" + ' + 'RbDev + ' + Me.RbDev.AutoSize = True + Me.RbDev.Checked = True + Me.RbDev.Location = New System.Drawing.Point(6, 42) + Me.RbDev.Name = "RbDev" + Me.RbDev.Size = New System.Drawing.Size(111, 17) + Me.RbDev.TabIndex = 1 + Me.RbDev.TabStop = True + Me.RbDev.Text = "Engineering Mode" + Me.RbDev.UseVisualStyleBackColor = True + ' + 'RbDecl + ' + Me.RbDecl.AutoSize = True + Me.RbDecl.Location = New System.Drawing.Point(6, 19) + Me.RbDecl.Name = "RbDecl" + Me.RbDecl.Size = New System.Drawing.Size(109, 17) + Me.RbDecl.TabIndex = 0 + Me.RbDecl.TabStop = True + Me.RbDecl.Text = "Declaration Mode" + Me.RbDecl.UseVisualStyleBackColor = True + ' + 'PnDeclOpt + ' + Me.PnDeclOpt.Controls.Add(Me.CbBatch) + Me.PnDeclOpt.Controls.Add(Me.ChBoxCyclDistCor) + Me.PnDeclOpt.Controls.Add(Me.ChBoxUseGears) + Me.PnDeclOpt.Location = New System.Drawing.Point(3, 81) + Me.PnDeclOpt.Name = "PnDeclOpt" + Me.PnDeclOpt.Size = New System.Drawing.Size(202, 93) + Me.PnDeclOpt.TabIndex = 13 + ' + 'CbBatch + ' + Me.CbBatch.AutoSize = True + Me.CbBatch.Location = New System.Drawing.Point(6, 3) + Me.CbBatch.Name = "CbBatch" + Me.CbBatch.Size = New System.Drawing.Size(84, 17) + Me.CbBatch.TabIndex = 15 + Me.CbBatch.Text = "Batch Mode" + Me.CbBatch.UseVisualStyleBackColor = True + ' + 'ChBoxCyclDistCor + ' + Me.ChBoxCyclDistCor.AutoSize = True + Me.ChBoxCyclDistCor.Location = New System.Drawing.Point(6, 41) + Me.ChBoxCyclDistCor.Name = "ChBoxCyclDistCor" + Me.ChBoxCyclDistCor.Size = New System.Drawing.Size(148, 17) + Me.ChBoxCyclDistCor.TabIndex = 0 + Me.ChBoxCyclDistCor.Text = "Cycle Distance Correction" + Me.ChBoxCyclDistCor.UseVisualStyleBackColor = True + ' + 'ChBoxUseGears + ' + Me.ChBoxUseGears.AutoSize = True + Me.ChBoxUseGears.Location = New System.Drawing.Point(6, 64) + Me.ChBoxUseGears.Name = "ChBoxUseGears" + Me.ChBoxUseGears.Size = New System.Drawing.Size(188, 17) + Me.ChBoxUseGears.TabIndex = 0 + Me.ChBoxUseGears.Text = "Use gears/rpm's form driving cycle" + Me.ChBoxUseGears.UseVisualStyleBackColor = True + ' + 'TabPageDEV + ' + Me.TabPageDEV.Controls.Add(Me.Label1) + Me.TabPageDEV.Controls.Add(Me.LvDEVoptions) + Me.TabPageDEV.Location = New System.Drawing.Point(4, 22) + Me.TabPageDEV.Name = "TabPageDEV" + Me.TabPageDEV.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageDEV.Size = New System.Drawing.Size(1118, 346) + Me.TabPageDEV.TabIndex = 3 + Me.TabPageDEV.Text = "Test" + Me.TabPageDEV.UseVisualStyleBackColor = True + ' + 'Label1 + ' + Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(6, 330) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(125, 13) + Me.Label1.TabIndex = 1 + Me.Label1.Text = "Double-Click entry to edit" + ' + 'LvDEVoptions + ' + Me.LvDEVoptions.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LvDEVoptions.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader7, Me.ColumnHeader5, Me.ColumnHeader6, Me.ColumnHeader8, Me.ColumnHeader9}) + Me.LvDEVoptions.FullRowSelect = True + Me.LvDEVoptions.GridLines = True + Me.LvDEVoptions.Location = New System.Drawing.Point(6, 6) + Me.LvDEVoptions.MultiSelect = False + Me.LvDEVoptions.Name = "LvDEVoptions" + Me.LvDEVoptions.Size = New System.Drawing.Size(1106, 321) + Me.LvDEVoptions.TabIndex = 0 + Me.LvDEVoptions.UseCompatibleStateImageBehavior = False + Me.LvDEVoptions.View = System.Windows.Forms.View.Details + ' + 'ColumnHeader4 + ' + Me.ColumnHeader4.Text = "Property" + Me.ColumnHeader4.Width = 89 + ' + 'ColumnHeader7 + ' + Me.ColumnHeader7.Text = "Description" + Me.ColumnHeader7.Width = 527 + ' + 'ColumnHeader5 + ' + Me.ColumnHeader5.Text = "Type" + Me.ColumnHeader5.Width = 82 + ' + 'ColumnHeader6 + ' + Me.ColumnHeader6.Text = "Value" + Me.ColumnHeader6.Width = 134 + ' + 'ColumnHeader8 + ' + Me.ColumnHeader8.Text = "Default" + Me.ColumnHeader8.Width = 120 + ' + 'ColumnHeader9 + ' + Me.ColumnHeader9.Text = "Saved In DEVconfig.txt" + Me.ColumnHeader9.Width = 129 + ' + 'ConMenFilelist + ' + Me.ConMenFilelist.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.SaveListToolStripMenuItem, Me.LoadListToolStripMenuItem, Me.LoadDefaultListToolStripMenuItem, Me.ClearListToolStripMenuItem}) + Me.ConMenFilelist.Name = "ConMenFilelist" + Me.ConMenFilelist.Size = New System.Drawing.Size(176, 92) + ' + 'SaveListToolStripMenuItem + ' + Me.SaveListToolStripMenuItem.Name = "SaveListToolStripMenuItem" + Me.SaveListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) + Me.SaveListToolStripMenuItem.Text = "Save List..." + ' + 'LoadListToolStripMenuItem + ' + Me.LoadListToolStripMenuItem.Name = "LoadListToolStripMenuItem" + Me.LoadListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) + Me.LoadListToolStripMenuItem.Text = "Load List..." + ' + 'LoadDefaultListToolStripMenuItem + ' + Me.LoadDefaultListToolStripMenuItem.Name = "LoadDefaultListToolStripMenuItem" + Me.LoadDefaultListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) + Me.LoadDefaultListToolStripMenuItem.Text = "Load Autosave-List" + ' + 'ClearListToolStripMenuItem + ' + Me.ClearListToolStripMenuItem.Name = "ClearListToolStripMenuItem" + Me.ClearListToolStripMenuItem.Size = New System.Drawing.Size(175, 22) + Me.ClearListToolStripMenuItem.Text = "Clear List" + ' + 'BackgroundWorker1 + ' + ' + 'LvMsg + ' + Me.LvMsg.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LvMsg.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3}) + Me.LvMsg.Font = New System.Drawing.Font("Courier New", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LvMsg.FullRowSelect = True + Me.LvMsg.GridLines = True + Me.LvMsg.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable + Me.LvMsg.LabelWrap = False + Me.LvMsg.Location = New System.Drawing.Point(3, 3) + Me.LvMsg.MultiSelect = False + Me.LvMsg.Name = "LvMsg" + Me.LvMsg.Size = New System.Drawing.Size(1126, 190) + Me.LvMsg.TabIndex = 0 + Me.LvMsg.UseCompatibleStateImageBehavior = False + Me.LvMsg.View = System.Windows.Forms.View.Details + ' + 'ColumnHeader1 + ' + Me.ColumnHeader1.Text = "Message" + Me.ColumnHeader1.Width = 779 + ' + 'ColumnHeader2 + ' + Me.ColumnHeader2.Text = "Time" + Me.ColumnHeader2.Width = 151 + ' + 'ColumnHeader3 + ' + Me.ColumnHeader3.Text = "Source" + Me.ColumnHeader3.Width = 138 + ' + 'SplitContainer1 + ' + Me.SplitContainer1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.SplitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D + Me.SplitContainer1.Location = New System.Drawing.Point(0, 27) + Me.SplitContainer1.Name = "SplitContainer1" + Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal + ' + 'SplitContainer1.Panel1 + ' + Me.SplitContainer1.Panel1.Controls.Add(Me.TabControl1) + ' + 'SplitContainer1.Panel2 + ' + Me.SplitContainer1.Panel2.Controls.Add(Me.LvMsg) + Me.SplitContainer1.Size = New System.Drawing.Size(1136, 586) + Me.SplitContainer1.SplitterDistance = 382 + Me.SplitContainer1.TabIndex = 12 + ' + 'ToolStrip1 + ' + Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden + Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripBtNew, Me.ToolStripBtOpen, Me.ToolStripSeparator2, Me.ToolStripDrDnBtTools, Me.ToolStripDrDnBtInfo}) + Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) + Me.ToolStrip1.Name = "ToolStrip1" + Me.ToolStrip1.Size = New System.Drawing.Size(1136, 25) + Me.ToolStrip1.TabIndex = 11 + Me.ToolStrip1.Text = "ToolStrip1" + ' + 'ToolStripBtNew + ' + Me.ToolStripBtNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtNew.Image = Global.VECTO.My.Resources.Resources.blue_document_icon + Me.ToolStripBtNew.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtNew.Name = "ToolStripBtNew" + Me.ToolStripBtNew.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtNew.Text = "ToolStripBtNew" + Me.ToolStripBtNew.ToolTipText = "New Job File" + ' + 'ToolStripBtOpen + ' + Me.ToolStripBtOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtOpen.Image = Global.VECTO.My.Resources.Resources.Open_icon + Me.ToolStripBtOpen.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtOpen.Name = "ToolStripBtOpen" + Me.ToolStripBtOpen.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtOpen.Text = "ToolStripButton1" + Me.ToolStripBtOpen.ToolTipText = "Open File..." + ' + 'ToolStripSeparator2 + ' + Me.ToolStripSeparator2.Name = "ToolStripSeparator2" + Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25) + ' + 'ToolStripDrDnBtTools + ' + Me.ToolStripDrDnBtTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.GENEditorToolStripMenuItem1, Me.VEHEditorToolStripMenuItem, Me.EngineEditorToolStripMenuItem, Me.GearboxEditorToolStripMenuItem, Me.GraphToolStripMenuItem, Me.ToolStripSeparator6, Me.SignOrVerifyFilesToolStripMenuItem, Me.ToolStripSeparator4, Me.OpenLogToolStripMenuItem, Me.SettingsToolStripMenuItem}) + Me.ToolStripDrDnBtTools.Image = Global.VECTO.My.Resources.Resources.Misc_Tools_icon + Me.ToolStripDrDnBtTools.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripDrDnBtTools.Name = "ToolStripDrDnBtTools" + Me.ToolStripDrDnBtTools.Size = New System.Drawing.Size(65, 22) + Me.ToolStripDrDnBtTools.Text = "Tools" + ' + 'GENEditorToolStripMenuItem1 + ' + Me.GENEditorToolStripMenuItem1.Image = Global.VECTO.My.Resources.Resources.F_VECTO + Me.GENEditorToolStripMenuItem1.Name = "GENEditorToolStripMenuItem1" + Me.GENEditorToolStripMenuItem1.Size = New System.Drawing.Size(170, 22) + Me.GENEditorToolStripMenuItem1.Text = "Job Editor" + ' + 'VEHEditorToolStripMenuItem + ' + Me.VEHEditorToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.F_VEH + Me.VEHEditorToolStripMenuItem.Name = "VEHEditorToolStripMenuItem" + Me.VEHEditorToolStripMenuItem.Size = New System.Drawing.Size(170, 22) + Me.VEHEditorToolStripMenuItem.Text = "Vehicle Editor" + ' + 'EngineEditorToolStripMenuItem + ' + Me.EngineEditorToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.F_ENG + Me.EngineEditorToolStripMenuItem.Name = "EngineEditorToolStripMenuItem" + Me.EngineEditorToolStripMenuItem.Size = New System.Drawing.Size(170, 22) + Me.EngineEditorToolStripMenuItem.Text = "Engine Editor" + ' + 'GearboxEditorToolStripMenuItem + ' + Me.GearboxEditorToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.F_GBX + Me.GearboxEditorToolStripMenuItem.Name = "GearboxEditorToolStripMenuItem" + Me.GearboxEditorToolStripMenuItem.Size = New System.Drawing.Size(170, 22) + Me.GearboxEditorToolStripMenuItem.Text = "Gearbox Editor" + ' + 'GraphToolStripMenuItem + ' + Me.GraphToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.F_Graph + Me.GraphToolStripMenuItem.Name = "GraphToolStripMenuItem" + Me.GraphToolStripMenuItem.Size = New System.Drawing.Size(170, 22) + Me.GraphToolStripMenuItem.Text = "Graph" + ' + 'ToolStripSeparator6 + ' + Me.ToolStripSeparator6.Name = "ToolStripSeparator6" + Me.ToolStripSeparator6.Size = New System.Drawing.Size(167, 6) + ' + 'SignOrVerifyFilesToolStripMenuItem + ' + Me.SignOrVerifyFilesToolStripMenuItem.Image = Global.VECTO.My.Resources.Resources.Status_dialog_password_icon + Me.SignOrVerifyFilesToolStripMenuItem.Name = "SignOrVerifyFilesToolStripMenuItem" + Me.SignOrVerifyFilesToolStripMenuItem.Size = New System.Drawing.Size(170, 22) + Me.SignOrVerifyFilesToolStripMenuItem.Text = "Sign or Verify Files" + ' + 'ToolStripSeparator4 + ' + Me.ToolStripSeparator4.Name = "ToolStripSeparator4" + Me.ToolStripSeparator4.Size = New System.Drawing.Size(167, 6) + Me.ToolStripSeparator4.Visible = False + ' + 'OpenLogToolStripMenuItem + ' + Me.OpenLogToolStripMenuItem.Name = "OpenLogToolStripMenuItem" + Me.OpenLogToolStripMenuItem.Size = New System.Drawing.Size(170, 22) + Me.OpenLogToolStripMenuItem.Text = "Open Log" + ' + 'SettingsToolStripMenuItem + ' + Me.SettingsToolStripMenuItem.Name = "SettingsToolStripMenuItem" + Me.SettingsToolStripMenuItem.Size = New System.Drawing.Size(170, 22) + Me.SettingsToolStripMenuItem.Text = "Settings" + ' + 'ToolStripDrDnBtInfo + ' + Me.ToolStripDrDnBtInfo.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UserManualToolStripMenuItem, Me.UpdateNotesToolStripMenuItem, Me.ToolStripSeparator3, Me.CreateActivationFileToolStripMenuItem, Me.AboutVECTOToolStripMenuItem1}) + Me.ToolStripDrDnBtInfo.Image = Global.VECTO.My.Resources.Resources.Help_icon + Me.ToolStripDrDnBtInfo.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripDrDnBtInfo.Name = "ToolStripDrDnBtInfo" + Me.ToolStripDrDnBtInfo.Size = New System.Drawing.Size(61, 22) + Me.ToolStripDrDnBtInfo.Text = "Help" + ' + 'UserManualToolStripMenuItem + ' + Me.UserManualToolStripMenuItem.Name = "UserManualToolStripMenuItem" + Me.UserManualToolStripMenuItem.Size = New System.Drawing.Size(186, 22) + Me.UserManualToolStripMenuItem.Text = "User Manual" + ' + 'UpdateNotesToolStripMenuItem + ' + Me.UpdateNotesToolStripMenuItem.Name = "UpdateNotesToolStripMenuItem" + Me.UpdateNotesToolStripMenuItem.Size = New System.Drawing.Size(186, 22) + Me.UpdateNotesToolStripMenuItem.Text = "Release Notes" + ' + 'ToolStripSeparator3 + ' + Me.ToolStripSeparator3.Name = "ToolStripSeparator3" + Me.ToolStripSeparator3.Size = New System.Drawing.Size(183, 6) + ' + 'CreateActivationFileToolStripMenuItem + ' + Me.CreateActivationFileToolStripMenuItem.Name = "CreateActivationFileToolStripMenuItem" + Me.CreateActivationFileToolStripMenuItem.Size = New System.Drawing.Size(186, 22) + Me.CreateActivationFileToolStripMenuItem.Text = "Create Activation File" + ' + 'AboutVECTOToolStripMenuItem1 + ' + Me.AboutVECTOToolStripMenuItem1.Name = "AboutVECTOToolStripMenuItem1" + Me.AboutVECTOToolStripMenuItem1.Size = New System.Drawing.Size(186, 22) + Me.AboutVECTOToolStripMenuItem1.Text = "About VECTO" + ' + 'CmDEV + ' + Me.CmDEV.Name = "CmDEV" + Me.CmDEV.Size = New System.Drawing.Size(61, 4) + ' + 'TmProgSec + ' + Me.TmProgSec.Interval = 1000 + ' + 'CmOpenFile + ' + Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.OpenInGraphWindowToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) + Me.CmOpenFile.Name = "CmOpenFile" + Me.CmOpenFile.Size = New System.Drawing.Size(199, 70) + ' + 'OpenWithToolStripMenuItem + ' + Me.OpenWithToolStripMenuItem.Name = "OpenWithToolStripMenuItem" + Me.OpenWithToolStripMenuItem.Size = New System.Drawing.Size(198, 22) + Me.OpenWithToolStripMenuItem.Text = "Open with ..." + ' + 'OpenInGraphWindowToolStripMenuItem + ' + Me.OpenInGraphWindowToolStripMenuItem.Name = "OpenInGraphWindowToolStripMenuItem" + Me.OpenInGraphWindowToolStripMenuItem.Size = New System.Drawing.Size(198, 22) + Me.OpenInGraphWindowToolStripMenuItem.Text = "Open in Graph Window" + ' + 'ShowInFolderToolStripMenuItem + ' + Me.ShowInFolderToolStripMenuItem.Name = "ShowInFolderToolStripMenuItem" + Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(198, 22) + Me.ShowInFolderToolStripMenuItem.Text = "Show in Folder" + ' + 'F_MAINForm + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(1136, 638) + Me.Controls.Add(Me.ToolStrip1) + Me.Controls.Add(Me.SplitContainer1) + Me.Controls.Add(Me.StatusBAR) + Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon) + Me.MinimumSize = New System.Drawing.Size(785, 485) + Me.Name = "F_MAINForm" + Me.Text = "VECTO" + Me.StatusBAR.ResumeLayout(false) + Me.StatusBAR.PerformLayout + Me.TabControl1.ResumeLayout(false) + Me.TabPageGEN.ResumeLayout(false) + Me.TabPageGEN.PerformLayout + CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).EndInit + Me.TabPageDRI.ResumeLayout(false) + Me.TabPageDRI.PerformLayout + Me.TabPgOptions.ResumeLayout(false) + Me.TabPgOptions.PerformLayout + Me.GrBoxBATCH.ResumeLayout(false) + Me.GrBoxBATCH.PerformLayout + Me.PanelOptAllg.ResumeLayout(false) + Me.PanelOptAllg.PerformLayout + Me.GroupBox1.ResumeLayout(false) + Me.GroupBox1.PerformLayout + Me.PnDeclOpt.ResumeLayout(false) + Me.PnDeclOpt.PerformLayout + Me.TabPageDEV.ResumeLayout(false) + Me.TabPageDEV.PerformLayout + Me.ConMenFilelist.ResumeLayout(false) + Me.SplitContainer1.Panel1.ResumeLayout(false) + Me.SplitContainer1.Panel2.ResumeLayout(false) + CType(Me.SplitContainer1,System.ComponentModel.ISupportInitialize).EndInit + Me.SplitContainer1.ResumeLayout(false) + Me.ToolStrip1.ResumeLayout(false) + Me.ToolStrip1.PerformLayout + Me.CmOpenFile.ResumeLayout(false) + Me.ResumeLayout(false) + Me.PerformLayout - End Sub +End Sub Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents StatusBAR As System.Windows.Forms.StatusStrip Friend WithEvents ToolStripLbStatus As System.Windows.Forms.ToolStripStatusLabel @@ -1126,5 +1139,6 @@ Partial Class F_MAINForm Friend WithEvents RbDev As System.Windows.Forms.RadioButton Friend WithEvents RbDecl As System.Windows.Forms.RadioButton Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents Label1 As System.Windows.Forms.Label End Class diff --git a/VECTO/GUI/F_MAINForm.vb b/VECTO/GUI/F_MAINForm.vb index dca0bc54aee30384fe9e9ed826c5d22ab35c42c5..62dc0cdae0fb34b3f3e64622f06b13a675ef12c0 100644 --- a/VECTO/GUI/F_MAINForm.vb +++ b/VECTO/GUI/F_MAINForm.vb @@ -17,406 +17,404 @@ Imports System.Collections.Generic ''' <remarks></remarks> Public Class F_MAINForm + Private JobListView As cFileListView + Private CycleListView As cFileListView - Private JobListView As cFileListView - Private CycleListView As cFileListView + Private LastModeName As String + Private ConMenTarget As ListView + Private ConMenTarJob As Boolean - Private LastModeName As String - Private ConMenTarget As ListView - Private ConMenTarJob As Boolean + Private MODpath As String + Private MODVehList As Int32() - Private MODpath As String - Private MODVehList As Int32() + Private CycleTabPage As TabPage + Private CycleTabPageVisible As Boolean - Private CycleTabPage As TabPage - Private CycleTabPageVisible As Boolean + Private ComLineShutDown As Boolean - Private ComLineShutDown As Boolean + Private GUIlocked As Boolean - Private GUIlocked As Boolean + Private CheckedItems As List(Of ListViewItem) - Private CheckedItems As List(Of ListViewItem) + Private DEVpage As TabPage + Private CmDEVitem As ListViewItem - Private DEVpage As TabPage - Private CmDEVitem As ListViewItem + Private CheckLock As Boolean + Private GENchecked As Integer + Private DRIchecked As Integer + Private GENcheckAllLock As Boolean + Private DRIcheckAllLock As Boolean - Private CheckLock As Boolean - Private GENchecked As Integer - Private DRIchecked As Integer - Private GENcheckAllLock As Boolean - Private DRIcheckAllLock As Boolean - - Private CbDeclLock As Boolean = False + Private CbDeclLock As Boolean = False #Region "SLEEP Control - Prevent sleep while VECTO is running" - Private Declare Function SetThreadExecutionState Lib "kernel32" (ByVal esFlags As Long) As Long + Private Declare Function SetThreadExecutionState Lib "kernel32" (ByVal esFlags As Long) As Long - Private Sub AllowSleepOFF() + Private Sub AllowSleepOFF() #If Not PLATFORM = "x86" Then - SetThreadExecutionState(tEXECUTION_STATE.ES_CONTINUOUS Or tEXECUTION_STATE.ES_SYSTEM_REQUIRED) + SetThreadExecutionState(tEXECUTION_STATE.ES_CONTINUOUS Or tEXECUTION_STATE.ES_SYSTEM_REQUIRED) #End If - End Sub + End Sub - Private Sub AllowSleepON() + Private Sub AllowSleepON() #If Not PLATFORM = "x86" Then - SetThreadExecutionState(tEXECUTION_STATE.ES_CONTINUOUS) + SetThreadExecutionState(tEXECUTION_STATE.ES_CONTINUOUS) #End If - End Sub + End Sub - Private Enum tEXECUTION_STATE As Integer - ''' Informs the system that the state being set should remain in effect until the next call that uses ES_CONTINUOUS and one of the other state flags is cleared. - ES_CONTINUOUS = &H80000000 - ''' Forces the display to be on by resetting the display idle timer. - ES_DISPLAY_REQUIRED = &H2 - ''' Forces the system to be in the working state by resetting the system idle timer. - ES_SYSTEM_REQUIRED = &H1 - End Enum + Private Enum tEXECUTION_STATE As Integer + ''' Informs the system that the state being set should remain in effect until the next call that uses ES_CONTINUOUS and one of the other state flags is cleared. + ES_CONTINUOUS = &H80000000 + ''' Forces the display to be on by resetting the display idle timer. + ES_DISPLAY_REQUIRED = &H2 + ''' Forces the system to be in the working state by resetting the system idle timer. + ES_SYSTEM_REQUIRED = &H1 + End Enum #End Region #Region "FileBrowser Init/Close" - Private Sub FB_Initialize() - FB_Init = False - fbFolder = New cFileBrowser("WorkDir", True) - fbFileLists = New cFileBrowser("FileLists") - fbVECTO = New cFileBrowser("vecto") - fbVEH = New cFileBrowser("vveh") - fbMAP = New cFileBrowser("vmap") - fbDRI = New cFileBrowser("vdri") - fbFLD = New cFileBrowser("vfld") - fbENG = New cFileBrowser("veng") - fbGBX = New cFileBrowser("vgbx") - fbACC = New cFileBrowser("vacc") - fbAUX = New cFileBrowser("vaux") - fbGBS = New cFileBrowser("vgbs") - fbRLM = New cFileBrowser("vrlm") - fbTLM = New cFileBrowser("vtlm") - fbTCC = New cFileBrowser("vtcc") - fbCDx = New cFileBrowser("vcdx") - - fbVMOD = New cFileBrowser("vmod") - - - '------------------------------------------------------- - fbFileLists.Extensions = New String() {"txt"} - fbVECTO.Extensions = New String() {"vecto"} - fbVEH.Extensions = New String() {"vveh"} - fbMAP.Extensions = New String() {"vmap"} - fbDRI.Extensions = New String() {"vdri"} - fbFLD.Extensions = New String() {"vfld"} - fbENG.Extensions = New String() {"veng"} - fbGBX.Extensions = New String() {"vgbx"} - fbACC.Extensions = New String() {"vacc"} - fbAUX.Extensions = New String() {"vaux"} - fbGBS.Extensions = New String() {"vgbs"} - fbRLM.Extensions = New String() {"vrlm"} - fbTLM.Extensions = New String() {"vtlm"} - fbTCC.Extensions = New String() {"vtcc"} - fbCDx.Extensions = New String() {"vcdv", "vcdb"} - - fbVMOD.Extensions = New String() {"vmod"} - - - End Sub - Private Sub FB_Close() - fbFolder.Close() - fbFileLists.Close() - fbVECTO.Close() - fbVEH.Close() - fbMAP.Close() - fbDRI.Close() - fbFLD.Close() - fbENG.Close() - fbGBX.Close() - fbACC.Close() - fbAUX.Close() - fbGBS.Close() - fbRLM.Close() - fbTLM.Close() - fbTCC.Close() - fbCDx.Close() - fbVMOD.Close() - End Sub + + Private Sub FB_Initialize() + FB_Init = False + fbFolder = New cFileBrowser("WorkDir", True) + fbFileLists = New cFileBrowser("FileLists") + fbVECTO = New cFileBrowser("vecto") + fbVEH = New cFileBrowser("vveh") + fbMAP = New cFileBrowser("vmap") + fbDRI = New cFileBrowser("vdri") + fbFLD = New cFileBrowser("vfld") + fbENG = New cFileBrowser("veng") + fbGBX = New cFileBrowser("vgbx") + fbACC = New cFileBrowser("vacc") + fbAUX = New cFileBrowser("vaux") + fbGBS = New cFileBrowser("vgbs") + fbRLM = New cFileBrowser("vrlm") + fbTLM = New cFileBrowser("vtlm") + fbTCC = New cFileBrowser("vtcc") + fbCDx = New cFileBrowser("vcdx") + + fbVMOD = New cFileBrowser("vmod") + + + '------------------------------------------------------- + fbFileLists.Extensions = New String() {"txt"} + fbVECTO.Extensions = New String() {"vecto"} + fbVEH.Extensions = New String() {"vveh"} + fbMAP.Extensions = New String() {"vmap"} + fbDRI.Extensions = New String() {"vdri"} + fbFLD.Extensions = New String() {"vfld"} + fbENG.Extensions = New String() {"veng"} + fbGBX.Extensions = New String() {"vgbx"} + fbACC.Extensions = New String() {"vacc"} + fbAUX.Extensions = New String() {"vaux"} + fbGBS.Extensions = New String() {"vgbs"} + fbRLM.Extensions = New String() {"vrlm"} + fbTLM.Extensions = New String() {"vtlm"} + fbTCC.Extensions = New String() {"vtcc"} + fbCDx.Extensions = New String() {"vcdv", "vcdb"} + + fbVMOD.Extensions = New String() {"vmod"} + End Sub + + Private Sub FB_Close() + fbFolder.Close() + fbFileLists.Close() + fbVECTO.Close() + fbVEH.Close() + fbMAP.Close() + fbDRI.Close() + fbFLD.Close() + fbENG.Close() + fbGBX.Close() + fbACC.Close() + fbAUX.Close() + fbGBS.Close() + fbRLM.Close() + fbTLM.Close() + fbTCC.Close() + fbCDx.Close() + fbVMOD.Close() + End Sub #End Region #Region "VECTO-Worker" - 'VECTO-Launcher - Public Sub VECTO_Launcher() - Dim ProgOverall As Boolean - Dim GEN0 As cVECTO - - 'Called when VECTO already running - If VECTOworker.IsBusy Then - GUImsg(tMsgID.Err, "VECTO is already running!") - Exit Sub - End If - - 'Delete GENlist-Selection - Me.LvGEN.SelectedItems.Clear() - - 'If more than 100 calculations, ask whether to write by-second results - If Cfg.BatchMode And ((Me.LvGEN.CheckedItems.Count) * (Me.LvDRI.CheckedItems.Count) > 100) And Me.ChBoxModOut.Checked Then - Select Case MsgBox("You are about to run Batch Mode with " & (Me.LvGEN.CheckedItems.Count) * (Me.LvDRI.CheckedItems.Count) & " calculations!" & ChrW(10) & "Do you still want to write modal results?", MsgBoxStyle.YesNoCancel) - Case MsgBoxResult.No - Me.ChBoxModOut.Checked = False - Case MsgBoxResult.Cancel - GUImsg(tMsgID.Normal, "Aborted by User") - Exit Sub - End Select - End If - - 'Status - Status("Launching VECTO...") - - - 'Define Job-0list - - 'Define File / Cycle list - SetJobList() - - 'Zyklus-Liste definieren (falls nicht BATCH-Modus wird in SetCycleList nur die Liste gelöscht und nicht neu belegt) |@@| Define Cycle-list (if not BATCH mode in SetCycleList deleted only the list and not reassigned) - SetCycleList() - - If JobFileList.Count = 0 Then - GUImsg(tMsgID.Err, "No job file selected!") - Exit Sub - End If - - 'Check whether Overall-progbar is needed - If Cfg.BatchMode Or JobFileList.Count > 1 Or Cfg.DeclMode Then - ProgOverall = True - Else - GEN0 = New cVECTO - GEN0.FilePath = JobFileList(0) - If Not GEN0.ReadFile Then - GUImsg(tMsgID.Err, "Failed to job file (" & fFILE(JobFileList(0), True) & ")!") - Exit Sub - End If - ProgOverall = (GEN0.CycleFiles.Count > 1) - End If - - 'Launch through Job_Launcher - Job_Launcher(ProgOverall) - - End Sub - - 'Lock certain GUI elements while VECTO is running - Private Sub LockGUI(ByVal Lock As Boolean) - GUIlocked = Lock - - Me.PanelOptAllg.Enabled = Not Lock - Me.GrBoxSTD.Enabled = Not Lock - Me.GrBoxBATCH.Enabled = Not Lock - - Me.BtGENup.Enabled = Not Lock - Me.BtGENdown.Enabled = Not Lock - Me.ButtonGENadd.Enabled = Not Lock - Me.ButtonGENremove.Enabled = Not Lock - Me.LvGEN.LabelEdit = Not Lock - Me.ChBoxAllGEN.Enabled = Not Lock - - Me.BtDRIup.Enabled = Not Lock - Me.BtDRIdown.Enabled = Not Lock - Me.ButtonDRIadd.Enabled = Not Lock - Me.ButtonDRIremove.Enabled = Not Lock - Me.LvDRI.LabelEdit = Not Lock - Me.ChBoxAllDRI.Enabled = Not Lock - - If DEV.Enabled Then - Me.LvDEVoptions.Enabled = Not Lock - End If - - End Sub - - 'Define job file list - Private Sub SetJobList() - Dim LV0 As ListViewItem - Dim x As Integer - - JobFileList.Clear() - CheckedItems.Clear() - - x = -1 - For Each LV0 In Me.LvGEN.CheckedItems - x += 1 - LV0.SubItems(1).Text = "" - CheckedItems.Add(LV0) - SetCheckedItemColor(x, tJobStatus.Queued) - JobFileList.Add(fFileRepl(LV0.SubItems(0).Text)) - Next - - End Sub - - 'Define cycle list (BATCH mode only) - Private Sub SetCycleList() - Dim LV0 As ListViewItem - - JobCycleList.Clear() - - If Cfg.BatchMode Then - For Each LV0 In Me.LvDRI.CheckedItems - JobCycleList.Add(fFileRepl(LV0.SubItems(0).Text)) - Next - End If - - End Sub - - 'Job Launcher - Private Sub Job_Launcher(ByVal ProgOverallEnabled As Boolean) - - If VECTOworker.IsBusy Then Exit Sub - - 'Load Options from Options Tab - SetOptions() - - 'Save Config - Cfg.ConfigSAVE() - - If DEV.Enabled Then DEV.SaveToFile() - - 'Reset Msg-output - ClearMSG() - - 'Button switch - Me.Button1.Text = "STOP" - Me.Button1.Image = My.Resources.Stop_icon - - 'Disable Options - LockGUI(True) - - 'ProgBars start - If ProgOverallEnabled Then - Me.ToolStripProgBarOverall.Value = 0 - Me.ToolStripProgBarOverall.Style = ProgressBarStyle.Marquee - Me.ToolStripProgBarOverall.Visible = True - End If - - ProgBarCtrl.ProgJobInt = 0 - ProgSecStart() - - 'BG-Worker start - VECTOworker.RunWorkerAsync() - - End Sub - - 'Abort Job - Private Sub JobAbort() - Me.Button1.Enabled = False - Me.Button1.Text = "Aborting..." - Me.Button1.Image = My.Resources.Play_icon_gray - VECTOworker.CancelAsync() - End Sub + 'VECTO-Launcher + Public Sub VECTO_Launcher() + Dim ProgOverall As Boolean + Dim GEN0 As cVECTO + + 'Called when VECTO already running + If VECTOworker.IsBusy Then + GUImsg(tMsgID.Err, "VECTO is already running!") + Exit Sub + End If + + 'Delete GENlist-Selection + Me.LvGEN.SelectedItems.Clear() + + 'If more than 100 calculations, ask whether to write by-second results + If Cfg.BatchMode And ((Me.LvGEN.CheckedItems.Count) * (Me.LvDRI.CheckedItems.Count) > 100) And Me.ChBoxModOut.Checked _ + Then + Select Case _ + MsgBox( + "You are about to run Batch Mode with " & (Me.LvGEN.CheckedItems.Count) * (Me.LvDRI.CheckedItems.Count) & + " calculations!" & ChrW(10) & "Do you still want to write modal results?", MsgBoxStyle.YesNoCancel) + Case MsgBoxResult.No + Me.ChBoxModOut.Checked = False + Case MsgBoxResult.Cancel + GUImsg(tMsgID.Normal, "Aborted by User") + Exit Sub + End Select + End If + + 'Status + Status("Launching VECTO...") + + + 'Define Job-0list + + 'Define File / Cycle list + SetJobList() + + 'Zyklus-Liste definieren (falls nicht BATCH-Modus wird in SetCycleList nur die Liste gelöscht und nicht neu belegt) |@@| Define Cycle-list (if not BATCH mode in SetCycleList deleted only the list and not reassigned) + SetCycleList() + + If JobFileList.Count = 0 Then + GUImsg(tMsgID.Err, "No job file selected!") + Exit Sub + End If + + 'Check whether Overall-progbar is needed + If Cfg.BatchMode Or JobFileList.Count > 1 Or Cfg.DeclMode Then + ProgOverall = True + Else + GEN0 = New cVECTO + GEN0.FilePath = JobFileList(0) + If Not GEN0.ReadFile Then + GUImsg(tMsgID.Err, "Failed to job file (" & fFILE(JobFileList(0), True) & ")!") + Exit Sub + End If + ProgOverall = (GEN0.CycleFiles.Count > 1) + End If + + 'Launch through Job_Launcher + Job_Launcher(ProgOverall) + End Sub + + 'Lock certain GUI elements while VECTO is running + Private Sub LockGUI(ByVal Lock As Boolean) + GUIlocked = Lock + + Me.PanelOptAllg.Enabled = Not Lock + Me.GrBoxSTD.Enabled = Not Lock + Me.GrBoxBATCH.Enabled = Not Lock + + Me.BtGENup.Enabled = Not Lock + Me.BtGENdown.Enabled = Not Lock + Me.ButtonGENadd.Enabled = Not Lock + Me.ButtonGENremove.Enabled = Not Lock + Me.LvGEN.LabelEdit = Not Lock + Me.ChBoxAllGEN.Enabled = Not Lock + + Me.BtDRIup.Enabled = Not Lock + Me.BtDRIdown.Enabled = Not Lock + Me.ButtonDRIadd.Enabled = Not Lock + Me.ButtonDRIremove.Enabled = Not Lock + Me.LvDRI.LabelEdit = Not Lock + Me.ChBoxAllDRI.Enabled = Not Lock + + If DEV.Enabled Then + Me.LvDEVoptions.Enabled = Not Lock + End If + End Sub + + 'Define job file list + Private Sub SetJobList() + Dim LV0 As ListViewItem + Dim x As Integer + + JobFileList.Clear() + CheckedItems.Clear() + + x = -1 + For Each LV0 In Me.LvGEN.CheckedItems + x += 1 + LV0.SubItems(1).Text = "" + CheckedItems.Add(LV0) + SetCheckedItemColor(x, tJobStatus.Queued) + JobFileList.Add(fFileRepl(LV0.SubItems(0).Text)) + Next + End Sub + + 'Define cycle list (BATCH mode only) + Private Sub SetCycleList() + Dim LV0 As ListViewItem + + JobCycleList.Clear() + + If Cfg.BatchMode Then + For Each LV0 In Me.LvDRI.CheckedItems + JobCycleList.Add(fFileRepl(LV0.SubItems(0).Text)) + Next + End If + End Sub + + 'Job Launcher + Private Sub Job_Launcher(ByVal ProgOverallEnabled As Boolean) + + If VECTOworker.IsBusy Then Exit Sub + + 'Load Options from Options Tab + SetOptions() + + 'Save Config + Cfg.ConfigSAVE() + + If DEV.Enabled Then DEV.SaveToFile() + + 'Reset Msg-output + ClearMSG() + + 'Button switch + Me.Button1.Text = "STOP" + Me.Button1.Image = My.Resources.Stop_icon + + 'Disable Options + LockGUI(True) + + 'ProgBars start + If ProgOverallEnabled Then + Me.ToolStripProgBarOverall.Value = 0 + Me.ToolStripProgBarOverall.Style = ProgressBarStyle.Marquee + Me.ToolStripProgBarOverall.Visible = True + End If + + ProgBarCtrl.ProgJobInt = 0 + ProgSecStart() + + 'BG-Worker start + VECTOworker.RunWorkerAsync() + End Sub + + 'Abort Job + Private Sub JobAbort() + Me.Button1.Enabled = False + Me.Button1.Text = "Aborting..." + Me.Button1.Image = My.Resources.Play_icon_gray + VECTOworker.CancelAsync() + End Sub #Region "BackgroundWorker Events" - 'DoWork - Start Calculations - Private Sub BackgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork - - 'Prevent SLEEP - AllowSleepOFF() - - If SetCulture Then - Try - System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US") - Catch ex As Exception - GUImsg(tMsgID.Err, "Failed to set thread culture 'en-US'! Check system decimal- and group- separators!") - End Try - End If - - e.Result = VECTO() - - - End Sub - - 'Progress Report - Progressbar, Messages, etc. - Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged - Dim x As cWorkProg - x = e.UserState - - Select Case x.Target - Case tWorkMsgType.StatusListBox - MSGtoForm(e.UserState.ID, e.UserState.Msg, x.Source, x.Link) - - Case tWorkMsgType.StatusBar - Status(e.UserState.Msg) - - Case tWorkMsgType.ProgBars - Me.ToolStripProgBarOverall.Value = e.ProgressPercentage - ProgSecStart() - - Case tWorkMsgType.JobStatus - CheckedItems(x.FileIndex).SubItems(1).Text = x.Msg - SetCheckedItemColor(x.FileIndex, x.Status) - - Case tWorkMsgType.CycleStatus - Try - Me.LvDRI.CheckedItems(x.FileIndex).SubItems(1).Text = x.Msg - Catch ex As Exception - End Try - - Case tWorkMsgType.InitProgBar - Me.ToolStripProgBarOverall.Style = ProgressBarStyle.Continuous - - Case Else ' tWorkMsgType.Abort - JobAbort() - - End Select - End Sub - - 'Work completed - Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted - - Dim Result As tCalcResult - - 'Progbar reset - Me.ToolStripProgBarOverall.Visible = False - Me.ToolStripProgBarOverall.Style = ProgressBarStyle.Continuous - Me.ToolStripProgBarOverall.Value = 0 - ProgSecStop() - - 'So ListView-Item Colors (Warning = Yellow, etc..) are correctly visible - Me.LvGEN.SelectedIndices.Clear() - - Result = e.Result - - 'ShutDown when Unexpected Error - If e.Error IsNot Nothing Then - MsgBox("An Unexpected Error occurred!" & ChrW(10) & ChrW(10) & _ - e.Error.Message.ToString, MsgBoxStyle.Critical, "Unexpected Error") - LogFile.WriteToLog(tMsgID.Err, ">>>Unexpected Error:" & e.Error.ToString()) - Me.Close() - End If - - 'Options enable / GUI reset - LockGUI(False) - Me.Button1.Enabled = True - Me.Button1.Text = "START" - Me.Button1.Image = My.Resources.Play_icon - Status(LastModeName & " Mode") - - 'Command Line Shutdown - If ComLineShutDown Then Me.Close() - - 'Auto Shutdown - If Me.ChBoxAutoSD.Checked Then - Me.ChBoxAutoSD.Checked = False - If Not Result = tCalcResult.Abort Then - If F_ShutDown.ShutDown Then - GUImsg(tMsgID.Warn, "Shutting down...") - Me.Close() - End If - End If - End If - - 'SLEEP reactivate - AllowSleepON() - - End Sub + 'DoWork - Start Calculations + Private Sub BackgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) _ + Handles BackgroundWorker1.DoWork + + 'Prevent SLEEP + AllowSleepOFF() + + If SetCulture Then + Try + System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US") + Catch ex As Exception + GUImsg(tMsgID.Err, "Failed to set thread culture 'en-US'! Check system decimal- and group- separators!") + End Try + End If + + e.Result = VECTO() + End Sub + + 'Progress Report - Progressbar, Messages, etc. + Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As Object, + ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged + Dim x As cWorkProg + x = e.UserState + + Select Case x.Target + Case tWorkMsgType.StatusListBox + MSGtoForm(e.UserState.ID, e.UserState.Msg, x.Source, x.Link) + + Case tWorkMsgType.StatusBar + Status(e.UserState.Msg) + + Case tWorkMsgType.ProgBars + Me.ToolStripProgBarOverall.Value = e.ProgressPercentage + ProgSecStart() + + Case tWorkMsgType.JobStatus + CheckedItems(x.FileIndex).SubItems(1).Text = x.Msg + SetCheckedItemColor(x.FileIndex, x.Status) + + Case tWorkMsgType.CycleStatus + Try + Me.LvDRI.CheckedItems(x.FileIndex).SubItems(1).Text = x.Msg + Catch ex As Exception + End Try + + Case tWorkMsgType.InitProgBar + Me.ToolStripProgBarOverall.Style = ProgressBarStyle.Continuous + + Case Else ' tWorkMsgType.Abort + JobAbort() + + End Select + End Sub + + 'Work completed + Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, + ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted + + Dim Result As tCalcResult + + 'Progbar reset + Me.ToolStripProgBarOverall.Visible = False + Me.ToolStripProgBarOverall.Style = ProgressBarStyle.Continuous + Me.ToolStripProgBarOverall.Value = 0 + ProgSecStop() + + 'So ListView-Item Colors (Warning = Yellow, etc..) are correctly visible + Me.LvGEN.SelectedIndices.Clear() + + Result = e.Result + + 'ShutDown when Unexpected Error + If e.Error IsNot Nothing Then + MsgBox("An Unexpected Error occurred!" & ChrW(10) & ChrW(10) & + e.Error.Message.ToString, MsgBoxStyle.Critical, "Unexpected Error") + LogFile.WriteToLog(tMsgID.Err, ">>>Unexpected Error:" & e.Error.ToString()) + Me.Close() + End If + + 'Options enable / GUI reset + LockGUI(False) + Me.Button1.Enabled = True + Me.Button1.Text = "START" + Me.Button1.Image = My.Resources.Play_icon + Status(LastModeName & " Mode") + + 'Command Line Shutdown + If ComLineShutDown Then Me.Close() + + 'Auto Shutdown + If Me.ChBoxAutoSD.Checked Then + Me.ChBoxAutoSD.Checked = False + If Not Result = tCalcResult.Abort Then + If F_ShutDown.ShutDown Then + GUImsg(tMsgID.Warn, "Shutting down...") + Me.Close() + End If + End If + End If + + 'SLEEP reactivate + AllowSleepON() + End Sub #End Region @@ -424,560 +422,559 @@ Public Class F_MAINForm #Region "Form Init/Close" - 'Initialise - Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load - Dim x As Integer - - GUIlocked = False - CheckLock = False - GENcheckAllLock = False - DRIcheckAllLock = False - DRIchecked = 0 - GENchecked = 0 - - CheckedItems = New List(Of ListViewItem) - - 'Load Tabs properly (otherwise problem with ListViews) - For x = 0 To Me.TabControl1.TabCount - 1 - Me.TabControl1.TabPages(x).Show() - Next - - CycleTabPageVisible = True - CycleTabPage = Me.TabPageDRI - - DEVpage = Me.TabPageDEV - Me.TabControl1.Controls.Remove(DEVpage) + 'Initialise + Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load + Dim x As Integer - LastModeName = "" + GUIlocked = False + CheckLock = False + GENcheckAllLock = False + DRIcheckAllLock = False + DRIchecked = 0 + GENchecked = 0 - ComLineShutDown = False + CheckedItems = New List(Of ListViewItem) - FB_Initialize() + 'Load Tabs properly (otherwise problem with ListViews) + For x = 0 To Me.TabControl1.TabCount - 1 + Me.TabControl1.TabPages(x).Show() + Next - Me.Text = "VECTO " & VECTOvers + CycleTabPageVisible = True + CycleTabPage = Me.TabPageDRI + DEVpage = Me.TabPageDEV + Me.TabControl1.Controls.Remove(DEVpage) - 'FileLists - JobListView = New cFileListView(MyConfPath & "joblist.txt") - JobListView.LVbox = Me.LvGEN - CycleListView = New cFileListView(MyConfPath & "cyclelist.txt") - CycleListView.LVbox = Me.LvDRI + LastModeName = "" - JobListView.LoadList() + ComLineShutDown = False - 'Load GUI Options (here, the GEN/ADV/DRI lists are loaded) - LoadOptions() + FB_Initialize() - 'Resize columns ... after Loading the @file-lists - Me.LvGEN.Columns(1).Width = -2 - Me.LvDRI.Columns(1).Width = -2 - Me.LvMsg.Columns(2).Width = -2 - - 'Initialize BackgroundWorker - VECTOworker = Me.BackgroundWorker1 - VECTOworker.WorkerReportsProgress = True - VECTOworker.WorkerSupportsCancellation = True - - 'Set mode (Batch/Standard) - ModeUpdate() - - 'License check - If Not Lic.LICcheck() Then - MsgBox("License File invalid!" & vbCrLf & vbCrLf & Lic.FailMsg) - If Lic.CreateActFile(MyAppPath & "ActivationCode.dat") Then - MsgBox("Activation File created.") - Else - MsgBox("Failed to create Activation File! Is Directory Read-Only?") - End If - Me.Close() - Else - GUImsg(tMsgID.Normal, "License File validated.") - If Lic.TimeWarn Then GUImsg(tMsgID.Warn, "License expiring date (y/m/d): " & Lic.ExpTime) - End If - - DEV.Enabled = True ' Lic.LicFeature(9) - - If DEV.Enabled Then - DEV.LoadFromFile() - LoadDEVconfigs() - End If - - DeclOnOff() - - End Sub - - 'Declaration mode GUI settings - Private Sub DeclOnOff() - - If Cfg.DeclMode Then - Me.Text = "VECTO " & VECTOvers & " - Declaration Mode" - Me.CbBatch.Checked = False - Cfg.DeclInit() - Else - Me.Text = "VECTO " & VECTOvers - End If - - If Cfg.DeclMode Then - LastModeName = "Declaration" - Else - If Cfg.BatchMode Then - LastModeName = "Batch" - Else - LastModeName = "Engineering" - End If - End If - - Status(LastModeName & " Mode") - - Me.LoadOptions() - - Me.LbDecl.Visible = Cfg.DeclMode - - Me.PnDeclOpt.Enabled = Not Cfg.DeclMode - - End Sub - - 'Shown Event (Form-Load finished) ... here StartUp Forms are loaded (DEV, GEN/ADV- Editor ..) - Private Sub F01_MAINForm_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown - Dim fwelcome As F_Welcome - - 'DEV Form - If DEV.Enabled Then - Me.TabControl1.TabPages.Insert(Me.TabControl1.TabPages.Count, DEVpage) - End If - - 'VECTO Init - Declaration.Init() - - 'Command Line Args - If Command() <> "" Then - CmdLineCtrl(My.Application.CommandLineArgs) - Else - If Cfg.FirstRun Then - Cfg.FirstRun = False - fwelcome = New F_Welcome - fwelcome.ShowDialog() - End If - End If - - End Sub - - 'Open file - Private Sub CmdLineCtrl(ByVal ComLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) - Dim bBATCH As Boolean - Dim bRUN As Boolean - Dim x As Object - Dim str As String - Dim ComFile As String = "" - Dim vecFiles As New List(Of String) - Dim driFiles As New List(Of String) - - bBATCH = False - bRUN = False - ComFile = sKey.NoFile - - 'Read Command-Line Args - For Each x In ComLineArgs - str = Trim(Replace(x.ToString, ChrW(34), "")) - Select Case UCase(str) - Case "-BATCH" - bBATCH = True - Case "-CLOSE" - ComLineShutDown = True - Case "-RUN" - bRUN = True - Case Else - Select Case UCase(fEXT(str)) - Case ".VECTO" - vecFiles.Add(fFileRepl(str)) - Case ".VDRI" - driFiles.Add(fFileRepl(str)) - Case Else - ComFile = fFileRepl(str) - End Select - End Select - Next - - 'Mode switch and load Driving Cycles - If bBATCH Then - Me.CbBatch.Checked = True - - If driFiles.Count > 0 Then - LvDRI.Items.Clear() - AddToCycleListView(driFiles.ToArray) - End If - - Else - Me.CbBatch.Checked = False - End If - - 'Load Vecto files or open editor (if only one file) - If vecFiles.Count > 0 Then - If vecFiles.Count > 1 Or bRUN Then - LvGEN.Items.Clear() - AddToJobListView(vecFiles.ToArray) - Else - ComFile = vecFiles(0) - End If - End If - - 'Run or open file editor if file is specified - If bRUN Then - VECTO_Launcher() - Else - If ComFile <> sKey.NoFile Then OpenVectoFile(ComFile) - End If - - End Sub - - 'Close - Private Sub F01_MAINForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing - - 'Save File-Lists - SaveFileLists() - - 'Close log - LogFile.CloseLog() - - 'Config save - SetOptions() - Cfg.ConfigSAVE() - If DEV.Enabled Then DEV.SaveToFile() - - 'File browser instances close - FB_Close() - - End Sub + Me.Text = "VECTO " & VECTOvers + + + 'FileLists + JobListView = New cFileListView(MyConfPath & "joblist.txt") + JobListView.LVbox = Me.LvGEN + CycleListView = New cFileListView(MyConfPath & "cyclelist.txt") + CycleListView.LVbox = Me.LvDRI + + JobListView.LoadList() + + 'Load GUI Options (here, the GEN/ADV/DRI lists are loaded) + LoadOptions() + + 'Resize columns ... after Loading the @file-lists + Me.LvGEN.Columns(1).Width = -2 + Me.LvDRI.Columns(1).Width = -2 + Me.LvMsg.Columns(2).Width = -2 + + 'Initialize BackgroundWorker + VECTOworker = Me.BackgroundWorker1 + VECTOworker.WorkerReportsProgress = True + VECTOworker.WorkerSupportsCancellation = True + + 'Set mode (Batch/Standard) + ModeUpdate() + + 'License check + If Not Lic.LICcheck() Then + MsgBox("License File invalid!" & vbCrLf & vbCrLf & Lic.FailMsg) + If Lic.CreateActFile(MyAppPath & "ActivationCode.dat") Then + MsgBox("Activation File created.") + Else + MsgBox("Failed to create Activation File! Is Directory Read-Only?") + End If + Me.Close() + Else + GUImsg(tMsgID.Normal, "License File validated.") + If Lic.TimeWarn Then GUImsg(tMsgID.Warn, "License expiring date (y/m/d): " & Lic.ExpTime) + End If + + DEV.Enabled = True ' Lic.LicFeature(9) + + If DEV.Enabled Then + DEV.LoadFromFile() + LoadDEVconfigs() + End If + + DeclOnOff() + End Sub + + 'Declaration mode GUI settings + Private Sub DeclOnOff() + + If Cfg.DeclMode Then + Me.Text = "VECTO " & VECTOvers & " - Declaration Mode" + Me.CbBatch.Checked = False + Cfg.DeclInit() + Else + Me.Text = "VECTO " & VECTOvers + End If + + If Cfg.DeclMode Then + LastModeName = "Declaration" + Else + If Cfg.BatchMode Then + LastModeName = "Batch" + Else + LastModeName = "Engineering" + End If + End If + + Status(LastModeName & " Mode") + + Me.LoadOptions() + + Me.LbDecl.Visible = Cfg.DeclMode + + Me.PnDeclOpt.Enabled = Not Cfg.DeclMode + End Sub + + 'Shown Event (Form-Load finished) ... here StartUp Forms are loaded (DEV, GEN/ADV- Editor ..) + Private Sub F01_MAINForm_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown + Dim fwelcome As F_Welcome + + 'DEV Form + If DEV.Enabled Then + Me.TabControl1.TabPages.Insert(Me.TabControl1.TabPages.Count, DEVpage) + End If + + 'VECTO Init + Declaration.Init() + + 'Command Line Args + If Command() <> "" Then + CmdLineCtrl(My.Application.CommandLineArgs) + Else + If Cfg.FirstRun Then + Cfg.FirstRun = False + fwelcome = New F_Welcome + fwelcome.ShowDialog() + End If + End If + End Sub + + 'Open file + Private Sub CmdLineCtrl(ByVal ComLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) + Dim bBATCH As Boolean + Dim bRUN As Boolean + Dim x As Object + Dim str As String + Dim ComFile As String = "" + Dim vecFiles As New List(Of String) + Dim driFiles As New List(Of String) + + bBATCH = False + bRUN = False + ComFile = sKey.NoFile + + 'Read Command-Line Args + For Each x In ComLineArgs + str = Trim(Replace(x.ToString, ChrW(34), "")) + Select Case UCase(str) + Case "-BATCH" + bBATCH = True + Case "-CLOSE" + ComLineShutDown = True + Case "-RUN" + bRUN = True + Case Else + Select Case UCase(fEXT(str)) + Case ".VECTO" + vecFiles.Add(fFileRepl(str)) + Case ".VDRI" + driFiles.Add(fFileRepl(str)) + Case Else + ComFile = fFileRepl(str) + End Select + End Select + Next + + 'Mode switch and load Driving Cycles + If bBATCH Then + Me.CbBatch.Checked = True + + If driFiles.Count > 0 Then + LvDRI.Items.Clear() + AddToCycleListView(driFiles.ToArray) + End If + + Else + Me.CbBatch.Checked = False + End If + + 'Load Vecto files or open editor (if only one file) + If vecFiles.Count > 0 Then + If vecFiles.Count > 1 Or bRUN Then + LvGEN.Items.Clear() + AddToJobListView(vecFiles.ToArray) + Else + ComFile = vecFiles(0) + End If + End If + + 'Run or open file editor if file is specified + If bRUN Then + VECTO_Launcher() + Else + If ComFile <> sKey.NoFile Then OpenVectoFile(ComFile) + End If + End Sub + + 'Close + Private Sub F01_MAINForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) _ + Handles Me.FormClosing + + 'Save File-Lists + SaveFileLists() + + 'Close log + LogFile.CloseLog() + + 'Config save + SetOptions() + Cfg.ConfigSAVE() + If DEV.Enabled Then DEV.SaveToFile() + + 'File browser instances close + FB_Close() + End Sub #End Region - 'Open file - Job, vehicle, engine, gearbox or signature file - Public Sub OpenVectoFile(ByVal File As String) - - If Not IO.File.Exists(File) Then - - GUImsg(tMsgID.Err, "File not found! (" & File & ")") - MsgBox("File not found! (" & File & ")", MsgBoxStyle.Critical) - - Else - - Select Case UCase(fEXT(File)) - Case ".VGBX" - If Not F_GBX.Visible Then - F_GBX.Show() - Else - F_GBX.JobDir = "" - If F_GBX.WindowState = FormWindowState.Minimized Then F_GBX.WindowState = FormWindowState.Normal - F_GBX.BringToFront() - End If - F_GBX.openGBX(File) - Case ".VVEH" - If Not F_VEH.Visible Then - F_VEH.Show() - Else - F_VEH.JobDir = "" - If F_VEH.WindowState = FormWindowState.Minimized Then F_VEH.WindowState = FormWindowState.Normal - F_VEH.BringToFront() - End If - F_VEH.openVEH(File) - Case ".VENG" - If Not F_ENG.Visible Then - F_ENG.Show() - Else - F_ENG.JobDir = "" - If F_ENG.WindowState = FormWindowState.Minimized Then F_ENG.WindowState = FormWindowState.Normal - F_ENG.BringToFront() - End If - F_ENG.openENG(File) - Case ".VECTO" - OpenVECTOeditor(File) - Case ".VSIG" - OpenSigFile(File) - Case Else - MsgBox("Type '" & fEXT(File) & "' unknown!", MsgBoxStyle.Critical) - End Select - - End If - - End Sub + 'Open file - Job, vehicle, engine, gearbox or signature file + Public Sub OpenVectoFile(ByVal File As String) + + If Not IO.File.Exists(File) Then + + GUImsg(tMsgID.Err, "File not found! (" & File & ")") + MsgBox("File not found! (" & File & ")", MsgBoxStyle.Critical) + + Else + + Select Case UCase(fEXT(File)) + Case ".VGBX" + If Not F_GBX.Visible Then + F_GBX.Show() + Else + F_GBX.JobDir = "" + If F_GBX.WindowState = FormWindowState.Minimized Then F_GBX.WindowState = FormWindowState.Normal + F_GBX.BringToFront() + End If + F_GBX.openGBX(File) + Case ".VVEH" + If Not F_VEH.Visible Then + F_VEH.Show() + Else + F_VEH.JobDir = "" + If F_VEH.WindowState = FormWindowState.Minimized Then F_VEH.WindowState = FormWindowState.Normal + F_VEH.BringToFront() + End If + F_VEH.openVEH(File) + Case ".VENG" + If Not F_ENG.Visible Then + F_ENG.Show() + Else + F_ENG.JobDir = "" + If F_ENG.WindowState = FormWindowState.Minimized Then F_ENG.WindowState = FormWindowState.Normal + F_ENG.BringToFront() + End If + F_ENG.openENG(File) + Case ".VECTO" + OpenVECTOeditor(File) + Case ".VSIG" + OpenSigFile(File) + Case Else + MsgBox("Type '" & fEXT(File) & "' unknown!", MsgBoxStyle.Critical) + End Select + + End If + End Sub #Region "Job file list" #Region "Events" - Private Sub ButtonGENremove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGENremove.Click - RemoveJobFile() - End Sub - - Private Sub ButtonGENadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGENadd.Click - AddJobFile() - End Sub - - Private Sub ButtonGENoptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGENopt.Click - ConMenTarget = Me.LvGEN - ConMenTarJob = True - - 'Locked functions show/hide - Me.LoadListToolStripMenuItem.Enabled = Not GUIlocked - Me.LoadDefaultListToolStripMenuItem.Enabled = Not GUIlocked - Me.ClearListToolStripMenuItem.Enabled = Not GUIlocked - - Me.ConMenFilelist.Show(Control.MousePosition) - End Sub - - Private Sub ListViewGEN_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles LvGEN.KeyDown - Select Case e.KeyCode - Case Keys.Delete, Keys.Back - If Not GUIlocked Then RemoveJobFile() - Case Keys.Enter - OpenJobFile() - End Select - End Sub - - Private Sub ListViewGEN_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LvGEN.DoubleClick - If Me.LvGEN.SelectedItems.Count > 0 Then - Me.LvGEN.SelectedItems(0).Checked = Not Me.LvGEN.SelectedItems(0).Checked - OpenJobFile() - End If - End Sub - - Private Sub LvGEN_ItemChecked(sender As Object, e As System.Windows.Forms.ItemCheckedEventArgs) Handles LvGEN.ItemChecked - - If e.Item.Checked Then - GENchecked += 1 - Else - GENchecked -= 1 - End If - - If CheckLock Then Exit Sub - UpdateJobTabText() - - End Sub - - Private Sub ChBoxAllGEN_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChBoxAllGEN.CheckedChanged - - If GENcheckAllLock And Me.ChBoxAllGEN.CheckState = CheckState.Indeterminate Then Exit Sub - - CheckAllGEN(Me.ChBoxAllGEN.Checked) - End Sub - Private Sub CheckAllGEN(ByVal Check As Boolean) - Dim x As ListViewItem - - CheckLock = True - Me.LvGEN.BeginUpdate() - - For Each x In Me.LvGEN.Items - x.Checked = Check - Next - - Me.LvGEN.EndUpdate() - CheckLock = False - - GENchecked = Me.LvGEN.CheckedItems.Count - UpdateJobTabText() - End Sub - - Private Sub ListGEN_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles LvGEN.DragEnter - If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then - e.Effect = DragDropEffects.Copy - End If - End Sub - Private Sub ListGEN_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles LvGEN.DragDrop - Dim f As String() - f = CType(e.Data.GetData(DataFormats.FileDrop), Array) - AddToJobListView(f) - End Sub - - Private Sub BtGENup_Click(sender As System.Object, e As System.EventArgs) Handles BtGENup.Click - MoveItem(LvGEN, True) - End Sub - - Private Sub BtGENdown_Click(sender As System.Object, e As System.EventArgs) Handles BtGENdown.Click - MoveItem(LvGEN, False) - End Sub + Private Sub ButtonGENremove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ButtonGENremove.Click + RemoveJobFile() + End Sub + + Private Sub ButtonGENadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGENadd.Click + AddJobFile() + End Sub + + Private Sub ButtonGENoptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ButtonGENopt.Click + ConMenTarget = Me.LvGEN + ConMenTarJob = True + + 'Locked functions show/hide + Me.LoadListToolStripMenuItem.Enabled = Not GUIlocked + Me.LoadDefaultListToolStripMenuItem.Enabled = Not GUIlocked + Me.ClearListToolStripMenuItem.Enabled = Not GUIlocked + + Me.ConMenFilelist.Show(Control.MousePosition) + End Sub + + Private Sub ListViewGEN_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) _ + Handles LvGEN.KeyDown + Select Case e.KeyCode + Case Keys.Delete, Keys.Back + If Not GUIlocked Then RemoveJobFile() + Case Keys.Enter + OpenJobFile() + End Select + End Sub + + Private Sub ListViewGEN_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LvGEN.DoubleClick + If Me.LvGEN.SelectedItems.Count > 0 Then + Me.LvGEN.SelectedItems(0).Checked = Not Me.LvGEN.SelectedItems(0).Checked + OpenJobFile() + End If + End Sub + + Private Sub LvGEN_ItemChecked(sender As Object, e As System.Windows.Forms.ItemCheckedEventArgs) _ + Handles LvGEN.ItemChecked + + If e.Item.Checked Then + GENchecked += 1 + Else + GENchecked -= 1 + End If + + If CheckLock Then Exit Sub + UpdateJobTabText() + End Sub + + Private Sub ChBoxAllGEN_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ChBoxAllGEN.CheckedChanged + + If GENcheckAllLock And Me.ChBoxAllGEN.CheckState = CheckState.Indeterminate Then Exit Sub + + CheckAllGEN(Me.ChBoxAllGEN.Checked) + End Sub + + Private Sub CheckAllGEN(ByVal Check As Boolean) + Dim x As ListViewItem + + CheckLock = True + Me.LvGEN.BeginUpdate() + + For Each x In Me.LvGEN.Items + x.Checked = Check + Next + + Me.LvGEN.EndUpdate() + CheckLock = False + + GENchecked = Me.LvGEN.CheckedItems.Count + UpdateJobTabText() + End Sub + + Private Sub ListGEN_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) _ + Handles LvGEN.DragEnter + If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then + e.Effect = DragDropEffects.Copy + End If + End Sub + + Private Sub ListGEN_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) _ + Handles LvGEN.DragDrop + Dim f As String() + f = CType(e.Data.GetData(DataFormats.FileDrop), Array) + AddToJobListView(f) + End Sub + + Private Sub BtGENup_Click(sender As System.Object, e As System.EventArgs) Handles BtGENup.Click + MoveItem(LvGEN, True) + End Sub + + Private Sub BtGENdown_Click(sender As System.Object, e As System.EventArgs) Handles BtGENdown.Click + MoveItem(LvGEN, False) + End Sub #End Region - 'Remove selected file(s) from job list - Private Sub RemoveJobFile() - Dim lastindx As Integer - Dim SelIx() As Integer - Dim i As Integer - - If Me.LvGEN.SelectedItems.Count < 1 Then - If Me.LvGEN.Items.Count = 1 Then - Me.LvGEN.Items(0).Selected = True - Else - Exit Sub - End If - End If - - LvGEN.BeginUpdate() - CheckLock = True - - ReDim SelIx(LvGEN.SelectedItems.Count - 1) - LvGEN.SelectedIndices.CopyTo(SelIx, 0) - - lastindx = LvGEN.SelectedIndices(LvGEN.SelectedItems.Count - 1) - - For i = UBound(SelIx) To 0 Step -1 - LvGEN.Items.RemoveAt(SelIx(i)) - Next - - If lastindx < LvGEN.Items.Count Then - LvGEN.Items(lastindx).Selected = True - Else - If LvGEN.Items.Count > 0 Then LvGEN.Items(LvGEN.Items.Count - 1).Selected = True - End If - - LvGEN.EndUpdate() - CheckLock = False - - GENchecked = LvGEN.CheckedItems.Count - UpdateJobTabText() - End Sub - - 'Browse for job file(s) and add to job list with AddToJobListView - Private Sub AddJobFile() - Dim x As String() - Dim Chck As Boolean = False - - x = New String() {""} - - 'STANDARD/BATCH - If fbVECTO.OpenDialog("", True, "vecto") Then - Chck = True - x = fbVECTO.Files - End If - - If Chck Then AddToJobListView(x) - - End Sub - - 'Open file in list - Private Sub OpenJobFile() - Dim f As String - - If Me.LvGEN.SelectedItems.Count < 1 Then - If Me.LvGEN.Items.Count = 1 Then - Me.LvGEN.Items(0).Selected = True - Else - Exit Sub - End If - End If - - f = Me.LvGEN.SelectedItems(0).SubItems(0).Text - f = fFileRepl(f) - If Not IO.File.Exists(f) Then - MsgBox(f & " not found!") - Else - OpenVECTOeditor(f) - End If - End Sub - - 'Add File to job listview (multiple files) - Private Sub AddToJobListView(ByVal Path As String(), Optional ByVal Txt As String = " ") - Dim pDim As Int16 - Dim p As Int16 - Dim f As Int16 - Dim fList As String() - Dim fListDim As Int16 = -1 - Dim ListViewItem0 As ListViewItem - - 'If VECTO runs: Cancel operation (because Mode-change during calculation is not very clever) - If VECTOworker.IsBusy Then Exit Sub - - pDim = UBound(Path) - ReDim fList(0) 'um Nullverweisausnahme-Warnung zu verhindern - - '******************************************* Begin Update '******************************************* - Me.LvGEN.BeginUpdate() - CheckLock = True - - Me.LvGEN.SelectedIndices.Clear() - - If pDim = 0 Then - fListDim = Me.LvGEN.Items.Count - 1 - ReDim fList(fListDim) - For f = 0 To fListDim - fList(f) = fFileRepl(Me.LvGEN.Items(f).SubItems(0).Text) - Next - End If - - For p = 0 To pDim - - If pDim = 0 Then - - For f = 0 To fListDim - - 'If file already exists in the list: Do not append (only when a single file) - If UCase(Path(p)) = UCase(fList(f)) Then - - 'Status reset - Me.LvGEN.Items(f).SubItems(1).Text = Txt - Me.LvGEN.Items(f).BackColor = Color.FromKnownColor(KnownColor.Window) - Me.LvGEN.Items(f).ForeColor = Color.FromKnownColor(KnownColor.WindowText) - - 'Element auswählen und anhaken |@@| Element selection and hook - Me.LvGEN.Items(f).Selected = True - Me.LvGEN.Items(f).Checked = True - Me.LvGEN.Items(f).EnsureVisible() - - GoTo lbFound - End If - Next - - End If - - 'Otherwise: Add File (without WorkDir) - ListViewItem0 = New ListViewItem(Path(p)) 'fFileWD(Path(p))) - ListViewItem0.SubItems.Add(" ") - ListViewItem0.Checked = True - ListViewItem0.Selected = True - Me.LvGEN.Items.Add(ListViewItem0) - ListViewItem0.EnsureVisible() + 'Remove selected file(s) from job list + Private Sub RemoveJobFile() + Dim lastindx As Integer + Dim SelIx() As Integer + Dim i As Integer + + If Me.LvGEN.SelectedItems.Count < 1 Then + If Me.LvGEN.Items.Count = 1 Then + Me.LvGEN.Items(0).Selected = True + Else + Exit Sub + End If + End If + + LvGEN.BeginUpdate() + CheckLock = True + + ReDim SelIx(LvGEN.SelectedItems.Count - 1) + LvGEN.SelectedIndices.CopyTo(SelIx, 0) + + lastindx = LvGEN.SelectedIndices(LvGEN.SelectedItems.Count - 1) + + For i = UBound(SelIx) To 0 Step -1 + LvGEN.Items.RemoveAt(SelIx(i)) + Next + + If lastindx < LvGEN.Items.Count Then + LvGEN.Items(lastindx).Selected = True + Else + If LvGEN.Items.Count > 0 Then LvGEN.Items(LvGEN.Items.Count - 1).Selected = True + End If + + LvGEN.EndUpdate() + CheckLock = False + + GENchecked = LvGEN.CheckedItems.Count + UpdateJobTabText() + End Sub + + 'Browse for job file(s) and add to job list with AddToJobListView + Private Sub AddJobFile() + Dim x As String() + Dim Chck As Boolean = False + + x = New String() {""} + + 'STANDARD/BATCH + If fbVECTO.OpenDialog("", True, "vecto") Then + Chck = True + x = fbVECTO.Files + End If + + If Chck Then AddToJobListView(x) + End Sub + + 'Open file in list + Private Sub OpenJobFile() + Dim f As String + + If Me.LvGEN.SelectedItems.Count < 1 Then + If Me.LvGEN.Items.Count = 1 Then + Me.LvGEN.Items(0).Selected = True + Else + Exit Sub + End If + End If + + f = Me.LvGEN.SelectedItems(0).SubItems(0).Text + f = fFileRepl(f) + If Not IO.File.Exists(f) Then + MsgBox(f & " not found!") + Else + OpenVECTOeditor(f) + End If + End Sub + + 'Add File to job listview (multiple files) + Private Sub AddToJobListView(ByVal Path As String(), Optional ByVal Txt As String = " ") + Dim pDim As Int16 + Dim p As Int16 + Dim f As Int16 + Dim fList As String() + Dim fListDim As Int16 = -1 + Dim ListViewItem0 As ListViewItem + + 'If VECTO runs: Cancel operation (because Mode-change during calculation is not very clever) + If VECTOworker.IsBusy Then Exit Sub + + pDim = UBound(Path) + ReDim fList(0) 'um Nullverweisausnahme-Warnung zu verhindern + + '******************************************* Begin Update '******************************************* + Me.LvGEN.BeginUpdate() + CheckLock = True + + Me.LvGEN.SelectedIndices.Clear() + + If pDim = 0 Then + fListDim = Me.LvGEN.Items.Count - 1 + ReDim fList(fListDim) + For f = 0 To fListDim + fList(f) = fFileRepl(Me.LvGEN.Items(f).SubItems(0).Text) + Next + End If + + For p = 0 To pDim + + If pDim = 0 Then + + For f = 0 To fListDim + + 'If file already exists in the list: Do not append (only when a single file) + If UCase(Path(p)) = UCase(fList(f)) Then + + 'Status reset + Me.LvGEN.Items(f).SubItems(1).Text = Txt + Me.LvGEN.Items(f).BackColor = Color.FromKnownColor(KnownColor.Window) + Me.LvGEN.Items(f).ForeColor = Color.FromKnownColor(KnownColor.WindowText) + + 'Element auswählen und anhaken |@@| Element selection and hook + Me.LvGEN.Items(f).Selected = True + Me.LvGEN.Items(f).Checked = True + Me.LvGEN.Items(f).EnsureVisible() + + GoTo lbFound + End If + Next + + End If + + 'Otherwise: Add File (without WorkDir) + ListViewItem0 = New ListViewItem(Path(p)) 'fFileWD(Path(p))) + ListViewItem0.SubItems.Add(" ") + ListViewItem0.Checked = True + ListViewItem0.Selected = True + Me.LvGEN.Items.Add(ListViewItem0) + ListViewItem0.EnsureVisible() lbFound: - Next - - Me.LvGEN.EndUpdate() - CheckLock = False - '******************************************* End Update '******************************************* - - 'Number update - GENchecked = Me.LvGEN.CheckedItems.Count - UpdateJobTabText() + Next + Me.LvGEN.EndUpdate() + CheckLock = False + '******************************************* End Update '******************************************* - End Sub + 'Number update + GENchecked = Me.LvGEN.CheckedItems.Count + UpdateJobTabText() + End Sub - 'Add File to job listview (single file) - Public Sub AddToJobListView(ByVal Path As String, Optional ByVal Txt As String = " ") - Dim p(0) As String - p(0) = Path - AddToJobListView(p, Txt) - End Sub + 'Add File to job listview (single file) + Public Sub AddToJobListView(ByVal Path As String, Optional ByVal Txt As String = " ") + Dim p(0) As String + p(0) = Path + AddToJobListView(p, Txt) + End Sub - 'Update job files counter in tab titel - Private Sub UpdateJobTabText() - Dim c As Integer - c = Me.LvGEN.Items.Count + 'Update job files counter in tab titel + Private Sub UpdateJobTabText() + Dim c As Integer + c = Me.LvGEN.Items.Count - Me.TabPageGEN.Text = "Job Files ( " & GENchecked & " / " & c & " )" - 'Me.TabPageGEN.Text = "Job Files (" & c & ")" + Me.TabPageGEN.Text = "Job Files ( " & GENchecked & " / " & c & " )" + 'Me.TabPageGEN.Text = "Job Files (" & c & ")" - GENcheckAllLock = True + GENcheckAllLock = True - If GENchecked = 0 Then - Me.ChBoxAllGEN.CheckState = CheckState.Unchecked - ElseIf GENchecked = c Then - Me.ChBoxAllGEN.CheckState = CheckState.Checked - Else - Me.ChBoxAllGEN.CheckState = CheckState.Indeterminate - End If + If GENchecked = 0 Then + Me.ChBoxAllGEN.CheckState = CheckState.Unchecked + ElseIf GENchecked = c Then + Me.ChBoxAllGEN.CheckState = CheckState.Checked + Else + Me.ChBoxAllGEN.CheckState = CheckState.Indeterminate + End If - GENcheckAllLock = False - - End Sub + GENcheckAllLock = False + End Sub #End Region @@ -986,817 +983,825 @@ lbFound: #Region "Events" - Private Sub ButtonDRIadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDRIadd.Click - AddCycle() - End Sub - - Private Sub ButtonDRIremove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDRIremove.Click - RemoveCycle() - End Sub - - Private Sub ButtonDRIoptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDRIedit.Click - ConMenTarget = Me.LvDRI - ConMenTarJob = False - Me.ConMenFilelist.Show(Control.MousePosition) - End Sub - - Private Sub LvDRI_ItemChecked(sender As Object, e As System.Windows.Forms.ItemCheckedEventArgs) Handles LvDRI.ItemChecked - - If e.Item.Checked Then - DRIchecked += 1 - Else - DRIchecked -= 1 - End If - - If CheckLock Then Exit Sub - UpdateCycleTabText() - - End Sub - - Private Sub ChBoxAllDRI_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChBoxAllDRI.CheckedChanged - Dim Check As Boolean - Dim x As ListViewItem - - If DRIcheckAllLock Or Me.ChBoxAllDRI.CheckState = CheckState.Indeterminate Then Exit Sub - - Check = Me.ChBoxAllDRI.Checked - - CheckLock = True - Me.LvDRI.BeginUpdate() - - For Each x In Me.LvDRI.Items - x.Checked = Check - Next - - Me.LvDRI.EndUpdate() - CheckLock = False - - DRIchecked = Me.LvDRI.CheckedItems.Count - UpdateCycleTabText() - - End Sub - - Private Sub ListViewDRI_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LvDRI.DoubleClick - If Me.LvDRI.SelectedItems.Count > 0 Then - Me.LvDRI.SelectedItems(0).Checked = Not Me.LvDRI.SelectedItems(0).Checked - OpenCycle() - Else - AddCycle() - End If - End Sub - - Private Sub ListViewDRI_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles LvDRI.KeyDown - Select Case e.KeyCode - Case Keys.Delete, Keys.Back - If Not GUIlocked Then RemoveCycle() - Case Keys.Enter - OpenCycle() - End Select - End Sub - - 'Drag n' Drop - Private Sub ListDRI_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles LvDRI.DragEnter - If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then e.Effect = DragDropEffects.Copy - End Sub - Private Sub ListDRI_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles LvDRI.DragDrop - Dim f As String() - f = CType(e.Data.GetData(DataFormats.FileDrop), Array) - AddToCycleListView(f) - If LvDRI.Items.Count > 0 Then LvDRI.Items(LvDRI.Items.Count - 1).Selected = True - End Sub - - Private Sub BtDRIup_Click(sender As System.Object, e As System.EventArgs) Handles BtDRIup.Click - MoveItem(LvDRI, True) - End Sub - - Private Sub BtDRIdown_Click(sender As System.Object, e As System.EventArgs) Handles BtDRIdown.Click - MoveItem(LvDRI, False) - End Sub + Private Sub ButtonDRIadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDRIadd.Click + AddCycle() + End Sub + + Private Sub ButtonDRIremove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ButtonDRIremove.Click + RemoveCycle() + End Sub + + Private Sub ButtonDRIoptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ButtonDRIedit.Click + ConMenTarget = Me.LvDRI + ConMenTarJob = False + Me.ConMenFilelist.Show(Control.MousePosition) + End Sub + + Private Sub LvDRI_ItemChecked(sender As Object, e As System.Windows.Forms.ItemCheckedEventArgs) _ + Handles LvDRI.ItemChecked + + If e.Item.Checked Then + DRIchecked += 1 + Else + DRIchecked -= 1 + End If + + If CheckLock Then Exit Sub + UpdateCycleTabText() + End Sub + + Private Sub ChBoxAllDRI_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ChBoxAllDRI.CheckedChanged + Dim Check As Boolean + Dim x As ListViewItem + + If DRIcheckAllLock Or Me.ChBoxAllDRI.CheckState = CheckState.Indeterminate Then Exit Sub + + Check = Me.ChBoxAllDRI.Checked + + CheckLock = True + Me.LvDRI.BeginUpdate() + + For Each x In Me.LvDRI.Items + x.Checked = Check + Next + + Me.LvDRI.EndUpdate() + CheckLock = False + + DRIchecked = Me.LvDRI.CheckedItems.Count + UpdateCycleTabText() + End Sub + + Private Sub ListViewDRI_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LvDRI.DoubleClick + If Me.LvDRI.SelectedItems.Count > 0 Then + Me.LvDRI.SelectedItems(0).Checked = Not Me.LvDRI.SelectedItems(0).Checked + OpenCycle() + Else + AddCycle() + End If + End Sub + + Private Sub ListViewDRI_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) _ + Handles LvDRI.KeyDown + Select Case e.KeyCode + Case Keys.Delete, Keys.Back + If Not GUIlocked Then RemoveCycle() + Case Keys.Enter + OpenCycle() + End Select + End Sub + + 'Drag n' Drop + Private Sub ListDRI_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) _ + Handles LvDRI.DragEnter + If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then e.Effect = DragDropEffects.Copy + End Sub + + Private Sub ListDRI_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) _ + Handles LvDRI.DragDrop + Dim f As String() + f = CType(e.Data.GetData(DataFormats.FileDrop), Array) + AddToCycleListView(f) + If LvDRI.Items.Count > 0 Then LvDRI.Items(LvDRI.Items.Count - 1).Selected = True + End Sub + + Private Sub BtDRIup_Click(sender As System.Object, e As System.EventArgs) Handles BtDRIup.Click + MoveItem(LvDRI, True) + End Sub + + Private Sub BtDRIdown_Click(sender As System.Object, e As System.EventArgs) Handles BtDRIdown.Click + MoveItem(LvDRI, False) + End Sub #End Region - 'Remove selected file(s) from cycle list - Private Sub RemoveCycle() - Dim lastindx As Integer - Dim SelIx() As Integer - Dim i As Integer - - If Me.LvDRI.SelectedItems.Count < 1 Then - If Me.LvDRI.Items.Count = 1 Then - Me.LvDRI.Items(0).Selected = True - Else - Exit Sub - End If - End If - - CheckLock = True - LvDRI.BeginUpdate() - - ReDim SelIx(LvDRI.SelectedItems.Count - 1) - LvDRI.SelectedIndices.CopyTo(SelIx, 0) - - lastindx = LvDRI.SelectedIndices(LvDRI.SelectedItems.Count - 1) - - For i = UBound(SelIx) To 0 Step -1 - LvDRI.Items.RemoveAt(SelIx(i)) - Next - - If lastindx < LvDRI.Items.Count Then - LvDRI.Items(lastindx).Selected = True - Else - If LvDRI.Items.Count > 0 Then LvDRI.Items(LvDRI.Items.Count - 1).Selected = True - End If - - CheckLock = False - LvDRI.EndUpdate() - - DRIchecked = LvDRI.CheckedItems.Count - UpdateCycleTabText() - End Sub - - 'Browse for cycle file(s) and add to cycle list with AddToCycleListView - Private Sub AddCycle() - If fbDRI.OpenDialog("", True) Then - AddToCycleListView(fbDRI.Files) - If LvDRI.Items.Count > 0 Then LvDRI.Items(LvDRI.Items.Count - 1).Selected = True - End If - End Sub - - 'Open cycle in list - Private Sub OpenCycle() - - If Me.LvDRI.SelectedItems.Count < 1 Then - If Me.LvDRI.Items.Count = 1 Then - Me.LvDRI.Items(0).Selected = True - Else - Exit Sub - End If - End If - - OpenFiles(fFileRepl(Me.LvDRI.SelectedItems(0).SubItems(0).Text)) - End Sub - - 'Add File to cycle listview (multiple files) - Private Sub AddToCycleListView(ByVal Path As String()) - Dim pDim As Int16 - Dim p As Int16 - Dim ListViewItem0 As ListViewItem - - pDim = UBound(Path) - - Me.LvDRI.BeginUpdate() - CheckLock = True - - 'Mode switch if necessary - If Not Me.CbBatch.Checked Then Me.CbBatch.Checked = True - - For p = 0 To pDim - ListViewItem0 = New ListViewItem(Path(p)) 'fFileWD(Path(p))) - ListViewItem0.SubItems.Add(" ") - ListViewItem0.Checked = True - Me.LvDRI.Items.Add(ListViewItem0) + 'Remove selected file(s) from cycle list + Private Sub RemoveCycle() + Dim lastindx As Integer + Dim SelIx() As Integer + Dim i As Integer + + If Me.LvDRI.SelectedItems.Count < 1 Then + If Me.LvDRI.Items.Count = 1 Then + Me.LvDRI.Items(0).Selected = True + Else + Exit Sub + End If + End If + + CheckLock = True + LvDRI.BeginUpdate() + + ReDim SelIx(LvDRI.SelectedItems.Count - 1) + LvDRI.SelectedIndices.CopyTo(SelIx, 0) + + lastindx = LvDRI.SelectedIndices(LvDRI.SelectedItems.Count - 1) + + For i = UBound(SelIx) To 0 Step -1 + LvDRI.Items.RemoveAt(SelIx(i)) + Next + + If lastindx < LvDRI.Items.Count Then + LvDRI.Items(lastindx).Selected = True + Else + If LvDRI.Items.Count > 0 Then LvDRI.Items(LvDRI.Items.Count - 1).Selected = True + End If + + CheckLock = False + LvDRI.EndUpdate() + + DRIchecked = LvDRI.CheckedItems.Count + UpdateCycleTabText() + End Sub + + 'Browse for cycle file(s) and add to cycle list with AddToCycleListView + Private Sub AddCycle() + If fbDRI.OpenDialog("", True) Then + AddToCycleListView(fbDRI.Files) + If LvDRI.Items.Count > 0 Then LvDRI.Items(LvDRI.Items.Count - 1).Selected = True + End If + End Sub + + 'Open cycle in list + Private Sub OpenCycle() + + If Me.LvDRI.SelectedItems.Count < 1 Then + If Me.LvDRI.Items.Count = 1 Then + Me.LvDRI.Items(0).Selected = True + Else + Exit Sub + End If + End If + + OpenFiles(fFileRepl(Me.LvDRI.SelectedItems(0).SubItems(0).Text)) + End Sub + + 'Add File to cycle listview (multiple files) + Private Sub AddToCycleListView(ByVal Path As String()) + Dim pDim As Int16 + Dim p As Int16 + Dim ListViewItem0 As ListViewItem + + pDim = UBound(Path) + + Me.LvDRI.BeginUpdate() + CheckLock = True + + 'Mode switch if necessary + If Not Me.CbBatch.Checked Then Me.CbBatch.Checked = True + + For p = 0 To pDim + ListViewItem0 = New ListViewItem(Path(p)) 'fFileWD(Path(p))) + ListViewItem0.SubItems.Add(" ") + ListViewItem0.Checked = True + Me.LvDRI.Items.Add(ListViewItem0) lbFound: - Next - - Me.LvDRI.EndUpdate() - CheckLock = False + Next - 'Number update - DRIchecked = Me.LvDRI.CheckedItems.Count - UpdateCycleTabText() + Me.LvDRI.EndUpdate() + CheckLock = False - End Sub + 'Number update + DRIchecked = Me.LvDRI.CheckedItems.Count + UpdateCycleTabText() + End Sub - 'Add File to cycle listview (single file) - Private Sub AddToCycleListView(ByVal Path As String) - Dim p(0) As String - p(0) = Path - AddToCycleListView(p) - End Sub + 'Add File to cycle listview (single file) + Private Sub AddToCycleListView(ByVal Path As String) + Dim p(0) As String + p(0) = Path + AddToCycleListView(p) + End Sub - 'Update cycle files counter in tab titel - Private Sub UpdateCycleTabText() - Dim c As Integer - c = Me.LvDRI.Items.Count + 'Update cycle files counter in tab titel + Private Sub UpdateCycleTabText() + Dim c As Integer + c = Me.LvDRI.Items.Count - Me.TabPageDRI.Text = "Driving Cycles ( " & DRIchecked & " / " & c & " )" - 'Me.TabPageDRI.Text = "Driving Cycles (" & c & ")" + Me.TabPageDRI.Text = "Driving Cycles ( " & DRIchecked & " / " & c & " )" + 'Me.TabPageDRI.Text = "Driving Cycles (" & c & ")" - DRIcheckAllLock = True + DRIcheckAllLock = True - If DRIchecked = 0 Then - Me.ChBoxAllDRI.CheckState = CheckState.Unchecked - ElseIf DRIchecked = c Then - Me.ChBoxAllDRI.CheckState = CheckState.Checked - Else - Me.ChBoxAllDRI.CheckState = CheckState.Indeterminate - End If + If DRIchecked = 0 Then + Me.ChBoxAllDRI.CheckState = CheckState.Unchecked + ElseIf DRIchecked = c Then + Me.ChBoxAllDRI.CheckState = CheckState.Checked + Else + Me.ChBoxAllDRI.CheckState = CheckState.Indeterminate + End If - DRIcheckAllLock = False - - End Sub + DRIcheckAllLock = False + End Sub #End Region #Region "Toolstrip" - 'New Job file - Private Sub ToolStripBtNew_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripBtNew.Click - OpenVECTOeditor("<New>") - End Sub - - 'Open input file - Private Sub ToolStripBtOpen_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripBtOpen.Click - - If fbVECTO.OpenDialog("", False, "vecto,vveh,vgbx,veng,vsig") Then - OpenVectoFile(fbVECTO.Files(0)) - End If - - End Sub - - Private Sub GENEditorToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles GENEditorToolStripMenuItem1.Click - OpenVECTOeditor("<New>") - End Sub - - Private Sub VEHEditorToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles VEHEditorToolStripMenuItem.Click - If Not F_VEH.Visible Then - F_VEH.Show() - Else - If F_VEH.WindowState = FormWindowState.Minimized Then F_VEH.WindowState = FormWindowState.Normal - F_VEH.BringToFront() - End If - End Sub - - Private Sub EngineEditorToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles EngineEditorToolStripMenuItem.Click - If Not F_ENG.Visible Then - F_ENG.Show() - Else - If F_ENG.WindowState = FormWindowState.Minimized Then F_ENG.WindowState = FormWindowState.Normal - F_ENG.BringToFront() - End If - End Sub - - Private Sub GearboxEditorToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles GearboxEditorToolStripMenuItem.Click - If Not F_GBX.Visible Then - F_GBX.Show() - Else - If F_GBX.WindowState = FormWindowState.Minimized Then F_GBX.WindowState = FormWindowState.Normal - F_GBX.BringToFront() - End If - End Sub - - Private Sub GraphToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles GraphToolStripMenuItem.Click - Dim FGraph As New F_Graph - FGraph.Show() - End Sub - - Private Sub SignOrVerifyFilesToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SignOrVerifyFilesToolStripMenuItem.Click - If Not F_FileSign.Visible Then - F_FileSign.Show() - Else - If F_FileSign.WindowState = FormWindowState.Minimized Then F_FileSign.WindowState = FormWindowState.Normal - F_FileSign.BringToFront() - End If - End Sub - - Private Sub OpenLogToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OpenLogToolStripMenuItem.Click - System.Diagnostics.Process.Start(MyAppPath & "log.txt") - End Sub - - Private Sub SettingsToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SettingsToolStripMenuItem.Click - F_Settings.ShowDialog() - End Sub - - Private Sub UserManualToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles UserManualToolStripMenuItem.Click - If IO.File.Exists(MyAppPath & "User Manual\usermanual.html") Then - System.Diagnostics.Process.Start(MyAppPath & "User Manual\usermanual.html") - Else - MsgBox("User Manual not found!", MsgBoxStyle.Critical) - End If - End Sub - - Private Sub UpdateNotesToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles UpdateNotesToolStripMenuItem.Click - If IO.File.Exists(MyAppPath & "User Manual\Release Notes.pdf") Then - System.Diagnostics.Process.Start(MyAppPath & "User Manual\Release Notes.pdf") - Else - MsgBox("Release Notes not found!", MsgBoxStyle.Critical) - End If - End Sub - - Private Sub CreateActivationFileToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CreateActivationFileToolStripMenuItem.Click - If MsgBox("Create Activation File ?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then - If Lic.CreateActFile(MyAppPath & "ActivationCode.dat") Then - GUImsg(tMsgID.Normal, "Activation File created.") - Else - GUImsg(tMsgID.Err, "Failed to create Activation File!") - MsgBox("ERROR! Failed to create Activation File!", MsgBoxStyle.Critical) - End If - End If - End Sub - - Private Sub AboutVECTOToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles AboutVECTOToolStripMenuItem1.Click - F_AboutBox.ShowDialog() - End Sub - - + 'New Job file + Private Sub ToolStripBtNew_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripBtNew.Click + OpenVECTOeditor("<New>") + End Sub + + 'Open input file + Private Sub ToolStripBtOpen_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripBtOpen.Click + + If fbVECTO.OpenDialog("", False, "vecto,vveh,vgbx,veng,vsig") Then + OpenVectoFile(fbVECTO.Files(0)) + End If + End Sub + + Private Sub GENEditorToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) _ + Handles GENEditorToolStripMenuItem1.Click + OpenVECTOeditor("<New>") + End Sub + + Private Sub VEHEditorToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles VEHEditorToolStripMenuItem.Click + If Not F_VEH.Visible Then + F_VEH.Show() + Else + If F_VEH.WindowState = FormWindowState.Minimized Then F_VEH.WindowState = FormWindowState.Normal + F_VEH.BringToFront() + End If + End Sub + + Private Sub EngineEditorToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles EngineEditorToolStripMenuItem.Click + If Not F_ENG.Visible Then + F_ENG.Show() + Else + If F_ENG.WindowState = FormWindowState.Minimized Then F_ENG.WindowState = FormWindowState.Normal + F_ENG.BringToFront() + End If + End Sub + + Private Sub GearboxEditorToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles GearboxEditorToolStripMenuItem.Click + If Not F_GBX.Visible Then + F_GBX.Show() + Else + If F_GBX.WindowState = FormWindowState.Minimized Then F_GBX.WindowState = FormWindowState.Normal + F_GBX.BringToFront() + End If + End Sub + + Private Sub GraphToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles GraphToolStripMenuItem.Click + Dim FGraph As New F_Graph + FGraph.Show() + End Sub + + Private Sub SignOrVerifyFilesToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles SignOrVerifyFilesToolStripMenuItem.Click + If Not F_FileSign.Visible Then + F_FileSign.Show() + Else + If F_FileSign.WindowState = FormWindowState.Minimized Then F_FileSign.WindowState = FormWindowState.Normal + F_FileSign.BringToFront() + End If + End Sub + + Private Sub OpenLogToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles OpenLogToolStripMenuItem.Click + System.Diagnostics.Process.Start(MyAppPath & "log.txt") + End Sub + + Private Sub SettingsToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles SettingsToolStripMenuItem.Click + F_Settings.ShowDialog() + End Sub + + Private Sub UserManualToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles UserManualToolStripMenuItem.Click + If IO.File.Exists(MyAppPath & "User Manual\usermanual.html") Then + System.Diagnostics.Process.Start(MyAppPath & "User Manual\usermanual.html") + Else + MsgBox("User Manual not found!", MsgBoxStyle.Critical) + End If + End Sub + + Private Sub UpdateNotesToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles UpdateNotesToolStripMenuItem.Click + If IO.File.Exists(MyAppPath & "User Manual\Release Notes.pdf") Then + System.Diagnostics.Process.Start(MyAppPath & "User Manual\Release Notes.pdf") + Else + MsgBox("Release Notes not found!", MsgBoxStyle.Critical) + End If + End Sub + + Private Sub CreateActivationFileToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles CreateActivationFileToolStripMenuItem.Click + If MsgBox("Create Activation File ?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then + If Lic.CreateActFile(MyAppPath & "ActivationCode.dat") Then + GUImsg(tMsgID.Normal, "Activation File created.") + Else + GUImsg(tMsgID.Err, "Failed to create Activation File!") + MsgBox("ERROR! Failed to create Activation File!", MsgBoxStyle.Critical) + End If + End If + End Sub + + Private Sub AboutVECTOToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) _ + Handles AboutVECTOToolStripMenuItem1.Click + F_AboutBox.ShowDialog() + End Sub #End Region - 'Move job/cycle file up or down in list view - Private Sub MoveItem(ByRef ListV As ListView, ByVal MoveUp As Boolean) - Dim x As Int32 - Dim y As Int32 - Dim y1 As Int32 - Dim items() As String - Dim check() As Boolean - Dim index() As Integer - Dim ListViewItem0 As ListViewItem - - If GUIlocked Then Exit Sub - - 'Cache Selected Items - y1 = ListV.SelectedItems.Count - 1 - ReDim items(y1) - ReDim check(y1) - ReDim index(y1) - y = 0 - For Each x In ListV.SelectedIndices - items(y) = ListV.Items(x).SubItems(0).Text - check(y) = ListV.Items(x).Checked - If MoveUp Then - If x = 0 Then Exit Sub - index(y) = x - 1 - Else - If x = ListV.Items.Count - 1 Then Exit Sub - index(y) = x + 1 - End If - y += 1 - Next - - ListV.BeginUpdate() - - 'Delete Selected Items - For Each ListViewItem0 In ListV.SelectedItems - ListViewItem0.Remove() - Next - - 'Items select and Insert - 'For y = y1 To 0 Step -1 - For y = 0 To y1 - If Not check(y) Then GENchecked += 1 - ListViewItem0 = ListV.Items.Insert(index(y), items(y)) - ListViewItem0.SubItems.Add(" ") - ListViewItem0.Checked = check(y) - ListV.SelectedIndices.Add(index(y)) - Next - - ListV.EndUpdate() - - End Sub + 'Move job/cycle file up or down in list view + Private Sub MoveItem(ByRef ListV As ListView, ByVal MoveUp As Boolean) + Dim x As Int32 + Dim y As Int32 + Dim y1 As Int32 + Dim items() As String + Dim check() As Boolean + Dim index() As Integer + Dim ListViewItem0 As ListViewItem + + If GUIlocked Then Exit Sub + + 'Cache Selected Items + y1 = ListV.SelectedItems.Count - 1 + ReDim items(y1) + ReDim check(y1) + ReDim index(y1) + y = 0 + For Each x In ListV.SelectedIndices + items(y) = ListV.Items(x).SubItems(0).Text + check(y) = ListV.Items(x).Checked + If MoveUp Then + If x = 0 Then Exit Sub + index(y) = x - 1 + Else + If x = ListV.Items.Count - 1 Then Exit Sub + index(y) = x + 1 + End If + y += 1 + Next + + ListV.BeginUpdate() + + 'Delete Selected Items + For Each ListViewItem0 In ListV.SelectedItems + ListViewItem0.Remove() + Next + + 'Items select and Insert + 'For y = y1 To 0 Step -1 + For y = 0 To y1 + If Not check(y) Then GENchecked += 1 + ListViewItem0 = ListV.Items.Insert(index(y), items(y)) + ListViewItem0.SubItems.Add(" ") + ListViewItem0.Checked = check(y) + ListV.SelectedIndices.Add(index(y)) + Next + + ListV.EndUpdate() + End Sub #Region "job/cycle file List - Context Menu" - 'Save List - Private Sub SaveListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveListToolStripMenuItem.Click - If fbFileLists.SaveDialog("") Then - If ConMenTarJob Then - JobListView.SaveList(fbFileLists.Files(0)) - Else - CycleListView.SaveList(fbFileLists.Files(0)) - End If - End If - End Sub - - 'Load List - Private Sub LoadListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadListToolStripMenuItem.Click - - If GUIlocked Then Exit Sub - - If fbFileLists.OpenDialog("") Then - - If ConMenTarJob Then 'GEN - JobListView.LoadList(fbFileLists.Files(0)) - GENchecked = Me.LvGEN.CheckedItems.Count - UpdateJobTabText() - Else 'DRI - 'Mode toggle - If Not Me.CbBatch.Checked Then Me.CbBatch.Checked = True - CycleListView.LoadList(fbFileLists.Files(0)) - DRIchecked = Me.LvDRI.CheckedItems.Count - UpdateCycleTabText() - End If - - End If - - End Sub - - 'Load Default List - Private Sub LoadDefaultListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadDefaultListToolStripMenuItem.Click - - If GUIlocked Then Exit Sub - - If ConMenTarJob Then - - JobListView.LoadList() - - GENchecked = Me.LvGEN.CheckedItems.Count - UpdateJobTabText() - Else - CycleListView.LoadList() - DRIchecked = Me.LvDRI.CheckedItems.Count - UpdateCycleTabText() - End If - End Sub - - 'Clear List - Private Sub ClearListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearListToolStripMenuItem.Click - 'Dim ListViewItem0 As ListViewItem - 'For Each ListViewItem0 In ConMenTarget.SelectedItems - ' ListViewItem0.Remove() - 'Next - If GUIlocked Then Exit Sub - - ConMenTarget.Items.Clear() - If ConMenTarJob Then - GENchecked = Me.LvGEN.CheckedItems.Count - UpdateJobTabText() - Else - DRIchecked = Me.LvDRI.CheckedItems.Count - UpdateCycleTabText() - End If - End Sub + 'Save List + Private Sub SaveListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles SaveListToolStripMenuItem.Click + If fbFileLists.SaveDialog("") Then + If ConMenTarJob Then + JobListView.SaveList(fbFileLists.Files(0)) + Else + CycleListView.SaveList(fbFileLists.Files(0)) + End If + End If + End Sub + + 'Load List + Private Sub LoadListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles LoadListToolStripMenuItem.Click + + If GUIlocked Then Exit Sub + + If fbFileLists.OpenDialog("") Then + + If ConMenTarJob Then 'GEN + JobListView.LoadList(fbFileLists.Files(0)) + GENchecked = Me.LvGEN.CheckedItems.Count + UpdateJobTabText() + Else 'DRI + 'Mode toggle + If Not Me.CbBatch.Checked Then Me.CbBatch.Checked = True + CycleListView.LoadList(fbFileLists.Files(0)) + DRIchecked = Me.LvDRI.CheckedItems.Count + UpdateCycleTabText() + End If + + End If + End Sub + + 'Load Default List + Private Sub LoadDefaultListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles LoadDefaultListToolStripMenuItem.Click + + If GUIlocked Then Exit Sub + + If ConMenTarJob Then + + JobListView.LoadList() + + GENchecked = Me.LvGEN.CheckedItems.Count + UpdateJobTabText() + Else + CycleListView.LoadList() + DRIchecked = Me.LvDRI.CheckedItems.Count + UpdateCycleTabText() + End If + End Sub + + 'Clear List + Private Sub ClearListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ClearListToolStripMenuItem.Click + 'Dim ListViewItem0 As ListViewItem + 'For Each ListViewItem0 In ConMenTarget.SelectedItems + ' ListViewItem0.Remove() + 'Next + If GUIlocked Then Exit Sub + + ConMenTarget.Items.Clear() + If ConMenTarJob Then + GENchecked = Me.LvGEN.CheckedItems.Count + UpdateJobTabText() + Else + DRIchecked = Me.LvDRI.CheckedItems.Count + UpdateCycleTabText() + End If + End Sub #End Region - 'VECTO Start button - Calls VECTO_Launcher or aborts calculation - Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click - - 'VECTO Start/Stop - If VECTOworker.IsBusy Then - - 'If VECTO already running: STOP - ComLineShutDown = False - JobAbort() - - Else - - '...Otherwise: START - - 'Save Lists if Crash - SaveFileLists() - - 'Start - VECTO_Launcher() - - End If - - End Sub + 'VECTO Start button - Calls VECTO_Launcher or aborts calculation + Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click - 'Mode Change (STANDARD/BATCH) - Private Sub CbBatch_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CbBatch.CheckedChanged - ModeUpdate() - End Sub + 'VECTO Start/Stop + If VECTOworker.IsBusy Then - Private Sub ModeUpdate() + 'If VECTO already running: STOP + ComLineShutDown = False + JobAbort() - 'Save lists - JobListView.SaveList() - If Cfg.BatchMode Then CycleListView.SaveList() + Else - 'New mode - Cfg.BatchMode = Me.CbBatch.Checked + '...Otherwise: START - 'GUI changes according to current mode + 'Save Lists if Crash + SaveFileLists() - If Cfg.BatchMode Then + 'Start + VECTO_Launcher() - LastModeName = "Batch" + End If + End Sub - 'Load cycle list - CycleListView.LoadList() + 'Mode Change (STANDARD/BATCH) + Private Sub CbBatch_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CbBatch.CheckedChanged + ModeUpdate() + End Sub - 'Update cycle counter - DRIchecked = Me.LvDRI.CheckedItems.Count - UpdateCycleTabText() + Private Sub ModeUpdate() - 'Show mode-specific settings - Me.GrBoxSTD.Visible = False - Me.GrBoxBATCH.Visible = True + 'Save lists + JobListView.SaveList() + If Cfg.BatchMode Then CycleListView.SaveList() - 'Show Cycle Tab Page - If Not CycleTabPageVisible Then - Me.TabControl1.TabPages.Insert(1, CycleTabPage) - CycleTabPageVisible = True - End If + 'New mode + Cfg.BatchMode = Me.CbBatch.Checked - Else + 'GUI changes according to current mode - If Cfg.DeclMode Then - LastModeName = "Declaration" - Else - LastModeName = "Engineering" - End If + If Cfg.BatchMode Then - 'Show mode-specific settings - Me.GrBoxSTD.Visible = False 'Currently no specific settings for STANDARD mode, therefore always 'False' - Me.GrBoxBATCH.Visible = False + LastModeName = "Batch" - 'Hide Cycle Tab Page - If CycleTabPageVisible Then - Me.TabControl1.Controls.Remove(CycleTabPage) - CycleTabPageVisible = False - End If + 'Load cycle list + CycleListView.LoadList() - End If + 'Update cycle counter + DRIchecked = Me.LvDRI.CheckedItems.Count + UpdateCycleTabText() - 'Update job counter - GENchecked = Me.LvGEN.CheckedItems.Count - UpdateJobTabText() + 'Show mode-specific settings + Me.GrBoxSTD.Visible = False + Me.GrBoxBATCH.Visible = True - 'Status label - Status(LastModeName & " Mode") + 'Show Cycle Tab Page + If Not CycleTabPageVisible Then + Me.TabControl1.TabPages.Insert(1, CycleTabPage) + CycleTabPageVisible = True + End If + + Else + + If Cfg.DeclMode Then + LastModeName = "Declaration" + Else + LastModeName = "Engineering" + End If + + 'Show mode-specific settings + Me.GrBoxSTD.Visible = False 'Currently no specific settings for STANDARD mode, therefore always 'False' + Me.GrBoxBATCH.Visible = False + + 'Hide Cycle Tab Page + If CycleTabPageVisible Then + Me.TabControl1.Controls.Remove(CycleTabPage) + CycleTabPageVisible = False + End If - End Sub - - 'Class for ListView control - Job and cycle lists - Private Class cFileListView - - Private FilePath As String - Private LoadedDefault As Boolean - Public LVbox As ListView - - Public Sub New(ByVal Path As String) - FilePath = Path - LoadedDefault = False - End Sub - - Public Sub SaveList(Optional ByVal Path As String = "") - Dim x As Int32 - Dim file As cFile_V3 - 'If LVbox.Items.Count = 0 Then Exit Sub - file = New cFile_V3 - If Path = "" Then - If Not LoadedDefault Then Exit Sub - Path = FilePath - End If - file.OpenWrite(Path, "?") - For x = 1 To LVbox.Items.Count - file.WriteLine(LVbox.Items(x - 1).SubItems(0).Text, Math.Abs(CInt(LVbox.Items(x - 1).Checked))) - Next - file.Close() - file = Nothing - End Sub - - Public Sub LoadList(Optional ByVal Path As String = "") - Dim line As String() - Dim NoCheck As Boolean - Dim file As cFile_V3 - Dim ListViewItem0 As ListViewItem - - If Path = "" Then - Path = FilePath - LoadedDefault = True - End If - - file = New cFile_V3 - - If Not file.OpenRead(Path, "?") Then - If Not LoadedDefault Then GUImsg(tMsgID.Err, "Cannot open file (" & Path & ")!") - Exit Sub - End If - - F_MAINForm.CheckLock = True - LVbox.BeginUpdate() - - LVbox.Items.Clear() - - NoCheck = False - Do While Not file.EndOfFile - line = file.ReadLine - - ListViewItem0 = New ListViewItem(line(0)) - ListViewItem0.SubItems.Add(" ") - - If NoCheck Then - ListViewItem0.Checked = True - Else - If UBound(line) < 1 Then - NoCheck = True - ListViewItem0.Checked = True - Else - If IsNumeric(line(1)) Then - ListViewItem0.Checked = CBool(line(1)) - Else - ListViewItem0.Checked = True - End If - End If - End If - LVbox.Items.Add(ListViewItem0) - Loop - - file.Close() - - LVbox.EndUpdate() - F_MAINForm.CheckLock = False - - If LVbox.Items.Count > 0 Then LVbox.Items(LVbox.Items.Count - 1).EnsureVisible() - - End Sub - - End Class - - 'Set color of job files in list (Error, Warnings, Currently running, etc.) - Private Sub SetCheckedItemColor(ByVal LvID As Integer, ByVal Status As tJobStatus) - Dim lv0 As ListViewItem - - lv0 = CheckedItems(LvID) - - Select Case Status - Case tJobStatus.Err - lv0.BackColor = Color.Red - lv0.ForeColor = Color.White - Case tJobStatus.OK - lv0.BackColor = Color.White - lv0.ForeColor = Color.DarkGreen - Case tJobStatus.Warn - lv0.BackColor = Color.Khaki - lv0.ForeColor = Color.DarkBlue 'FromArgb(218, 125, 0) 'DarkOrange 'OrangeRed - Case tJobStatus.Queued - lv0.BackColor = Color.LightGray - lv0.ForeColor = Color.DarkBlue - Case tJobStatus.Running - lv0.BackColor = Color.DarkBlue - lv0.ForeColor = Color.White - Case tJobStatus.Undef - lv0.BackColor = Color.FromKnownColor(KnownColor.Window) - lv0.ForeColor = Color.FromKnownColor(KnownColor.WindowText) - End Select - - End Sub - - 'Open Job Editor and open file (or new file) - Friend Sub OpenVECTOeditor(ByVal x As String) - - If Not F_VECTO.Visible Then - F_VECTO.Show() - Else - If F_VECTO.WindowState = FormWindowState.Minimized Then F_VECTO.WindowState = FormWindowState.Normal - F_VECTO.BringToFront() - End If - - If x = "<New>" Then - F_VECTO.VECTOnew() - Else - F_VECTO.VECTOload2Form(x) - End If - - F_VECTO.Activate() - - End Sub - - 'Open signature file (.vsig) - Friend Sub OpenSigFile(ByVal file As String) - If Not F_FileSign.Visible Then - F_FileSign.Show() - - End If - F_FileSign.WindowState = FormWindowState.Normal - F_FileSign.TbSigFile.Text = file - F_FileSign.VerifySigFile() - F_FileSign.Activate() - End Sub - - 'Save job and cycle file lists - Private Sub SaveFileLists() - JobListView.SaveList() - If Cfg.BatchMode Then CycleListView.SaveList() - End Sub + End If + + 'Update job counter + GENchecked = Me.LvGEN.CheckedItems.Count + UpdateJobTabText() + + 'Status label + Status(LastModeName & " Mode") + End Sub + + 'Class for ListView control - Job and cycle lists + Private Class cFileListView + Private FilePath As String + Private LoadedDefault As Boolean + Public LVbox As ListView + + Public Sub New(ByVal Path As String) + FilePath = Path + LoadedDefault = False + End Sub + + Public Sub SaveList(Optional ByVal Path As String = "") + Dim x As Int32 + Dim file As cFile_V3 + 'If LVbox.Items.Count = 0 Then Exit Sub + file = New cFile_V3 + If Path = "" Then + If Not LoadedDefault Then Exit Sub + Path = FilePath + End If + file.OpenWrite(Path, "?") + For x = 1 To LVbox.Items.Count + file.WriteLine(LVbox.Items(x - 1).SubItems(0).Text, Math.Abs(CInt(LVbox.Items(x - 1).Checked))) + Next + file.Close() + file = Nothing + End Sub + + Public Sub LoadList(Optional ByVal Path As String = "") + Dim line As String() + Dim NoCheck As Boolean + Dim file As cFile_V3 + Dim ListViewItem0 As ListViewItem + + If Path = "" Then + Path = FilePath + LoadedDefault = True + End If + + file = New cFile_V3 + + If Not file.OpenRead(Path, "?") Then + If Not LoadedDefault Then GUImsg(tMsgID.Err, "Cannot open file (" & Path & ")!") + Exit Sub + End If + + F_MAINForm.CheckLock = True + LVbox.BeginUpdate() + + LVbox.Items.Clear() + + NoCheck = False + Do While Not file.EndOfFile + line = file.ReadLine + + ListViewItem0 = New ListViewItem(line(0)) + ListViewItem0.SubItems.Add(" ") + + If NoCheck Then + ListViewItem0.Checked = True + Else + If UBound(line) < 1 Then + NoCheck = True + ListViewItem0.Checked = True + Else + If IsNumeric(line(1)) Then + ListViewItem0.Checked = CBool(line(1)) + Else + ListViewItem0.Checked = True + End If + End If + End If + LVbox.Items.Add(ListViewItem0) + Loop + + file.Close() + + LVbox.EndUpdate() + F_MAINForm.CheckLock = False + + If LVbox.Items.Count > 0 Then LVbox.Items(LVbox.Items.Count - 1).EnsureVisible() + End Sub + End Class + + 'Set color of job files in list (Error, Warnings, Currently running, etc.) + Private Sub SetCheckedItemColor(ByVal LvID As Integer, ByVal Status As tJobStatus) + Dim lv0 As ListViewItem + + lv0 = CheckedItems(LvID) + + Select Case Status + Case tJobStatus.Err + lv0.BackColor = Color.Red + lv0.ForeColor = Color.White + Case tJobStatus.OK + lv0.BackColor = Color.White + lv0.ForeColor = Color.DarkGreen + Case tJobStatus.Warn + lv0.BackColor = Color.Khaki + lv0.ForeColor = Color.DarkBlue 'FromArgb(218, 125, 0) 'DarkOrange 'OrangeRed + Case tJobStatus.Queued + lv0.BackColor = Color.LightGray + lv0.ForeColor = Color.DarkBlue + Case tJobStatus.Running + lv0.BackColor = Color.DarkBlue + lv0.ForeColor = Color.White + Case tJobStatus.Undef + lv0.BackColor = Color.FromKnownColor(KnownColor.Window) + lv0.ForeColor = Color.FromKnownColor(KnownColor.WindowText) + End Select + End Sub + + 'Open Job Editor and open file (or new file) + Friend Sub OpenVECTOeditor(ByVal x As String) + + If Not F_VECTO.Visible Then + F_VECTO.Show() + Else + If F_VECTO.WindowState = FormWindowState.Minimized Then F_VECTO.WindowState = FormWindowState.Normal + F_VECTO.BringToFront() + End If + + If x = "<New>" Then + F_VECTO.VECTOnew() + Else + F_VECTO.VECTOload2Form(x) + End If + + F_VECTO.Activate() + End Sub + + 'Open signature file (.vsig) + Friend Sub OpenSigFile(ByVal file As String) + If Not F_FileSign.Visible Then + F_FileSign.Show() + + End If + F_FileSign.WindowState = FormWindowState.Normal + F_FileSign.TbSigFile.Text = file + F_FileSign.VerifySigFile() + F_FileSign.Activate() + End Sub + + 'Save job and cycle file lists + Private Sub SaveFileLists() + JobListView.SaveList() + If Cfg.BatchMode Then CycleListView.SaveList() + End Sub #Region "Progressbar controls" - 'Initialise progress bar (Start of next job in calculation) - Private Sub ProgSecStart() - Me.ToolStripProgBarJob.Value = 0 - Me.ToolStripProgBarJob.Style = ProgressBarStyle.Marquee - Me.ToolStripProgBarJob.Visible = True - Me.TmProgSec.Start() - End Sub - - 'Stop - Hide progress bar - Private Sub ProgSecStop() - Me.TmProgSec.Stop() - Me.ToolStripProgBarJob.Visible = False - Me.ToolStripProgBarJob.Value = 0 - End Sub - - 'Timer to update progress bar regularly - Private Sub TmProgSec_Tick(sender As Object, e As System.EventArgs) Handles TmProgSec.Tick - If GUItest0.TestActive Then - Call GUItest0.TestTick() - Exit Sub - Else - If Not ProgBarCtrl.ProgLock Then ProgSecUpdate() - End If - End Sub - - 'Update progress bar (timer controlled) - Private Sub ProgSecUpdate() - - With ProgBarCtrl - - If .ProgJobInt > 0 AndAlso Me.ToolStripProgBarJob.Style = ProgressBarStyle.Marquee Then - Me.ToolStripProgBarJob.Style = ProgressBarStyle.Continuous - End If - - If .ProgJobInt < 0 Then - .ProgJobInt = 0 - ElseIf .ProgJobInt > 100 Then - .ProgJobInt = 100 - End If - - Me.ToolStripProgBarJob.Value = .ProgJobInt - - If .ProgOverallStartInt > -1 Then - Me.ToolStripProgBarOverall.Value = CInt(.ProgOverallStartInt + (.PgroOverallEndInt - .ProgOverallStartInt) * .ProgJobInt / 100) - End If - - End With - - End Sub + 'Initialise progress bar (Start of next job in calculation) + Private Sub ProgSecStart() + Me.ToolStripProgBarJob.Value = 0 + Me.ToolStripProgBarJob.Style = ProgressBarStyle.Marquee + Me.ToolStripProgBarJob.Visible = True + Me.TmProgSec.Start() + End Sub + + 'Stop - Hide progress bar + Private Sub ProgSecStop() + Me.TmProgSec.Stop() + Me.ToolStripProgBarJob.Visible = False + Me.ToolStripProgBarJob.Value = 0 + End Sub + + 'Timer to update progress bar regularly + Private Sub TmProgSec_Tick(sender As Object, e As System.EventArgs) Handles TmProgSec.Tick + If GUItest0.TestActive Then + Call GUItest0.TestTick() + Exit Sub + Else + If Not ProgBarCtrl.ProgLock Then ProgSecUpdate() + End If + End Sub + + 'Update progress bar (timer controlled) + Private Sub ProgSecUpdate() + + With ProgBarCtrl + + If .ProgJobInt > 0 AndAlso Me.ToolStripProgBarJob.Style = ProgressBarStyle.Marquee Then + Me.ToolStripProgBarJob.Style = ProgressBarStyle.Continuous + End If + + If .ProgJobInt < 0 Then + .ProgJobInt = 0 + ElseIf .ProgJobInt > 100 Then + .ProgJobInt = 100 + End If + + Me.ToolStripProgBarJob.Value = .ProgJobInt + + If .ProgOverallStartInt > -1 Then + Me.ToolStripProgBarOverall.Value = + CInt(.ProgOverallStartInt + (.PgroOverallEndInt - .ProgOverallStartInt) * .ProgJobInt / 100) + End If + + End With + End Sub #End Region #Region "Options Tab" - 'Load options from config class - Public Sub LoadOptions() - Me.ChBoxCyclDistCor.Checked = Cfg.DistCorr - Me.ChBoxUseGears.Checked = Cfg.GnUfromCycle - Me.ChBoxModOut.Checked = Cfg.ModOut - CbBOmode.SelectedIndex = -1 - Select Case UCase(Cfg.BATCHoutpath) - Case sKey.JobPath - CbBOmode.SelectedIndex = 0 - Case Else - CbBOmode.SelectedIndex = 1 - Me.TbBOpath.Text = Cfg.BATCHoutpath - End Select - Me.ChBoxBatchSubD.Checked = Cfg.BATCHoutSubD - - 'Set Mode - If Not Cfg.DeclMode Then Me.CbBatch.Checked = Cfg.BatchMode - - Me.RbDecl.Checked = Cfg.DeclMode - - End Sub - - 'Update config class from options in GUI, e.g. before running calculations - Private Sub SetOptions() - - 'General(Allgemein) - Cfg.DistCorr = Me.ChBoxCyclDistCor.Checked - Cfg.GnUfromCycle = Me.ChBoxUseGears.Checked - - 'BATCH - Cfg.ModOut = Me.ChBoxModOut.Checked - Select Case CbBOmode.SelectedIndex - Case 0 - Cfg.BATCHoutpath = sKey.JobPath - Case Else - Cfg.BATCHoutpath = Trim(Me.TbBOpath.Text) - If Microsoft.VisualBasic.Right(Cfg.BATCHoutpath, 1) <> "\" Then Cfg.BATCHoutpath &= "\" - End Select - Cfg.BATCHoutSubD = Me.ChBoxBatchSubD.Checked - - DEV.SetOptions() - - - End Sub + 'Load options from config class + Public Sub LoadOptions() + Me.ChBoxCyclDistCor.Checked = Cfg.DistCorr + Me.ChBoxUseGears.Checked = Cfg.GnUfromCycle + Me.ChBoxModOut.Checked = Cfg.ModOut + CbBOmode.SelectedIndex = -1 + Select Case UCase(Cfg.BATCHoutpath) + Case sKey.JobPath + CbBOmode.SelectedIndex = 0 + Case Else + CbBOmode.SelectedIndex = 1 + Me.TbBOpath.Text = Cfg.BATCHoutpath + End Select + Me.ChBoxBatchSubD.Checked = Cfg.BATCHoutSubD + + 'Set Mode + If Not Cfg.DeclMode Then Me.CbBatch.Checked = Cfg.BatchMode + + Me.RbDecl.Checked = Cfg.DeclMode + End Sub + + 'Update config class from options in GUI, e.g. before running calculations + Private Sub SetOptions() + + 'General(Allgemein) + Cfg.DistCorr = Me.ChBoxCyclDistCor.Checked + Cfg.GnUfromCycle = Me.ChBoxUseGears.Checked + + 'BATCH + Cfg.ModOut = Me.ChBoxModOut.Checked + Select Case CbBOmode.SelectedIndex + Case 0 + Cfg.BATCHoutpath = sKey.JobPath + Case Else + Cfg.BATCHoutpath = Trim(Me.TbBOpath.Text) + If Microsoft.VisualBasic.Right(Cfg.BATCHoutpath, 1) <> "\" Then Cfg.BATCHoutpath &= "\" + End Select + Cfg.BATCHoutSubD = Me.ChBoxBatchSubD.Checked + + DEV.SetOptions() + End Sub #Region "Events" - Private Sub ChBoxAutoSD_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChBoxAutoSD.CheckedChanged - Me.LbAutoShDown.Visible = Me.ChBoxAutoSD.Checked - End Sub + Private Sub ChBoxAutoSD_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ChBoxAutoSD.CheckedChanged + Me.LbAutoShDown.Visible = Me.ChBoxAutoSD.Checked + End Sub - Private Sub CbBOmode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CbBOmode.SelectedIndexChanged - Me.TbBOpath.Visible = (Me.CbBOmode.SelectedIndex = 2) - Me.ButBObrowse.Visible = (Me.CbBOmode.SelectedIndex = 2) - End Sub + Private Sub CbBOmode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles CbBOmode.SelectedIndexChanged + Me.TbBOpath.Visible = (Me.CbBOmode.SelectedIndex = 2) + Me.ButBObrowse.Visible = (Me.CbBOmode.SelectedIndex = 2) + End Sub - Private Sub ButBObrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButBObrowse.Click - If fbFolder.OpenDialog(Me.TbBOpath.Text) Then - Me.TbBOpath.Text = fbFolder.Files(0) - End If - End Sub + Private Sub ButBObrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButBObrowse.Click + If fbFolder.OpenDialog(Me.TbBOpath.Text) Then + Me.TbBOpath.Text = fbFolder.Files(0) + End If + End Sub - Private Sub ChBoxBatchOut_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChBoxModOut.CheckedChanged - Me.ChBoxBatchSubD.Enabled = Me.ChBoxModOut.Checked - End Sub + Private Sub ChBoxBatchOut_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ + Handles ChBoxModOut.CheckedChanged + Me.ChBoxBatchSubD.Enabled = Me.ChBoxModOut.Checked + End Sub #End Region @@ -1805,644 +1810,631 @@ lbFound: #Region "Developer options (DEV) Tab" - 'Load DEV options - Private Sub LoadDEVconfigs() - Dim LV0 As ListViewItem - Dim i As Integer - Dim Config0 As KeyValuePair(Of String, cDEVoption) - - Me.LvDEVoptions.Items.Clear() - - i = -1 - For Each Config0 In DEV.Options - i += 1 - - LV0 = New ListViewItem - LV0.SubItems(0).Text = Config0.Key - LV0.SubItems.Add(Config0.Value.Description) - LV0.SubItems.Add(Config0.Value.TypeString) - LV0.SubItems.Add("") - LV0.SubItems.Add(Config0.Value.ValTextDef) - - If Config0.Value.ConfigType = tDEVconfType.tAction Then - LV0.SubItems.Add("") - Else - If Config0.Value.SaveInFile Then - LV0.SubItems.Add("True") - Else - LV0.SubItems.Add("False") - End If - End If + 'Load DEV options + Private Sub LoadDEVconfigs() + Dim LV0 As ListViewItem + Dim i As Integer + Dim Config0 As KeyValuePair(Of String, cDEVoption) + Me.LvDEVoptions.Items.Clear() + i = -1 + For Each Config0 In DEV.Options + i += 1 - LV0.Tag = Config0.Key + LV0 = New ListViewItem + LV0.SubItems(0).Text = Config0.Key + LV0.SubItems.Add(Config0.Value.Description) + LV0.SubItems.Add(Config0.Value.TypeString) + LV0.SubItems.Add("") + LV0.SubItems.Add(Config0.Value.ValTextDef) - If Not Config0.Value.Enabled Then - LV0.ForeColor = Color.DarkGray - End If + If Config0.Value.ConfigType = tDEVconfType.tAction Then + LV0.SubItems.Add("") + Else + If Config0.Value.SaveInFile Then + LV0.SubItems.Add("True") + Else + LV0.SubItems.Add("False") + End If + End If - Me.LvDEVoptions.Items.Add(LV0) - UpdateDEVconfigs(LV0) + LV0.Tag = Config0.Key - Next + If Not Config0.Value.Enabled Then + LV0.ForeColor = Color.DarkGray + End If - End Sub + Me.LvDEVoptions.Items.Add(LV0) - 'Update value of specific DEV option - Private Sub UpdateDEVconfigs(ByRef LV0 As ListViewItem) - LV0.SubItems(3).Text = DEV.Options(LV0.Tag).ValText - End Sub + UpdateDEVconfigs(LV0) - 'Change value of DEV option or execute action-type DEV options - Private Sub LvDEVoptions_DoubleClick(sender As Object, e As System.EventArgs) Handles LvDEVoptions.DoubleClick - Dim Config0 As cDEVoption - Dim str As String - Dim i As Integer + Next + End Sub - Config0 = DEV.Options(Me.LvDEVoptions.SelectedItems(0).Tag) + 'Update value of specific DEV option + Private Sub UpdateDEVconfigs(ByRef LV0 As ListViewItem) + DEV.UpdateDevConfigs() + End Sub - If Not Config0.Enabled Then Exit Sub + 'Change value of DEV option or execute action-type DEV options + Private Sub LvDEVoptions_DoubleClick(sender As Object, e As System.EventArgs) Handles LvDEVoptions.DoubleClick + Dim Config0 As cDEVoption + Dim str As String + Dim i As Integer - Select Case Config0.ConfigType - Case tDEVconfType.tAction - Config0.DoAction() + Config0 = DEV.Options(Me.LvDEVoptions.SelectedItems(0).Tag) - Case tDEVconfType.tBoolean - Config0.BoolVal = Not Config0.BoolVal + If Not Config0.Enabled Then Exit Sub - Case tDEVconfType.tSelection + Select Case Config0.ConfigType + Case tDEVconfType.tAction + Config0.DoAction() - CmDEVitem = Me.LvDEVoptions.SelectedItems(0) + Case tDEVconfType.tBoolean + Config0.BoolVal = Not Config0.BoolVal - CmDEV.Items.Clear() + Case tDEVconfType.tSelection - i = -1 - For Each str In Config0.Modes - i += 1 - CmDEV.Items.Add("(" & i & ") " & str) - CmDEV.Items(i).Tag = i - Next + CmDEVitem = Me.LvDEVoptions.SelectedItems(0) - CmDEV.Show(Cursor.Position) + CmDEV.Items.Clear() - Case tDEVconfType.tIntVal - str = InputBox("New Value <" & Config0.TypeString & "> =", , Config0.ValToString) - If str <> "" AndAlso IsNumeric(str) Then - Config0.IntVal = CInt(str) - End If + i = -1 + For Each str In Config0.Modes + i += 1 + CmDEV.Items.Add("(" & i & ") " & str) + CmDEV.Items(i).Tag = i + Next - Case tDEVconfType.tSingleVal - str = InputBox("New Value <" & Config0.TypeString & "> =", , Config0.ValToString) - If str <> "" AndAlso IsNumeric(str) Then - Config0.SingleVal = CSng(str) - End If + CmDEV.Show(Cursor.Position) - Case Else 'tDEVconfType.tStringVal - Dim dlg As New F_StrInpBox - Config0.StringVal = dlg.ShowDlog("New Value <" & Config0.TypeString & "> =", Config0.StringVal) - End Select + Case tDEVconfType.tIntVal + str = InputBox("New Value <" & Config0.TypeString & "> =", , Config0.ValToString) + If str <> "" AndAlso IsNumeric(str) Then + Config0.IntVal = CInt(str) + End If - UpdateDEVconfigs(Me.LvDEVoptions.SelectedItems(0)) + Case tDEVconfType.tSingleVal + str = InputBox("New Value <" & Config0.TypeString & "> =", , Config0.ValToString) + If str <> "" AndAlso IsNumeric(str) Then + Config0.SingleVal = CSng(str) + End If - End Sub + Case Else 'tDEVconfType.tStringVal + Dim dlg As New F_StrInpBox + Config0.StringVal = dlg.ShowDlog("New Value <" & Config0.TypeString & "> =", Config0.StringVal) + End Select - 'Context menu for selection-type DEV options - Private Sub CmDEV_ItemClicked(sender As Object, e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles CmDEV.ItemClicked - Dim i As Integer + UpdateDEVconfigs(Me.LvDEVoptions.SelectedItems(0)) + End Sub - i = e.ClickedItem.Tag + 'Context menu for selection-type DEV options + Private Sub CmDEV_ItemClicked(sender As Object, e As System.Windows.Forms.ToolStripItemClickedEventArgs) _ + Handles CmDEV.ItemClicked + Dim i As Integer - DEV.Options(CmDEVitem.Tag).ModeIndex = i - - UpdateDEVconfigs(CmDEVitem) - - End Sub + i = e.ClickedItem.Tag + DEV.Options(CmDEVitem.Tag).ModeIndex = i + UpdateDEVconfigs(CmDEVitem) + End Sub #End Region - 'Add message to message list - Public Sub MSGtoForm(ByVal ID As tMsgID, ByVal Msg As String, ByVal Source As String, ByVal Link As String) - - Dim lv0 As ListViewItem - - lv0 = New ListViewItem - lv0.Text = Msg - lv0.SubItems.Add(Now.ToString) - lv0.SubItems.Add(Source) - - If LvMsg.Items.Count > 9999 Then LvMsg.Items.RemoveAt(0) - - LogFile.WriteToLog(ID, Msg & vbTab & Source) - - Select Case ID - - Case tMsgID.Err - - lv0.BackColor = Color.Red - lv0.ForeColor = Color.White - - Case tMsgID.Warn - - lv0.BackColor = Color.Khaki 'FromArgb(218, 125, 0) 'DarkOrange - lv0.ForeColor = Color.Black - - Case Else - - If ID = tMsgID.NewJob Then - lv0.BackColor = Color.LightGray - lv0.ForeColor = Color.DarkBlue - End If - - End Select - - If Link <> "" Then - If Not ID = tMsgID.Err Then lv0.ForeColor = Color.Blue - lv0.SubItems(0).Font = New Font(Me.LvMsg.Font, FontStyle.Underline) - lv0.Tag = Link - End If - - - LvMsg.Items.Add(lv0) - - lv0.EnsureVisible() - - End Sub - - - - - 'Open link in message list - Private Sub LvMsg_MouseClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles LvMsg.MouseClick - Dim txt As String - If Me.LvMsg.SelectedIndices.Count > 0 Then - If Not Me.LvMsg.SelectedItems(0).Tag Is Nothing Then - If Len(CStr(Me.LvMsg.SelectedItems(0).Tag)) > 4 AndAlso Microsoft.VisualBasic.Left(CStr(Me.LvMsg.SelectedItems(0).Tag), 4) = "<UM>" Then - txt = CStr(Me.LvMsg.SelectedItems(0).Tag).Replace("<UM>", MyAppPath & "User Manual") - txt = txt.Replace(" ", "%20") - txt = txt.Replace("\", "/") - txt = "file:///" & txt - Try - System.Diagnostics.Process.Start(txt) - Catch ex As Exception - MsgBox("Cannot open link! (-_-;)") - End Try - ElseIf Len(CStr(Me.LvMsg.SelectedItems(0).Tag)) > 5 AndAlso Microsoft.VisualBasic.Left(CStr(Me.LvMsg.SelectedItems(0).Tag), 5) = "<GUI>" Then - txt = CStr(Me.LvMsg.SelectedItems(0).Tag).Replace("<GUI>", "") - OpenVectoFile(txt) - ElseIf Len(CStr(Me.LvMsg.SelectedItems(0).Tag)) > 5 AndAlso Microsoft.VisualBasic.Left(CStr(Me.LvMsg.SelectedItems(0).Tag), 5) = "<RUN>" Then - txt = CStr(Me.LvMsg.SelectedItems(0).Tag).Replace("<RUN>", "") - Try - Process.Start(txt) - Catch ex As Exception - GUImsg(tMsgID.Err, "Could not run '" & txt & "'!") - End Try - Else - OpenFiles(CStr(Me.LvMsg.SelectedItems(0).Tag)) - End If - End If - End If - End Sub - - 'Link-cursor (Hand) for links - Private Sub LvMsg_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles LvMsg.MouseMove - Dim lv0 As ListViewItem - lv0 = Me.LvMsg.GetItemAt(e.Location.X, e.Location.Y) - If lv0 Is Nothing OrElse lv0.Tag Is Nothing Then - LvMsg.Cursor = Cursors.Arrow - Else - LvMsg.Cursor = Cursors.Hand - End If - End Sub + 'Add message to message list + Public Sub MSGtoForm(ByVal ID As tMsgID, ByVal Msg As String, ByVal Source As String, ByVal Link As String) + + Dim lv0 As ListViewItem + + lv0 = New ListViewItem + lv0.Text = Msg + lv0.SubItems.Add(Now.ToString) + lv0.SubItems.Add(Source) + + If LvMsg.Items.Count > 9999 Then LvMsg.Items.RemoveAt(0) + + LogFile.WriteToLog(ID, Msg & vbTab & Source) + + Select Case ID + + Case tMsgID.Err + + lv0.BackColor = Color.Red + lv0.ForeColor = Color.White + + Case tMsgID.Warn + + lv0.BackColor = Color.Khaki 'FromArgb(218, 125, 0) 'DarkOrange + lv0.ForeColor = Color.Black + + Case Else + + If ID = tMsgID.NewJob Then + lv0.BackColor = Color.LightGray + lv0.ForeColor = Color.DarkBlue + End If + + End Select + + If Link <> "" Then + If Not ID = tMsgID.Err Then lv0.ForeColor = Color.Blue + lv0.SubItems(0).Font = New Font(Me.LvMsg.Font, FontStyle.Underline) + lv0.Tag = Link + End If + + + LvMsg.Items.Add(lv0) + + lv0.EnsureVisible() + End Sub + + + 'Open link in message list + Private Sub LvMsg_MouseClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles LvMsg.MouseClick + Dim txt As String + If Me.LvMsg.SelectedIndices.Count > 0 Then + If Not Me.LvMsg.SelectedItems(0).Tag Is Nothing Then + If _ + Len(CStr(Me.LvMsg.SelectedItems(0).Tag)) > 4 AndAlso + Microsoft.VisualBasic.Left(CStr(Me.LvMsg.SelectedItems(0).Tag), 4) = "<UM>" Then + txt = CStr(Me.LvMsg.SelectedItems(0).Tag).Replace("<UM>", MyAppPath & "User Manual") + txt = txt.Replace(" ", "%20") + txt = txt.Replace("\", "/") + txt = "file:///" & txt + Try + System.Diagnostics.Process.Start(txt) + Catch ex As Exception + MsgBox("Cannot open link! (-_-;)") + End Try + ElseIf _ + Len(CStr(Me.LvMsg.SelectedItems(0).Tag)) > 5 AndAlso + Microsoft.VisualBasic.Left(CStr(Me.LvMsg.SelectedItems(0).Tag), 5) = "<GUI>" Then + txt = CStr(Me.LvMsg.SelectedItems(0).Tag).Replace("<GUI>", "") + OpenVectoFile(txt) + ElseIf _ + Len(CStr(Me.LvMsg.SelectedItems(0).Tag)) > 5 AndAlso + Microsoft.VisualBasic.Left(CStr(Me.LvMsg.SelectedItems(0).Tag), 5) = "<RUN>" Then + txt = CStr(Me.LvMsg.SelectedItems(0).Tag).Replace("<RUN>", "") + Try + Process.Start(txt) + Catch ex As Exception + GUImsg(tMsgID.Err, "Could not run '" & txt & "'!") + End Try + Else + OpenFiles(CStr(Me.LvMsg.SelectedItems(0).Tag)) + End If + End If + End If + End Sub + + 'Link-cursor (Hand) for links + Private Sub LvMsg_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles LvMsg.MouseMove + Dim lv0 As ListViewItem + lv0 = Me.LvMsg.GetItemAt(e.Location.X, e.Location.Y) + If lv0 Is Nothing OrElse lv0.Tag Is Nothing Then + LvMsg.Cursor = Cursors.Arrow + Else + LvMsg.Cursor = Cursors.Hand + End If + End Sub #Region "Open File Context Menu" - Private CmFiles As String() + Private CmFiles As String() - 'Initialise and open context menu - Private Sub OpenFiles(ParamArray files() As String) + 'Initialise and open context menu + Private Sub OpenFiles(ParamArray files() As String) - If files.Length = 0 Then Exit Sub + If files.Length = 0 Then Exit Sub - CmFiles = files + CmFiles = files - Me.OpenInGraphWindowToolStripMenuItem.Enabled = (UCase(fEXT(CmFiles(0))) = ".VMOD") + Me.OpenInGraphWindowToolStripMenuItem.Enabled = (UCase(fEXT(CmFiles(0))) = ".VMOD") - OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName + OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName - CmOpenFile.Show(Cursor.Position) + CmOpenFile.Show(Cursor.Position) + End Sub - End Sub + 'Open with tool defined in Settings + Private Sub OpenWithToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles OpenWithToolStripMenuItem.Click + If Not FileOpenAlt(CmFiles(0)) Then MsgBox("Failed to open file!") + End Sub - 'Open with tool defined in Settings - Private Sub OpenWithToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OpenWithToolStripMenuItem.Click - If Not FileOpenAlt(CmFiles(0)) Then MsgBox("Failed to open file!") - End Sub + Private Sub OpenInGraphWindowToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles OpenInGraphWindowToolStripMenuItem.Click + Dim FGraph As New F_Graph + FGraph.Show() + FGraph.LoadNewFile(CmFiles(0)) + End Sub - Private Sub OpenInGraphWindowToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OpenInGraphWindowToolStripMenuItem.Click - Dim FGraph As New F_Graph - FGraph.Show() - FGraph.LoadNewFile(CmFiles(0)) - End Sub - - 'Show in folder - Private Sub ShowInFolderToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ShowInFolderToolStripMenuItem.Click - If IO.File.Exists(CmFiles(0)) Then - Try - System.Diagnostics.Process.Start("explorer", "/select,""" & CmFiles(0) & "") - Catch ex As Exception - MsgBox("Failed to open file!") - End Try - Else - MsgBox("File not found!") - End If - End Sub + 'Show in folder + Private Sub ShowInFolderToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) _ + Handles ShowInFolderToolStripMenuItem.Click + If IO.File.Exists(CmFiles(0)) Then + Try + System.Diagnostics.Process.Start("explorer", "/select,""" & CmFiles(0) & "") + Catch ex As Exception + MsgBox("Failed to open file!") + End Try + Else + MsgBox("File not found!") + End If + End Sub #End Region - 'Change Declaraion Mode - Private Sub RbDecl_CheckedChanged(sender As Object, e As System.EventArgs) Handles RbDecl.CheckedChanged - If CbDeclLock Then Exit Sub - - If F_VECTO.Visible Or F_VEH.Visible Or F_GBX.Visible Or F_ENG.Visible Then - CbDeclLock = True - Me.RbDecl.Checked = Not Me.RbDecl.Checked - CbDeclLock = False - MsgBox("Please close all dialog windows (e.g. Job Editor) before changing mode!") - Else - Cfg.DeclMode = Me.RbDecl.Checked - Me.RbDev.Checked = Not Me.RbDecl.Checked - DeclOnOff() - End If - - End Sub - - + 'Change Declaraion Mode + Private Sub RbDecl_CheckedChanged(sender As Object, e As System.EventArgs) Handles RbDecl.CheckedChanged + If CbDeclLock Then Exit Sub + If F_VECTO.Visible Or F_VEH.Visible Or F_GBX.Visible Or F_ENG.Visible Then + CbDeclLock = True + Me.RbDecl.Checked = Not Me.RbDecl.Checked + CbDeclLock = False + MsgBox("Please close all dialog windows (e.g. Job Editor) before changing mode!") + Else + Cfg.DeclMode = Me.RbDecl.Checked + Me.RbDev.Checked = Not Me.RbDecl.Checked + DeclOnOff() + End If + End Sub #Region "GUI Tests" - Private GUItest0 As New GUItest(Me) - - Private Class GUItest - Private RowLim As Int16 = 9 - Private ColLim As Int16 = 45 - Public TestActive As Boolean = False - Private TestAborted As Boolean - Private xCtrl As Int16 - Private xPanel As Int16 - Private Scr As Int32 - Private PRbAlt As Boolean - Private Ctrls(RowLim + 1) As Int16 - Private Pnls(RowLim + 1) As Int16 - Private CtrlC As Int16 - Private CtrlCL As Int16 - Private PnDir As Int16 - Private PnDirC As Int16 - Private PnDirCL As Int16 - Private PnDirRnd As Int16 - Private CtrlRnd As Int16 - Private DiffC As Int16 - Private DiffLvl As Int16 - Private bInit As Int16 - Private MyForm As F_MAINForm - Private KeyCode As List(Of Integer) - - Private Sub TestRun() - - Dim z As Int16 - - xPanel = ColLim - 10 - xCtrl = ColLim - 10 - PRbAlt = False - Scr = 0 - PnDir = 0 - PnDirCL = 10 - PnDirC = 0 ' StrDirCL - CtrlCL = 5 - CtrlC = CtrlCL - PnDirRnd = 5 - CtrlRnd = 8 - DiffC = 0 - DiffLvl = 1 - bInit = 0 - TestAborted = False - Randomize() - - - MyForm.LvMsg.Items.Clear() - MyForm.ToolStripLbStatus.Text = "Score: 0000 Press <Esc> to Quit" - - For z = 1 To RowLim - 6 - PRbAlt = Not PRbAlt - If Not PRbAlt Then - MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| |*") - Else - MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| | |*") - End If - Next - - PRbAlt = False - - MyForm.LvMsg.Items.Add(" VECTO Interactive Mode" & Space(ColLim - 35) & "*| |*") - MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| | |*") - MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| |*") - MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| | |*") - MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| |*") - MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| ∆ |*") - - For z = 1 To RowLim + 1 - Pnls(z) = ColLim - 10 - Ctrls(z) = 0 - Next - - MyForm.TmProgSec.Interval = 200 - - MyForm.LvMsg.Focus() - - MyForm.TmProgSec.Start() - - - End Sub - - Public Sub TestStop() - MyForm.TmProgSec.Stop() - TestActive = False - MyForm.LvMsg.Items.Clear() - CtrlC = 0 - MyForm.ToolStripLbStatus.Text = MyForm.LastModeName & " Mode" - End Sub - - Public Sub TestTick() - - If bInit = 24 Then GoTo LbRace - bInit += 1 - - Select Case bInit - Case 10 - MyForm.LvMsg.Items.RemoveAt(RowLim - 6) - MyForm.LvMsg.Items.RemoveAt(RowLim - 5) - MyForm.LvMsg.Items.Insert(RowLim - 6, Space(ColLim - 11) & "*| |*") - MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " 3 " & Space(10) & "*| |*") - Case 14 - MyForm.LvMsg.Items.RemoveAt(RowLim - 4) - MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " 2 " & Space(10) & "*| |*") - Case 18 - MyForm.LvMsg.Items.RemoveAt(RowLim - 4) - MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " 1 " & Space(10) & "*| |*") - Case 22 - MyForm.LvMsg.Items.RemoveAt(RowLim - 4) - MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " Go! " & Space(10) & "*| |*") - Case 24 - MyForm.LvMsg.Items.RemoveAt(RowLim - 4) - MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " " & Space(10) & "*| |*") - End Select - Exit Sub + Private GUItest0 As New GUItest(Me) + + Private Class GUItest + Private RowLim As Int16 = 9 + Private ColLim As Int16 = 45 + Public TestActive As Boolean = False + Private TestAborted As Boolean + Private xCtrl As Int16 + Private xPanel As Int16 + Private Scr As Int32 + Private PRbAlt As Boolean + Private Ctrls(RowLim + 1) As Int16 + Private Pnls(RowLim + 1) As Int16 + Private CtrlC As Int16 + Private CtrlCL As Int16 + Private PnDir As Int16 + Private PnDirC As Int16 + Private PnDirCL As Int16 + Private PnDirRnd As Int16 + Private CtrlRnd As Int16 + Private DiffC As Int16 + Private DiffLvl As Int16 + Private bInit As Int16 + Private MyForm As F_MAINForm + Private KeyCode As List(Of Integer) + + Private Sub TestRun() + + Dim z As Int16 + + xPanel = ColLim - 10 + xCtrl = ColLim - 10 + PRbAlt = False + Scr = 0 + PnDir = 0 + PnDirCL = 10 + PnDirC = 0 ' StrDirCL + CtrlCL = 5 + CtrlC = CtrlCL + PnDirRnd = 5 + CtrlRnd = 8 + DiffC = 0 + DiffLvl = 1 + bInit = 0 + TestAborted = False + Randomize() + + + MyForm.LvMsg.Items.Clear() + MyForm.ToolStripLbStatus.Text = "Score: 0000 Press <Esc> to Quit" + + For z = 1 To RowLim - 6 + PRbAlt = Not PRbAlt + If Not PRbAlt Then + MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| |*") + Else + MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| | |*") + End If + Next + + PRbAlt = False + + MyForm.LvMsg.Items.Add(" VECTO Interactive Mode" & Space(ColLim - 35) & "*| |*") + MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| | |*") + MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| |*") + MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| | |*") + MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| |*") + MyForm.LvMsg.Items.Add(Space(ColLim - 11) & "*| ∆ |*") + + For z = 1 To RowLim + 1 + Pnls(z) = ColLim - 10 + Ctrls(z) = 0 + Next + + MyForm.TmProgSec.Interval = 200 + + MyForm.LvMsg.Focus() + + MyForm.TmProgSec.Start() + End Sub + + Public Sub TestStop() + MyForm.TmProgSec.Stop() + TestActive = False + MyForm.LvMsg.Items.Clear() + CtrlC = 0 + MyForm.ToolStripLbStatus.Text = MyForm.LastModeName & " Mode" + End Sub + + Public Sub TestTick() + + If bInit = 24 Then GoTo LbRace + bInit += 1 + + Select Case bInit + Case 10 + MyForm.LvMsg.Items.RemoveAt(RowLim - 6) + MyForm.LvMsg.Items.RemoveAt(RowLim - 5) + MyForm.LvMsg.Items.Insert(RowLim - 6, Space(ColLim - 11) & "*| |*") + MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " 3 " & Space(10) & "*| |*") + Case 14 + MyForm.LvMsg.Items.RemoveAt(RowLim - 4) + MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " 2 " & Space(10) & "*| |*") + Case 18 + MyForm.LvMsg.Items.RemoveAt(RowLim - 4) + MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " 1 " & Space(10) & "*| |*") + Case 22 + MyForm.LvMsg.Items.RemoveAt(RowLim - 4) + MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " Go! " & Space(10) & "*| |*") + Case 24 + MyForm.LvMsg.Items.RemoveAt(RowLim - 4) + MyForm.LvMsg.Items.Insert(RowLim - 4, Space(ColLim - 30) & " " & Space(10) & "*| |*") + End Select + Exit Sub LbRace: - PRbAlt = Not PRbAlt - - MyForm.LvMsg.BeginUpdate() - - sLists() + PRbAlt = Not PRbAlt + + MyForm.LvMsg.BeginUpdate() + + sLists() - sAlign() + sAlign() - sSetCtrl() + sSetCtrl() - sSetPanel() + sSetPanel() - MyForm.LvMsg.Items.RemoveAt(RowLim) + MyForm.LvMsg.Items.RemoveAt(RowLim) - sUpdateCtrl() + sUpdateCtrl() - MyForm.LvMsg.EndUpdate() + MyForm.LvMsg.EndUpdate() - If Math.Abs(xCtrl - Pnls(2)) > 4 Then - sAbort() - Exit Sub - ElseIf Ctrls(2) <> 0 Then - If xCtrl = Pnls(2) + Ctrls(2) - 4 Then - sAbort() - Exit Sub - End If - Scr += 5 * DiffLvl - End If - - Scr += DiffLvl - DiffC += 1 - - 'Erhöhe Schwierigkeitsgrad - If DiffC = (DiffLvl + 3) * 4 Then - DiffC = 0 - DiffLvl += 1 - If DiffLvl > 2 And DiffLvl < 7 Then MyForm.TmProgSec.Interval = 300 - (DiffLvl) * 30 - Scr += 100 - Select Case DiffLvl - Case 3 - PnDirCL = 3 - CtrlCL = 4 - CtrlRnd = 6 - Case 5 - PnDirCL = 2 - PnDirRnd = 4 - Case 8 - CtrlCL = 2 - Case 10 - CtrlRnd = 4 - PnDirRnd = 3 - End Select - End If - - End Sub - - Public Sub TestKey(ByVal Key0 As Integer) - - If TestActive Then - Select Case Key0 - Case Keys.Left - xCtrl -= 1 - sUpdateCtrl() - Case Keys.Right - xCtrl += 1 - sUpdateCtrl() - Case Keys.Escape - TestStop() - End Select - Else - - If KeyCode(CtrlC) = Key0 Then - CtrlC += 1 - If CtrlC = KeyCode.Count Then - TestActive = True - TestRun() - End If - Else - CtrlC = 0 - End If - - End If - End Sub - - Private Sub sAbort() - - Dim s As String, s1 As String - - If TestAborted Then Exit Sub - - TestAborted = True - - MyForm.TmProgSec.Stop() - - MyForm.LvMsg.BeginUpdate() - - s = MyForm.LvMsg.Items(0).Text - MyForm.LvMsg.Items.RemoveAt(0) - MyForm.LvMsg.Items.Insert(0, "You crashed!" & Microsoft.VisualBasic.Right(s, Len(s) - 12)) - - s = MyForm.LvMsg.Items(1).Text - s1 = "Score: " & Scr & " " - MyForm.LvMsg.Items.RemoveAt(1) - MyForm.LvMsg.Items.Insert(1, s1 & Microsoft.VisualBasic.Right(s, Len(s) - Len(s1))) - - MyForm.LvMsg.EndUpdate() - - LogFile.WriteToLog(tMsgID.Normal, "*** Race Score: " & Scr.ToString("0000") & " ***") - - CtrlC = 0 - TestActive = False - - MyForm.ToolStripLbStatus.Text = MyForm.LastModeName & " Mode" - - - End Sub - - Private Sub sSetCtrl() - Dim x As Int16 - If Scr < 10 Then Exit Sub - Ctrls(RowLim + 1) = 0 - CtrlC += 1 - If CtrlC < CtrlCL Then Exit Sub - Select Case CInt(Int((CtrlRnd * Rnd()) + 1)) - Case 1, 2 - CtrlC = 0 - x = CInt(Int((7 * Rnd()) + 1)) - Ctrls(RowLim + 1) = x - Case Else - End Select - End Sub - - Private Sub sUpdateCtrl() - Dim s As String - If bInit < 21 Then - xCtrl = ColLim - 10 - Exit Sub - End If - If Math.Abs(xCtrl - Pnls(1)) > 5 Then - sAbort() - Exit Sub - End If - s = Replace(MyForm.LvMsg.Items(RowLim - 1).Text.ToString, "∆", " ") & " " - s = Microsoft.VisualBasic.Left(s, ColLim + 15) - 's = s.Remove(0, 20) - 's = "Press <Esc> to Quit " & s - If Mid(s, xCtrl + 5, 1) = "X" Then - sAbort() - Exit Sub - End If - s = s.Remove(xCtrl + 4, 1) - 's = Trim(s.Insert(xCar + 4, "∆")) & Space(ColLim + 5 - Streets(2)) & "Pts: " & Pts & " Lv: " & DiffLvl - s = Space(Pnls(2) - 1) & Trim(s.Insert(xCtrl + 4, "∆")) - MyForm.LvMsg.Items.RemoveAt(RowLim - 1) - MyForm.LvMsg.Items.Insert(RowLim - 1, s) - MyForm.ToolStripLbStatus.Text = "Score: " & Scr.ToString("0000") & " Press <Esc> to Quit" - End Sub - - Private Sub sSetPanel() - Dim s As String - s = "*| | |*" - If PRbAlt Then - s = s.Remove(5, 1) - s = s.Insert(5, " ") - End If - If Ctrls(RowLim + 1) <> 0 Then - s = s.Remove(Ctrls(RowLim + 1) + 1, 1) - s = s.Insert(Ctrls(RowLim + 1) + 1, "X") - End If - Select Case xPanel - Pnls(RowLim) - Case -1 - s = Replace(s, "|", "\") - Case 1 - s = Replace(s, "|", "/") - End Select - MyForm.LvMsg.Items.Insert(0, Space(xPanel - 1) & s) - End Sub - - Private Sub sAlign() - PnDirC += 1 - If PnDirC < PnDirCL Then GoTo Lb1 - PnDirC = 0 - Select Case CInt(Int((PnDirRnd * Rnd()) + 1)) - Case 1 - PnDir = 1 - Case 2 - PnDir = -1 - Case Else - PnDir = 0 - End Select + If Math.Abs(xCtrl - Pnls(2)) > 4 Then + sAbort() + Exit Sub + ElseIf Ctrls(2) <> 0 Then + If xCtrl = Pnls(2) + Ctrls(2) - 4 Then + sAbort() + Exit Sub + End If + Scr += 5 * DiffLvl + End If + + Scr += DiffLvl + DiffC += 1 + + 'Erhöhe Schwierigkeitsgrad + If DiffC = (DiffLvl + 3) * 4 Then + DiffC = 0 + DiffLvl += 1 + If DiffLvl > 2 And DiffLvl < 7 Then MyForm.TmProgSec.Interval = 300 - (DiffLvl) * 30 + Scr += 100 + Select Case DiffLvl + Case 3 + PnDirCL = 3 + CtrlCL = 4 + CtrlRnd = 6 + Case 5 + PnDirCL = 2 + PnDirRnd = 4 + Case 8 + CtrlCL = 2 + Case 10 + CtrlRnd = 4 + PnDirRnd = 3 + End Select + End If + End Sub + + Public Sub TestKey(ByVal Key0 As Integer) + + If TestActive Then + Select Case Key0 + Case Keys.Left + xCtrl -= 1 + sUpdateCtrl() + Case Keys.Right + xCtrl += 1 + sUpdateCtrl() + Case Keys.Escape + TestStop() + End Select + Else + + If KeyCode(CtrlC) = Key0 Then + CtrlC += 1 + If CtrlC = KeyCode.Count Then + TestActive = True + TestRun() + End If + Else + CtrlC = 0 + End If + + End If + End Sub + + Private Sub sAbort() + + Dim s As String, s1 As String + + If TestAborted Then Exit Sub + + TestAborted = True + + MyForm.TmProgSec.Stop() + + MyForm.LvMsg.BeginUpdate() + + s = MyForm.LvMsg.Items(0).Text + MyForm.LvMsg.Items.RemoveAt(0) + MyForm.LvMsg.Items.Insert(0, "You crashed!" & Microsoft.VisualBasic.Right(s, Len(s) - 12)) + + s = MyForm.LvMsg.Items(1).Text + s1 = "Score: " & Scr & " " + MyForm.LvMsg.Items.RemoveAt(1) + MyForm.LvMsg.Items.Insert(1, s1 & Microsoft.VisualBasic.Right(s, Len(s) - Len(s1))) + + MyForm.LvMsg.EndUpdate() + + LogFile.WriteToLog(tMsgID.Normal, "*** Race Score: " & Scr.ToString("0000") & " ***") + + CtrlC = 0 + TestActive = False + + MyForm.ToolStripLbStatus.Text = MyForm.LastModeName & " Mode" + End Sub + + Private Sub sSetCtrl() + Dim x As Int16 + If Scr < 10 Then Exit Sub + Ctrls(RowLim + 1) = 0 + CtrlC += 1 + If CtrlC < CtrlCL Then Exit Sub + Select Case CInt(Int((CtrlRnd * Rnd()) + 1)) + Case 1, 2 + CtrlC = 0 + x = CInt(Int((7 * Rnd()) + 1)) + Ctrls(RowLim + 1) = x + Case Else + End Select + End Sub + + Private Sub sUpdateCtrl() + Dim s As String + If bInit < 21 Then + xCtrl = ColLim - 10 + Exit Sub + End If + If Math.Abs(xCtrl - Pnls(1)) > 5 Then + sAbort() + Exit Sub + End If + s = Replace(MyForm.LvMsg.Items(RowLim - 1).Text.ToString, "∆", " ") & " " + s = Microsoft.VisualBasic.Left(s, ColLim + 15) + 's = s.Remove(0, 20) + 's = "Press <Esc> to Quit " & s + If Mid(s, xCtrl + 5, 1) = "X" Then + sAbort() + Exit Sub + End If + s = s.Remove(xCtrl + 4, 1) + 's = Trim(s.Insert(xCar + 4, "∆")) & Space(ColLim + 5 - Streets(2)) & "Pts: " & Pts & " Lv: " & DiffLvl + s = Space(Pnls(2) - 1) & Trim(s.Insert(xCtrl + 4, "∆")) + MyForm.LvMsg.Items.RemoveAt(RowLim - 1) + MyForm.LvMsg.Items.Insert(RowLim - 1, s) + MyForm.ToolStripLbStatus.Text = "Score: " & Scr.ToString("0000") & " Press <Esc> to Quit" + End Sub + + Private Sub sSetPanel() + Dim s As String + s = "*| | |*" + If PRbAlt Then + s = s.Remove(5, 1) + s = s.Insert(5, " ") + End If + If Ctrls(RowLim + 1) <> 0 Then + s = s.Remove(Ctrls(RowLim + 1) + 1, 1) + s = s.Insert(Ctrls(RowLim + 1) + 1, "X") + End If + Select Case xPanel - Pnls(RowLim) + Case -1 + s = Replace(s, "|", "\") + Case 1 + s = Replace(s, "|", "/") + End Select + MyForm.LvMsg.Items.Insert(0, Space(xPanel - 1) & s) + End Sub + + Private Sub sAlign() + PnDirC += 1 + If PnDirC < PnDirCL Then GoTo Lb1 + PnDirC = 0 + Select Case CInt(Int((PnDirRnd * Rnd()) + 1)) + Case 1 + PnDir = 1 + Case 2 + PnDir = -1 + Case Else + PnDir = 0 + End Select Lb1: - xPanel += PnDir - If xPanel > ColLim Then - xPanel = ColLim - ElseIf xPanel < 22 Then - xPanel = 22 - End If - Pnls(RowLim + 1) = xPanel - End Sub - - Private Sub sLists() - Dim x As Int16 - For x = 2 To RowLim + 1 - Ctrls(x - 1) = Ctrls(x) - Pnls(x - 1) = Pnls(x) - Next - End Sub - - Public Sub New(ByVal Form As F_MAINForm) - MyForm = Form - KeyCode = New List(Of Integer) - KeyCode.Add(Keys.Up) - KeyCode.Add(Keys.Up) - KeyCode.Add(Keys.Down) - KeyCode.Add(Keys.Down) - KeyCode.Add(Keys.Left) - KeyCode.Add(Keys.Right) - KeyCode.Add(Keys.Left) - KeyCode.Add(Keys.Right) - KeyCode.Add(Keys.B) - KeyCode.Add(Keys.A) - CtrlC = 0 - End Sub - - End Class - - Private Sub LvMsg_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles LvMsg.KeyDown - GUItest0.TestKey(e.KeyValue) - If GUItest0.TestActive Then e.SuppressKeyPress = True - End Sub - - Private Sub LvMsg_LostFocus(sender As Object, e As System.EventArgs) Handles LvMsg.LostFocus - If GUItest0.TestActive Then GUItest0.TestStop() - End Sub + xPanel += PnDir + If xPanel > ColLim Then + xPanel = ColLim + ElseIf xPanel < 22 Then + xPanel = 22 + End If + Pnls(RowLim + 1) = xPanel + End Sub + + Private Sub sLists() + Dim x As Int16 + For x = 2 To RowLim + 1 + Ctrls(x - 1) = Ctrls(x) + Pnls(x - 1) = Pnls(x) + Next + End Sub + + Public Sub New(ByVal Form As F_MAINForm) + MyForm = Form + KeyCode = New List(Of Integer) + KeyCode.Add(Keys.Up) + KeyCode.Add(Keys.Up) + KeyCode.Add(Keys.Down) + KeyCode.Add(Keys.Down) + KeyCode.Add(Keys.Left) + KeyCode.Add(Keys.Right) + KeyCode.Add(Keys.Left) + KeyCode.Add(Keys.Right) + KeyCode.Add(Keys.B) + KeyCode.Add(Keys.A) + CtrlC = 0 + End Sub + End Class + + Private Sub LvMsg_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles LvMsg.KeyDown + GUItest0.TestKey(e.KeyValue) + If GUItest0.TestActive Then e.SuppressKeyPress = True + End Sub + + Private Sub LvMsg_LostFocus(sender As Object, e As System.EventArgs) Handles LvMsg.LostFocus + If GUItest0.TestActive Then GUItest0.TestStop() + End Sub #End Region - - - End Class diff --git a/VECTO/VECTO_Global.vb b/VECTO/VECTO_Global.vb index ce805abd7c49e45da96c5592e9959cdc12615ca3..2b5661019fcd25d658e7f9e492f45189d1121c4b 100644 --- a/VECTO/VECTO_Global.vb +++ b/VECTO/VECTO_Global.vb @@ -11,649 +11,629 @@ Imports System.Collections.Generic Module VECTO_Global + Public Const VECTOvers As String = "2.0.5" + Public Const LicSigAppCode As String = "VECTO-Release-0093C61E0A2E4BFA9A7ED7E729C56AE4" + Public MyAppPath As String + Public MyConfPath As String + Public MyDeclPath As String - Public Const VECTOvers As String = "2.0.4-beta4 Test2" - Public Const LicSigAppCode As String = "VECTO-Release-0093C61E0A2E4BFA9A7ED7E729C56AE4" - Public MyAppPath As String - Public MyConfPath As String - Public MyDeclPath As String + 'Log + Public LogFile As cLogFile - 'Log - Public LogFile As cLogFile + 'BackgroundWorker + Public VECTOworker As System.ComponentModel.BackgroundWorker - 'BackgroundWorker - Public VECTOworker As System.ComponentModel.BackgroundWorker + 'Log/Msg + Public MSGerror As Integer + Public MSGwarn As Integer - 'Log/Msg - Public MSGerror As Integer - Public MSGwarn As Integer + 'Config------------------------------------------------------- + Public Cfg As cConfig - 'Config------------------------------------------------------- - Public Cfg As cConfig + Public sKey As csKey - Public sKey As csKey + 'File format + Public FileFormat As System.Text.Encoding = System.Text.Encoding.UTF8 - 'File format - Public FileFormat As System.Text.Encoding = System.Text.Encoding.UTF8 + Public VEC As cVECTO + Public VEH As cVEH + Public ENG As cENG + Public GBX As cGBX + Public MAP As cMAP + Public DRI As cDRI + Public FLD As List(Of cFLD) + Public MODdata As cMOD + Public Lic As vectolic.cLicense + Public VSUM As cVSUM + Public DEV As cDEV - Public VEC As cVECTO - Public VEH As cVEH - Public ENG As cENG - Public GBX As cGBX - Public MAP As cMAP - Public DRI As cDRI - Public FLD As List(Of cFLD) - Public MODdata As cMOD - Public Lic As vectolic.cLicense - Public VSUM As cVSUM - Public DEV As cDEV + Public Declaration As cDeclaration - Public Declaration As cDeclaration + Public ProgBarCtrl As cProgBarCtrl - Public ProgBarCtrl As cProgBarCtrl + Public SetCulture As Boolean 'Damit der Backgroundworker das richtige Format verwendet - Public SetCulture As Boolean 'Damit der Backgroundworker das richtige Format verwendet + Public Function nMtoPe(ByVal nU As Double, ByVal M As Double) As Double + Return ((nU*2*Math.PI/60)*M/1000) + End Function - Public Function nMtoPe(ByVal nU As Double, ByVal M As Double) As Double - Return ((nU * 2 * Math.PI / 60) * M / 1000) - End Function - - Public Function nPeToM(ByVal nU As Single, ByVal Pe As Double) As Single - Return Pe * 1000 / (nU * 2 * Math.PI / 60) - End Function + Public Function nPeToM(ByVal nU As Single, ByVal Pe As Double) As Single + Return Pe*1000/(nU*2*Math.PI/60) + End Function #Region "sKey > Typ Umwandlung" - Public Function GearboxConv(ByVal Gearbox As tGearbox) As String - Select Case Gearbox - Case tGearbox.Manual - Return "MT" - Case tGearbox.Automatic - Return "AT" - Case tGearbox.SemiAutomatic - Return "AMT" - Case Else 'tGearbox.Custom - Return "Custom" - End Select - End Function - - Public Function GearboxConv(ByVal Gearbox As String) As tGearbox - Select Case UCase(Trim(Gearbox)) - Case "MT" - Return tGearbox.Manual - Case "AT" - Return tGearbox.Automatic - Case "AMT" - Return tGearbox.SemiAutomatic - Case Else '"Custom" - Return tGearbox.Custom - End Select - End Function - - Public Function fDriComp(ByVal sK As String) As tDriComp - sK = Trim(UCase(sK)) - Select Case sK - Case sKey.DRI.t - Return tDriComp.t - Case sKey.DRI.V - Return tDriComp.V - Case sKey.DRI.Grad - Return tDriComp.Grad - Case sKey.DRI.nU - Return tDriComp.nU - Case sKey.DRI.Gears - Return tDriComp.Gears - Case sKey.DRI.Padd - Return tDriComp.Padd - Case sKey.DRI.Pe - Return tDriComp.Pe - Case sKey.DRI.VairVres - Return tDriComp.VairVres - Case sKey.DRI.VairBeta - Return tDriComp.VairBeta - Case sKey.DRI.s - Return tDriComp.s - Case sKey.DRI.StopTime - Return tDriComp.StopTime - Case sKey.DRI.Torque - Return tDriComp.Torque - Case sKey.DRI.Alt - Return tDriComp.Alt - Case sKey.DRI.Pwheel - Return tDriComp.Pwheel - Case Else - Return tDriComp.Undefined - - End Select - End Function - - Public Function fAuxComp(ByVal sK As String) As tAuxComp - Dim x As Integer - sK = Trim(UCase(sK)) - - x = sK.IndexOf("_") - - If x = -1 Then Return tAuxComp.Undefined - - sK = Left(sK, x + 1) - - Select Case sK - Case sKey.PauxSply - Return tAuxComp.Psupply - Case Else - Return tAuxComp.Undefined - End Select - - End Function - - - Public Function fCompSubStr(ByVal sK As String) As String - Dim x As Integer - - sK = Trim(UCase(sK)) - - x = sK.IndexOf("_") - - If x = -1 Then Return "" - - sK = Right(sK, Len(sK) - x - 1) - - x = CShort(sK.IndexOf(">")) - - If x = -1 Then Return "" - - sK = Left(sK, x) - - Return sK - - End Function + Public Function GearboxConv(ByVal Gearbox As tGearbox) As String + Select Case Gearbox + Case tGearbox.Manual + Return "MT" + Case tGearbox.Automatic + Return "AT" + Case tGearbox.SemiAutomatic + Return "AMT" + Case Else 'tGearbox.Custom + Return "Custom" + End Select + End Function + + Public Function GearboxConv(ByVal Gearbox As String) As tGearbox + Select Case UCase(Trim(Gearbox)) + Case "MT" + Return tGearbox.Manual + Case "AT" + Return tGearbox.Automatic + Case "AMT" + Return tGearbox.SemiAutomatic + Case Else '"Custom" + Return tGearbox.Custom + End Select + End Function + + Public Function fDriComp(ByVal sK As String) As tDriComp + sK = Trim(UCase(sK)) + Select Case sK + Case sKey.DRI.t + Return tDriComp.t + Case sKey.DRI.V + Return tDriComp.V + Case sKey.DRI.Grad + Return tDriComp.Grad + Case sKey.DRI.nU + Return tDriComp.nU + Case sKey.DRI.Gears + Return tDriComp.Gears + Case sKey.DRI.Padd + Return tDriComp.Padd + Case sKey.DRI.Pe + Return tDriComp.Pe + Case sKey.DRI.VairVres + Return tDriComp.VairVres + Case sKey.DRI.VairBeta + Return tDriComp.VairBeta + Case sKey.DRI.s + Return tDriComp.s + Case sKey.DRI.StopTime + Return tDriComp.StopTime + Case sKey.DRI.Torque + Return tDriComp.Torque + Case sKey.DRI.Alt + Return tDriComp.Alt + Case sKey.DRI.Pwheel + Return tDriComp.Pwheel + Case Else + Return tDriComp.Undefined + + End Select + End Function + + Public Function fAuxComp(ByVal sK As String) As tAuxComp + Dim x As Integer + sK = Trim(UCase(sK)) + + x = sK.IndexOf("_") + + If x = - 1 Then Return tAuxComp.Undefined + + sK = Left(sK, x + 1) + + Select Case sK + Case sKey.PauxSply + Return tAuxComp.Psupply + Case Else + Return tAuxComp.Undefined + End Select + End Function + + + Public Function fCompSubStr(ByVal sK As String) As String + Dim x As Integer + + sK = Trim(UCase(sK)) + + x = sK.IndexOf("_") + + If x = - 1 Then Return "" + + sK = Right(sK, Len(sK) - x - 1) + + x = CShort(sK.IndexOf(">")) + + If x = - 1 Then Return "" + + sK = Left(sK, x) + + Return sK + End Function #End Region #Region "Typ > Name Conversion" - Public Function ConvLoading(ByVal load As tLoading) As String - Select Case load - Case tLoading.FullLoaded - Return "Full Loading" - - Case tLoading.RefLoaded - Return "Reference Loading" - - Case tLoading.EmptyLoaded - Return "Empty Loading" - - Case Else ' tLoading.UserDefLoaded - Return "User-defined Loading" - - End Select - End Function - - - - Public Function ConvVehCat(ByVal VehCat As tVehCat, ByVal NiceName As Boolean) As String - Select Case VehCat - Case tVehCat.Citybus - Return "Citybus" - Case tVehCat.Coach - Return "Coach" - Case tVehCat.InterurbanBus - If NiceName Then - Return "Interurban Bus" - Else - Return "InterurbanBus" - End If - Case tVehCat.RigidTruck - If NiceName Then - Return "Rigid Truck" - Else - Return "RigidTruck" - End If - Case tVehCat.Tractor - If NiceName Then - Return "Semitrailer Truck" - Else - Return "Tractor" - End If - Case Else ' tVehCat.Undef - Return "not defined" - End Select - End Function - - Public Function ConvVehCat(ByVal VehCat As String) As tVehCat - Select Case UCase(Trim(VehCat)) - Case "CITYBUS" - Return tVehCat.Citybus - Case "COACH" - Return tVehCat.Coach - Case "INTERURBANBUS" - Return tVehCat.InterurbanBus - Case "RIGIDTRUCK" - Return tVehCat.RigidTruck - Case "TRACTOR" - Return tVehCat.Tractor - Case Else - Return tVehCat.Undef - End Select - End Function - - Public Function ConvAxleConf(ByVal AxleConf As tAxleConf) As String - Select Case AxleConf - Case tAxleConf.a4x2 - Return "4x2" - Case tAxleConf.a4x4 - Return "4x4" - Case tAxleConf.a6x2 - Return "6x2" - Case tAxleConf.a6x4 - Return "6x4" - Case tAxleConf.a6x6 - Return "6x6" - Case tAxleConf.a8x2 - Return "8x2" - Case tAxleConf.a8x4 - Return "8x4" - Case tAxleConf.a8x6 - Return "8x6" - Case Else 'tAxleConf.a8x8 - Return "8x8" - End Select - End Function - - Public Function ConvAxleConf(ByVal AxleConf As String) As tAxleConf - Select Case UCase(Trim(AxleConf)) - Case "4X2" - Return tAxleConf.a4x2 - Case "4X4" - Return tAxleConf.a4x4 - Case "6X2" - Return tAxleConf.a6x2 - Case "6X4" - Return tAxleConf.a6x4 - Case "6X6" - Return tAxleConf.a6x6 - Case "8X2" - Return tAxleConf.a8x2 - Case "8X4" - Return tAxleConf.a8x4 - Case "8X6" - Return tAxleConf.a8x6 - Case Else '"8X8" - Return tAxleConf.a8x8 - End Select - End Function - - Public Function ConvMission(ByVal Mission As tMission) As String - Select Case Mission - Case tMission.LongHaul - Return "LongHaul" - Case tMission.RegionalDelivery - Return "RegionalDelivery" - Case tMission.UrbanDelivery - Return "UrbanDelivery" - Case tMission.MunicipalUtility - Return "MunicipalUtility" - Case tMission.Construction - Return "Construction" - Case tMission.HeavyUrban - Return "HeavyUrban" - Case tMission.Urban - Return "Urban" - Case tMission.Suburban - Return "Suburban" - Case tMission.Interurban - Return "Interurban" - Case tMission.Coach - Return "Coach" - Case Else - Return "not defined" - End Select - End Function - - Public Function ConvMission(ByVal Mission As String) As tMission - Select Case Mission - Case "LongHaul" - Return tMission.LongHaul - Case "RegionalDelivery" - Return tMission.RegionalDelivery - Case "UrbanDelivery" - Return tMission.UrbanDelivery - Case "MunicipalUtility" - Return tMission.MunicipalUtility - Case "Construction" - Return tMission.Construction - Case "HeavyUrban" - Return tMission.HeavyUrban - Case "Urban" - Return tMission.Urban - Case "Suburban" - Return tMission.Suburban - Case "Interurban" - Return tMission.Interurban - Case "Coach" - Return tMission.Coach - Case Else - Return tMission.Undef - End Select - End Function - - - - Public Function CdModeConv(ByVal CdMode As tCdMode) As String - Select Case CdMode - Case tCdMode.CdOfBeta - Return "CdOfBeta" - Case tCdMode.CdOfV - Return "CdOfV" - Case Else 'tCdMode.ConstCd0 - Return "Off" - End Select - End Function - - Public Function CdModeConv(ByVal CdMode As String) As tCdMode - Select Case UCase(Trim(CdMode)) - Case "CDOFBETA" - Return tCdMode.CdOfBeta - Case "CDOFV" - Return tCdMode.CdOfV - Case Else '"OFF" - Return tCdMode.ConstCd0 - End Select - End Function - - - - Public Function RtTypeConv(ByVal RtType As tRtType) As String - Select Case RtType - Case tRtType.Primary - Return "Primary" - Case tRtType.Secondary - Return "Secondary" - Case Else 'tRtType.None - Return "None" - End Select - End Function - - Public Function RtTypeConv(ByVal RtType As String) As tRtType - Select Case UCase(Trim(RtType)) - Case "PRIMARY" - Return tRtType.Primary - Case "SECONDARY" - Return tRtType.Secondary - Case Else '"NONE" - Return tRtType.None - End Select - End Function + Public Function ConvLoading(ByVal load As tLoading) As String + Select Case load + Case tLoading.FullLoaded + Return "Full Loading" + + Case tLoading.RefLoaded + Return "Reference Loading" + + Case tLoading.EmptyLoaded + Return "Empty Loading" + + Case Else ' tLoading.UserDefLoaded + Return "User-defined Loading" + + End Select + End Function + + + Public Function ConvVehCat(ByVal VehCat As tVehCat, ByVal NiceName As Boolean) As String + Select Case VehCat + Case tVehCat.Citybus + Return "Citybus" + Case tVehCat.Coach + Return "Coach" + Case tVehCat.InterurbanBus + If NiceName Then + Return "Interurban Bus" + Else + Return "InterurbanBus" + End If + Case tVehCat.RigidTruck + If NiceName Then + Return "Rigid Truck" + Else + Return "RigidTruck" + End If + Case tVehCat.Tractor + If NiceName Then + Return "Semitrailer Truck" + Else + Return "Tractor" + End If + Case Else ' tVehCat.Undef + Return "not defined" + End Select + End Function + + Public Function ConvVehCat(ByVal VehCat As String) As tVehCat + Select Case UCase(Trim(VehCat)) + Case "CITYBUS" + Return tVehCat.Citybus + Case "COACH" + Return tVehCat.Coach + Case "INTERURBANBUS" + Return tVehCat.InterurbanBus + Case "RIGIDTRUCK" + Return tVehCat.RigidTruck + Case "TRACTOR" + Return tVehCat.Tractor + Case Else + Return tVehCat.Undef + End Select + End Function + + Public Function ConvAxleConf(ByVal AxleConf As tAxleConf) As String + Select Case AxleConf + Case tAxleConf.a4x2 + Return "4x2" + Case tAxleConf.a4x4 + Return "4x4" + Case tAxleConf.a6x2 + Return "6x2" + Case tAxleConf.a6x4 + Return "6x4" + Case tAxleConf.a6x6 + Return "6x6" + Case tAxleConf.a8x2 + Return "8x2" + Case tAxleConf.a8x4 + Return "8x4" + Case tAxleConf.a8x6 + Return "8x6" + Case Else 'tAxleConf.a8x8 + Return "8x8" + End Select + End Function + + Public Function ConvAxleConf(ByVal AxleConf As String) As tAxleConf + Select Case UCase(Trim(AxleConf)) + Case "4X2" + Return tAxleConf.a4x2 + Case "4X4" + Return tAxleConf.a4x4 + Case "6X2" + Return tAxleConf.a6x2 + Case "6X4" + Return tAxleConf.a6x4 + Case "6X6" + Return tAxleConf.a6x6 + Case "8X2" + Return tAxleConf.a8x2 + Case "8X4" + Return tAxleConf.a8x4 + Case "8X6" + Return tAxleConf.a8x6 + Case Else '"8X8" + Return tAxleConf.a8x8 + End Select + End Function + + Public Function ConvMission(ByVal Mission As tMission) As String + Select Case Mission + Case tMission.LongHaul + Return "LongHaul" + Case tMission.RegionalDelivery + Return "RegionalDelivery" + Case tMission.UrbanDelivery + Return "UrbanDelivery" + Case tMission.MunicipalUtility + Return "MunicipalUtility" + Case tMission.Construction + Return "Construction" + Case tMission.HeavyUrban + Return "HeavyUrban" + Case tMission.Urban + Return "Urban" + Case tMission.Suburban + Return "Suburban" + Case tMission.Interurban + Return "Interurban" + Case tMission.Coach + Return "Coach" + Case Else + Return "not defined" + End Select + End Function + + Public Function ConvMission(ByVal Mission As String) As tMission + Select Case Mission + Case "LongHaul" + Return tMission.LongHaul + Case "RegionalDelivery" + Return tMission.RegionalDelivery + Case "UrbanDelivery" + Return tMission.UrbanDelivery + Case "MunicipalUtility" + Return tMission.MunicipalUtility + Case "Construction" + Return tMission.Construction + Case "HeavyUrban" + Return tMission.HeavyUrban + Case "Urban" + Return tMission.Urban + Case "Suburban" + Return tMission.Suburban + Case "Interurban" + Return tMission.Interurban + Case "Coach" + Return tMission.Coach + Case Else + Return tMission.Undef + End Select + End Function + + + Public Function CdModeConv(ByVal CdMode As tCdMode) As String + Select Case CdMode + Case tCdMode.CdOfBeta + Return "CdOfBeta" + Case tCdMode.CdOfV + Return "CdOfV" + Case Else 'tCdMode.ConstCd0 + Return "Off" + End Select + End Function + + Public Function CdModeConv(ByVal CdMode As String) As tCdMode + Select Case UCase(Trim(CdMode)) + Case "CDOFBETA" + Return tCdMode.CdOfBeta + Case "CDOFV" + Return tCdMode.CdOfV + Case Else '"OFF" + Return tCdMode.ConstCd0 + End Select + End Function + + + Public Function RtTypeConv(ByVal RtType As tRtType) As String + Select Case RtType + Case tRtType.Primary + Return "Primary" + Case tRtType.Secondary + Return "Secondary" + Case Else 'tRtType.None + Return "None" + End Select + End Function + + Public Function RtTypeConv(ByVal RtType As String) As tRtType + Select Case UCase(Trim(RtType)) + Case "PRIMARY" + Return tRtType.Primary + Case "SECONDARY" + Return tRtType.Secondary + Case Else '"NONE" + Return tRtType.None + End Select + End Function #End Region - Public Class cLogFile - - Private LOGstream As System.IO.StreamWriter - - Public Function StartLog() As Boolean - - 'Log start - Try - LOGstream = My.Computer.FileSystem.OpenTextFileWriter(MyAppPath & "LOG.txt", True, FileFormat) - LOGstream.AutoFlush = True - WriteToLog(tMsgID.Normal, "Starting Session " & Now) - WriteToLog(tMsgID.Normal, "VECTO " & VECTOvers) - Catch ex As Exception - Return False - End Try - - Return True + Public Class cLogFile + Private LOGstream As System.IO.StreamWriter - End Function + Public Function StartLog() As Boolean - Public Function SizeCheck() As Boolean - Dim logfDetail As IO.FileInfo - Dim BackUpError As Boolean + 'Log start + Try + LOGstream = My.Computer.FileSystem.OpenTextFileWriter(MyAppPath & "LOG.txt", True, FileFormat) + LOGstream.AutoFlush = True + WriteToLog(tMsgID.Normal, "Starting Session " & Now) + WriteToLog(tMsgID.Normal, "VECTO " & VECTOvers) + Catch ex As Exception + Return False + End Try - 'Start new log if file size limit reached - If IO.File.Exists(MyAppPath & "LOG.txt") Then + Return True + End Function - 'File size check - logfDetail = My.Computer.FileSystem.GetFileInfo(MyAppPath & "LOG.txt") + Public Function SizeCheck() As Boolean + Dim logfDetail As IO.FileInfo + Dim BackUpError As Boolean - 'If Log too large: Delete - If logfDetail.Length / (2 ^ 20) > Cfg.LogSize Then + 'Start new log if file size limit reached + If IO.File.Exists(MyAppPath & "LOG.txt") Then - WriteToLog(tMsgID.Normal, "Starting new logfile") - LOGstream.Close() + 'File size check + logfDetail = My.Computer.FileSystem.GetFileInfo(MyAppPath & "LOG.txt") - BackUpError = False + 'If Log too large: Delete + If logfDetail.Length/(2^20) > Cfg.LogSize Then - Try - If IO.File.Exists(MyAppPath & "LOG_backup.txt") Then IO.File.Delete(MyAppPath & "LOG_backup.txt") - IO.File.Move(MyAppPath & "LOG.txt", MyAppPath & "LOG_backup.txt") - Catch ex As Exception - BackUpError = True - End Try + WriteToLog(tMsgID.Normal, "Starting new logfile") + LOGstream.Close() - If Not StartLog() Then Return False + BackUpError = False - If BackUpError Then - WriteToLog(tMsgID.Err, "Failed to backup logfile! (" & MyAppPath & "LOG_backup.txt)") - Else - WriteToLog(tMsgID.Normal, "Logfile restarted. Old log saved to LOG_backup.txt") - End If + Try + If IO.File.Exists(MyAppPath & "LOG_backup.txt") Then IO.File.Delete(MyAppPath & "LOG_backup.txt") + IO.File.Move(MyAppPath & "LOG.txt", MyAppPath & "LOG_backup.txt") + Catch ex As Exception + BackUpError = True + End Try - End If + If Not StartLog() Then Return False - End If + If BackUpError Then + WriteToLog(tMsgID.Err, "Failed to backup logfile! (" & MyAppPath & "LOG_backup.txt)") + Else + WriteToLog(tMsgID.Normal, "Logfile restarted. Old log saved to LOG_backup.txt") + End If - Return True + End If - End Function + End If - Public Function CloseLog() As Boolean - Try - WriteToLog(tMsgID.Normal, "Closing Session " & Now) - LOGstream.Close() - Catch ex As Exception - Return False - End Try + Return True + End Function - Return True + Public Function CloseLog() As Boolean + Try + WriteToLog(tMsgID.Normal, "Closing Session " & Now) + LOGstream.Close() + Catch ex As Exception + Return False + End Try - End Function + Return True + End Function - Public Function WriteToLog(ByVal MsgType As tMsgID, ByVal Msg As String) As Boolean - Dim MsgTypeStr As String + Public Function WriteToLog(ByVal MsgType As tMsgID, ByVal Msg As String) As Boolean + Dim MsgTypeStr As String - Select Case MsgType - Case tMsgID.Err - MsgTypeStr = "Error" - Case tMsgID.Warn - MsgTypeStr = "Warning" - Case Else - MsgTypeStr = "-" - End Select + Select Case MsgType + Case tMsgID.Err + MsgTypeStr = "Error" + Case tMsgID.Warn + MsgTypeStr = "Warning" + Case Else + MsgTypeStr = "-" + End Select - Try - LOGstream.WriteLine(Now.ToString("yyyy/MM/dd-HH:mm:ss") & vbTab & MsgTypeStr & vbTab & Msg) - Return True - Catch ex As Exception - Return False - End Try - - End Function - - - End Class + Try + LOGstream.WriteLine(Now.ToString("yyyy/MM/dd-HH:mm:ss") & vbTab & MsgTypeStr & vbTab & Msg) + Return True + Catch ex As Exception + Return False + End Try + End Function + End Class #Region "File path functions" - 'When no path is specified, then insert either HomeDir or MainDir Special-folders - Public Function fFileRepl(ByVal file As String, Optional ByVal MainDir As String = "") As String - - Dim ReplPath As String + 'When no path is specified, then insert either HomeDir or MainDir Special-folders + Public Function fFileRepl(ByVal file As String, Optional ByVal MainDir As String = "") As String + + Dim ReplPath As String + + 'Trim Path + file = Trim(file) - 'Trim Path - file = Trim(file) + 'If empty file => Abort + If file = "" Then Return "" - 'If empty file => Abort - If file = "" Then Return "" + 'Replace sKeys + file = Microsoft.VisualBasic.Strings.Replace(file, sKey.DefVehPath & "\", MyAppPath & "Default Vehicles\", 1, - 1, + CompareMethod.Text) + file = Microsoft.VisualBasic.Strings.Replace(file, sKey.HomePath & "\", MyAppPath, 1, - 1, CompareMethod.Text) - 'Replace sKeys - file = Microsoft.VisualBasic.Strings.Replace(file, sKey.DefVehPath & "\", MyAppPath & "Default Vehicles\", 1, -1, CompareMethod.Text) - file = Microsoft.VisualBasic.Strings.Replace(file, sKey.HomePath & "\", MyAppPath, 1, -1, CompareMethod.Text) + 'Replace - Determine folder + If MainDir = "" Then + ReplPath = MyAppPath + Else + ReplPath = MainDir + End If - 'Replace - Determine folder - If MainDir = "" Then - ReplPath = MyAppPath - Else - ReplPath = MainDir - End If + ' "..\" => One folder-level up + Do While ReplPath.Length > 0 AndAlso Left(file, 3) = "..\" + ReplPath = fPathUp(ReplPath) + file = file.Substring(3) + Loop - ' "..\" => One folder-level up - Do While ReplPath.Length > 0 AndAlso Left(file, 3) = "..\" - ReplPath = fPathUp(ReplPath) - file = file.Substring(3) - Loop + 'Supplement Path, if not available + If fPATH(file) = "" Then - 'Supplement Path, if not available - If fPATH(file) = "" Then + Return ReplPath & file - Return ReplPath & file + Else + Return file + End If + End Function - Else - Return file - End If + 'Path one-level-up "C:\temp\ordner1\" >> "C:\temp\" + Private Function fPathUp(ByVal Pfad As String) As String + Dim x As Int16 - End Function + Pfad = Pfad.Substring(0, Pfad.Length - 1) - 'Path one-level-up "C:\temp\ordner1\" >> "C:\temp\" - Private Function fPathUp(ByVal Pfad As String) As String - Dim x As Int16 + x = Pfad.LastIndexOf("\") - Pfad = Pfad.Substring(0, Pfad.Length - 1) + If x = - 1 Then Return "" - x = Pfad.LastIndexOf("\") + Return Pfad.Substring(0, x + 1) + End Function - If x = -1 Then Return "" + 'File name without the path "C:\temp\TEST.txt" >> "TEST.txt" oder "TEST" + Public Function fFILE(ByVal Pfad As String, ByVal MitEndung As Boolean) As String + Dim x As Int16 + x = Pfad.LastIndexOf("\") + 1 + Pfad = Microsoft.VisualBasic.Right(Pfad, Microsoft.VisualBasic.Len(Pfad) - x) + If Not MitEndung Then + x = Pfad.LastIndexOf(".") + If x > 0 Then Pfad = Microsoft.VisualBasic.Left(Pfad, x) + End If + Return Pfad + End Function - Return Pfad.Substring(0, x + 1) + 'Filename without extension "C:\temp\TEST.txt" >> "C:\temp\TEST" + Public Function fFileWoExt(ByVal Path As String) As String + Return fPATH(Path) & fFILE(Path, False) + End Function - End Function + 'Filename without path if Path = WorkDir or MainDir + Public Function fFileWoDir(ByVal file As String, Optional ByVal MainDir As String = "") As String + Dim path As String - 'File name without the path "C:\temp\TEST.txt" >> "TEST.txt" oder "TEST" - Public Function fFILE(ByVal Pfad As String, ByVal MitEndung As Boolean) As String - Dim x As Int16 - x = Pfad.LastIndexOf("\") + 1 - Pfad = Microsoft.VisualBasic.Right(Pfad, Microsoft.VisualBasic.Len(Pfad) - x) - If Not MitEndung Then - x = Pfad.LastIndexOf(".") - If x > 0 Then Pfad = Microsoft.VisualBasic.Left(Pfad, x) - End If - Return Pfad - End Function + If MainDir = "" Then + path = MyAppPath + Else + path = MainDir + End If - 'Filename without extension "C:\temp\TEST.txt" >> "C:\temp\TEST" - Public Function fFileWoExt(ByVal Path As String) As String - Return fPATH(Path) & fFILE(Path, False) - End Function + If UCase(fPATH(file)) = UCase(path) Then file = fFILE(file, True) - 'Filename without path if Path = WorkDir or MainDir - Public Function fFileWoDir(ByVal file As String, Optional ByVal MainDir As String = "") As String - Dim path As String + Return file + End Function - If MainDir = "" Then - path = MyAppPath - Else - path = MainDir - End If + 'Path alone "C:\temp\TEST.txt" >> "C:\temp\" + ' "TEST.txt" >> "" + Public Function fPATH(ByVal Pfad As String) As String + Dim x As Int16 + If Pfad Is Nothing OrElse Pfad.Length < 3 OrElse Pfad.Substring(1, 2) <> ":\" Then Return "" + x = Pfad.LastIndexOf("\") + Return Microsoft.VisualBasic.Left(Pfad, x + 1) + End Function - If UCase(fPATH(file)) = UCase(path) Then file = fFILE(file, True) - - Return file - - End Function - - 'Path alone "C:\temp\TEST.txt" >> "C:\temp\" - ' "TEST.txt" >> "" - Public Function fPATH(ByVal Pfad As String) As String - Dim x As Int16 - If Pfad Is Nothing OrElse Pfad.Length < 3 OrElse Pfad.Substring(1, 2) <> ":\" Then Return "" - x = Pfad.LastIndexOf("\") - Return Microsoft.VisualBasic.Left(Pfad, x + 1) - End Function - - 'Extension alone "C:\temp\TEST.txt" >> ".txt" - Public Function fEXT(ByVal Pfad As String) As String - Dim x As Int16 - x = Pfad.LastIndexOf(".") - If x = -1 Then - Return "" - Else - Return Microsoft.VisualBasic.Right(Pfad, Microsoft.VisualBasic.Len(Pfad) - x) - End If - End Function + 'Extension alone "C:\temp\TEST.txt" >> ".txt" + Public Function fEXT(ByVal Pfad As String) As String + Dim x As Int16 + x = Pfad.LastIndexOf(".") + If x = - 1 Then + Return "" + Else + Return Microsoft.VisualBasic.Right(Pfad, Microsoft.VisualBasic.Len(Pfad) - x) + End If + End Function #End Region - - End Module Public Class csKey - Public DRI As csKeyDRI - Public AUX As csKeyAux - - Public HomePath As String = "<HOME>" - Public JobPath As String = "<JOBPATH>" - Public DefVehPath As String = "<VEHDIR>" - Public NoFile As String = "<NOFILE>" - Public EmptyString As String = "<EMPTYSTRING>" - Public Break As String = "<//>" - - Public Normed As String = "NORM" - - Public PauxSply As String = "<AUX_" - - Public EngDrag As String = "<DRAG>" - - Public Sub New() - DRI = New csKeyDRI - AUX = New csKeyAux - End Sub - - Public Class csKeyDRI - Public t As String = "<T>" - Public V As String = "<V>" - Public Grad As String = "<GRAD>" - Public Alt As String = "<ALT>" - Public Gears As String = "<GEAR>" - Public nU As String = "<N>" - Public Pe As String = "<PE>" - Public Padd As String = "<PADD>" - Public VairVres As String = "<VAIR_RES>" - Public VairBeta As String = "<VAIR_BETA>" - Public s As String = "<S>" - Public StopTime As String = "<STOP>" - Public Torque As String = "<ME>" - Public Pwheel As String = "<PWHEEL>" - End Class - - Public Class csKeyAux - Public Fan As String = "FAN" - Public SteerPump As String = "STP" - Public HVAC As String = "AC" - Public ElecSys As String = "ES" - Public PneumSys As String = "PS" - End Class - - + Public DRI As csKeyDRI + Public AUX As csKeyAux + + Public HomePath As String = "<HOME>" + Public JobPath As String = "<JOBPATH>" + Public DefVehPath As String = "<VEHDIR>" + Public NoFile As String = "<NOFILE>" + Public EmptyString As String = "<EMPTYSTRING>" + Public Break As String = "<//>" + + Public Normed As String = "NORM" + + Public PauxSply As String = "<AUX_" + + Public EngDrag As String = "<DRAG>" + + Public Sub New() + DRI = New csKeyDRI + AUX = New csKeyAux + End Sub + + Public Class csKeyDRI + Public t As String = "<T>" + Public V As String = "<V>" + Public Grad As String = "<GRAD>" + Public Alt As String = "<ALT>" + Public Gears As String = "<GEAR>" + Public nU As String = "<N>" + Public Pe As String = "<PE>" + Public Padd As String = "<PADD>" + Public VairVres As String = "<VAIR_RES>" + Public VairBeta As String = "<VAIR_BETA>" + Public s As String = "<S>" + Public StopTime As String = "<STOP>" + Public Torque As String = "<ME>" + Public Pwheel As String = "<PWHEEL>" + End Class + + Public Class csKeyAux + Public Fan As String = "FAN" + Public SteerPump As String = "STP" + Public HVAC As String = "AC" + Public ElecSys As String = "ES" + Public PneumSys As String = "PS" + End Class End Class - diff --git a/VECTO/cDEV.vb b/VECTO/cDEV.vb index c480346dcbfc4b24225f559f637fb55b1c5f4f3e..94e93d03daf627d94de14d2322f2440b1911583b 100644 --- a/VECTO/cDEV.vb +++ b/VECTO/cDEV.vb @@ -11,531 +11,567 @@ Imports System.Collections.Generic Public Class cDEV + Public Enabled As Boolean + + Private MyOptions As Dictionary(Of String, cDEVoption) + Private iOptionsDim As Integer + + Public TCiterPrec As Single + Public TClimit As Single + + + Public AdvFormat As Boolean + + + '************************************************************************************************************** + '************************************************************************************************************** + '********************************* Instructions for integrating new DEV-Options ********************************* + + '1. Entry in "Sub New()" + ' + ' I) Define new cDEVoption Object with "Conf0 = New cDEVoption(ConfigType, Description, SaveInConfg, Enabled)" + ' + ' ConfigType <tDEVconfType> ...Type definition: Boolean, Integer, Single, String, menu selection (Integer) or Reference to Function + ' Description <String> ...Description of the parameters + ' SaveInConfg <Boolean> ...Whether you want to save settings for next VECTO-startup + ' Enabled <Boolean> ...Whether settings in the DEV-tab can be changed + ' + ' II) default value definition. Distinguish which ConfigType to use: + ' + ' a) ConfigType = tBoolean: + ' + ' Conf0.BoolVal = ... <Boolean> + ' + ' b) ConfigType = tSingleVal: + ' + ' Conf0.SingleVal = ... <Single> + ' + ' c) ConfigType = tStringVal: + ' + ' Conf0.StringVal = ... <String> + ' + ' d) ConfigType = tIntVal: + ' + ' Conf0.IntVal = ... <Integer> + ' + ' e) ConfigType = tAction: + ' + ' Conf0.ActionDelegate = New cDEVoption.dActionDelegate(AddressOf NameDerFunktion) + ' + ' Where NameDerFunktion is a function to call returning a <String>: "Public Function NameDerFunktion() As String" + ' + ' f) ConfigType = tContMenIndex: + ' + ' Definition of Available selection options as <String>: + ' + ' Conf0.AddMode ("select 1") + ' Conf0.AddMode ("Option 2") + ' and so forth. + ' + ' Default value definition: First choice = 0 + ' + ' Conf0.ModeIndex = ... <Integer> + + + '************************************************************************************************************** + '************************************************************************************************************** + + + Public Sub New() + + Enabled = False + MyOptions = New Dictionary(Of String, cDEVoption) + + '***************************************************************************************** + '***************************************************************************************** + '**************************** START: Parameters Configuration '**************************** + + Dim Conf0 As cDEVoption + + 'Conf0 = New cDEVoption(tDEVconfType.tBoolean, "Kennfelderstellung mit Median") + 'Conf0.BoolVal = False + 'MyOptions.Add("KF-Median", Conf0) + + 'Conf0 = New cDEVoption(tDEVconfType.tAction, "Action Test") + 'Conf0.ActionDelegate = New cDEVoption.dActionDelegate(AddressOf Me.TestFunction) + 'MyOptions.Add("Action_Test", Conf0) + + 'Conf0 = New cDEVoption(tDEVconfType.tIntVal, "Integer Test", True, False) + 'Conf0.IntVal = 666 + 'MyOptions.Add("Integer_Test", Conf0) + + 'Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "Single Test") + 'Conf0.SingleVal = 1.2345 + 'MyOptions.Add("Single_Test", Conf0) + + 'Conf0 = New cDEVoption(tDEVconfType.tStringVal, "String Test", False) + 'Conf0.StringVal = "Hallo DU!" + 'MyOptions.Add("String_Test", Conf0) + + 'Conf0 = New cDEVoption(tDEVconfType.tSelection, "Menu Test", False, False) + 'Conf0.AddMode("Mode 0") + 'Conf0.AddMode("Hugo") + 'Conf0.AddMode("Charlie") + 'Conf0.AddMode("Mode 3") + 'Conf0.ModeIndex = 3 + 'MyOptions.Add("Menu_Test", Conf0) + + + Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "TC iteration: target precision for torque ratio") + Conf0.SingleVal = 0.001 + MyOptions.Add("TCiterPrec", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tBoolean, "Advanced output files format") + Conf0.BoolVal = False + MyOptions.Add("AdvFormat", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tBoolean, + "Limit engine speed in torque converter operation if Pe(acc_min) < Pe_max") + Conf0.BoolVal = True + MyOptions.Add("TClimitOn", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "Max. engine speed for torque converter operation [1/min]") + Conf0.SingleVal = 1600 + MyOptions.Add("TClimit", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tSelection, + "Acceleration for AT Up-Shift power condition") + Conf0.AddMode("acc_target (old)") + Conf0.AddMode("acc_min (new)") + Conf0.ModeIndex = 1 + MyOptions.Add("TCshiftMode", Conf0) - Public Enabled As Boolean - - Private MyOptions As Dictionary(Of String, cDEVoption) - Private iOptionsDim As Integer - - Public TCiterPrec As Single - Public TClimit As Single - - Public AdvFormat As Boolean - - - '************************************************************************************************************** - '************************************************************************************************************** - '********************************* Instructions for integrating new DEV-Options ********************************* - - '1. Entry in "Sub New()" - ' - ' I) Define new cDEVoption Object with "Conf0 = New cDEVoption(ConfigType, Description, SaveInConfg, Enabled)" - ' - ' ConfigType <tDEVconfType> ...Type definition: Boolean, Integer, Single, String, menu selection (Integer) or Reference to Function - ' Description <String> ...Description of the parameters - ' SaveInConfg <Boolean> ...Whether you want to save settings for next VECTO-startup - ' Enabled <Boolean> ...Whether settings in the DEV-tab can be changed - ' - ' II) default value definition. Distinguish which ConfigType to use: - ' - ' a) ConfigType = tBoolean: - ' - ' Conf0.BoolVal = ... <Boolean> - ' - ' b) ConfigType = tSingleVal: - ' - ' Conf0.SingleVal = ... <Single> - ' - ' c) ConfigType = tStringVal: - ' - ' Conf0.StringVal = ... <String> - ' - ' d) ConfigType = tIntVal: - ' - ' Conf0.IntVal = ... <Integer> - ' - ' e) ConfigType = tAction: - ' - ' Conf0.ActionDelegate = New cDEVoption.dActionDelegate(AddressOf NameDerFunktion) - ' - ' Where NameDerFunktion is a function to call returning a <String>: "Public Function NameDerFunktion() As String" - ' - ' f) ConfigType = tContMenIndex: - ' - ' Definition of Available selection options as <String>: - ' - ' Conf0.AddMode ("select 1") - ' Conf0.AddMode ("Option 2") - ' and so forth. - ' - ' Default value definition: First choice = 0 - ' - ' Conf0.ModeIndex = ... <Integer> + Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "Minimum acceleration (acc_min) for TC rpm limit and AT-Shift [m/s²]") + Conf0.SingleVal = 0.02 + MyOptions.Add("TCaccMin", Conf0) - '************************************************************************************************************** - '************************************************************************************************************** + '**************************** END: Parameters Configuration '***************************** + '***************************************************************************************** + '***************************************************************************************** + iOptionsDim = MyOptions.Count - 1 + End Sub - Public Sub New() + 'Initialize the actual Config-Parameters from MyConfigs list + Public Sub SetOptions() + TCiterPrec = MyOptions("TCiterPrec").SingleVal + AdvFormat = MyOptions("AdvFormat").BoolVal + TClimit = MyOptions("TClimit").SingleVal + End Sub - Enabled = False - MyOptions = New Dictionary(Of String, cDEVoption) + 'Demo for Delegate Function + Public Function TestFunction() As String + Return "OK...?" + End Function - '***************************************************************************************** - '***************************************************************************************** - '**************************** START: Parameters Configuration '**************************** + Public sub UpdateDevConfigs + Dim lv0 As ListViewItem - Dim Conf0 As cDEVoption + EnabledOptCheck() - 'Conf0 = New cDEVoption(tDEVconfType.tBoolean, "Kennfelderstellung mit Median") - 'Conf0.BoolVal = False - 'MyOptions.Add("KF-Median", Conf0) + for each lv0 In F_MAINForm.LvDEVoptions.Items + lv0.SubItems(3).Text = DEV.Options(lv0.Tag).ValText + If DEV.Options(lv0.Tag).Enabled Then + lv0.ForeColor = Color.Black + Else + lv0.ForeColor = Color.DarkGray + End If + Next + End Sub - 'Conf0 = New cDEVoption(tDEVconfType.tAction, "Action Test") - 'Conf0.ActionDelegate = New cDEVoption.dActionDelegate(AddressOf Me.TestFunction) - 'MyOptions.Add("Action_Test", Conf0) + Private sub EnabledOptCheck + MyOptions("TClimit").EnabledOpt = MyOptions("TClimitOn").BoolVal + MyOptions("TCaccMin").EnabledOpt = MyOptions("TClimitOn").BoolVal Or MyOptions("TCshiftMode").ModeIndex = 1 + End Sub - 'Conf0 = New cDEVoption(tDEVconfType.tIntVal, "Integer Test", True, False) - 'Conf0.IntVal = 666 - 'MyOptions.Add("Integer_Test", Conf0) - 'Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "Single Test") - 'Conf0.SingleVal = 1.2345 - 'MyOptions.Add("Single_Test", Conf0) + Public Function DEVinfo() As String + Dim s As New System.Text.StringBuilder + Dim Conf0 As KeyValuePair(Of String, cDEVoption) - 'Conf0 = New cDEVoption(tDEVconfType.tStringVal, "String Test", False) - 'Conf0.StringVal = "Hallo DU!" - 'MyOptions.Add("String_Test", Conf0) + For Each Conf0 In MyOptions - 'Conf0 = New cDEVoption(tDEVconfType.tSelection, "Menu Test", False, False) - 'Conf0.AddMode("Mode 0") - 'Conf0.AddMode("Hugo") - 'Conf0.AddMode("Charlie") - 'Conf0.AddMode("Mode 3") - 'Conf0.ModeIndex = 3 - 'MyOptions.Add("Menu_Test", Conf0) + If Conf0.Value.ConfigType <> tDEVconfType.tAction Then + s.Append(Conf0.Key & " <" & Conf0.Value.TypeString & "> (" & Conf0.Value.Description & ")") + If Conf0.Value.ConfigType = tDEVconfType.tSelection Then + s.AppendLine("= " & Conf0.Value.ValToString & " (" & Conf0.Value.Mode & ")") + Else + s.AppendLine("= " & Conf0.Value.ValToString) + End If - Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "TC iteration: target precision for torque ratio") - Conf0.SingleVal = 0.001 - MyOptions.Add("TCiterPrec", Conf0) + End If - Conf0 = New cDEVoption(tDEVconfType.tBoolean, "Detailed output files format") - Conf0.BoolVal = False - MyOptions.Add("AdvFormat", Conf0) + Next + Return s.ToString + End Function - Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "Max. engine speed for torque converter operation") - Conf0.SingleVal = 1600 - MyOptions.Add("TClimit", Conf0) - '**************************** END: Parameters Configuration '***************************** - '***************************************************************************************** - '***************************************************************************************** + Public Function LoadFromFile() As Boolean + Dim file As cFile_V3 + Dim ConfigFromFile As Dictionary(Of String, String) + Dim Key As String + Dim Val As String + Dim KV As KeyValuePair(Of String, String) - iOptionsDim = MyOptions.Count - 1 + file = New cFile_V3 - End Sub + If Not file.OpenRead(MyConfPath & "DEVconfig.txt") Then Return False - 'Initialize the actual Config-Parameters from MyConfigs list - Public Sub SetOptions() - TCiterPrec = MyOptions("TCiterPrec").SingleVal - AdvFormat = MyOptions("AdvFormat").BoolVal - TClimit = MyOptions("TClimit").SingleVal - End Sub + ConfigFromFile = New Dictionary(Of String, String) - 'Demo for Delegate Function - Public Function TestFunction() As String - Return "OK...?" - End Function + Do While Not file.EndOfFile - Public Function DEVinfo() As String - Dim s As New System.Text.StringBuilder - Dim Conf0 As KeyValuePair(Of String, cDEVoption) + Key = file.ReadLine(0) + Val = file.ReadLine(0) - For Each Conf0 In MyOptions + If ConfigFromFile.ContainsKey(Key) Then + GUImsg(tMsgID.Err, "Multiple definitions of DEV Config '" & Key & "' !") + Return False + End If - If Conf0.Value.ConfigType <> tDEVconfType.tAction Then + ConfigFromFile.Add(Key, Val) - s.Append(Conf0.Key & " <" & Conf0.Value.TypeString & "> (" & Conf0.Value.Description & ")") + Loop - If Conf0.Value.ConfigType = tDEVconfType.tSelection Then - s.AppendLine("= " & Conf0.Value.ValToString & " (" & Conf0.Value.Mode & ")") - Else - s.AppendLine("= " & Conf0.Value.ValToString) - End If + file.Close() - End If + For Each KV In ConfigFromFile + If Not MyOptions.ContainsKey(KV.Key) Then + GUImsg(tMsgID.Warn, "DEV Config '" & KV.Key & "' not defined!") + Else + If MyOptions(KV.Key).SaveInFile Then MyOptions(KV.Key).StringToVal(KV.Value) + End If + Next - Next + UpdateDevConfigs - Return s.ToString + Return True + End Function - End Function + Public Function SaveToFile() As Boolean + Dim file As cFile_V3 + Dim Conf0 As KeyValuePair(Of String, cDEVoption) - Public Function LoadFromFile() As Boolean - Dim file As cFile_V3 - Dim ConfigFromFile As Dictionary(Of String, String) - Dim Key As String - Dim Val As String - Dim KV As KeyValuePair(Of String, String) + file = New cFile_V3 - file = New cFile_V3 + If Not file.OpenWrite(MyConfPath & "DEVconfig.txt") Then Return False - If Not file.OpenRead(MyConfPath & "DEVconfig.txt") Then Return False + For Each Conf0 In MyOptions - ConfigFromFile = New Dictionary(Of String, String) + If Conf0.Value.SaveInFile And Conf0.Value.ConfigType <> tDEVconfType.tAction Then - Do While Not file.EndOfFile + If Conf0.Value.ConfigType = tDEVconfType.tSelection Then + file.WriteLine("# " & Conf0.Value.Description & " <" & Conf0.Value.TypeString & "> (" & Conf0.Value.Mode & ")") + Else + file.WriteLine("# " & Conf0.Value.Description & " <" & Conf0.Value.TypeString & ">") + End If - Key = file.ReadLine(0) - Val = file.ReadLine(0) + file.WriteLine(Conf0.Key) + file.WriteLine(fStringOrDummySet(Conf0.Value.ValToString)) - If ConfigFromFile.ContainsKey(Key) Then - GUImsg(tMsgID.Err, "Multiple definitions of DEV Config '" & Key & "' !") - Return False - End If + End If - ConfigFromFile.Add(Key, Val) + Next - Loop + file.Close() - file.Close() + Return True + End Function - For Each KV In ConfigFromFile - If Not MyOptions.ContainsKey(KV.Key) Then - GUImsg(tMsgID.Warn, "DEV Config '" & KV.Key & "' not defined!") - Else - If MyOptions(KV.Key).SaveInFile Then MyOptions(KV.Key).StringToVal(KV.Value) - End If - Next - Return True + Public ReadOnly Property Options As Dictionary(Of String, cDEVoption) + Get + Return MyOptions + End Get + End Property - End Function + Public ReadOnly Property OptionsDim As Integer + Get + Return iOptionsDim + End Get + End Property - Public Function SaveToFile() As Boolean - Dim file As cFile_V3 - Dim Conf0 As KeyValuePair(Of String, cDEVoption) - - file = New cFile_V3 - - If Not file.OpenWrite(MyConfPath & "DEVconfig.txt") Then Return False - - For Each Conf0 In MyOptions - - If Conf0.Value.SaveInFile And Conf0.Value.ConfigType <> tDEVconfType.tAction Then - - If Conf0.Value.ConfigType = tDEVconfType.tSelection Then - file.WriteLine("# " & Conf0.Value.Description & " <" & Conf0.Value.TypeString & "> (" & Conf0.Value.Mode & ")") - Else - file.WriteLine("# " & Conf0.Value.Description & " <" & Conf0.Value.TypeString & ">") - End If - - file.WriteLine(Conf0.Key) - file.WriteLine(fStringOrDummySet(Conf0.Value.ValToString)) - - End If - - Next - - file.Close() - - Return True - - End Function - - Public ReadOnly Property Options As Dictionary(Of String, cDEVoption) - Get - Return MyOptions - End Get - End Property - - Public ReadOnly Property OptionsDim As Integer - Get - Return iOptionsDim - End Get - End Property - - Protected Overrides Sub Finalize() - MyBase.Finalize() - End Sub + Protected Overrides Sub Finalize() + MyBase.Finalize() + End Sub End Class Public Class cDEVoption - Private MyConfType As tDEVconfType - Private sTypeString As String - Private MyDescr As String - Private sModes As List(Of String) - Private iModesDim As Integer - Private bEnabled As Boolean - Private bSaveInFile As Boolean - - Private sValText As String - Private iIntVal As Integer - Private sSingleVal As Single - Private bBoolVal As Boolean - Private sStringVal As String - Private iModeIndex As Integer - - Private sValTextDef As String - Private sValTextDefdef As Boolean - - Public Delegate Function dActionDelegate() As String - Public ActionDelegate As dActionDelegate - - Public Sub New(ByVal ConfigType As tDEVconfType, ByVal Description As String, Optional SaveInConfg As Boolean = True, Optional ByVal Enabled As Boolean = True) - MyConfType = ConfigType - MyDescr = Description - bEnabled = Enabled - bSaveInFile = SaveInConfg - - Select Case MyConfType - Case tDEVconfType.tAction - sTypeString = "Subroutine" - Case tDEVconfType.tBoolean - sTypeString = "Boolean" - Case tDEVconfType.tSelection - sTypeString = "Selection (Int)" - Case tDEVconfType.tIntVal - sTypeString = "Integer" - Case tDEVconfType.tSingleVal - sTypeString = "Single" - Case tDEVconfType.tStringVal - sTypeString = "String" - End Select - - sModes = New List(Of String) - iModesDim = -1 - - iIntVal = 0 - sSingleVal = 0.0F - bBoolVal = False - sStringVal = "" - iModeIndex = -1 - - If MyConfType = tDEVconfType.tAction Then - sValText = "" - Else - sValText = "<undefined>" - End If - - sValTextDef = "" - sValTextDefdef = False - - End Sub - - Private Sub DefValTextDef() - sValTextDefdef = True - sValTextDef = sValText - End Sub - - Public Sub DoAction() - sValText = ActionDelegate.Invoke() - End Sub - - Public Sub AddMode(ByVal Txt As String) - sModes.Add(Txt) - iModesDim += 1 - End Sub - - Public Function StringToVal(ByVal StrExpr As String) As Boolean - - Try - Select Case MyConfType - Case tDEVconfType.tAction - '??? Darf nicht sein |@@| May not be - Return False - - Case tDEVconfType.tBoolean - BoolVal = CBool(StrExpr) - - Case tDEVconfType.tSelection - If CInt(StrExpr) > iModesDim Then - Return False - Else - ModeIndex = CInt(StrExpr) - End If - Case tDEVconfType.tIntVal - IntVal = CInt(StrExpr) - - Case tDEVconfType.tSingleVal - SingleVal = CSng(StrExpr) - - Case tDEVconfType.tStringVal - StringVal = fStringOrDummyGet(StrExpr) - - End Select - - Return True - - Catch ex As Exception - - Return False - - End Try - - End Function - - Public Function ValToString() As String - - Select Case MyConfType - Case tDEVconfType.tBoolean - Return CStr(Math.Abs(CDec(bBoolVal))) - - Case tDEVconfType.tSelection - Return iModeIndex.ToString - - Case tDEVconfType.tIntVal - Return IntVal.ToString - - Case tDEVconfType.tSingleVal - Return SingleVal.ToString - - Case Else ' tDEVconfType.tStringVal (tDEVconfType.tAction ...darf nicht sein) - Return StringVal - - End Select - - End Function - - Public ReadOnly Property ValText As String - Get - Return sValText - End Get - End Property - - Public ReadOnly Property ValTextDef As String - Get - Return sValTextDef - End Get - End Property - - Public Property IntVal As Integer - Get - Return iIntVal - End Get - Set(value As Integer) - iIntVal = value - sValText = iIntVal.ToString - If Not sValTextDefdef Then DefValTextDef() - End Set - End Property - - Public Property SingleVal As Single - Get - Return sSingleVal - End Get - Set(value As Single) - sSingleVal = value - sValText = sSingleVal.ToString - If Not sValTextDefdef Then DefValTextDef() - End Set - End Property - - Public Property BoolVal As Boolean - Get - Return bBoolVal - End Get - Set(value As Boolean) - bBoolVal = value - If bBoolVal Then - sValText = "True" - Else - sValText = "False" - End If - If Not sValTextDefdef Then DefValTextDef() - End Set - End Property - - Public Property StringVal As String - Get - Return sStringVal - End Get - Set(value As String) - sStringVal = value - sValText = ChrW(34) & sStringVal & ChrW(34) - If Not sValTextDefdef Then DefValTextDef() - End Set - End Property - - Public Property ModeIndex As Integer - Get - Return iModeIndex - End Get - Set(value As Integer) - iModeIndex = value - sValText = "(" & iModeIndex & ") " & sModes(iModeIndex) - If Not sValTextDefdef Then DefValTextDef() - End Set - End Property - - Public ReadOnly Property Modes As List(Of String) - Get - Return sModes - End Get - End Property - - Public ReadOnly Property Mode As String - Get - If iModeIndex = -1 Then - Return "<undefined>" - Else - Return sModes(iModeIndex) - End If - End Get - End Property - - Public ReadOnly Property ModesDim As Integer - Get - Return iModesDim - End Get - End Property - - Public ReadOnly Property Description As String - Get - Return MyDescr - End Get - End Property - - Public ReadOnly Property ConfigType As tDEVconfType - Get - Return MyConfType - End Get - End Property - - Public ReadOnly Property TypeString As String - Get - Return sTypeString - End Get - End Property - - Public ReadOnly Property Enabled As Boolean - Get - Return bEnabled - End Get - End Property - - Public ReadOnly Property SaveInFile As Boolean - Get - Return bSaveInFile - End Get - End Property - + Private MyConfType As tDEVconfType + Private sTypeString As String + Private MyDescr As String + Private sModes As List(Of String) + Private iModesDim As Integer + Private bEnabled As Boolean + Private bSaveInFile As Boolean + + Private sValText As String + Private iIntVal As Integer + Private sSingleVal As Single + Private bBoolVal As Boolean + Private sStringVal As String + Private iModeIndex As Integer + + Private sValTextDef As String + Private sValTextDefdef As Boolean + + Public EnabledOpt As Boolean + + Public Delegate Function dActionDelegate() As String + + Public ActionDelegate As dActionDelegate + + Public Sub New(ByVal ConfigType As tDEVconfType, ByVal Description As String, Optional SaveInConfg As Boolean = True, + Optional ByVal Enabled As Boolean = True) + MyConfType = ConfigType + MyDescr = Description + bEnabled = Enabled + bSaveInFile = SaveInConfg + EnabledOpt = True + + Select Case MyConfType + Case tDEVconfType.tAction + sTypeString = "Subroutine" + Case tDEVconfType.tBoolean + sTypeString = "Boolean" + Case tDEVconfType.tSelection + sTypeString = "Selection (Int)" + Case tDEVconfType.tIntVal + sTypeString = "Integer" + Case tDEVconfType.tSingleVal + sTypeString = "Single" + Case tDEVconfType.tStringVal + sTypeString = "String" + End Select + + sModes = New List(Of String) + iModesDim = - 1 + + iIntVal = 0 + sSingleVal = 0.0F + bBoolVal = False + sStringVal = "" + iModeIndex = - 1 + + If MyConfType = tDEVconfType.tAction Then + sValText = "" + Else + sValText = "<undefined>" + End If + + sValTextDef = "" + sValTextDefdef = False + End Sub + + Private Sub DefValTextDef() + sValTextDefdef = True + sValTextDef = sValText + End Sub + + Public Sub DoAction() + sValText = ActionDelegate.Invoke() + End Sub + + Public Sub AddMode(ByVal Txt As String) + sModes.Add(Txt) + iModesDim += 1 + End Sub + + Public Function StringToVal(ByVal StrExpr As String) As Boolean + + Try + Select Case MyConfType + Case tDEVconfType.tAction + '??? Darf nicht sein |@@| May not be + Return False + + Case tDEVconfType.tBoolean + BoolVal = CBool(StrExpr) + + Case tDEVconfType.tSelection + If CInt(StrExpr) > iModesDim Then + Return False + Else + ModeIndex = CInt(StrExpr) + End If + Case tDEVconfType.tIntVal + IntVal = CInt(StrExpr) + + Case tDEVconfType.tSingleVal + SingleVal = CSng(StrExpr) + + Case tDEVconfType.tStringVal + StringVal = fStringOrDummyGet(StrExpr) + + End Select + + Return True + + Catch ex As Exception + + Return False + + End Try + End Function + + Public Function ValToString() As String + + Select Case MyConfType + Case tDEVconfType.tBoolean + Return CStr(Math.Abs(CDec(bBoolVal))) + + Case tDEVconfType.tSelection + Return iModeIndex.ToString + + Case tDEVconfType.tIntVal + Return IntVal.ToString + + Case tDEVconfType.tSingleVal + Return SingleVal.ToString + + Case Else ' tDEVconfType.tStringVal (tDEVconfType.tAction ...darf nicht sein) + Return StringVal + + End Select + End Function + + Public ReadOnly Property ValText As String + Get + Return sValText + End Get + End Property + + Public ReadOnly Property ValTextDef As String + Get + Return sValTextDef + End Get + End Property + + Public Property IntVal As Integer + Get + Return iIntVal + End Get + Set(value As Integer) + iIntVal = value + sValText = iIntVal.ToString + If Not sValTextDefdef Then DefValTextDef() + End Set + End Property + + Public Property SingleVal As Single + Get + Return sSingleVal + End Get + Set(value As Single) + sSingleVal = value + sValText = sSingleVal.ToString + If Not sValTextDefdef Then DefValTextDef() + End Set + End Property + + Public Property BoolVal As Boolean + Get + Return bBoolVal + End Get + Set(value As Boolean) + bBoolVal = value + If bBoolVal Then + sValText = "True" + Else + sValText = "False" + End If + If Not sValTextDefdef Then DefValTextDef() + End Set + End Property + + Public Property StringVal As String + Get + Return sStringVal + End Get + Set(value As String) + sStringVal = value + sValText = ChrW(34) & sStringVal & ChrW(34) + If Not sValTextDefdef Then DefValTextDef() + End Set + End Property + + Public Property ModeIndex As Integer + Get + Return iModeIndex + End Get + Set(value As Integer) + iModeIndex = value + sValText = "(" & iModeIndex & ") " & sModes(iModeIndex) + If Not sValTextDefdef Then DefValTextDef() + End Set + End Property + + Public ReadOnly Property Modes As List(Of String) + Get + Return sModes + End Get + End Property + + Public ReadOnly Property Mode As String + Get + If iModeIndex = - 1 Then + Return "<undefined>" + Else + Return sModes(iModeIndex) + End If + End Get + End Property + + Public ReadOnly Property ModesDim As Integer + Get + Return iModesDim + End Get + End Property + + Public ReadOnly Property Description As String + Get + Return MyDescr + End Get + End Property + + Public ReadOnly Property ConfigType As tDEVconfType + Get + Return MyConfType + End Get + End Property + + Public ReadOnly Property TypeString As String + Get + Return sTypeString + End Get + End Property + + Public ReadOnly Property Enabled As Boolean + Get + Return (bEnabled And EnabledOpt) + End Get + End Property + + Public ReadOnly Property SaveInFile As Boolean + Get + Return bSaveInFile + End Get + End Property End Class Public Enum tDEVconfType - tBoolean - tSingleVal - tStringVal - tIntVal - tAction - tSelection + tBoolean + tSingleVal + tStringVal + tIntVal + tAction + tSelection End Enum -