419 lines
57 KiB
HTML
419 lines
57 KiB
HTML
<html>
|
|
|
|
<head>
|
|
<title>Update File Raw References Example (VB.NET)</title>
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
|
<link rel="stylesheet" type="text/css" href="ApiHelp.css">
|
|
</head>
|
|
<meta name=MS-HKWD content="VB.NET examples,files">
|
|
<meta name=MS-HKWD content="VB.NET examples,references">
|
|
<meta name=MS-HKWD content="VB.NET examples,file references">
|
|
|
|
<body>
|
|
<h1><font size="1"><span style="font-weight: 400">SOLIDWORKS PDM Professional API Help</span></h1>
|
|
<h1>Update File Raw References Example (VB.NET)</h1>
|
|
<p><a name="Top"></a>This example shows how to get file references directly
|
|
from a file and update file references directly in that file.</p>
|
|
<p><b>NOTE</b>: If using the primary interop assembly
|
|
provided with SOLIDWORKS PDM Professional, see
|
|
<a href="Using_NET_Framework_in_Applications.htm">Using .NET Framework 4.0 in
|
|
Stand-alone Applications</a>.</p>
|
|
<p><img border="0" src="UpdateFileRefs.gif" width="315" height="302"></p>
|
|
|
|
</font>
|
|
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"><span style="color: green">'----------------------------------------------------------------------------</span>
|
|
<span style="color: green">' Preconditions:</span>
|
|
<span style="color: green">' 1. Start Microsoft Visual Studio.</span>
|
|
<span style="color: green">' a. Click <b>File > New > Project > Visual Basic > Windows Forms Application</b>.</span>
|
|
<span style="color: green">' b. Type <b>RawReferencesVBNET</b> in <b>Name</b>.</span>
|
|
<span style="color: green">' c. Click <b>Browse</b> and navigate to the folder where to create the project.</span>
|
|
<span style="color: green">' d. Click <b>OK</b>. </span>
|
|
<span style="color: green">' e. Click <b>Show All Files</b> in the Solution Explorer toolbar and expand </span>
|
|
<span style="color: green">' <b>Form1.vb</b> in the Solution Explorer.</span>
|
|
<span style="color: green">' f. Replace the code in <b>Form1.vb</b> with <a href="#Form1">this code</a>.</span>
|
|
<span style="color: green">' g. To create the form, replace the code in <b>Form1.Designer.vb</b> with </span>
|
|
<span style="color: green">' <a href="#Designer">this code</a>.</span>
|
|
<span style="color: green">' 2. Add <b>EPDM.Interop.epdm.dll</b> as a reference (right-click the project</span>
|
|
<span style="color: green">' name in the Solution Explorer, click <b>Add Reference</b>, click </span>
|
|
<span style="color: green">' <b>Assemblies > Framework</b> in the left-side panel, browse to the top folder of </span>
|
|
<span style="color: green">' your SOLIDWORKS PDM Professional installation, locate and click </span>
|
|
<span style="color: green">' <b>EPDM.Interop.epdm.dll</b>, click <b>Open</b>, click <b>Add</b>, and click <b>Close</b>).</span>
|
|
<span style="color: green">' 3. Right-click <b>EPDM.Interop.epdm</b> in References, click <b>Properties</b>, and set </span>
|
|
<span style="color: green">' <b>Embed Interop Types </b>to <b>False</b> to handle methods that pass arrays of </span>
|
|
<span style="color: green">' structures.</span>
|
|
<span style="color: green">' 4. Check out a SOLIDWORKS assembly or drawing document whose file
|
|
' references you want to update and check out all of the document's
|
|
' referenced files.</span>
|
|
<span style="color: green">' 5. Click <b>Debug > Start Debugging</b> or press F5.</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">' Postconditions: </span>
|
|
<span style="color: green">' 1. Displays the Update Raw References in File dialog box.</span><span style="color:green;">
|
|
' 2. Select the vault view where the SOLIDWORKS assembly or</span>
|
|
<span style="color:green;">' drawing document that you checked out in</span>
|
|
<span style="color:green;">' Preconditions step 4 resides.</span>
|
|
<span style="color: green">' 3. Click <b>Open file</b>.</span>
|
|
<span style="color: green">' 4. Displays the Open a file dialog box.</span><span style="color:green;">
|
|
' a. Click the assembly or drawing document you checked</span>
|
|
<span style="color:green;">' out in Preconditions step 4.</span><span style="color: green">
|
|
' b. Click <b>Open</b>.</span>
|
|
<span style="color: green">' The opened file's path and file name appear </span>
|
|
<span style="color: green">' in the Update Raw References in File dialog box.</span>
|
|
<span style="color: green">' 5. Click <b>Get references</b>.</span>
|
|
<span style="color: green">' a. Displays a message box for each referenced file.
|
|
' The referenced file's ID, path and file name, file name,
|
|
' type, and number of times referenced appear in the
|
|
' message box.</span>
|
|
<span style="color: green">' b. Click <b>OK</b> to close each message box.</span>
|
|
<span style="color: green">' 6. Rename one of the referenced files in the selected vault
|
|
' in File Explorer.</span>
|
|
<span style="color: green">' 7. Click <b>Update references</b>.</span>
|
|
<span style="color: green">' a. Displays a message box confirming that references were updated.</span>
|
|
<span style="color: green">' b. Click <b>OK</b> to close the message box.</span>
|
|
<span style="color: green">' 8. Click <b>Get references</b>.</span>
|
|
<span style="color: green">' a. Displays a message box for each referenced file.
|
|
' The referenced file's ID, path and file name, file name,
|
|
' type, and number of times referenced appear in the
|
|
' message box. Note that the renamed file is now a referenced
|
|
' file of the open document.</span>
|
|
<span style="color: green">' b. Click <b>OK</b> to close each message box.</span>
|
|
<span style="color: green">' 9. Click <b>Close file</b>.</span><span style="color:green;">
|
|
' 10. Click <b>OK</b> to close the message box confirming that the
|
|
' open document was closed.</span>
|
|
<span style="color:green;">' 11. Close the Update Raw References in File dialog box.</span>
|
|
<span style="color:green;">' 12. Check in the SOLIDWORKS assembly or drawing and its
|
|
' file references.</span>
|
|
<span style="color: green">'----------------------------------------------------------------------------</span>
|
|
<span style="color: green"><a name="Form1"></a>'Form1.vb</span>
|
|
<span style="color: blue">Imports</span> EPDM.Interop.epdm
|
|
|
|
|
|
<span style="color: blue">Public</span> <span style="color: blue">Class</span> <span style="color: #2b91af">Form1</span>
|
|
|
|
<span style="color: blue">Private</span> vault1 <span style="color: blue">As</span> <span style="color: #2b91af">IEdmVault5</span> = <span style="color: blue">Nothing</span>
|
|
<span style="color: blue">Dim</span> aFile <span style="color: blue">As</span> <span style="color: #2b91af">IEdmFile5</span>
|
|
<span style="color: blue">Dim</span> fileName <span style="color: blue">As</span> <span style="color: blue">String</span>
|
|
<span style="color: blue">Dim</span> rawRefs <span style="color: blue">As</span> <span style="color: #2b91af">IEdmRawReferenceMgr</span>
|
|
<span style="color: blue">Dim</span> refs() <span style="color: blue">As</span> <span style="color: #2b91af">EdmRawReference</span> = <span style="color: blue">Nothing</span>
|
|
|
|
|
|
<span style="color: blue">Private</span> <span style="color: blue">Sub</span> Form1_Load( _
|
|
<span style="color: blue">ByVal</span> sender <span style="color: blue">As</span> System.<span style="color: #2b91af">Object</span>, _
|
|
<span style="color: blue">ByVal</span> e <span style="color: blue">As</span> System.<span style="color: #2b91af">EventArgs</span>) _
|
|
<span style="color: blue">Handles</span> <span style="color: blue">MyBase</span>.Load
|
|
|
|
<span style="color: blue">Try</span>
|
|
<span style="color: blue">Dim</span> vault <span style="color: blue">As</span> <span style="color: #2b91af">IEdmVault8</span> = <span style="color: blue">New</span> <span style="color: #2b91af">EdmVault5</span>
|
|
<span style="color: blue">Dim</span> Views() <span style="color: blue">As</span> <span style="color: #2b91af">EdmViewInfo</span> = <span style="color: blue">Nothing</span>
|
|
|
|
vault.<b>GetVaultViews</b>(Views, <span style="color: blue">False</span>)
|
|
VaultsComboBox.Items.Clear()
|
|
<span style="color: blue">For</span> <span style="color: blue">Each</span> View <span style="color: blue">As</span> <span style="color: #2b91af">EdmViewInfo</span> <span style="color: blue">In</span> Views
|
|
VaultsComboBox.Items.Add(View.<b>mbsVaultName</b>)
|
|
<span style="color: blue">Next</span>
|
|
<span style="color: blue">If</span> VaultsComboBox.Items.Count > 0 <span style="color: blue">Then</span>
|
|
VaultsComboBox.Text = VaultsComboBox.Items(0)
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> Runtime.InteropServices.<span style="color: #2b91af">COMException</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"HRESULT = 0x"</span> + _
|
|
ex.ErrorCode.ToString(<span style="color: #a31515">"X"</span>) + vbCrLf + _
|
|
ex.Message)
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> <span style="color: #2b91af">Exception</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(ex.Message)
|
|
<span style="color: blue">End</span> <span style="color: blue">Try</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">Sub</span>
|
|
|
|
<span style="color: blue">Public</span> <span style="color: blue">Sub</span> UpdateButton_Click(<span style="color: blue">ByVal</span> sender <span style="color: blue">As</span> System.<span style="color: #2b91af">Object</span>, <span style="color: blue">ByVal</span> e <span style="color: blue">As</span> System.<span style="color: #2b91af">EventArgs</span>) <span style="color: blue">Handles</span> UpdateButton.Click
|
|
<span style="color: blue">Try</span>
|
|
<span style="color: green">'Only create a new vault object</span>
|
|
<span style="color: green">'if one hasn't been created yet</span>
|
|
<span style="color: blue">If</span> vault1 <span style="color: blue">Is</span> <span style="color: blue">Nothing</span> <span style="color: blue">Then</span>
|
|
vault1 = <span style="color: blue">New</span> <span style="color: #2b91af">EdmVault5</span>()
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: blue">If</span> <span style="color: blue">Not</span> vault1.<b>IsLoggedIn</b> <span style="color: blue">Then</span>
|
|
<span style="color: green">'Log into selected vault as the current user</span>
|
|
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color: blue">Me</span>.Handle.ToInt32())
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: green">'Update the file references directly in the file</span>
|
|
rawRefs.<b>UpdateReferences</b>(refs)
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"File references updated."</span>)
|
|
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> System.Runtime.InteropServices.<span style="color: #2b91af">COMException</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"HRESULT = 0x"</span> + ex.ErrorCode.ToString(<span style="color: #a31515">"X"</span>) + <span style="color: #a31515">" "</span> + ex.Message)
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> <span style="color: #2b91af">Exception</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(ex.Message)
|
|
<span style="color: blue">End</span> <span style="color: blue">Try</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">Sub</span>
|
|
|
|
<span style="color: blue">Public</span> <span style="color: blue">Sub</span> OpenButton_Click(<span style="color: blue">ByVal</span> sender <span style="color: blue">As</span> System.<span style="color: #2b91af">Object</span>, <span style="color: blue">ByVal</span> e <span style="color: blue">As</span> System.<span style="color: #2b91af">EventArgs</span>) <span style="color: blue">Handles</span> OpenButton.Click
|
|
<span style="color: blue">Try</span>
|
|
<span style="color: green">'If one hasn't been created yet</span>
|
|
<span style="color: blue">If</span> vault1 <span style="color: blue">Is</span> <span style="color: blue">Nothing</span> <span style="color: blue">Then</span>
|
|
vault1 = <span style="color: blue">New</span> <span style="color: #2b91af">EdmVault5</span>()
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: blue">If</span> <span style="color: blue">Not</span> vault1.<b>IsLoggedIn</b> <span style="color: blue">Then</span>
|
|
<span style="color: green">'Log into selected vault as the current user</span>
|
|
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color: blue">Me</span>.Handle.ToInt32())
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
<span style="color: green">'Set the initial directory in the Open a file dialog</span>
|
|
OpenFileDialog1.InitialDirectory = vault1.<b>RootFolderPath</b>
|
|
<span style="color: green">'Show the Open a file dialog</span>
|
|
<span style="color: blue">Dim</span> DialogResult <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">DialogResult</span> = <span style="color: blue">Nothing</span>
|
|
DialogResult = OpenFileDialog1.ShowDialog()
|
|
|
|
<span style="color: blue">If</span> <span style="color: blue">Not</span> (DialogResult = System.Windows.Forms.<span style="color: #2b91af">DialogResult</span>.OK) <span style="color: blue">Then</span>
|
|
<span style="color: green">'Do nothing</span>
|
|
<span style="color: blue">Else</span>
|
|
<font color="#008080"> </font><font color="#008000"> </font><span style="color: #008000">'</span><font color="#008000">Open a file</font>
|
|
fileName = OpenFileDialog1.FileName
|
|
FileListBox.Items.Add(fileName)
|
|
aFile = vault1.<b>GetFileFromPath</b>(fileName)
|
|
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: green">'Get IEdmRawReferences interface </span>
|
|
rawRefs = vault1.<b>CreateUtility</b>(<span style="color: #2b91af">EdmUtility</span>.EdmUtil_RawReferenceMgr)
|
|
<span style="color: blue">Dim</span> fileRefsSupported <span style="color: blue">As</span> <span style="color: blue">Boolean</span>
|
|
fileRefsSupported = rawRefs.<b>Open</b>(fileName)
|
|
<span style="color: blue">If</span> <span style="color: blue">Not</span> fileRefsSupported <span style="color: blue">Then</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"File's format does not support file references."</span>)
|
|
<span style="color: blue">Exit Sub</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> System.Runtime.InteropServices.<span style="color: #2b91af">COMException</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"HRESULT = 0x"</span> + ex.ErrorCode.ToString(<span style="color: #a31515">"X"</span>) + <span style="color: #a31515">" "</span> + ex.Message)
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> <span style="color: #2b91af">Exception</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(ex.Message)
|
|
<span style="color: blue">End</span> <span style="color: blue">Try</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">Sub</span>
|
|
|
|
<span style="color: blue">Private</span> <span style="color: blue">Sub</span> GetButton_Click(<span style="color: blue">ByVal</span> sender <span style="color: blue">As</span> System.<span style="color: #2b91af">Object</span>, <span style="color: blue">ByVal</span> e <span style="color: blue">As</span> System.<span style="color: #2b91af">EventArgs</span>) <span style="color: blue">Handles</span> GetButton.Click
|
|
<span style="color: blue">Try</span>
|
|
<span style="color: green">'Only create a new vault object</span>
|
|
<span style="color: green">'if one hasn't been created yet</span>
|
|
<span style="color: blue">If</span> vault1 <span style="color: blue">Is</span> <span style="color: blue">Nothing</span> <span style="color: blue">Then</span>
|
|
vault1 = <span style="color: blue">New</span> <span style="color: #2b91af">EdmVault5</span>()
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: blue">If</span> <span style="color: blue">Not</span> vault1.<b>IsLoggedIn</b> <span style="color: blue">Then</span>
|
|
<span style="color: green">'Log into selected vault as the current user</span>
|
|
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color: blue">Me</span>.Handle.ToInt32())
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: blue">Dim</span> arrSize <span style="color: blue">As</span> <span style="color: blue">Integer</span>
|
|
<span style="color: blue">Dim</span> i <span style="color: blue">As</span> <span style="color: blue">Integer</span> = 0
|
|
<span style="color: blue">Dim</span> message <span style="color: blue">As</span> <span style="color: blue">String
|
|
</span> <span style="color: green">'Get the file references directly from the file</span>
|
|
rawRefs.<b>GetReferences</b>(refs)
|
|
arrSize = refs.Length
|
|
<span style="color: blue">If</span> arrSize = 0 <span style="color: blue">Then</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"No file references for opened file."</span>)
|
|
<span style="color: blue">Exit Sub</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
<span style="color: blue">While</span> i < arrSize
|
|
message = <span style="color: #a31515">"File reference information: "</span> + vbLf + vbLf
|
|
message = message + <span style="color: #a31515">" Internal ID: "</span> + refs(i).<b>mbsRefID</b> + vbLf
|
|
message = message + <span style="color: #a31515">" Referenced how: "</span> + refs(i).<b>mbsIncludePath</b> + vbLf
|
|
message = message + <span style="color: #a31515">" Reference name: "</span> + refs(i).<b>mbsRefName</b> + vbLf
|
|
message = message + <span style="color: #a31515">" Number of times file referenced = "</span> + refs(i).<b>mlCount</b>.ToString + vbLf
|
|
<span style="color: blue">Select</span> <span style="color: blue">Case</span> refs(i).<b>mlFlags</b>
|
|
<span style="color: blue">Case</span> <span style="color: #2b91af">EdmRawRefFlags</span>.Edmrrf_Ghost
|
|
message = message + <span style="color: #a31515">" Type = DWG files can store grandchildren as references"</span> + vbLf
|
|
<span style="color: blue">Case</span> <span style="color: #2b91af">EdmRawRefFlags</span>.Edmrrf_InternalComponent
|
|
message = message + <span style="color: #a31515">" Type = Not used"</span> + vbLf
|
|
<span style="color: blue">Case</span> <span style="color: #2b91af">EdmRawRefFlags</span>.Edmrrf_Nothing
|
|
message = message + <span style="color: #a31515">" Type = Normal file reference"</span> + vbLf
|
|
<span style="color: blue">End</span> <span style="color: blue">Select</span>
|
|
i = i + 1
|
|
<span style="color: #2b91af">MessageBox</span>.Show(message)
|
|
<span style="color: blue">End</span> <span style="color: blue">While</span>
|
|
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> System.Runtime.InteropServices.<span style="color: #2b91af">COMException</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"HRESULT = 0x"</span> + ex.ErrorCode.ToString(<span style="color: #a31515">"X"</span>) + <span style="color: #a31515">" "</span> + ex.Message)
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> <span style="color: #2b91af">Exception</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(ex.Message)
|
|
<span style="color: blue">End</span> <span style="color: blue">Try</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">Sub</span>
|
|
|
|
<span style="color: blue">Private</span> <span style="color: blue">Sub</span> CloseButton_Click(<span style="color: blue">ByVal</span> sender <span style="color: blue">As</span> System.<span style="color: #2b91af">Object</span>, <span style="color: blue">ByVal</span> e <span style="color: blue">As</span> System.<span style="color: #2b91af">EventArgs</span>) <span style="color: blue">Handles</span> CloseButton.Click
|
|
<span style="color: blue">Try</span>
|
|
<span style="color: green">'Only create a new vault object</span>
|
|
<span style="color: green">'if one hasn't been created yet</span>
|
|
<span style="color: blue">If</span> vault1 <span style="color: blue">Is</span> <span style="color: blue">Nothing</span> <span style="color: blue">Then</span>
|
|
vault1 = <span style="color: blue">New</span> <span style="color: #2b91af">EdmVault5</span>()
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: blue">If</span> <span style="color: blue">Not</span> vault1.<b>IsLoggedIn</b> <span style="color: blue">Then</span>
|
|
<span style="color: green">'Log into selected vault as the current user</span>
|
|
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color: blue">Me</span>.Handle.ToInt32())
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
|
|
<span style="color: green">'Close the file</span>
|
|
rawRefs.<b>Close</b>()
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"File closed."</span>)
|
|
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> System.Runtime.InteropServices.<span style="color: #2b91af">COMException</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(<span style="color: #a31515">"HRESULT = 0x"</span> + ex.ErrorCode.ToString(<span style="color: #a31515">"X"</span>) + <span style="color: #a31515">" "</span> + ex.Message)
|
|
<span style="color: blue">Catch</span> ex <span style="color: blue">As</span> <span style="color: #2b91af">Exception</span>
|
|
<span style="color: #2b91af">MessageBox</span>.Show(ex.Message)
|
|
<span style="color: blue">End</span> <span style="color: blue">Try</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">Sub</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">Class</span></pre>
|
|
<div align="center">
|
|
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"><font face="Calibri"><span style="color: #0000FF"><a href="#Top">Back to top</a></span></font></pre>
|
|
</div>
|
|
<div align="left">
|
|
<pre style="font-family: Courier New; font-size: 13; color: #008000; background: white"><a name="Designer"></a>'Form.Designer.vb</pre>
|
|
</div>
|
|
<div align="left">
|
|
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"><<span style="color: blue">Global</span>.Microsoft.VisualBasic.CompilerServices.<span style="color: #2b91af">DesignerGenerated</span>()> _
|
|
<span style="color: blue">Partial</span> <span style="color: blue">Class</span> <span style="color: #2b91af">Form1</span>
|
|
<span style="color: blue">Inherits</span> System.Windows.Forms.<span style="color: #2b91af">Form</span>
|
|
|
|
<span style="color: green">'Form overrides dispose to clean up the component list.</span>
|
|
<System.Diagnostics.<span style="color: #2b91af">DebuggerNonUserCode</span>()> _
|
|
<span style="color: blue">Protected</span> <span style="color: blue">Overrides</span> <span style="color: blue">Sub</span> Dispose(<span style="color: blue">ByVal</span> disposing <span style="color: blue">As</span> <span style="color: blue">Boolean</span>)
|
|
<span style="color: blue">Try</span>
|
|
<span style="color: blue">If</span> disposing <span style="color: blue">AndAlso</span> components <span style="color: blue">IsNot</span> <span style="color: blue">Nothing</span> <span style="color: blue">Then</span>
|
|
components.Dispose()
|
|
<span style="color: blue">End</span> <span style="color: blue">If</span>
|
|
<span style="color: blue">Finally</span>
|
|
<span style="color: blue">MyBase</span>.Dispose(disposing)
|
|
<span style="color: blue">End</span> <span style="color: blue">Try</span>
|
|
<span style="color: blue">End</span> <span style="color: blue">Sub</span>
|
|
|
|
<span style="color: green">'Required by the Windows Form Designer</span>
|
|
<span style="color: blue">Private</span> components <span style="color: blue">As</span> System.ComponentModel.<span style="color: #2b91af">IContainer</span>
|
|
|
|
<span style="color: green">'NOTE: The following procedure is required by the Windows Form Designer</span>
|
|
<span style="color: green">'It can be modified using the Windows Form Designer. </span>
|
|
<span style="color: green">'Do not modify it using the code editor.</span>
|
|
<System.Diagnostics.<span style="color: #2b91af">DebuggerStepThrough</span>()> _
|
|
<span style="color: blue">Private</span> <span style="color: blue">Sub</span> InitializeComponent()
|
|
<span style="color: blue">Me</span>.Label1 = <span style="color: blue">New</span> System.Windows.Forms.<span style="color: #2b91af">Label</span>()
|
|
<span style="color: blue">Me</span>.VaultsComboBox = <span style="color: blue">New</span> System.Windows.Forms.<span style="color: #2b91af">ComboBox</span>()
|
|
<span style="color: blue">Me</span>.OpenButton = <span style="color: blue">New</span> System.Windows.Forms.<span style="color: #2b91af">Button</span>()
|
|
<span style="color: blue">Me</span>.GetButton = <span style="color: blue">New</span> System.Windows.Forms.<span style="color: #2b91af">Button</span>()
|
|
<span style="color: blue">Me</span>.UpdateButton = <span style="color: blue">New</span> System.Windows.Forms.<span style="color: #2b91af">Button</span>()
|
|
<span style="color: blue">Me</span>.CloseButton = <span style="color: blue">New</span> System.Windows.Forms.<span style="color: #2b91af">Button</span>()
|
|
<span style="color: blue">Me</span>.FileListBox = <span style="color: blue">New</span> System.Windows.Forms.<span style="color: #2b91af">ListBox</span>()
|
|
<span style="color: blue">Me</span>.OpenFileDialog1 = <span style="color: blue">New</span> System.Windows.Forms.<span style="color: #2b91af">OpenFileDialog</span>()
|
|
<span style="color: blue">Me</span>.SuspendLayout()
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'Label1</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.Label1.AutoSize = <span style="color: blue">True</span>
|
|
<span style="color: blue">Me</span>.Label1.Location = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Point</span>(88, 26)
|
|
<span style="color: blue">Me</span>.Label1.Name = <span style="color: #a31515">"Label1"</span>
|
|
<span style="color: blue">Me</span>.Label1.Size = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Size</span>(91, 13)
|
|
<span style="color: blue">Me</span>.Label1.TabIndex = 0
|
|
<span style="color: blue">Me</span>.Label1.Text = <span style="color: #a31515">"Select vault view:"</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'VaultsComboBox</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.VaultsComboBox.FormattingEnabled = <span style="color: blue">True</span>
|
|
<span style="color: blue">Me</span>.VaultsComboBox.Location = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Point</span>(55, 42)
|
|
<span style="color: blue">Me</span>.VaultsComboBox.Name = <span style="color: #a31515">"VaultsComboBox"</span>
|
|
<span style="color: blue">Me</span>.VaultsComboBox.Size = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Size</span>(154, 21)
|
|
<span style="color: blue">Me</span>.VaultsComboBox.TabIndex = 1
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'OpenButton</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.OpenButton.Location = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Point</span>(55, 88)
|
|
<span style="color: blue">Me</span>.OpenButton.Name = <span style="color: #a31515">"OpenButton"</span>
|
|
<span style="color: blue">Me</span>.OpenButton.Size = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Size</span>(154, 23)
|
|
<span style="color: blue">Me</span>.OpenButton.TabIndex = 2
|
|
<span style="color: blue">Me</span>.OpenButton.Text = <span style="color: #a31515">"Open file"</span>
|
|
<span style="color: blue">Me</span>.OpenButton.UseVisualStyleBackColor = <span style="color: blue">True</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'GetButton</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.GetButton.Location = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Point</span>(12, 165)
|
|
<span style="color: blue">Me</span>.GetButton.Name = <span style="color: #a31515">"GetButton"</span>
|
|
<span style="color: blue">Me</span>.GetButton.Size = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Size</span>(108, 23)
|
|
<span style="color: blue">Me</span>.GetButton.TabIndex = 3
|
|
<span style="color: blue">Me</span>.GetButton.Text = <span style="color: #a31515">"Get references"</span>
|
|
<span style="color: blue">Me</span>.GetButton.UseVisualStyleBackColor = <span style="color: blue">True</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'UpdateButton</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.UpdateButton.Location = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Point</span>(164, 165)
|
|
<span style="color: blue">Me</span>.UpdateButton.Name = <span style="color: #a31515">"UpdateButton"</span>
|
|
<span style="color: blue">Me</span>.UpdateButton.Size = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Size</span>(108, 23)
|
|
<span style="color: blue">Me</span>.UpdateButton.TabIndex = 4
|
|
<span style="color: blue">Me</span>.UpdateButton.Text = <span style="color: #a31515">"Update references"</span>
|
|
<span style="color: blue">Me</span>.UpdateButton.UseVisualStyleBackColor = <span style="color: blue">True</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'CloseButton</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.CloseButton.Location = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Point</span>(55, 222)
|
|
<span style="color: blue">Me</span>.CloseButton.Name = <span style="color: #a31515">"CloseButton"</span>
|
|
<span style="color: blue">Me</span>.CloseButton.Size = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Size</span>(154, 23)
|
|
<span style="color: blue">Me</span>.CloseButton.TabIndex = 5
|
|
<span style="color: blue">Me</span>.CloseButton.Text = <span style="color: #a31515">"Close file"</span>
|
|
<span style="color: blue">Me</span>.CloseButton.UseVisualStyleBackColor = <span style="color: blue">True</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'FileListBox</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.FileListBox.FormattingEnabled = <span style="color: blue">True</span>
|
|
<span style="color: blue">Me</span>.FileListBox.Location = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Point</span>(12, 118)
|
|
<span style="color: blue">Me</span>.FileListBox.Name = <span style="color: #a31515">"FileListBox"</span>
|
|
<span style="color: blue">Me</span>.FileListBox.Size = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Size</span>(260, 30)
|
|
<span style="color: blue">Me</span>.FileListBox.TabIndex = 6
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'OpenFileDialog1</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.OpenFileDialog1.FileName = <span style="color: #a31515">"OpenFileDialog1"</span>
|
|
<span style="color: blue">Me</span>.OpenFileDialog1.Multiselect = <span style="color: blue">True</span>
|
|
<span style="color: blue">Me</span>.OpenFileDialog1.Title = <span style="color: #a31515">"Open a file"</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: green">'Form1</span>
|
|
<span style="color: green">'</span>
|
|
<span style="color: blue">Me</span>.AutoScaleDimensions = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">SizeF</span>(6.0!, 13.0!)
|
|
<span style="color: blue">Me</span>.AutoScaleMode = System.Windows.Forms.<span style="color: #2b91af">AutoScaleMode</span>.Font
|
|
<span style="color: blue">Me</span>.ClientSize = <span style="color: blue">New</span> System.Drawing.<span style="color: #2b91af">Size</span>(284, 264)
|
|
<span style="color: blue">Me</span>.Controls.Add(<span style="color: blue">Me</span>.FileListBox)
|
|
<span style="color: blue">Me</span>.Controls.Add(<span style="color: blue">Me</span>.CloseButton)
|
|
<span style="color: blue">Me</span>.Controls.Add(<span style="color: blue">Me</span>.UpdateButton)
|
|
<span style="color: blue">Me</span>.Controls.Add(<span style="color: blue">Me</span>.GetButton)
|
|
<span style="color: blue">Me</span>.Controls.Add(<span style="color: blue">Me</span>.OpenButton)
|
|
<span style="color: blue">Me</span>.Controls.Add(<span style="color: blue">Me</span>.VaultsComboBox)
|
|
<span style="color: blue">Me</span>.Controls.Add(<span style="color: blue">Me</span>.Label1)
|
|
<span style="color: blue">Me</span>.Name = <span style="color: #a31515">"Form1"</span>
|
|
<span style="color: blue">Me</span>.Text = <span style="color: #a31515">"Update References in File"</span>
|
|
<span style="color: blue">Me</span>.ResumeLayout(<span style="color: blue">False</span>)
|
|
<span style="color: blue">Me</span>.PerformLayout()
|
|
|
|
<span style="color: blue">End</span> <span style="color: blue">Sub</span>
|
|
<span style="color: blue">Friend</span> <span style="color: blue">WithEvents</span> Label1 <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">Label</span>
|
|
<span style="color: blue">Friend</span> <span style="color: blue">WithEvents</span> VaultsComboBox <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">ComboBox</span>
|
|
<span style="color: blue">Friend</span> <span style="color: blue">WithEvents</span> OpenButton <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">Button</span>
|
|
<span style="color: blue">Friend</span> <span style="color: blue">WithEvents</span> GetButton <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">Button</span>
|
|
<span style="color: blue">Friend</span> <span style="color: blue">WithEvents</span> UpdateButton <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">Button</span>
|
|
<span style="color: blue">Friend</span> <span style="color: blue">WithEvents</span> CloseButton <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">Button</span>
|
|
<span style="color: blue">Friend</span> <span style="color: blue">WithEvents</span> FileListBox <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">ListBox</span>
|
|
<span style="color: blue">Friend</span> <span style="color: blue">WithEvents</span> OpenFileDialog1 <span style="color: blue">As</span> System.Windows.Forms.<span style="color: #2b91af">OpenFileDialog</span>
|
|
|
|
<span style="color: blue">End</span> <span style="color: blue">Class</span></pre>
|
|
<div align="center">
|
|
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"><font face="Calibri"><span style="color: #0000FF"><a href="#Top">Back to top</a></span></font></pre>
|
|
</div>
|
|
<pre style="font-family: Courier New; font-size: 13; color: #008000; background: white"> </pre>
|
|
</div>
|
|
<div align="left">
|
|
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"> </pre>
|
|
</div>
|
|
<div align="left">
|
|
<pre style="font-family: Courier New; font-size: 13; color: black; background: white">
|
|
</pre>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|