Initial Commit of the PDM project (ready for DWS migration)
This commit is contained in:
@@ -0,0 +1,400 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Get File's State Transitions 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,states">
|
||||
<meta name=MS-HKWD content="VB.NET examples,transitions">
|
||||
|
||||
<body>
|
||||
<h1><font size="1"><span style="font-weight: 400">SOLIDWORKS PDM Professional API Help</span></h1>
|
||||
<h1>Get File's State Transitions Example (VB.NET)</h1>
|
||||
<p><a name="Top"></a>This example shows how to get a file's current and next possible state
|
||||
transitions.</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="StateTransitions.gif" width="339" height="222"></p>
|
||||
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE"><span style="color:green;">'----------------------------------------------------------------------------</span><br>
|
||||
<span style="color:green;">' Preconditions:</span><br>
|
||||
<span style="color:green;">' 1. Start Microsoft Visual Studio.</span><br>
|
||||
<span style="color:green;">' a. Click <b>File > New > Project > Visual Basic > Windows Forms Application</b>.</span><br>
|
||||
<span style="color:green;">' b. Type <b>StatesVBNET</b> in <b>Name</b>.</span><br>
|
||||
<span style="color:green;">' c. Click <b>Browse</b> and navigate to the folder where to create the project.</span><br>
|
||||
<span style="color:green;">' d. Click <b>OK</b>. </span><br>
|
||||
<span style="color:green;">' e. Click <b>Show All Files</b> in the Solution Explorer toolbar and expand </span><br>
|
||||
<span style="color:green;">' <b>Form1.vb</b> in the Solution Explorer.</span><br>
|
||||
<span style="color:green;">' f. Replace the code in <b>Form1.vb</b> with <a href="#Form1">this code</a>.</span><br>
|
||||
<span style="color:green;">' g. To create the form, replace the code in <b>Form1.Designer.vb</b> with </span><br>
|
||||
<span style="color:green;">' <a href="#Designer">this code</a>.</span><br>
|
||||
<span style="color:green;">' 2. Add <b>EPDM.Interop.epdm.dll</b> as a reference (right-click the project</span><br>
|
||||
<span style="color:green;">' name in the Solution Explorer, click <b>Add Reference</b>, click </span><br>
|
||||
<span style="color:green;">' <b>Assemblies > Framework</b> in the left-side panel, browse to the top folder of </span><br>
|
||||
<span style="color:green;">' your SOLIDWORKS PDM Professional installation, locate and click </span><br>
|
||||
<span style="color:green;">' <b>EPDM.Interop.epdm.dll</b>, click <b>Open</b>, click <b>Add</b>, and click <b>Close</b>).</span><br>
|
||||
<span style="color:green;">' 3. Right-click <b>EPDM.Interop.epdm </b>in References, click <b>Properties</b>, and set </span><br>
|
||||
<span style="color:green;">' <b>Embed Interop Types </b>to <b>False</b> to handle methods that pass arrays of </span><br>
|
||||
<span style="color:green;">' structures.<br>
|
||||
' 4. Ensure that the vault contains a file in a workflow state.</span><br>
|
||||
<span style="color:green;">' 5. Click <b>Debug > Start Debugging</b> or press F5.</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:green;">' Postconditions: </span><br>
|
||||
<span style="color:green;">' 1. Displays the State Transitions dialog box.</span><br>
|
||||
<span style="color:green;">' 2. Select a vault view.</span><br>
|
||||
<span style="color:green;">' 3. Click <b>Browse</b>.</span><br>
|
||||
<span style="color:green;">' 4. Displays the Select a file dialog box.</span><br>
|
||||
<span style="color:green;">' a. Select a file in the selected vault.</span><br>
|
||||
<span style="color:green;">' b. Click <b>Open</b>.</span><br>
|
||||
<span style="color:green;">' The selected file's path and file name appear </span><br>
|
||||
<span style="color:green;">' in the Select a file dialog box.</span><br>
|
||||
<span style="color:green;">' 5. Click <b>Get state transitions</b>. </span><br>
|
||||
<span style="color:green;">' 6. Displays a message box showing the name of the selected</span><br>
|
||||
<span style="color:green;">' file and its current and next possible state transitions.</span><br>
|
||||
<span style="color:green;">' 7. Click <b>OK</b> to close the message box.<br>
|
||||
' 8. Displays a message box showing whether the logged-in user must<br>
|
||||
' add a comment when transitioning the selected file to one of
|
||||
its next<br>
|
||||
' possible states.<br>
|
||||
' 9. Click <b>OK</b> to close the message box.<br>
|
||||
'10. Displays a message box with the archive server log.<br>
|
||||
'11. Click <b>OK</b> to close the message box.</span><br>
|
||||
<span style="color:green;">'12. Close the State Transitions dialog box.</span><br>
|
||||
<span style="color:green;">'----------------------------------------------------------------------------</span><br>
|
||||
<span style="color:green;"><a name="Form1"></a>'Form1.vb</span><br>
|
||||
<span style="color:blue;">Imports</span> EPDM.Interop.epdm<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<span style="color:blue;">Public</span> <span style="color:blue;">Class</span> <span style="color:#2b91af;">Form1</span><br>
|
||||
<br>
|
||||
<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><br>
|
||||
<span style="color:blue;">Dim</span> aFile <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmFile5</span><br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> Form1_Load( _<br>
|
||||
<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> System.<span style="color:#2b91af;">Object</span>, _<br>
|
||||
<span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.<span style="color:#2b91af;">EventArgs</span>) _<br>
|
||||
<span style="color:blue;">Handles</span> <span style="color:blue;">MyBase</span>.Load<br>
|
||||
<br>
|
||||
<span style="color:blue;">Try</span><br>
|
||||
<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><br>
|
||||
<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><br>
|
||||
<br>
|
||||
vault.<b>GetVaultViews</b>(Views, <span style="color:blue;">False</span>)<br>
|
||||
VaultsComboBox.Items.Clear()<br>
|
||||
<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<br>
|
||||
VaultsComboBox.Items.Add(View.<b>mbsVaultName</b>)<br>
|
||||
<span style="color:blue;">Next</span><br>
|
||||
<span style="color:blue;">If</span> VaultsComboBox.Items.Count > 0 <span style="color:blue;">Then</span><br>
|
||||
VaultsComboBox.Text = VaultsComboBox.Items(0)<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> Runtime.InteropServices.<span style="color:#2b91af;">COMException</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">"HRESULT = 0x"</span> + _<br>
|
||||
ex.ErrorCode.ToString(<span style="color:#a31515;">"X"</span>) + vbCrLf + _<br>
|
||||
ex.Message)<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> <span style="color:#2b91af;">Exception</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message)<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Try</span><br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">Public</span> <span style="color:blue;">Sub</span> GetTransitionButton_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> GetTransitionButton.Click<br>
|
||||
<span style="color:blue;">Try</span><br>
|
||||
<span style="color:green;">'Only create a new vault object</span><br>
|
||||
<span style="color:green;">'if one hasn't been created yet</span><br>
|
||||
<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><br>
|
||||
vault1 = <span style="color:blue;">New</span> <span style="color:#2b91af;">EdmVault5</span>()<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">If</span> <span style="color:blue;">Not</span> vault1.<b>IsLoggedIn</b> <span style="color:blue;">Then</span><br>
|
||||
<span style="color:green;">'Log into selected vault as the current user</span><br>
|
||||
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color:blue;">Me</span>.Handle.ToInt32())<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If<br>
|
||||
<br>
|
||||
</span><span style="color: #2b91af">
|
||||
</span><span style="color:blue;">Dim</span> vault2<span style="color: #2b91af">
|
||||
</span><span style="color:blue;">As</span> <span style="color: #2b91af">IEdmVault20</span><br>
|
||||
vault2 = vault1<br>
|
||||
<br>
|
||||
<span style="color:green;">'Get the file's current workflow state</span><br>
|
||||
<span style="color:blue;">Dim</span> workflowState <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmState5</span><br>
|
||||
workflowState = aFile.<b>CurrentState</b><br>
|
||||
<br>
|
||||
<span style="color:green;">'Start an enumeration of the transitions to </span><br>
|
||||
<span style="color:green;">'and from the file's current workflow state</span><br>
|
||||
<span style="color:blue;">Dim</span> pos <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmPos5</span><br>
|
||||
pos = workflowState.<b>GetFirstTransitionPosition</b><br>
|
||||
<br>
|
||||
<span style="color:green;">'Make sure current workflow state</span><br>
|
||||
<span style="color:green;">'has a next transition state</span><br>
|
||||
<span style="color:green;">'If not, exit application</span><br>
|
||||
<span style="color:blue;">If</span> pos.IsNull <span style="color:blue;">Then</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">"No next possible transition states."</span>)<br>
|
||||
<span style="color:blue;">Exit Sub</span><br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
</p>
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE">
|
||||
<font face="Courier New"><span style="color:blue;">
|
||||
Dim</span> transition <span style="color:blue;">As</span> IEdmTransition10<br>
|
||||
<br>
|
||||
<span style="color:green;">'Get the file's next possible transition to or from </span><br>
|
||||
<span style="color:green;">'the file's current workflow state</span><br>
|
||||
transition = workflowState.<b>GetNextTransition</b>(pos)<br>
|
||||
<br>
|
||||
<span style="color:blue;">Dim</span> message <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:#a31515;">"Current state for "</span> + aFile.<b>Name</b> + <span style="color:#a31515;">": "</span> + vbLf<br>
|
||||
message = message + <span style="color:#a31515;">" * "</span> + workflowState.<b>Name</b> + vbLf + vbLf<br>
|
||||
message = message + <span style="color:#a31515;">"Next possible state transitions for "</span> + aFile.<b>Name</b> + <span style="color:#a31515;">":"</span> + vbLf<br>
|
||||
message = message + <span style="color:#a31515;">" * "</span> + transition.<b>Name</b> + vbLf<br>
|
||||
<span style="color:green;">'message = message + " Requires authentication? " + transition.<b>Authentication</b>.ToString + vbLf</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'Iterate through the file's remaining next possible </span><br>
|
||||
<span style="color:green;">'transitions to or from the file's current workflow state</span><br>
|
||||
<span style="color:blue;">While</span> (<span style="color:blue;">Not</span> pos.IsNull)<br>
|
||||
transition = workflowState.<b>GetNextTransition</b>(pos)<br>
|
||||
message = message + <span style="color:#a31515;">" * "</span> + transition.<b>Name</b> + vbLf<br>
|
||||
<span style="color:green;">'message = message + " Requires authentication? " + transition.<b>Authentication</b>.ToString + vbLf</span><br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">While</span></font><br>
|
||||
<br>
|
||||
<font face="Courier New"><span style="color:green;">'Display a message box showing the file's name and its</span><br>
|
||||
<span style="color:green;">'next possible state transitions</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(message)<br>
|
||||
</font></p>
|
||||
<pre style="font-family: Courier New; font-size: 13; color: black; background: white" class="NewStyle"><span style="color:blue;"> Dim</span> userMgr <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmUserMgr10</span>
|
||||
userMgr = vault2.<b>CreateUtility</b>(<span style="color:#2b91af;">EdmUtility</span>.EdmUtil_UserMgr)
|
||||
<span style="color:blue;">Dim</span> user <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmUser5</span>
|
||||
user = userMgr.<b>GetLoggedInUser</b>()
|
||||
<span style="color:blue;">Dim</span> files(0) <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>
|
||||
files(0) = aFile.<b>ID</b>
|
||||
<span style="color:blue;">Dim</span> transitions(0) <span style="color:blue;">As</span> <span style="color:blue;">String</span>
|
||||
transitions(0) = transition.<b>Name</b> <span style="color:green;">'a possible transition</span>
|
||||
<span style="color:blue;">Dim</span> permBool <span style="color:blue;">As</span> <span style="color:blue;">Object</span>
|
||||
|
||||
permBool = vault2.<b>GetTransitionCommentPermissions</b>(user.ID, files, transitions)
|
||||
message = <span style="color:#a31515;">"Logged-in user, "</span> & user.<b>Name</b> & <span style="color:#a31515;">", must add a state change comment on "</span> & transition.<b>Name</b> & <span style="color:#a31515;">" for "</span> & aFile.<b>Name</b> & <span style="color:#a31515;">"? "</span> & permBool(0)
|
||||
|
||||
<font face="Courier New"> <font color="#008000">'Display a message box showing whether the logged-in user must add a comment
|
||||
'when transitioning the file to one of the next possible states</font></font>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(message)<font face="Courier New"><br> </font></pre>
|
||||
<p style="font-family: Couriere New; font-size: 13; color: black; background: white" class="APICODE">
|
||||
<span style="color:green;">
|
||||
'Display a message box with the archive server log</span><br>
|
||||
<span style="color:blue;">Dim</span> asLog <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:#a31515;">""</span><br>
|
||||
vault1.<b>GetArchiveServerLog</b>(asLog)<br>
|
||||
message = <span style="color:#a31515;">"Archive server log: "</span> & asLog<font face="Courier New"><br>
|
||||
</font><span style="color:#2b91af;">MessageBox</span>.Show(message)<font face="Courier New"><br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> System.Runtime.InteropServices.<span style="color:#2b91af;">COMException</span><br>
|
||||
<br>
|
||||
<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)<br>
|
||||
<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> <span style="color:#2b91af;">Exception</span><br>
|
||||
<br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message)<br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Try</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span><br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="color:blue;">Public</span> <span style="color:blue;">Sub</span> BrowseButton_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> BrowseButton.Click<br>
|
||||
<br>
|
||||
<span style="color:blue;">Try</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'If one hasn't been created yet</span><br>
|
||||
<br>
|
||||
<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><br>
|
||||
<br>
|
||||
vault1 = <span style="color:blue;">New</span> <span style="color:#2b91af;">EdmVault5</span>()<br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="color:blue;">If</span> <span style="color:blue;">Not</span> vault1.<b>IsLoggedIn</b> <span style="color:blue;">Then</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'Log into selected vault as the current user</span><br>
|
||||
<br>
|
||||
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color:blue;">Me</span>.Handle.ToInt32())<br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'Set the initial directory in the Select a file dialog</span><br>
|
||||
<br>
|
||||
OpenFileDialog1.InitialDirectory = vault1.<b>RootFolderPath</b><br>
|
||||
<br>
|
||||
<span style="color:green;">'Show the Select a file dialog</span><br>
|
||||
<br>
|
||||
<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><br>
|
||||
<br>
|
||||
DialogResult = OpenFileDialog1.ShowDialog()<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<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><br>
|
||||
<br>
|
||||
<span style="color:green;">'Do nothing</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">Else</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'Browse for a file whose next possible state <br>
|
||||
<br>
|
||||
'transitions to get</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">Dim</span> fileName <span style="color:blue;">As</span> <span style="color:blue;">String</span> = OpenFileDialog1.FileName<br>
|
||||
<br>
|
||||
FileListBox.Items.Add(fileName)<br>
|
||||
<br>
|
||||
aFile = vault1.<b>GetFileFromPath</b>(fileName)<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> System.Runtime.InteropServices.<span style="color:#2b91af;">COMException</span><br>
|
||||
<br>
|
||||
<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)<br>
|
||||
<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> <span style="color:#2b91af;">Exception</span><br>
|
||||
<br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message)<br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Try</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span><br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Class</span></font><br>
|
||||
</p>
|
||||
|
||||
<p align="center" class="APICODE"><font face="Courier New"><a href="#Top">Back to top</a></font></p>
|
||||
<p class="APICODE"><font size="2" color="#008000" face="Courier New"><a name="Designer"></a>
|
||||
'Form1.Designer.vb</font></p>
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE"><<span style="color:blue;">Global</span>.Microsoft.VisualBasic.CompilerServices.<span style="color:#2b91af;">DesignerGenerated</span>()> _<br>
|
||||
<span style="color:blue;">Partial</span> <span style="color:blue;">Class</span> <span style="color:#2b91af;">Form1</span><br>
|
||||
<span style="color:blue;">Inherits</span> System.Windows.Forms.<span style="color:#2b91af;">Form</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'Form overrides dispose to clean up the component list.</span><br>
|
||||
<System.Diagnostics.<span style="color:#2b91af;">DebuggerNonUserCode</span>()> _<br>
|
||||
<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>)<br>
|
||||
<span style="color:blue;">Try</span><br>
|
||||
<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><br>
|
||||
components.Dispose()<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<span style="color:blue;">Finally</span><br>
|
||||
<span style="color:blue;">MyBase</span>.Dispose(disposing)<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Try</span><br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'Required by the Windows Form Designer</span><br>
|
||||
<span style="color:blue;">Private</span> components <span style="color:blue;">As</span> System.ComponentModel.<span style="color:#2b91af;">IContainer</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'NOTE: The following procedure is required by the Windows Form Designer</span><br>
|
||||
<span style="color:green;">'It can be modified using the Windows Form Designer. </span><br>
|
||||
<span style="color:green;">'Do not modify it using the code editor.</span><br>
|
||||
<System.Diagnostics.<span style="color:#2b91af;">DebuggerStepThrough</span>()> _<br>
|
||||
<span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> InitializeComponent()<br>
|
||||
<span style="color:blue;">Me</span>.VaultsLabel = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">Label</span>()<br>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">ComboBox</span>()<br>
|
||||
<span style="color:blue;">Me</span>.FileListBox = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">ListBox</span>()<br>
|
||||
<span style="color:blue;">Me</span>.OpenFileDialog1 = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">OpenFileDialog</span>()<br>
|
||||
<span style="color:blue;">Me</span>.BrowseButton = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span>()<br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span>()<br>
|
||||
<span style="color:blue;">Me</span>.SuspendLayout()<br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:green;">'VaultsLabel</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:blue;">Me</span>.VaultsLabel.AutoSize = <span style="color:blue;">True</span><br>
|
||||
<span style="color:blue;">Me</span>.VaultsLabel.ImageAlign = System.Drawing.<span style="color:#2b91af;">ContentAlignment</span>.MiddleLeft<br>
|
||||
<span style="color:blue;">Me</span>.VaultsLabel.Location = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Point</span>(25, 28)<br>
|
||||
<span style="color:blue;">Me</span>.VaultsLabel.Name = <span style="color:#a31515;">"VaultsLabel"</span><br>
|
||||
<span style="color:blue;">Me</span>.VaultsLabel.Size = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(91, 13)<br>
|
||||
<span style="color:blue;">Me</span>.VaultsLabel.TabIndex = 0<br>
|
||||
<span style="color:blue;">Me</span>.VaultsLabel.Text = <span style="color:#a31515;">"Select vault view:"</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:green;">'VaultsComboBox</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.FormattingEnabled = <span style="color:blue;">True</span><br>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.Location = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Point</span>(28, 44)<br>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.Name = <span style="color:#a31515;">"VaultsComboBox"</span><br>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.Size = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(190, 21)<br>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.TabIndex = 1<br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:green;">'FileListBox</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:blue;">Me</span>.FileListBox.FormattingEnabled = <span style="color:blue;">True</span><br>
|
||||
<span style="color:blue;">Me</span>.FileListBox.Location = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Point</span>(28, 97)<br>
|
||||
<span style="color:blue;">Me</span>.FileListBox.Name = <span style="color:#a31515;">"FileListBox"</span><br>
|
||||
<span style="color:blue;">Me</span>.FileListBox.Size = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(190, 17)<br>
|
||||
<span style="color:blue;">Me</span>.FileListBox.TabIndex = 3<br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:green;">'OpenFileDialog1</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:blue;">Me</span>.OpenFileDialog1.FileName = <span style="color:#a31515;">"OpenFileDialog1"</span><br>
|
||||
<span style="color:blue;">Me</span>.OpenFileDialog1.Multiselect = <span style="color:blue;">True</span><br>
|
||||
<span style="color:blue;">Me</span>.OpenFileDialog1.Title = <span style="color:#a31515;">"Select a file"</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:green;">'BrowseButton</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:blue;">Me</span>.BrowseButton.Location = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Point</span>(236, 97)<br>
|
||||
<span style="color:blue;">Me</span>.BrowseButton.Name = <span style="color:#a31515;">"BrowseButton"</span><br>
|
||||
<span style="color:blue;">Me</span>.BrowseButton.Size = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(56, 23)<br>
|
||||
<span style="color:blue;">Me</span>.BrowseButton.TabIndex = 4<br>
|
||||
<span style="color:blue;">Me</span>.BrowseButton.Text = <span style="color:#a31515;">"Browse..."</span><br>
|
||||
<span style="color:blue;">Me</span>.BrowseButton.TextAlign = System.Drawing.<span style="color:#2b91af;">ContentAlignment</span>.MiddleLeft<br>
|
||||
<span style="color:blue;">Me</span>.BrowseButton.UseVisualStyleBackColor = <span style="color:blue;">True</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:green;">'GetTransitionButton</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton.ImageAlign = System.Drawing.<span style="color:#2b91af;">ContentAlignment</span>.MiddleLeft<br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton.Location = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Point</span>(28, 152)<br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton.Name = <span style="color:#a31515;">"GetTransitionButton"</span><br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton.Size = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(201, 23)<br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton.TabIndex = 5<br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton.Text = <span style="color:#a31515;">"Get next possible state transitions"</span><br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton.TextAlign = System.Drawing.<span style="color:#2b91af;">ContentAlignment</span>.MiddleLeft<br>
|
||||
<span style="color:blue;">Me</span>.GetTransitionButton.UseVisualStyleBackColor = <span style="color:blue;">True</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<span style="color:green;">'Form1</span><br>
|
||||
<span style="color:green;">'</span><br>
|
||||
<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!)<br>
|
||||
<span style="color:blue;">Me</span>.AutoScaleMode = System.Windows.Forms.<span style="color:#2b91af;">AutoScaleMode</span>.Font<br>
|
||||
<span style="color:blue;">Me</span>.ClientSize = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(323, 184)<br>
|
||||
<span style="color:blue;">Me</span>.Controls.Add(<span style="color:blue;">Me</span>.GetTransitionButton)<br>
|
||||
<span style="color:blue;">Me</span>.Controls.Add(<span style="color:blue;">Me</span>.BrowseButton)<br>
|
||||
<span style="color:blue;">Me</span>.Controls.Add(<span style="color:blue;">Me</span>.FileListBox)<br>
|
||||
<span style="color:blue;">Me</span>.Controls.Add(<span style="color:blue;">Me</span>.VaultsComboBox)<br>
|
||||
<span style="color:blue;">Me</span>.Controls.Add(<span style="color:blue;">Me</span>.VaultsLabel)<br>
|
||||
<span style="color:blue;">Me</span>.Name = <span style="color:#a31515;">"Form1"</span><br>
|
||||
<span style="color:blue;">Me</span>.Text = <span style="color:#a31515;">"Workflow State Transitions"</span><br>
|
||||
<span style="color:blue;">Me</span>.ResumeLayout(<span style="color:blue;">False</span>)<br>
|
||||
<span style="color:blue;">Me</span>.PerformLayout()<br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span><br>
|
||||
<span style="color:blue;">Friend</span> <span style="color:blue;">WithEvents</span> VaultsLabel <span style="color:blue;">As</span> System.Windows.Forms.<span style="color:#2b91af;">Label</span><br>
|
||||
<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><br>
|
||||
<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><br>
|
||||
<span style="color:blue;">Friend</span> <span style="color:blue;">WithEvents</span> BrowseButton <span style="color:blue;">As</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span><br>
|
||||
<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><br>
|
||||
<span style="color:blue;">Friend</span> <span style="color:blue;">WithEvents</span> GetTransitionButton <span style="color:blue;">As</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span><br>
|
||||
<br>
|
||||
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Class</span></p>
|
||||
<p align="center" class="APICODE"><font face="Courier New"><a href="#Top">Back to top</a></font></p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user