From d5bca1b472bd8c494fd8e07dfbf765828029243d Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Mon, 14 Oct 2019 14:15:35 +0200 Subject: [PATCH] remove legacy files from vecto-gui before refactoring (fb_global, file/path handling methods, ...) --- VECTO/BusAuxiliaries/UI/FB_Dialog.designer.vb | 446 -------- VECTO/BusAuxiliaries/UI/FB_Dialog.resx | 156 --- VECTO/BusAuxiliaries/UI/FB_Dialog.vb | 960 ------------------ .../BusAuxiliaries/UI/FB_FavDlog.designer.vb | 128 --- VECTO/BusAuxiliaries/UI/FB_FavDlog.resx | 120 --- VECTO/BusAuxiliaries/UI/FB_FavDlog.vb | 62 -- VECTO/BusAuxiliaries/UI/FB_Global.vb | 182 ---- VECTO/BusAuxiliaries/UI/VECTO_Types.vb | 22 - VECTO/BusAuxiliaries/UI/cFileBrowser.vb | 163 --- VECTO/BusAuxiliaries/UI/frmAuxiliaryConfig.vb | 44 +- VECTO/BusAuxiliaries/UI/frmHVACTool.vb | 15 +- VECTO/VECTO.vbproj | 22 - 12 files changed, 30 insertions(+), 2290 deletions(-) delete mode 100644 VECTO/BusAuxiliaries/UI/FB_Dialog.designer.vb delete mode 100644 VECTO/BusAuxiliaries/UI/FB_Dialog.resx delete mode 100644 VECTO/BusAuxiliaries/UI/FB_Dialog.vb delete mode 100644 VECTO/BusAuxiliaries/UI/FB_FavDlog.designer.vb delete mode 100644 VECTO/BusAuxiliaries/UI/FB_FavDlog.resx delete mode 100644 VECTO/BusAuxiliaries/UI/FB_FavDlog.vb delete mode 100644 VECTO/BusAuxiliaries/UI/FB_Global.vb delete mode 100644 VECTO/BusAuxiliaries/UI/VECTO_Types.vb delete mode 100644 VECTO/BusAuxiliaries/UI/cFileBrowser.vb diff --git a/VECTO/BusAuxiliaries/UI/FB_Dialog.designer.vb b/VECTO/BusAuxiliaries/UI/FB_Dialog.designer.vb deleted file mode 100644 index 983b12377d..0000000000 --- a/VECTO/BusAuxiliaries/UI/FB_Dialog.designer.vb +++ /dev/null @@ -1,446 +0,0 @@ -' Copyright 2017 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. -<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ -Partial Class FB_Dialog - Inherits System.Windows.Forms.Form - - 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. - <System.Diagnostics.DebuggerNonUserCode()> _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Wird vom Windows Form-Designer benötigt. - Private components As System.ComponentModel.IContainer - - 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. - 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. - '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(FB_Dialog)) - Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() - Me.Label1 = New System.Windows.Forms.Label() - Me.ButtonNewDir = New System.Windows.Forms.Button() - Me.ButtonDesktop = New System.Windows.Forms.Button() - Me.ButtonHisFolder = New System.Windows.Forms.Button() - Me.ButtonFolderBack = New System.Windows.Forms.Button() - Me.TextBoxSearchFolder = New System.Windows.Forms.TextBox() - Me.ListViewFolder = New System.Windows.Forms.ListView() - Me.ColumnHeader3 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components) - Me.ComboBoxDrive = New System.Windows.Forms.ComboBox() - Me.Label5 = New System.Windows.Forms.Label() - Me.Label2 = New System.Windows.Forms.Label() - Me.ButtonAll = New System.Windows.Forms.Button() - Me.ComboBoxExt = New System.Windows.Forms.ComboBox() - Me.ButtonHisFile = New System.Windows.Forms.Button() - Me.TextBoxSearchFile = New System.Windows.Forms.TextBox() - Me.ListViewFiles = New System.Windows.Forms.ListView() - Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ContextMenuFile = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.RenameFileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.DeleteFileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.TextBoxPath = New System.Windows.Forms.TextBox() - Me.ContextMenuHisFolder = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.ContextMenuHisFile = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.ButtonOK = New System.Windows.Forms.Button() - Me.ButtonCancel = New System.Windows.Forms.Button() - Me.TextBoxCurrent = New System.Windows.Forms.TextBox() - Me.Label3 = New System.Windows.Forms.Label() - Me.Label4 = New System.Windows.Forms.Label() - Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) - CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainer1.Panel1.SuspendLayout() - Me.SplitContainer1.Panel2.SuspendLayout() - Me.SplitContainer1.SuspendLayout() - Me.ContextMenuFile.SuspendLayout() - Me.SuspendLayout() - ' - '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.Location = New System.Drawing.Point(0, 46) - Me.SplitContainer1.Name = "SplitContainer1" - ' - 'SplitContainer1.Panel1 - ' - Me.SplitContainer1.Panel1.Controls.Add(Me.Label1) - Me.SplitContainer1.Panel1.Controls.Add(Me.ButtonNewDir) - Me.SplitContainer1.Panel1.Controls.Add(Me.ButtonDesktop) - Me.SplitContainer1.Panel1.Controls.Add(Me.ButtonHisFolder) - Me.SplitContainer1.Panel1.Controls.Add(Me.ButtonFolderBack) - Me.SplitContainer1.Panel1.Controls.Add(Me.TextBoxSearchFolder) - Me.SplitContainer1.Panel1.Controls.Add(Me.ListViewFolder) - Me.SplitContainer1.Panel1.Controls.Add(Me.ComboBoxDrive) - ' - 'SplitContainer1.Panel2 - ' - Me.SplitContainer1.Panel2.Controls.Add(Me.Label5) - Me.SplitContainer1.Panel2.Controls.Add(Me.Label2) - Me.SplitContainer1.Panel2.Controls.Add(Me.ButtonAll) - Me.SplitContainer1.Panel2.Controls.Add(Me.ComboBoxExt) - Me.SplitContainer1.Panel2.Controls.Add(Me.ButtonHisFile) - Me.SplitContainer1.Panel2.Controls.Add(Me.TextBoxSearchFile) - Me.SplitContainer1.Panel2.Controls.Add(Me.ListViewFiles) - Me.SplitContainer1.Size = New System.Drawing.Size(734, 292) - Me.SplitContainer1.SplitterDistance = 365 - Me.SplitContainer1.TabIndex = 5 - Me.SplitContainer1.TabStop = False - ' - '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(3, 272) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(32, 13) - Me.Label1.TabIndex = 28 - Me.Label1.Text = "Filter:" - ' - 'ButtonNewDir - ' - Me.ButtonNewDir.Image =Global.TUGraz.VECTO.My.Resources.Resources.new_dir - Me.ButtonNewDir.Location = New System.Drawing.Point(139, 2) - Me.ButtonNewDir.Name = "ButtonNewDir" - Me.ButtonNewDir.Size = New System.Drawing.Size(24, 24) - Me.ButtonNewDir.TabIndex = 21 - Me.ButtonNewDir.TabStop = False - Me.ToolTip1.SetToolTip(Me.ButtonNewDir, "Create new Directory") - Me.ButtonNewDir.UseVisualStyleBackColor = True - ' - 'ButtonDesktop - ' - Me.ButtonDesktop.Image = Global.TUGraz.VECTO.My.Resources.Resources.desktop - Me.ButtonDesktop.Location = New System.Drawing.Point(86, 2) - Me.ButtonDesktop.Name = "ButtonDesktop" - Me.ButtonDesktop.Size = New System.Drawing.Size(24, 24) - Me.ButtonDesktop.TabIndex = 22 - Me.ButtonDesktop.TabStop = False - Me.ToolTip1.SetToolTip(Me.ButtonDesktop, "Go to Desktop") - Me.ButtonDesktop.UseVisualStyleBackColor = True - ' - 'ButtonHisFolder - ' - Me.ButtonHisFolder.Image = Global.TUGraz.VECTO.My.Resources.Resources.favorites - Me.ButtonHisFolder.Location = New System.Drawing.Point(112, 2) - Me.ButtonHisFolder.Name = "ButtonHisFolder" - Me.ButtonHisFolder.Size = New System.Drawing.Size(24, 24) - Me.ButtonHisFolder.TabIndex = 24 - Me.ButtonHisFolder.TabStop = False - Me.ToolTip1.SetToolTip(Me.ButtonHisFolder, "Select from recent directories / favorites") - Me.ButtonHisFolder.UseVisualStyleBackColor = True - ' - 'ButtonFolderBack - ' - Me.ButtonFolderBack.Image = CType(resources.GetObject("ButtonFolderBack.Image"), System.Drawing.Image) - Me.ButtonFolderBack.Location = New System.Drawing.Point(60, 2) - Me.ButtonFolderBack.Name = "ButtonFolderBack" - Me.ButtonFolderBack.Size = New System.Drawing.Size(24, 24) - Me.ButtonFolderBack.TabIndex = 20 - Me.ButtonFolderBack.TabStop = False - Me.ToolTip1.SetToolTip(Me.ButtonFolderBack, "Move up one directory level") - Me.ButtonFolderBack.UseVisualStyleBackColor = True - ' - 'TextBoxSearchFolder - ' - Me.TextBoxSearchFolder.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TextBoxSearchFolder.Location = New System.Drawing.Point(37, 269) - Me.TextBoxSearchFolder.Name = "TextBoxSearchFolder" - Me.TextBoxSearchFolder.Size = New System.Drawing.Size(328, 20) - Me.TextBoxSearchFolder.TabIndex = 15 - ' - 'ListViewFolder - ' - Me.ListViewFolder.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.ListViewFolder.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader3}) - Me.ListViewFolder.FullRowSelect = True - Me.ListViewFolder.GridLines = True - Me.ListViewFolder.HideSelection = False - Me.ListViewFolder.Location = New System.Drawing.Point(-2, 27) - Me.ListViewFolder.MultiSelect = False - Me.ListViewFolder.Name = "ListViewFolder" - Me.ListViewFolder.Size = New System.Drawing.Size(367, 241) - Me.ListViewFolder.SmallImageList = Me.ImageList1 - Me.ListViewFolder.TabIndex = 10 - Me.ListViewFolder.UseCompatibleStateImageBehavior = False - Me.ListViewFolder.View = System.Windows.Forms.View.Details - ' - 'ColumnHeader3 - ' - Me.ColumnHeader3.Text = "Sub-Directories:" - Me.ColumnHeader3.Width = 368 - ' - 'ImageList1 - ' - Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit - Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16) - Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent - ' - 'ComboBoxDrive - ' - Me.ComboBoxDrive.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.ComboBoxDrive.FormattingEnabled = True - Me.ComboBoxDrive.Location = New System.Drawing.Point(3, 3) - Me.ComboBoxDrive.Name = "ComboBoxDrive" - Me.ComboBoxDrive.Size = New System.Drawing.Size(54, 21) - Me.ComboBoxDrive.TabIndex = 5 - ' - 'Label5 - ' - Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label5.AutoSize = True - Me.Label5.Location = New System.Drawing.Point(295, 272) - Me.Label5.Name = "Label5" - Me.Label5.Size = New System.Drawing.Size(10, 13) - Me.Label5.TabIndex = 30 - Me.Label5.Text = "." - ' - 'Label2 - ' - Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(3, 272) - Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(32, 13) - Me.Label2.TabIndex = 29 - Me.Label2.Text = "Filter:" - ' - 'ButtonAll - ' - Me.ButtonAll.Location = New System.Drawing.Point(25, 2) - Me.ButtonAll.Name = "ButtonAll" - Me.ButtonAll.Size = New System.Drawing.Size(71, 24) - Me.ButtonAll.TabIndex = 19 - Me.ButtonAll.Text = "Select All" - Me.ToolTip1.SetToolTip(Me.ButtonAll, "Select All Files") - Me.ButtonAll.UseVisualStyleBackColor = True - ' - 'ComboBoxExt - ' - Me.ComboBoxExt.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ComboBoxExt.FormattingEnabled = True - Me.ComboBoxExt.Location = New System.Drawing.Point(307, 269) - Me.ComboBoxExt.Name = "ComboBoxExt" - Me.ComboBoxExt.Size = New System.Drawing.Size(57, 21) - Me.ComboBoxExt.TabIndex = 20 - ' - 'ButtonHisFile - ' - Me.ButtonHisFile.Image = Global.TUGraz.VECTO.My.Resources.Resources.file_history - Me.ButtonHisFile.Location = New System.Drawing.Point(-1, 2) - Me.ButtonHisFile.Name = "ButtonHisFile" - Me.ButtonHisFile.Size = New System.Drawing.Size(24, 24) - Me.ButtonHisFile.TabIndex = 24 - Me.ButtonHisFile.TabStop = False - Me.ToolTip1.SetToolTip(Me.ButtonHisFile, "Select from recent files") - Me.ButtonHisFile.UseVisualStyleBackColor = True - ' - 'TextBoxSearchFile - ' - Me.TextBoxSearchFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TextBoxSearchFile.Location = New System.Drawing.Point(36, 269) - Me.TextBoxSearchFile.Name = "TextBoxSearchFile" - Me.TextBoxSearchFile.Size = New System.Drawing.Size(257, 20) - Me.TextBoxSearchFile.TabIndex = 15 - ' - 'ListViewFiles - ' - Me.ListViewFiles.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.ListViewFiles.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1}) - Me.ListViewFiles.ContextMenuStrip = Me.ContextMenuFile - Me.ListViewFiles.FullRowSelect = True - Me.ListViewFiles.GridLines = True - Me.ListViewFiles.HideSelection = False - Me.ListViewFiles.Location = New System.Drawing.Point(0, 27) - Me.ListViewFiles.Name = "ListViewFiles" - Me.ListViewFiles.Size = New System.Drawing.Size(367, 241) - Me.ListViewFiles.SmallImageList = Me.ImageList1 - Me.ListViewFiles.TabIndex = 10 - Me.ListViewFiles.UseCompatibleStateImageBehavior = False - Me.ListViewFiles.View = System.Windows.Forms.View.Details - ' - 'ColumnHeader1 - ' - Me.ColumnHeader1.Text = "Files:" - Me.ColumnHeader1.Width = 367 - ' - 'ContextMenuFile - ' - Me.ContextMenuFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.RenameFileToolStripMenuItem, Me.DeleteFileToolStripMenuItem}) - Me.ContextMenuFile.Name = "ContextMenuFile" - Me.ContextMenuFile.Size = New System.Drawing.Size(148, 48) - ' - 'RenameFileToolStripMenuItem - ' - Me.RenameFileToolStripMenuItem.Name = "RenameFileToolStripMenuItem" - Me.RenameFileToolStripMenuItem.Size = New System.Drawing.Size(147, 22) - Me.RenameFileToolStripMenuItem.Text = "Rename File..." - ' - 'DeleteFileToolStripMenuItem - ' - Me.DeleteFileToolStripMenuItem.Name = "DeleteFileToolStripMenuItem" - Me.DeleteFileToolStripMenuItem.Size = New System.Drawing.Size(147, 22) - Me.DeleteFileToolStripMenuItem.Text = "Delete File..." - ' - 'TextBoxPath - ' - Me.TextBoxPath.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TextBoxPath.Location = New System.Drawing.Point(47, 354) - Me.TextBoxPath.Name = "TextBoxPath" - Me.TextBoxPath.Size = New System.Drawing.Size(680, 20) - Me.TextBoxPath.TabIndex = 15 - ' - 'ContextMenuHisFolder - ' - Me.ContextMenuHisFolder.Name = "ContextMenuFolderHis" - Me.ContextMenuHisFolder.Size = New System.Drawing.Size(61, 4) - ' - 'ContextMenuHisFile - ' - Me.ContextMenuHisFile.Name = "ContextMenuFileHis" - Me.ContextMenuHisFile.Size = New System.Drawing.Size(61, 4) - ' - 'ButtonOK - ' - Me.ButtonOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonOK.DialogResult = System.Windows.Forms.DialogResult.OK - Me.ButtonOK.Location = New System.Drawing.Point(574, 383) - Me.ButtonOK.Name = "ButtonOK" - Me.ButtonOK.Size = New System.Drawing.Size(75, 23) - Me.ButtonOK.TabIndex = 20 - Me.ButtonOK.TabStop = False - Me.ButtonOK.Text = "OK" - Me.ButtonOK.UseVisualStyleBackColor = True - ' - 'ButtonCancel - ' - Me.ButtonCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.ButtonCancel.Location = New System.Drawing.Point(652, 383) - Me.ButtonCancel.Name = "ButtonCancel" - Me.ButtonCancel.Size = New System.Drawing.Size(75, 23) - Me.ButtonCancel.TabIndex = 25 - Me.ButtonCancel.TabStop = False - Me.ButtonCancel.Text = "Cancel" - Me.ButtonCancel.UseVisualStyleBackColor = True - ' - 'TextBoxCurrent - ' - Me.TextBoxCurrent.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TextBoxCurrent.Cursor = System.Windows.Forms.Cursors.Hand - Me.TextBoxCurrent.Location = New System.Drawing.Point(5, 17) - Me.TextBoxCurrent.Name = "TextBoxCurrent" - Me.TextBoxCurrent.ReadOnly = True - Me.TextBoxCurrent.Size = New System.Drawing.Size(722, 20) - Me.TextBoxCurrent.TabIndex = 0 - Me.TextBoxCurrent.TabStop = False - ' - 'Label3 - ' - Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(5, 357) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(38, 13) - Me.Label3.TabIndex = 29 - Me.Label3.Text = "Name:" - ' - 'Label4 - ' - Me.Label4.AutoSize = True - Me.Label4.Location = New System.Drawing.Point(4, 3) - Me.Label4.Name = "Label4" - Me.Label4.Size = New System.Drawing.Size(89, 13) - Me.Label4.TabIndex = 30 - Me.Label4.Text = "Current Directory:" - ' - 'FB_Dialog - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.CancelButton = Me.ButtonCancel - Me.ClientSize = New System.Drawing.Size(734, 412) - Me.Controls.Add(Me.Label4) - Me.Controls.Add(Me.Label3) - Me.Controls.Add(Me.TextBoxCurrent) - Me.Controls.Add(Me.ButtonCancel) - Me.Controls.Add(Me.ButtonOK) - Me.Controls.Add(Me.TextBoxPath) - Me.Controls.Add(Me.SplitContainer1) - Me.MinimizeBox = False - Me.MinimumSize = New System.Drawing.Size(341, 272) - Me.Name = "FB_Dialog" - Me.ShowIcon = False - Me.ShowInTaskbar = False - Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent - Me.Text = "File Browser" - Me.SplitContainer1.Panel1.ResumeLayout(False) - Me.SplitContainer1.Panel1.PerformLayout() - Me.SplitContainer1.Panel2.ResumeLayout(False) - Me.SplitContainer1.Panel2.PerformLayout() - CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainer1.ResumeLayout(False) - Me.ContextMenuFile.ResumeLayout(False) - Me.ResumeLayout(False) - Me.PerformLayout() - - End Sub - Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer - Friend WithEvents ComboBoxDrive As System.Windows.Forms.ComboBox - Friend WithEvents ListViewFolder As System.Windows.Forms.ListView - Friend WithEvents ListViewFiles As System.Windows.Forms.ListView - Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader - Friend WithEvents TextBoxSearchFolder As System.Windows.Forms.TextBox - Friend WithEvents TextBoxPath As System.Windows.Forms.TextBox - Friend WithEvents ButtonFolderBack As System.Windows.Forms.Button - Friend WithEvents ContextMenuHisFolder As System.Windows.Forms.ContextMenuStrip - Friend WithEvents ContextMenuHisFile As System.Windows.Forms.ContextMenuStrip - Friend WithEvents ButtonHisFolder As System.Windows.Forms.Button - Friend WithEvents ButtonHisFile As System.Windows.Forms.Button - Friend WithEvents ButtonOK As System.Windows.Forms.Button - Friend WithEvents ButtonCancel As System.Windows.Forms.Button - Friend WithEvents TextBoxCurrent As System.Windows.Forms.TextBox - Friend WithEvents ColumnHeader3 As System.Windows.Forms.ColumnHeader - Friend WithEvents ButtonDesktop As System.Windows.Forms.Button - Friend WithEvents ContextMenuFile As System.Windows.Forms.ContextMenuStrip - Friend WithEvents RenameFileToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents DeleteFileToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents ButtonNewDir As System.Windows.Forms.Button - Friend WithEvents ButtonAll As System.Windows.Forms.Button - Friend WithEvents Label1 As System.Windows.Forms.Label - Friend WithEvents Label3 As System.Windows.Forms.Label - Friend WithEvents Label4 As System.Windows.Forms.Label - Friend WithEvents ImageList1 As System.Windows.Forms.ImageList - Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip - Friend WithEvents Label5 As System.Windows.Forms.Label - Friend WithEvents Label2 As System.Windows.Forms.Label - Friend WithEvents ComboBoxExt As System.Windows.Forms.ComboBox - Friend WithEvents TextBoxSearchFile As System.Windows.Forms.TextBox - -End Class diff --git a/VECTO/BusAuxiliaries/UI/FB_Dialog.resx b/VECTO/BusAuxiliaries/UI/FB_Dialog.resx deleted file mode 100644 index 1f675622ab..0000000000 --- a/VECTO/BusAuxiliaries/UI/FB_Dialog.resx +++ /dev/null @@ -1,156 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>583, 17</value> - </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="ButtonFolderBack.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAKqSURBVDhPbZF3T1NRHIb5EvAh/McYDWI0sixblkRjGoypBoKJOAkOUESCYCLBiEZRVKBlVaQU - ECm2SNmUUsosXDvonrTMSo15vT0thApv8uae3JznOb97bpA3jqlnJoes1GqVFsMieQzzWAGMI/ehH8qD - gX4ahvOxpq9DNPc4CPB/aAE2dDVwzJTDRq9d6moYlbXwbInw1yMmjeWdwGFpyMESr+CPu5PU7WyBg6qE - sjcLGsUnrNo6CJwiC8NlZRzpPslegWezHb/Xv4LqYUE192EfvFcSwQ4L9glkpfC4O7C9yaPhVmy5mrH4 - 7RKBvY3v9glyLRnIW2EiWXCavN+dxD5Zgu2NNrjXvmDL2YQNOxsLnUxQ8ioop6uQ0HuMgHesF8FaSCIw - AXdio2/fvcrFprMR6/Z6rJo/Yo5/AUuyClB0vYIcdRoy5YydqZ76UV8skiJsrjRg3VZLwzVw6t9itu0c - xr5fh4SuV5A2cBIx7aHo7E2DnMcMnMA8Xog162e4TO+xonsDu+YlpltTMcK/SmBvGbxQdAhSYbfbIWtO - CBSYRh/CZayGQ/caNnUlLNRzTHHPgiE4gpjuo+Sy+IIUzIsziGCyKS5QYBi+B4e2CjZVBcxUOYwLJeSU - /pY0DHLTsTzChGboPNQD6UQgbWAECvSDd2FVvoB5qQyG+WLoZgohbYxFX0MCxE2JBFT1J5Nm9igxwTkT - KNCKb8G0WArD3BNopwugmczHBH2KqJ6Bfk7MLuxtPGcGEnZUoGD5Zy70s0XQyh9AI82Davwm2SSsi9on - oIRJGK+PoPyoL2rRNfwSZWNReAUKIQuKPha9KRL8ylPoehUOCSeaCMfZkQSme9uP+qL8kR2s6MoMp/99 - jqwl8R39jQOjteHrj7IORZfdCA3xbzsgQUH/AJeyUFejvjvmAAAAAElFTkSuQmCC -</value> - </data> - <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>583, 17</value> - </metadata> - <metadata name="ImageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>473, 17</value> - </metadata> - <metadata name="ContextMenuFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>329, 17</value> - </metadata> - <metadata name="ContextMenuHisFolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="ContextMenuHisFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>180, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/VECTO/BusAuxiliaries/UI/FB_Dialog.vb b/VECTO/BusAuxiliaries/UI/FB_Dialog.vb deleted file mode 100644 index 8a4ff83994..0000000000 --- a/VECTO/BusAuxiliaries/UI/FB_Dialog.vb +++ /dev/null @@ -1,960 +0,0 @@ -' Copyright 2017 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. -Option Infer On -Option Explicit On -Option Strict On - -Imports System.Drawing -Imports System.IO -Imports System.Text -Imports Microsoft.VisualBasic.FileIO -Imports System.Runtime.InteropServices -Imports System.Windows.Forms - -''' <summary> -''' File Browser dialog. Entirely controlled by cFilebrowser class. -''' </summary> -Public Class FB_Dialog - Private _myFolder As String - Private _myFiles() As String - Private _myDrive As String - Private _updateLock As Boolean - Private _initialized As Boolean - Private _myId As String - Private _myExt() As String - Private _lastFile As String - Private _bFileMustExist As Boolean - Private _bOverwriteCheck As Boolean - Private _bMultiFiles As Boolean - Private _noExt As Boolean - Private _bBrowseFolder As Boolean - Private _bForceExt As Boolean - Private _extListSingle As ArrayList - Private _extListMulti As ArrayList - Private _lastExt As String - Private ReadOnly _bLightMode As Boolean - - Private Const FavText As String = "Edit Favorites..." - Private Const EmptyText As String = " " - Private Const NoFavString As String = "<undefined>" - - 'New - Public Sub New(lightMode As Boolean) - ' This call is required by the Windows Form Designer. - InitializeComponent() - ' Append any initialization after the InitializeComponent() call. - _myId = "Default" - _updateLock = False - _initialized = False - _myFolder = "" - _myDrive = "" - _lastFile = "" - _bOverwriteCheck = False - _bFileMustExist = False - _bMultiFiles = False - _noExt = True - _bBrowseFolder = False - _bLightMode = LightMode - ButtonHisFile.Enabled = Not _bLightMode - End Sub - - 'Resize - Private Sub FB_Dialog_Resize(sender As Object, e As EventArgs) Handles Me.ResizeEnd - Resized() - End Sub - - 'Shown - Private Sub FileBrowser_Shown(sender As Object, e As EventArgs) Handles Me.Shown - Resized() - TextBoxPath.Focus() - TextBoxPath.SelectAll() - End Sub - - 'Resized ListView Format - Private Sub Resized() - 'To autosize to the width of the column heading, set the Width property to -2 - ListViewFolder.Columns(0).Width = -2 - 'ListViewFolder.Columns(0).Width -= 1 - ListViewFiles.Columns(0).Width = -2 - 'ListViewFiles.Columns(0).Width -= 1 - End Sub - - 'SplitterMoved - Private Sub SplitContainer1_SplitterMoved(sender As Object, e As SplitterEventArgs) _ - Handles SplitContainer1.SplitterMoved - If _initialized Then Resized() - End Sub - - 'Closing (Overwrite-Check etc) - Private Sub FileBrowser_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing - Dim x As Int32 - Dim path As String - Dim ext As String - Dim hasExt As Boolean - If DialogResult = DialogResult.OK Then - If _bBrowseFolder Then - path = Trim(TextBoxPath.Text) - 'If empty path: use the Current-folder(MyFolder) - If path = "" Then - path = _myFolder - Else - If Mid(path, 2, 1) <> ":" Then path = _myFolder & path - End If - If Not Directory.Exists(path) Then - MsgBox("Directory " & path & " does not exist!", MsgBoxStyle.Critical) - e.Cancel = True - Exit Sub - End If - If Microsoft.VisualBasic.Right(path, 1) <> "\" Then path &= "\" - ReDim _myFiles(0) - _myFiles(0) = path - Else - 'Stop if empty path - If Trim(TextBoxPath.Text) = "" Then - e.Cancel = True - Exit Sub - End If - _lastExt = Trim(ComboBoxExt.Text) - 'Assume Files in array - If Microsoft.VisualBasic.Left(TextBoxPath.Text, 1) = "<" And ListViewFiles.SelectedItems.Count > 0 Then - 'Multiple files selected - ReDim _myFiles(ListViewFiles.SelectedItems.Count - 1) - x = -1 - For Each lv0 As ListViewItem In ListViewFiles.Items - If lv0.Selected Then - x += 1 - _myFiles(x) = _myFolder & lv0.SubItems(0).Text - End If - Next - _bMultiFiles = True - Else - 'Single File - path = Trim(TextBoxPath.Text) - 'Primary extension (eg for bForceExt) - ext = Trim(ComboBoxExt.Text.Split(","c)(0)) - 'If file without path then append path - - - If Mid(path, 2, 1) <> ":" Then path = _myFolder & path - 'If instead of File a Folder is entered: Switch to Folder and Abort - If Directory.Exists(path) Then - SetFolder(path) - e.Cancel = True - Exit Sub - End If - 'Force Extension - If _bForceExt Then - If UCase(IO.Path.GetExtension(path)) <> "." & UCase(ext) Then path &= "." & ext - hasExt = True - Else - 'Check whether specified a File with Ext - hasExt = (Microsoft.VisualBasic.Len(IO.Path.GetExtension(path)) > 1) - End If - 'If File without Extension (after bForceExt question) and it does not exist, then add primary Extension - If Not hasExt Then - If ext <> "*" And ext <> "" Then - If Not File.Exists(path) Then path &= "." & ext - End If - End If - 'Check that File exists - If File.Exists(path) Then - 'Yes: when bOverwriteCheck, check for Overwrite - If _bOverwriteCheck Then - If MsgBox("Overwrite " & path & " ?", MsgBoxStyle.YesNo) = MsgBoxResult.No Then - e.Cancel = True - Exit Sub - End If - End If - Else - 'No: abort if bFileMustExist - If _bFileMustExist Then - MsgBox("The file " & path & " does not exist!", MsgBoxStyle.Critical) - e.Cancel = True - Exit Sub - End If - End If - 'Define MyFiles - ReDim _myFiles(0) - _myFiles(0) = path - _bMultiFiles = False - End If - End If - End If - End Sub - - 'Browse - Custom Dialog - Public Function Browse(path As String, fileMustExist As Boolean, overwriteCheck As Boolean, extMode As tFbExtMode, - multiFile As Boolean, ext As String, title As String) As Boolean - If Not _initialized Then Init() - - 'Load Folder History ContextMenu - For x = 0 To 9 - ContextMenuHisFolder.Items(x).Text = FB_FolderHistory(x) - Next - For x = 10 To 19 - ContextMenuHisFolder.Items(x + 1).Text = FB_FolderHistory(x) - Next - - 'Options - _bOverwriteCheck = overwriteCheck - _bFileMustExist = fileMustExist - _bForceExt = (extMode = tFbExtMode.ForceExt) - - 'Form Config - ListViewFiles.MultiSelect = multiFile - ButtonAll.Visible = multiFile - Me.Title = title - Text = title - - 'Ext-Combobox - ComboBoxExt.Items.Clear() - If _noExt Then - ComboBoxExt.Items.Add("*") - ComboBoxExt.SelectedIndex = 0 - Else - Select Case extMode - Case tFbExtMode.ForceExt - If ext = "" Then ext = _extListSingle(0).ToString - ComboBoxExt.Items.AddRange(_extListSingle.ToArray) - ComboBoxExt.Text = ext - ComboBoxExt.Enabled = False - Case tFbExtMode.MultiExt, tFbExtMode.SingleExt - If extMode = tFbExtMode.MultiExt Then - ComboBoxExt.Items.AddRange(_extListMulti.ToArray) - Else - ComboBoxExt.Items.AddRange(_extListSingle.ToArray) - End If - If ext <> "" Then - ComboBoxExt.Text = ext - Else - ComboBoxExt.Text = _lastExt - End If - ComboBoxExt.Enabled = True - End Select - End If - - - 'Define Path - ' If no path is specified: Last folder, no file name - If path = "" Then path = FB_FolderHistory(0) - - ' If path-length too small (Path is invalid): Last File - If path.Length < 2 Then path = _lastFile - - 'Open Folder - If no folder in the path: Last folder - If fPATH(path) = "" Then - 'If given a file without path - If Trim(FB_FolderHistory(0)) = "" Then - SetFolder("C:\") - Else - SetFolder(FB_FolderHistory(0)) - End If - Else - '...Otherwise: - SetFolder(fPATH(path)) - End If - If _bBrowseFolder Then - FolderUp() - TextBoxPath.Text = path - Else - TextBoxPath.Text = IO.Path.GetFileName(path) - End If - - 'Show form ------------------------------------------------ ---- - ShowDialog() - If DialogResult = DialogResult.OK Then - 'File / Folder History - If _bMultiFiles Then - _lastFile = _myFolder - UpdateHisFolder(_myFolder) - Else - _lastFile = _myFiles(0) - UpdateHisFolder(fPATH(_lastFile)) - If Not _bBrowseFolder Then UpdateHisFile(_lastFile) - End If - 'Update Global History Folder - For x = 0 To 9 - FB_FolderHistory(x) = ContextMenuHisFolder.Items(x).Text - Next - For x = 10 To 19 - FB_FolderHistory(x) = ContextMenuHisFolder.Items(x + 1).Text - Next - Return True - Else - Return False - End If - End Function - - Public Title As String - - 'Close and save File / Folder History - Public Sub SaveAndClose() - 'Folder History - If FB_Init Then - Try - Dim f = My.Computer.FileSystem.OpenTextFileWriter(Path.Combine(FB_FilHisDir, "Directories.txt"), False, Encoding.UTF8) - For x = 0 To 19 - f.WriteLine(FB_FolderHistory(x)) - Next - f.Close() - f.Dispose() - Catch ex As Exception - End Try - FB_Init = False - End If - 'File History - If _initialized And Not _bLightMode Then - If Not _bBrowseFolder Then - Try - Dim f = My.Computer.FileSystem.OpenTextFileWriter(Path.Combine(FB_FilHisDir, _myId & ".txt"), False, Encoding.UTF8) - For x = 0 To 9 - f.WriteLine(ContextMenuHisFile.Items(x).Text) - Next - f.Close() - f.Dispose() - Catch ex As Exception - End Try - End If - _initialized = False - End If - - 'Close - Close() - End Sub - - 'Switching to FolderBrowser - Public Sub SetFolderBrowser() - If _initialized Then Exit Sub - - _bBrowseFolder = True - Width = 500 - ListViewFiles.Enabled = False - ButtonHisFile.Enabled = False - TextBoxSearchFile.Enabled = False - SplitContainer1.Panel2Collapsed = True - Text = "Directory Browser" - End Sub - - 'Initialize - Private Sub Init() - _updateLock = True - - 'Initialization for Global File Browser - If Not FB_Init Then GlobalInit() - - 'Load Drive ComboBox - For x = 0 To UBound(FB_Drives) - ComboBoxDrive.Items.Add(FB_Drives(x)) - Next - - 'FolderHistory ContextMenu - ContextMenuHisFolder.Items.Clear() - For x = 0 To 9 - ContextMenuHisFolder.Items.Add("") - Next - ContextMenuHisFolder.Items.Add("-") - For x = 10 To 19 - ContextMenuHisFolder.Items.Add("") - Next - ContextMenuHisFolder.Items.Add("-") - ContextMenuHisFolder.Items.Add(FavText) - - 'FileHistory ContextMenu - If _bBrowseFolder Then - _lastFile = FB_FolderHistory(0) - ElseIf Not _bLightMode Then - For x = 0 To 9 - ContextMenuHisFile.Items.Add("") - Next - If File.Exists(path.Combine(FB_FilHisDir, _myId & ".txt")) Then - Dim f = New StreamReader(path.Combine(FB_FilHisDir, _myId & ".txt")) - Dim x = -1 - Do While Not f.EndOfStream And x < 9 - x += 1 - Dim line = f.ReadLine - ContextMenuHisFile.Items(x).Text = line - If x = 0 Then _lastFile = line - Loop - f.Close() - f.Dispose() - End If - End If - - 'Extension-ComboBox - If Not _noExt Then - _extListSingle = New ArrayList - _extListMulti = New ArrayList - For x = 0 To UBound(_myExt) - _extListMulti.Add(_myExt(x)) - _extListSingle.AddRange(_myExt(x).Split(","c)) - Next - _extListMulti.Add("*") - _extListSingle.Add("*") - End If - - _initialized = True - _updateLock = False - End Sub - - Private Sub GlobalInit() - - 'Create Drive List - ReDim FB_Drives(UBound(Directory.GetLogicalDrives())) - Dim x = -1 - For Each drive In Directory.GetLogicalDrives() - x += 1 - FB_Drives(x) = Microsoft.VisualBasic.Left(drive, 2) - Next - - 'Read Folder History - For x = 0 To 19 - FB_FolderHistory(x) = EmptyText - Next - If File.Exists(path.Combine(FB_FilHisDir, "Directories.txt")) Then - Dim f = New StreamReader(path.Combine(FB_FilHisDir,"Directories.txt")) - x = -1 - Do While Not f.EndOfStream And x < 19 - x += 1 - FB_FolderHistory(x) = f.ReadLine() - Loop - f.Dispose() - f.Close() - End If - - FB_Init = True - End Sub - - 'ComboBoxDrive_SelectedIndexChanged - Private Sub ComboBoxDrive_SelectedIndexChanged(sender As Object, e As EventArgs) _ - Handles ComboBoxDrive.SelectedIndexChanged - If Not _updateLock Then SetFolder(ComboBoxDrive.SelectedItem.ToString) - End Sub - - - 'ButtonFolderBack_Click - Private Sub ButtonFolderBack_Click(sender As Object, e As EventArgs) Handles ButtonFolderBack.Click - FolderUp() - End Sub - - 'TextBoxPath_KeyDown (ENTER) - Private Sub TextBoxPath_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBoxPath.KeyDown - If e.KeyCode = Keys.Enter Then - Dim path = TextBoxPath.Text - If Directory.Exists(path) Then - If _bBrowseFolder Then - DialogResult = DialogResult.OK - Close() - Else - SetFolder(path) - End If - Else - DialogResult = DialogResult.OK - Close() - End If - End If - End Sub - - 'ListViewFolder_SelectedIndexChanged - Private Sub ListViewFolder_SelectedIndexChanged(sender As Object, e As EventArgs) _ - Handles ListViewFolder.SelectedIndexChanged - If _bBrowseFolder Then - _updateLock = True - If ListViewFolder.SelectedItems.Count > 0 Then - TextBoxPath.Text = ListViewFolder.SelectedItems.Item(0).Text & "\" - End If - _updateLock = False - End If - End Sub - - 'ListViewFolder_MouseDoubleClick - Private Sub ListViewFolder_MouseDoubleClick(sender As Object, e As MouseEventArgs) _ - Handles ListViewFolder.MouseDoubleClick - If ListViewFolder.SelectedItems.Count = 0 Then Exit Sub - SetFolder(_myFolder & ListViewFolder.SelectedItems.Item(0).Text) - End Sub - - 'ListViewFolder_KeyDown - Private Sub ListViewFolder_KeyDown(sender As Object, e As KeyEventArgs) Handles ListViewFolder.KeyDown - If e.KeyCode = Keys.Enter Then - If ListViewFolder.SelectedItems.Count = 0 Then Exit Sub - SetFolder(_myFolder & ListViewFolder.SelectedItems.Item(0).Text) - End If - End Sub - - 'ListViewFiles_SelectedIndexChanged - Private Sub ListViewFiles_SelectedIndexChanged(sender As Object, e As EventArgs) _ - Handles ListViewFiles.SelectedIndexChanged - _updateLock = True - If ListViewFiles.SelectedItems.Count = 0 Then - TextBoxPath.Text = "" - Else - If ListViewFiles.SelectedItems.Count > 1 Then - TextBoxPath.Text = "<" & ListViewFiles.SelectedItems.Count & " Files selected>" - Else - TextBoxPath.Text = ListViewFiles.SelectedItems.Item(0).Text - TextBoxPath.SelectionStart = TextBoxPath.Text.Length - End If - End If - _updateLock = False - End Sub - - 'ListViewFiles_MouseDoubleClick - Private Sub ListViewFiles_MouseDoubleClick(sender As Object, e As MouseEventArgs) _ - Handles ListViewFiles.MouseDoubleClick - If ListViewFiles.SelectedItems.Count = 0 Then Exit Sub - - DialogResult = DialogResult.OK - Close() - End Sub - - 'ListViewFiles_KeyDown - Private Sub ListViewFiles_KeyDown(sender As Object, e As KeyEventArgs) Handles ListViewFiles.KeyDown - If e.KeyCode = Keys.Enter Then - If ListViewFiles.SelectedItems.Count = 0 Then Exit Sub - DialogResult = DialogResult.OK - Close() - End If - End Sub - - 'TextBoxSearchFolder_KeyDown - Private Sub TextBoxSearchFolder_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBoxSearchFolder.KeyDown - Dim itemCount = ListViewFolder.Items.Count - Dim noItem = (itemCount = 0) - - Dim selIndex As Integer - If Not noItem Then - If ListViewFolder.SelectedItems.Count = 0 Then - selIndex = -1 - Else - selIndex = ListViewFolder.SelectedIndices(0) - End If - End If - Select Case e.KeyCode - Case Keys.Enter - If noItem Then Exit Sub - If ListViewFolder.SelectedItems.Count = 0 Then ListViewFolder.SelectedIndices.Add(0) - SetFolder(_myFolder & ListViewFolder.SelectedItems.Item(0).Text) - Case Keys.Up - If Not noItem Then - If selIndex < 1 Then - selIndex = 1 - Else - ListViewFolder.Items(selIndex).Selected = False - End If - ListViewFolder.Items(selIndex - 1).Selected = True - ListViewFolder.Items(selIndex - 1).EnsureVisible() - End If - Case Keys.Down - If Not noItem And selIndex < itemCount - 1 Then - If Not selIndex = -1 Then ListViewFolder.Items(selIndex).Selected = False - ListViewFolder.Items(selIndex + 1).Selected = True - ListViewFolder.Items(selIndex + 1).EnsureVisible() - End If - Case Keys.Back - If TextBoxSearchFolder.Text = "" Then FolderUp() - End Select - End Sub - - 'TextBoxSearchFolder_TextChanged - Private Sub TextBoxSearchFolder_TextChanged(sender As Object, e As EventArgs) Handles TextBoxSearchFolder.TextChanged - If Not _updateLock Then LoadListFolder() - End Sub - - 'TextBoxSearchFile_KeyDown - Private Sub TextBoxSearchFile_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBoxSearchFile.KeyDown - Dim selIndex As Integer - - Dim itemCount = ListViewFiles.Items.Count - Dim noItem = (itemCount = 0) - If Not noItem Then - If ListViewFiles.SelectedItems.Count = 0 Then - selIndex = -1 - Else - selIndex = ListViewFiles.SelectedIndices(0) - End If - End If - Select Case e.KeyCode - Case Keys.Enter - If noItem Then Exit Sub - If ListViewFiles.SelectedItems.Count = 0 Then ListViewFiles.SelectedIndices.Add(0) - DialogResult = DialogResult.OK - Close() - Case Keys.Up - If Not noItem Then - If selIndex < 1 Then - selIndex = 1 - Else - ListViewFiles.Items(selIndex).Selected = False - End If - ListViewFiles.Items(selIndex - 1).Selected = True - ListViewFiles.Items(selIndex - 1).EnsureVisible() - End If - Case Keys.Down - If Not noItem And selIndex < itemCount - 1 Then - If Not selIndex = -1 Then ListViewFiles.Items(selIndex).Selected = False - ListViewFiles.Items(selIndex + 1).Selected = True - ListViewFiles.Items(selIndex + 1).EnsureVisible() - End If - End Select - End Sub - - Private Sub TextBoxSearchFile_TextChanged(sender As Object, e As EventArgs) _ - Handles TextBoxSearchFile.TextChanged, ComboBoxExt.TextChanged - If Not _updateLock Then LoadListFiles() - End Sub - - Private Sub ButtonHisFolder_Click(sender As Object, e As EventArgs) Handles ButtonHisFolder.Click - ContextMenuHisFolder.Show(MousePosition) - End Sub - - - Private Sub ButtonHisFile_Click(sender As Object, e As EventArgs) Handles ButtonHisFile.Click - ContextMenuHisFile.Show(MousePosition) - End Sub - - Private Sub ButtonAll_Click(sender As Object, e As EventArgs) Handles ButtonAll.Click - ListViewFiles.BeginUpdate() - For i = 0 To ListViewFiles.Items.Count - 1 - ListViewFiles.Items(i).Selected = True - Next - ListViewFiles.EndUpdate() - End Sub - - Private Sub ContextMenuHisFile_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) _ - Handles ContextMenuHisFile.ItemClicked - Dim path = e.ClickedItem.Text.ToString - If path = EmptyText Then Exit Sub - SetFolder(fPATH(path)) - TextBoxPath.Text = IO.Path.GetFileName(path) - End Sub - - Private Sub ContextMenuHisFolder_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) _ - Handles ContextMenuHisFolder.ItemClicked - - Dim path = e.ClickedItem.Text.ToString - - If path = EmptyText Then Exit Sub - - If path = FavText Then - Dim favdlog = New FB_FavDlog - If favdlog.ShowDialog(Me) = DialogResult.OK Then - For x As Integer = 10 To 19 - path = CType(favdlog.ListBox1.Items(x - 10), String) - If path = NoFavString Then - FB_FolderHistory(x) = EmptyText - Else - FB_FolderHistory(x) = path - End If - ContextMenuHisFolder.Items(x + 1).Text = FB_FolderHistory(x) - Next - End If - Else - SetFolder(path) - End If - End Sub - - Private Sub TextBoxCurrent_MouseClick(sender As Object, e As MouseEventArgs) Handles TextBoxCurrent.MouseClick - Dim newpath = "" - Dim x = TextBoxCurrent.SelectionStart - Dim path = TextBoxCurrent.Text - Dim x1 = path.Length - If x = x1 Then Exit Sub - If x < 4 Then - SetFolder(Microsoft.VisualBasic.Left(path, 2)) - Exit Sub - End If - Do While x1 > x - newpath = path - 'path = Microsoft.VisualBasic.Left(path, x1 - 1) - path = Microsoft.VisualBasic.Left(path, path.LastIndexOf("\")) - x1 = path.Length - Loop - SetFolder(newpath) - End Sub - - Private Sub ButtonDesktop_Click(sender As Object, e As EventArgs) Handles ButtonDesktop.Click - SetFolder(SpecialDirectories.Desktop.ToString) - End Sub - - Private Sub UpdateHisFile(path As String) - If _bLightMode Then Exit Sub - - Dim x As Integer - For x = 0 To 8 - If UCase(ContextMenuHisFile.Items(x).Text.ToString) = UCase(path) Then Exit For - Next - For y = x To 1 Step -1 - ContextMenuHisFile.Items(y).Text = ContextMenuHisFile.Items(y - 1).Text - Next - ContextMenuHisFile.Items(0).Text = path - End Sub - - Private Sub UpdateHisFolder(path As String) - Dim x As Integer - For x = 0 To 8 - If UCase(ContextMenuHisFolder.Items(x).Text.ToString) = UCase(path) Then Exit For - Next - For y = x To 1 Step -1 - ContextMenuHisFolder.Items(y).Text = ContextMenuHisFolder.Items(y - 1).Text - Next - ContextMenuHisFolder.Items(0).Text = path - End Sub - - Public Sub UpdateHistory(path As String) - If Not _initialized Then Init() - UpdateHisFile(path) - path = fPATH(path) - Dim x As Integer - For x = 0 To 8 - If UCase(FB_FolderHistory(x)) = UCase(path) Then Exit For - Next - For y = x To 1 Step -1 - FB_FolderHistory(y) = FB_FolderHistory(y - 1) - Next - FB_FolderHistory(0) = path - End Sub - - 'Change folder - Private Sub SetFolder(path As String) - - 'Abort if no drive specified - If Mid(path, 2, 1) <> ":" Then Exit Sub - - _updateLock = True - - 'Delete Search-fields - TextBoxSearchFile.Text = "" - TextBoxSearchFolder.Text = "" - - 'Set Drive - If _myDrive <> Microsoft.VisualBasic.Left(path, 2) Then - _myDrive = UCase(Microsoft.VisualBasic.Left(path, 2)) - ComboBoxDrive.SelectedItem = _myDrive - End If - - 'Set Folder - _myFolder = path - If Microsoft.VisualBasic.Right(_myFolder, 1) <> "\" Then _myFolder &= "\" - - Me.Text = Me.Title & " " & _myFolder - - LoadListFolder() - LoadListFiles() - - If _bBrowseFolder Then TextBoxPath.Text = "" - - TextBoxCurrent.Text = _myFolder - - 'TextBoxPath.SelectionStart = TextBoxPath.Text.Length - _updateLock = False - End Sub - - 'Folder one level up - Private Sub FolderUp() - If _myFolder <> "" Then - Dim path = Microsoft.VisualBasic.Left(_myFolder, _myFolder.Length - 1) - Dim x = path.LastIndexOf("\") - If x > 0 Then SetFolder(Microsoft.VisualBasic.Left(path, x)) - End If - End Sub - - - Private Structure SHFILEINFO - Public hIcon As IntPtr ' : icon - Public iIcon As Integer ' : icondex - Public dwAttributes As Integer ' : SFGAO_ flags - <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=260)> Public szDisplayName As String - <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=80)> Public szTypeName As String - End Structure - - Private Const SHGFI_ICON = &H100 - Private Const SHGFI_SMALLICON = &H1 - Private Declare Ansi Function SHGetFileInfo Lib "shell32.dll" (pszPath As String, dwFileAttributes As Integer, - ByRef psfi As SHFILEINFO, cbFileInfo As Integer, uFlags As Integer) As IntPtr - - 'Load Folder-List - Private Sub LoadListFolder() - 'Delete Folder-List - ListViewFolder.Items.Clear() - Dim searchPat = "*" & TextBoxSearchFolder.Text & "*" - Try - 'Add Folder - Dim di As New DirectoryInfo(_myFolder) - Dim aryFi = di.GetDirectories(searchPat) - ImageList1.Images.Clear() - Dim shinfo = New SHFILEINFO() - shinfo.szDisplayName = New String(Chr(0), 260) - shinfo.szTypeName = New String(Chr(0), 80) - SHGetFileInfo(_myFolder, 0, shinfo, Marshal.SizeOf(shinfo), SHGFI_ICON Or SHGFI_SMALLICON) - Dim myIcon = Icon.FromHandle(shinfo.hIcon) - ImageList1.Images.Add(myIcon) - For Each fi In aryFi - ListViewFolder.Items.Add(fi.ToString, 0) - Next - Catch ex As Exception - ListViewFolder.Items.Add("<ERROR: " & ex.Message.ToString & ">") - End Try - End Sub - - 'Load File-list - Private Sub LoadListFiles() - 'Abort if bBrowseFolder - If _bBrowseFolder Then Exit Sub - - 'Define Extension-filter - Dim extStr As String() - If Trim(ComboBoxExt.Text.ToString) = "" Then - extStr = New String() {"*"} - Else - extStr = ComboBoxExt.Text.ToString.Split(","c) - End If - - 'Delete File-List - ListViewFiles.Items.Clear() - - Dim searchFile = TextBoxSearchFile.Text - - ListViewFiles.BeginUpdate() - Try - 'Add Folder - Dim di As New DirectoryInfo(_myFolder) - Dim aryFi As FileInfo() - Dim fi As FileInfo - Dim x = -1 - For Each SearchExt In extStr - Dim searchPat = "*" & Trim(searchFile) & "*." & Trim(SearchExt) - aryFi = di.GetFiles(searchPat) - For Each fi In aryFi - x += 1 - Dim shinfo = New SHFILEINFO() - shinfo.szDisplayName = New String(Chr(0), 260) - shinfo.szTypeName = New String(Chr(0), 80) - SHGetFileInfo(Path.Combine(_myFolder, fi.ToString), 0, shinfo, Marshal.SizeOf(shinfo), - SHGFI_ICON Or SHGFI_SMALLICON) - Dim myIcon = Icon.FromHandle(shinfo.hIcon) - ImageList1.Images.Add(myIcon) - ListViewFiles.Items.Add(fi.ToString, x + 1) - Next - Next - Catch ex As Exception - ListViewFiles.Items.Add("<ERROR: " & ex.Message.ToString & ">") - End Try - - ListViewFiles.EndUpdate() - End Sub - - 'Rename File - Private Sub RenameFileToolStripMenuItem_Click(sender As Object, e As EventArgs) _ - Handles RenameFileToolStripMenuItem.Click - - If ListViewFiles.SelectedItems.Count = 1 Then - Dim file0 = ListViewFiles.SelectedItems(0).Text - Dim file = file0 -lb1: - file = InputBox("New Filename", "Rename " & file0, file) - If file <> "" Then - If IO.File.Exists(_myFolder & file) Then - MsgBox("File " & file & " already exists!") - GoTo lb1 - End If - Try - My.Computer.FileSystem.RenameFile(_myFolder & file0, file) - LoadListFiles() - Catch ex As Exception - MsgBox("Cannot rename " & file0 & "!") - End Try - End If - End If - End Sub - - 'Delete File - Private Sub DeleteFileToolStripMenuItem_Click(sender As Object, e As EventArgs) _ - Handles DeleteFileToolStripMenuItem.Click - Dim c = ListViewFiles.SelectedItems.Count - If c > 0 Then - If c = 1 Then - If MsgBox("Delete " & _myFolder & ListViewFiles.SelectedItems(0).Text & "?", MsgBoxStyle.YesNo) = MsgBoxResult.No _ - Then Exit Sub - Else - If MsgBox("Delete " & c & " files?", MsgBoxStyle.YesNo) = MsgBoxResult.No Then Exit Sub - End If - For x = 0 To c - 1 - Try - File.Delete(_myFolder & ListViewFiles.SelectedItems(x).Text) - Catch ex As Exception - End Try - Next - LoadListFiles() - End If - End Sub - - 'Neuer Ordner - Private Sub ButtonNewDir_Click(sender As Object, e As EventArgs) Handles ButtonNewDir.Click - Dim f = "New Folder" -lb10: - f = InputBox("Create New Folder", "New Folder", f) - If f <> "" Then - If Directory.Exists(_myFolder & f) Then - MsgBox("Folder " & _myFolder & f & " already exists!") - GoTo lb10 - End If - Try - Directory.CreateDirectory(_myFolder & f) - SetFolder(_myFolder & f) - Catch ex As Exception - MsgBox("Cannot create " & f & "!") - End Try - End If - End Sub - - Private Shared Function fPATH(path As String) As String - Dim x = path.LastIndexOf("\") - If x = -1 Then - Return Microsoft.VisualBasic.Left(path, 0) - Else - Return Microsoft.VisualBasic.Left(path, x + 1) - End If - End Function - - Public ReadOnly Property Folder As String - Get - Return _myFolder - End Get - End Property - - Public ReadOnly Property Files As String() - Get - Return _myFiles - End Get - End Property - - Public Property ID As String - Get - Return _myId - End Get - Set(value As String) - _myId = value - End Set - End Property - - Public Property Extensions As String() - Get - Return _myExt - End Get - Set(value As String()) - _myExt = value - _lastExt = _myExt(0) - _noExt = False - End Set - End Property -End Class - - diff --git a/VECTO/BusAuxiliaries/UI/FB_FavDlog.designer.vb b/VECTO/BusAuxiliaries/UI/FB_FavDlog.designer.vb deleted file mode 100644 index 58df00746d..0000000000 --- a/VECTO/BusAuxiliaries/UI/FB_FavDlog.designer.vb +++ /dev/null @@ -1,128 +0,0 @@ -' Copyright 2017 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. -<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ -Partial Class FB_FavDlog - Inherits System.Windows.Forms.Form - - 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. - <System.Diagnostics.DebuggerNonUserCode()> _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Wird vom Windows Form-Designer benötigt. - Private components As System.ComponentModel.IContainer - - 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. - 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. - 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - <System.Diagnostics.DebuggerStepThrough()> _ - Private Sub InitializeComponent() - Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() - Me.OK_Button = New System.Windows.Forms.Button() - Me.Cancel_Button = New System.Windows.Forms.Button() - Me.ListBox1 = New System.Windows.Forms.ListBox() - Me.Label1 = New System.Windows.Forms.Label() - Me.TableLayoutPanel1.SuspendLayout() - Me.SuspendLayout() - ' - 'TableLayoutPanel1 - ' - Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TableLayoutPanel1.ColumnCount = 2 - Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) - Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) - Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0) - Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0) - Me.TableLayoutPanel1.Location = New System.Drawing.Point(326, 173) - Me.TableLayoutPanel1.Name = "TableLayoutPanel1" - Me.TableLayoutPanel1.RowCount = 1 - Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) - Me.TableLayoutPanel1.Size = New System.Drawing.Size(146, 29) - Me.TableLayoutPanel1.TabIndex = 0 - ' - 'OK_Button - ' - Me.OK_Button.Anchor = System.Windows.Forms.AnchorStyles.None - Me.OK_Button.Location = New System.Drawing.Point(3, 3) - Me.OK_Button.Name = "OK_Button" - Me.OK_Button.Size = New System.Drawing.Size(67, 23) - Me.OK_Button.TabIndex = 0 - Me.OK_Button.Text = "OK" - ' - 'Cancel_Button - ' - Me.Cancel_Button.Anchor = System.Windows.Forms.AnchorStyles.None - Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.Cancel_Button.Location = New System.Drawing.Point(76, 3) - Me.Cancel_Button.Name = "Cancel_Button" - Me.Cancel_Button.Size = New System.Drawing.Size(67, 23) - Me.Cancel_Button.TabIndex = 1 - Me.Cancel_Button.Text = "Cancel" - ' - 'ListBox1 - ' - Me.ListBox1.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.ListBox1.FormattingEnabled = True - Me.ListBox1.Location = New System.Drawing.Point(12, 12) - Me.ListBox1.Name = "ListBox1" - Me.ListBox1.Size = New System.Drawing.Size(460, 134) - Me.ListBox1.TabIndex = 1 - ' - 'Label1 - ' - Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(369, 147) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(106, 13) - Me.Label1.TabIndex = 2 - Me.Label1.Text = "(Double-Click to Edit)" - ' - 'FB_FavDlog - ' - Me.AcceptButton = Me.OK_Button - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit - Me.CancelButton = Me.Cancel_Button - Me.ClientSize = New System.Drawing.Size(484, 208) - Me.Controls.Add(Me.Label1) - Me.Controls.Add(Me.ListBox1) - Me.Controls.Add(Me.TableLayoutPanel1) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow - Me.MaximizeBox = False - Me.MaximumSize = New System.Drawing.Size(5000, 242) - Me.MinimizeBox = False - Me.MinimumSize = New System.Drawing.Size(0, 242) - Me.Name = "FB_FavDlog" - Me.ShowIcon = False - Me.ShowInTaskbar = False - Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent - Me.Text = "Edit Favorites" - Me.TableLayoutPanel1.ResumeLayout(False) - Me.ResumeLayout(False) - Me.PerformLayout() - - End Sub - Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel - Friend WithEvents OK_Button As System.Windows.Forms.Button - Friend WithEvents Cancel_Button As System.Windows.Forms.Button - Friend WithEvents ListBox1 As System.Windows.Forms.ListBox - Friend WithEvents Label1 As System.Windows.Forms.Label - -End Class diff --git a/VECTO/BusAuxiliaries/UI/FB_FavDlog.resx b/VECTO/BusAuxiliaries/UI/FB_FavDlog.resx deleted file mode 100644 index 1af7de150c..0000000000 --- a/VECTO/BusAuxiliaries/UI/FB_FavDlog.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/VECTO/BusAuxiliaries/UI/FB_FavDlog.vb b/VECTO/BusAuxiliaries/UI/FB_FavDlog.vb deleted file mode 100644 index 2e520d9c15..0000000000 --- a/VECTO/BusAuxiliaries/UI/FB_FavDlog.vb +++ /dev/null @@ -1,62 +0,0 @@ -' Copyright 2017 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. -Option Infer On - -Imports System.Windows.Forms - -''' <summary> -''' Sub-dialog for File Browser. Entirely controlled by cFilebrowser class (via FB_Dialog). -''' </summary> -''' <remarks></remarks> -Public Class FB_FavDlog - Private Const NoFavString As String = "<empty favorite slot>" - Private Const EmptyText As String = " " - - Private Sub FB_FavDlog_Load(sender As Object, e As EventArgs) Handles Me.Load - For x = 10 To 19 - Dim txt = FB_FolderHistory(x) - If txt = EmptyText Then - ListBox1.Items.Add(NoFavString) - Else - ListBox1.Items.Add(txt) - End If - Next - End Sub - - Private Sub OK_Button_Click(sender As Object, e As EventArgs) Handles OK_Button.Click - DialogResult = DialogResult.OK - Close() - End Sub - - Private Sub Cancel_Button_Click(sender As Object, e As EventArgs) Handles Cancel_Button.Click - DialogResult = DialogResult.Cancel - Close() - End Sub - - Private Sub ListBox1_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles ListBox1.MouseDoubleClick - Dim i = ListBox1.SelectedIndex - Dim txt = ListBox1.Items(i).ToString - - If txt = NoFavString Then txt = "" - - Dim fb = New cFileBrowser("DirBr", True, True) - - If fb.OpenDialog(txt) Then - txt = fb.Files(0) - ListBox1.Items.Insert(i, txt) - ListBox1.Items.RemoveAt(i + 1) - End If - End Sub - - Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged - - End Sub -End Class diff --git a/VECTO/BusAuxiliaries/UI/FB_Global.vb b/VECTO/BusAuxiliaries/UI/FB_Global.vb deleted file mode 100644 index 9b976a1f71..0000000000 --- a/VECTO/BusAuxiliaries/UI/FB_Global.vb +++ /dev/null @@ -1,182 +0,0 @@ -' Copyright 2017 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. -Imports System.IO - -''' <summary> -''' Global File Brower properties and cFilebrowser instances. -''' </summary> -''' <remarks></remarks> -Module FB_Global - Public FB_FolderHistory(19) As String - Public FB_Drives() As String - Public FB_Init As Boolean - Public FB_FilHisDir As String - '----------------------------- - Public fbFolder As cFileBrowser - Public fbVECTO As cFileBrowser - Public fbFileLists As cFileBrowser - Public fbVEH As cFileBrowser - Public fbDRI As cFileBrowser - Public fbMAP As cFileBrowser - Public fbFLD As cFileBrowser - - Public fbENG As cFileBrowser - Public fbGBX As cFileBrowser - Public fbACC As cFileBrowser - Public fbAUX As cFileBrowser - - Public fbGBS As cFileBrowser - Public fbTLM As cFileBrowser - Public fbRLM As cFileBrowser - Public fbTCC As cFileBrowser - Public fbCDx As cFileBrowser - - Public fbVMOD As cFileBrowser - - 'Paths - Private MyAppPath As String = My.Application.Info.DirectoryPath & "\" - Private MyConfPath As String = MyAppPath & "Config\" - Private MyDeclPath As String = MyAppPath & "Declaration\" - 'private FB_FilHisDir = MyConfPath & "FileHistory\" - Private HomePath As String = "<HOME>" - Private JobPath As String = "<JOBPATH>" - Private DefVehPath As String = "<VEHDIR>" - Private NoFile As String = "<NOFILE>" - Private EmptyString As String = "<EMPTYSTRING>" - Private Break As String = "<//>" - - Private Normed As String = "NORM" - - Private PauxSply As String = "<AUX_" - -#Region "File path functions" - - - 'Public Function GetRelativePath(filePath As String, basePath As String) As String - ' If (String.IsNullOrEmpty(filePath) OrElse String.IsNullOrEmpty(basePath)) Then - ' Return "" - ' End If - ' If (Path.GetDirectoryName(filePath).StartsWith(basePath, StringComparison.OrdinalIgnoreCase)) Then - ' Return Path.GetFullPath(filePath).Substring(basePath.Length + If(basePath.EndsWith("\"), 0, 1)) - ' End If - ' Return filePath - 'End Function - - - '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) - - 'If empty file => Abort - If file = "" Then Return "" - - 'Replace sKeys - file = Microsoft.VisualBasic.Strings.Replace(file, DefVehPath & "\", MyAppPath & "Default Vehicles\", 1, -1, - CompareMethod.Text) - file = Microsoft.VisualBasic.Strings.Replace(file, DefVehPath & "\", MyAppPath, 1, -1, CompareMethod.Text) - - '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 - - - 'Supplement Path, if not available - If fPATH(file) = "" Then - - Return ReplPath & file - - Else - Return file - End If - End Function - - 'Path one-level-up "C:\temp\ordner1\" >> "C:\temp\" - Private Function fPathUp(ByVal Pfad As String) As String - Dim x As Integer - - Pfad = Pfad.Substring(0, Pfad.Length - 1) - - x = Pfad.LastIndexOf("\") - - If x = -1 Then Return "" - - Return Pfad.Substring(0, x + 1) - End Function - - '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 Integer - 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 - - '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 - - '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 - - If MainDir = "" Then - path = MyAppPath - Else - path = MainDir - End If - - 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 Integer - 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 Integer - 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 - diff --git a/VECTO/BusAuxiliaries/UI/VECTO_Types.vb b/VECTO/BusAuxiliaries/UI/VECTO_Types.vb deleted file mode 100644 index cde354e37f..0000000000 --- a/VECTO/BusAuxiliaries/UI/VECTO_Types.vb +++ /dev/null @@ -1,22 +0,0 @@ -' Copyright 2017 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. - -''' <summary> -''' Determines how file extensions are set in the File Browser -''' </summary> -''' <remarks></remarks> -Public Enum tFbExtMode As Integer - ForceExt = 0 - MultiExt = 1 - SingleExt = 2 -End Enum - - diff --git a/VECTO/BusAuxiliaries/UI/cFileBrowser.vb b/VECTO/BusAuxiliaries/UI/cFileBrowser.vb deleted file mode 100644 index 3cfd6080f1..0000000000 --- a/VECTO/BusAuxiliaries/UI/cFileBrowser.vb +++ /dev/null @@ -1,163 +0,0 @@ -' Copyright 2017 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. - -''' <summary> -''' File Browser for Open/Save File dialogs and Folder Browser. Features File History and Favorite Folders. -''' </summary> -''' <remarks> -''' Usage: -''' 1. Create new instance, preferably in FB_Global, e.g. fbTXT = New cFileBrowser("txt") -''' 2. Define extensions, e.g. fbTXT.Extensions = New String() {"txt","log"} -''' 3. Use OpenDialog, SaveDialog, etc. -''' 4. Call Close method when closing application to write file history, e.g. fbTXT.Close -''' File history is unique for each ID. Folder history is global. -''' </remarks> -Public Class cFileBrowser - Private Initialized As Boolean - Private MyID As String - Private MyExt As String() - Private Dlog As FB_Dialog - Private NoExt As Boolean - Private bFolderBrowser As Boolean - Private bLightMode As Boolean - - ''' <summary> - ''' New cFileBrowser instance - ''' </summary> - ''' <param name="ID">Needed to save the file history when not using LightMode.</param> - ''' <param name="folderBrowser">Browse folders instead of files.</param> - ''' <param name="lightMode">If enabled file history is not saved.</param> - ''' <remarks></remarks> - Public Sub New(ByVal ID As String, Optional ByVal folderBrowser As Boolean = False, - Optional ByVal lightMode As Boolean = False) - Initialized = False - MyID = ID - NoExt = True - bFolderBrowser = folderBrowser - bLightMode = LightMode - End Sub - - ''' <summary> - ''' Opens dialog for OPENING files. Selected file must exist. Returns False if cancelled by user, else True. - ''' </summary> - ''' <param name="path">Initial selected file. If empty the last selected file is used. If file without directoy the last directory will be used.</param> - ''' <param name="multiFile">Allow selecting multiple files.</param> - ''' <param name="Ext">Set extension. If not defined the first predefined extension is used.</param> - ''' <returns></returns> - ''' <remarks></remarks> - Public Function OpenDialog(ByVal path As String, Optional ByVal multiFile As Boolean = False, - Optional ByVal Ext As String = "") As Boolean - Return CustomDialog(path, True, False, tFbExtMode.MultiExt, MultiFile, Ext, "Open") - End Function - - ''' <summary> - ''' Opens dialog for SAVING files. If file already exists user will be asked to overwrite. Returns False if cancelled by user, else True. - ''' </summary> - ''' <param name="path">Initial selected file. If empty the last selected file is used. If file without directoy the last directory will be used.</param> - ''' <param name="forceExt">Force predefined file extension.</param> - ''' <param name="Ext">Set extension. If not defined the first predefined extension is used.</param> - ''' <returns></returns> - ''' <remarks></remarks> - Public Function SaveDialog(ByVal path As String, Optional ByVal forceExt As Boolean = True, - Optional ByVal Ext As String = "") As Boolean - Dim x As tFbExtMode - If ForceExt Then - x = tFbExtMode.ForceExt - Else - x = tFbExtMode.SingleExt - End If - Return CustomDialog(path, False, True, x, False, Ext, "Save As") - End Function - - ''' <summary> - ''' Custom open/save dialog. Returns False if cancelled by user, else True. - ''' </summary> - ''' <param name="path">Initial selected file. If empty the last selected file is used. If file without directoy the last directory will be used.</param> - ''' <param name="fileMustExist">Selected file must exist.</param> - ''' <param name="overwriteCheck">If file already exists user will be asked to overwrite.</param> - ''' <param name="extMode">ForceExt= First predefined extension (or Ext parameter) will be forced (Default for SaveDialog), MultiExt= All files with predefined extensions are shown (Default for OpenDialog), SingleExt= All files with the first predefined extension will be shown.</param> - ''' <param name="multiFile">Allow to select multiple files.</param> - ''' <param name="ext">Set extension. If not defined the first predefined extension is used.</param> - ''' <param name="title">Dialog title.</param> - ''' <returns></returns> - ''' <remarks></remarks> - Public Function CustomDialog(ByVal path As String, ByVal fileMustExist As Boolean, ByVal overwriteCheck As Boolean, - ByVal extMode As tFbExtMode, ByVal multiFile As Boolean, ByVal ext As String, - Optional title As String = "File Browser") As Boolean - If Not Initialized Then Init() - Return Dlog.Browse(path, fileMustExist, overwriteCheck, extMode, multiFile, ext, Title) - End Function - - 'Manually update File History - ''' <summary> - ''' Add file to file history. - ''' </summary> - ''' <param name="path">File to be added to file history.</param> - ''' <remarks></remarks> - Public Sub UpdateHistory(ByVal path As String) - If Not Initialized Then Init() - Dlog.UpdateHistory(Path) - End Sub - - ''' <summary> - ''' Save file history (if not LightMode) and global folder history. - ''' </summary> - ''' <remarks></remarks> - Public Sub Close() - If Initialized Then - Dlog.SaveAndClose() - Initialized = False - End If - Dlog = Nothing - End Sub - - Private Sub Init() - Dlog = New FB_Dialog(bLightMode) - Dlog.ID = MyID - If Not NoExt Then Dlog.Extensions = MyExt - If bFolderBrowser Then Dlog.SetFolderBrowser() - Initialized = True - End Sub - - ''' <summary> - ''' Predefined file extensions. Must be set before Open/Save dialog is used for the first time. - ''' </summary> - ''' <value></value> - ''' <returns></returns> - ''' <remarks></remarks> - Public Property Extensions() As String() - Get - Return MyExt - End Get - Set(ByVal value As String()) - MyExt = value - NoExt = False - End Set - End Property - - ''' <summary> - ''' Selected file(s) oder folder (if FolderBrowser) - ''' </summary> - ''' <value></value> - ''' <returns></returns> - ''' <remarks></remarks> - Public ReadOnly Property Files() As String() - Get - If Initialized Then - Return Dlog.Files - Else - Return New String() {""} - End If - End Get - End Property -End Class - - diff --git a/VECTO/BusAuxiliaries/UI/frmAuxiliaryConfig.vb b/VECTO/BusAuxiliaries/UI/frmAuxiliaryConfig.vb index ea3eb9f95b..2c84681450 100644 --- a/VECTO/BusAuxiliaries/UI/frmAuxiliaryConfig.vb +++ b/VECTO/BusAuxiliaries/UI/frmAuxiliaryConfig.vb @@ -837,24 +837,24 @@ Public Class frmAuxiliaryConfig Private Sub btnFuelMap_Click(sender As Object, e As EventArgs) Handles btnFuelMap.Click - Dim fbAux As New cFileBrowser("AAUXFuelMap", False, False) + Dim fbAux As New FileBrowser("AAUXFuelMap", False, False) ' Dim vectoFile As String = "C:\Users\tb28\Source\Workspaces\VECTO\AuxillaryTestHarness\bin\Debug\vectopath.vecto" - Dim fname As String = fFILE(vectoFile, True) + Dim fname As String = Path.GetFileName(vectoFile) ' fFILE(vectoFile, True) fbAux.Extensions = New String() {"vmap"} ' If fbAux.OpenDialog(fFileRepl(fname, fPATH(VECTOfile))) Then - If fbAux.OpenDialog(fPATH(vectoFile)) Then + If fbAux.OpenDialog(Path.GetDirectoryName(vectoFile)) Then - txtFuelMap.Text = fFileWoDir(fbAux.Files(0), fPATH(vectoFile)) + txtFuelMap.Text = GetRelativePath(fbAux.Files(0), path.GetDirectoryName(vectoFile)) End If End Sub Private Sub btnAlternatorMapPath_Click(sender As Object, e As EventArgs) Handles btnAlternatorMapPath.Click - Dim fbAux As New cFileBrowser("AAUXALT", False, False) + Dim fbAux As New FileBrowser("AAUXALT", False, False) fbAux.Extensions = New String() {"AALT"} Dim suppliedAALTPath As String = txtAlternatorMapPath.Text @@ -887,10 +887,10 @@ Public Class frmAuxiliaryConfig While needToFindOrCreateFile 'Find / Create file and configure. - If fbAux.CustomDialog(absoluteAALTPath, False, False, tFbExtMode.ForceExt, False, String.Empty) Then - txtAlternatorMapPath.Text = fFileWoDir(fbAux.Files(0), fPATH(vectoFile)) + If fbAux.CustomDialog(absoluteAALTPath, False, False, FileBrowserFileExtensionMode.ForceExt, False, String.Empty) Then + txtAlternatorMapPath.Text = GetRelativePath(fbAux.Files(0), Path.GetDirectoryName(vectoFile)) suppliedAALTPath = txtAlternatorMapPath.Text - absoluteAALTPath = FilePathUtils.ResolveFilePath(fPATH(vectoFile), suppliedAALTPath) + absoluteAALTPath = FilePathUtils.ResolveFilePath(path.GetDirectoryName(vectoFile), suppliedAALTPath) If _ IO.File.Exists(absoluteAALTPath) OrElse @@ -915,7 +915,7 @@ Public Class frmAuxiliaryConfig txtAlternatorMapPath.Text = If(suppliedAALTPath.Contains(aauxPath), suppliedAALTPath.Replace(aauxPath, ""), suppliedAALTPath) Else - txtAlternatorMapPath.Text = fFileWoDir(suppliedAALTPath) + txtAlternatorMapPath.Text = path.GetFileName(suppliedAALTPath) End If Else Return @@ -930,11 +930,11 @@ Public Class frmAuxiliaryConfig Private Sub btnCompressorMap_Click(sender As Object, e As EventArgs) Handles btnCompressorMap.Click - Dim fbAux As New cFileBrowser("AAUXComp", False, False) + Dim fbAux As New FileBrowser("AAUXComp", False, False) ' Dim vectoFile As String = "C:\Users\tb28\Source\Workspaces\VECTO\AuxillaryTestHarness\bin\Debug\vectopath.vecto" - Dim fname As String = fFILE(vectoFile, True) + Dim fname As String = path.GetFileName(vectoFile) fbAux.Extensions = New String() {"ACMP"} If fbAux.OpenDialog(Path.Combine(aauxPath, txtCompressorMap.Text)) Then @@ -955,10 +955,10 @@ Public Class frmAuxiliaryConfig Private Sub btnActuationsMap_Click(sender As Object, e As EventArgs) Handles btnActuationsMap.Click - Dim fbAux As New cFileBrowser("AAUXPneuAct", False, False) + Dim fbAux As New FileBrowser("AAUXPneuAct", False, False) ' Dim vectoFile As String = "C:\Users\tb28\Source\Workspaces\VECTO\AuxillaryTestHarness\bin\Debug\vectopath.vecto" - Dim fname As String = fFILE(vectoFile, True) + Dim fname As String = path.GetFileName(vectoFile) fbAux.Extensions = New String() {"APAC"} If fbAux.OpenDialog(Path.Combine(aauxPath, txtActuationsMap.Text)) Then @@ -982,7 +982,7 @@ Public Class frmAuxiliaryConfig Private Sub btnBusDatabaseSource_Click(sender As Object, e As EventArgs) Handles btnBusDatabaseSource.Click - Dim fbAux As New cFileBrowser("AAUXBusDB", False, False) + Dim fbAux As New FileBrowser("AAUXBusDB", False, False) Dim message As String = String.Empty @@ -1011,7 +1011,7 @@ Public Class frmAuxiliaryConfig Private Sub btnSSMBSource_Click(sender As Object, e As EventArgs) Handles btnSSMBSource.Click - Dim fbAux As New cFileBrowser("AAUXSSM", False, False) + Dim fbAux As New FileBrowser("AAUXSSM", False, False) fbAux.Extensions = New String() {"AHSM"} Dim suppliedSSMPath As String = txtSSMFilePath.Text.Trim() @@ -1048,7 +1048,7 @@ Public Class frmAuxiliaryConfig While needToFindOrCreateFile 'Find / Create file and configure. - If fbAux.CustomDialog(absoluteSSMPath, False, False, tFbExtMode.ForceExt, False, String.Empty) Then + If fbAux.CustomDialog(absoluteSSMPath, False, False, FileBrowserFileExtensionMode.ForceExt, False, String.Empty) Then txtSSMFilePath.Text = GetRelativePath(fbAux.Files(0), aauxPath) suppliedSSMPath = txtSSMFilePath.Text absoluteSSMPath = FilePathUtils.ResolveFilePath(aauxPath, suppliedSSMPath) @@ -1074,7 +1074,7 @@ Public Class frmAuxiliaryConfig txtSSMFilePath.Text = If(suppliedSSMPath.Contains(aauxPath), suppliedSSMPath.Replace(aauxPath, ""), suppliedSSMPath) Else - txtSSMFilePath.Text = fFileWoDir(suppliedSSMPath) + txtSSMFilePath.Text = path.GetFileName(suppliedSSMPath) End If Else Return @@ -1098,29 +1098,29 @@ Public Class frmAuxiliaryConfig Private Sub btnAALTOpen_Click(sender As Object, e As EventArgs) Handles btnAALTOpen.Click - OpenFiles(fFileRepl(Me.txtAlternatorMapPath.Text, fPATH(vectoFile))) + OpenFiles(GetRelativePath(Me.txtAlternatorMapPath.Text, Path.GetDirectoryName(vectoFile))) End Sub Private Sub btnOpenACMP_Click(sender As Object, e As EventArgs) Handles btnOpenACMP.Click - OpenFiles(fFileRepl(Me.txtCompressorMap.Text, fPATH(vectoFile))) + OpenFiles(GetRelativePath(Me.txtCompressorMap.Text, Path.GetDirectoryName(vectoFile))) End Sub Private Sub btnOpenAPAC_Click(sender As Object, e As EventArgs) Handles btnOpenAPAC.Click - OpenFiles(fFileRepl(Me.txtActuationsMap.Text, fPATH(vectoFile))) + OpenFiles(GetRelativePath(Me.txtActuationsMap.Text, Path.GetDirectoryName(vectoFile))) End Sub Private Sub btnOpenAHSM_Click(sender As Object, e As EventArgs) Handles btnOpenAHSM.Click - OpenFiles(fFileRepl(Me.txtSSMFilePath.Text, fPATH(vectoFile))) + OpenFiles(GetRelativePath(Me.txtSSMFilePath.Text, Path.GetDirectoryName(vectoFile))) End Sub Private Sub btnOpenABDB_Click(sender As Object, e As EventArgs) Handles btnOpenABDB.Click - OpenFiles(fFileRepl(Me.txtBusDatabaseFilePath.Text, fPATH(vectoFile))) + OpenFiles(GetRelativePath(Me.txtBusDatabaseFilePath.Text, Path.GetDirectoryName(vectoFile))) End Sub diff --git a/VECTO/BusAuxiliaries/UI/frmHVACTool.vb b/VECTO/BusAuxiliaries/UI/frmHVACTool.vb index 089497e12b..a62ae99998 100644 --- a/VECTO/BusAuxiliaries/UI/frmHVACTool.vb +++ b/VECTO/BusAuxiliaries/UI/frmHVACTool.vb @@ -3,6 +3,7 @@ Imports System.Windows.Forms Imports System.ComponentModel Imports System.Drawing Imports System.Globalization +Imports System.IO Imports System.Linq Imports TUGraz.VectoCommon.Utils Imports TUGraz.VectoCore.BusAuxiliaries.Interfaces.DownstreamModules.HVAC @@ -224,8 +225,8 @@ Public Class frmHVACTool cboLineType.DataSource = {"Normal", "ActiveVentilation"} txtEC_EnvironmentConditionsFilePath.Tag = ssmTOOL.GenInputs.EC_EnviromentalConditions_BatchFile - txtEC_EnvironmentConditionsFilePath.Text = fFileWoDir(ssmTOOL.GenInputs.EC_EnviromentalConditions_BatchFile, - fPATH(vectoFile)) + txtEC_EnvironmentConditionsFilePath.Text = GetRelativePath(ssmTOOL.GenInputs.EC_EnviromentalConditions_BatchFile, + Path.GetDirectoryName(vectoFile)) txtEC_EnvironmentConditionsFilePath.ReadOnly = True btnEnvironmentConditionsSource.Enabled = False btnOpenAenv.Enabled = False @@ -722,7 +723,7 @@ Public Class frmHVACTool Try Dim environmentalConditionsMap As IEnvironmentalConditionsMap = - New EnvironmentalConditionsMap(CType(txtEC_EnvironmentConditionsFilePath.Tag, String), fPATH(vectoFile)) + New EnvironmentalConditionsMap(CType(txtEC_EnvironmentConditionsFilePath.Tag, String), Path.GetDirectoryName(vectoFile)) ErrorProvider1.SetError(txtEC_EnvironmentConditionsFilePath, String.Empty) ssmTOOL.GenInputs.EC_EnviromentalConditions_BatchFile = CType(txtEC_EnvironmentConditionsFilePath.Tag, String) Catch ex As Exception @@ -1460,14 +1461,14 @@ Public Class frmHVACTool Private Sub btnEnvironmentConditionsSource_Click(sender As Object, e As EventArgs) _ Handles btnEnvironmentConditionsSource.Click - Dim ecFileBrowser As New cFileBrowser("AAUXEnv", True, False) + Dim ecFileBrowser As New FileBrowser("AAUXEnv", True, False) ecFileBrowser.Extensions = New String() {"aenv"} - If ecFileBrowser.OpenDialog(fPATH(vectoFile)) Then + If ecFileBrowser.OpenDialog(path.GetDirectoryName(vectoFile)) Then txtEC_EnvironmentConditionsFilePath.Tag = ecFileBrowser.Files(0) - txtEC_EnvironmentConditionsFilePath.Text = fFileWoDir(ecFileBrowser.Files(0), fPATH(vectoFile)) + txtEC_EnvironmentConditionsFilePath.Text = GetRelativePath(ecFileBrowser.Files(0), path.GetDirectoryName(vectoFile)) txtEC_EnvironmentConditionsFilePath.Focus() txtAH_FuelFiredHeaterkW.Focus() @@ -1496,7 +1497,7 @@ Public Class frmHVACTool Private cmFilesList As String() Private Sub btnOpenECDB_Click(sender As Object, e As EventArgs) Handles btnOpenAenv.Click - OpenFiles(fFileRepl(Me.txtEC_EnvironmentConditionsFilePath.Text, fPATH(vectoFile))) + OpenFiles(path.Combine(Me.txtEC_EnvironmentConditionsFilePath.Text, path.GetDirectoryName(vectoFile))) End Sub Public Function FileOpenAlt(ByVal file As String) As Boolean diff --git a/VECTO/VECTO.vbproj b/VECTO/VECTO.vbproj index 5f2d6f5196..72180b5a6c 100644 --- a/VECTO/VECTO.vbproj +++ b/VECTO/VECTO.vbproj @@ -200,20 +200,6 @@ </ItemGroup> <ItemGroup> <Compile Include="ApplicationEvents.vb" /> - <Compile Include="BusAuxiliaries\UI\cFileBrowser.vb" /> - <Compile Include="BusAuxiliaries\UI\FB_Dialog.designer.vb"> - <DependentUpon>FB_Dialog.vb</DependentUpon> - </Compile> - <Compile Include="BusAuxiliaries\UI\FB_Dialog.vb"> - <SubType>Form</SubType> - </Compile> - <Compile Include="BusAuxiliaries\UI\FB_FavDlog.designer.vb"> - <DependentUpon>FB_FavDlog.vb</DependentUpon> - </Compile> - <Compile Include="BusAuxiliaries\UI\FB_FavDlog.vb"> - <SubType>Form</SubType> - </Compile> - <Compile Include="BusAuxiliaries\UI\FB_Global.vb" /> <Compile Include="BusAuxiliaries\UI\frmAuxiliaryConfig.Designer.vb"> <DependentUpon>frmAuxiliaryConfig.vb</DependentUpon> </Compile> @@ -232,7 +218,6 @@ <Compile Include="BusAuxiliaries\UI\frmHVACTool.vb"> <SubType>Form</SubType> </Compile> - <Compile Include="BusAuxiliaries\UI\VECTO_Types.vb" /> <Compile Include="BusAuxiliaries\Util\DeleteCell.vb" /> <Compile Include="BusAuxiliaries\Util\DeleteColumn.vb" /> <Compile Include="BusAuxiliaries\Util\SIConvert.vb" /> @@ -391,13 +376,6 @@ </Compile> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="BusAuxiliaries\UI\FB_Dialog.resx"> - <DependentUpon>FB_Dialog.vb</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> - <EmbeddedResource Include="BusAuxiliaries\UI\FB_FavDlog.resx"> - <DependentUpon>FB_FavDlog.vb</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="BusAuxiliaries\UI\frmAuxiliaryConfig.resx"> <DependentUpon>frmAuxiliaryConfig.vb</DependentUpon> </EmbeddedResource> -- GitLab