Initial Commit of the PDM project (ready for DWS migration)
This commit is contained in:
412
documentation/api_extracted/Graph_Workflow_Example_CSharp.htm
Normal file
412
documentation/api_extracted/Graph_Workflow_Example_CSharp.htm
Normal file
@@ -0,0 +1,412 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Graph a Workflow Example (C#)</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="C# examples,states">
|
||||
<meta name=MS-HKWD content="C# examples,workflows">
|
||||
<meta name=MS-HKWD content="C# examples,transitions">
|
||||
<body>
|
||||
<h1><span style="font-weight: normal; font-size: 7.5pt;">SOLIDWORKS PDM Professional API Help</span></h1>
|
||||
<h1>Graph a Workflow Example (C#)</h1>
|
||||
<p><a name="top"></a>This example shows how to graph a workflow.</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="GraphWorkflow.gif" width="243" height="300"></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
|
||||
C# > Windows Forms Application</b>.</span><br>
|
||||
<span style="color:green;">// b. Type <b>PaintWorkflowGraph_CSharp</b> in <b>Name</b>.</span><br>
|
||||
<span style="color:green;">// c. Click <b>Browse</b> and navigate to the folder where to create </span><br>
|
||||
<span style="color:green;">// 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.cs</b> in the Solution Explorer.</span><br>
|
||||
<span style="color:green;">// f. Replace the code in <b>Form1.cs</b> with <a href="#Form1.cs">this code</a>.</span><br>
|
||||
<span style="color:green;">// g. To create the form,
|
||||
replace the code in <b>Form1.Designer.cs</b> with <a href="#Form1.Designer.cs">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>, and click <b>Add</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.</span><br>
|
||||
<span style="color:green;">// 4. 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: #008000; background-position: 0 0">//</span><font size="2"><span style="color:green;"> 1. Displays the Graph
|
||||
a workflow dialog box.<br>
|
||||
// 2. Maximize the dialog box for the workflow graph.</span><br>
|
||||
<span style="color: #008000">//</span><span style="color:green;"> 3. Select a vault view.<br>
|
||||
// 4. Click a workflow.</span><br>
|
||||
<span style="color: #008000">//</span><span style="color:green;"> 5. Click <b>Graph
|
||||
workflow</b>. </span><br>
|
||||
<span style="color: #008000">//</span><span style="color:green;">
|
||||
6. Graphs the selected workflow in the dialog box.</span><br>
|
||||
</font>
|
||||
<span style="color: #008000; background-position: 0 0">//</span><span style="color:green;"><font size="2"> 7. Close the Graph
|
||||
a workflow dialog box. </font><font size="1"> </font></span><font size="2"><span style="color:green;"> </span></font><br>
|
||||
<span style="color:green;">
|
||||
//----------------------------------------------------------------------------</span><br>
|
||||
<br>
|
||||
<span style="color:green;"><a name="Form1.cs"></a>//Form1.cs</span><br>
|
||||
</p>
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE">
|
||||
<span style="color:blue;">using</span> System;<br>
|
||||
<span style="color:blue;">using</span> System.Collections.Generic;<br>
|
||||
<span style="color:blue;">using</span> System.ComponentModel;<br>
|
||||
<span style="color:blue;">using</span> System.Data;<br>
|
||||
<span style="color:blue;">using</span> System.Drawing;<br>
|
||||
<span style="color:blue;">using</span> System.Linq;<br>
|
||||
<span style="color:blue;">using</span> System.Text;<br>
|
||||
<span style="color:blue;">using</span> System.Windows.Forms;<br>
|
||||
<span style="color:blue;">using</span> EPDM.Interop.epdm;<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="color:blue;">namespace</span> PaintWorkflowGraph_CSharp<br>
|
||||
{<br>
|
||||
<span style="color:blue;">public</span> <span style="color:blue;">partial</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">Form1</span> : <span style="color:#2b91af;">Form</span><br>
|
||||
{<br>
|
||||
<span style="color:blue;">public</span> Form1()<br>
|
||||
{<br>
|
||||
InitializeComponent();<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:#2b91af;">IEdmVault5</span> vault1 = <span style="color:blue;">null</span>;<br>
|
||||
<span style="color:#2b91af;">IEdmWorkflow6</span> wf;<br>
|
||||
<span style="color:#2b91af;">IEdmWorkflowMgr6</span> wfmgr;<br>
|
||||
<span style="color:#2b91af;">IEdmPos5</span> pos;<br>
|
||||
<br>
|
||||
<span style="color:blue;">public</span> <span style="color:blue;">void</span> Form1_Load(System.<span style="color:#2b91af;">Object</span> sender, System.<span style="color:#2b91af;">EventArgs</span> e)<br>
|
||||
{<br>
|
||||
<span style="color:blue;">try</span><br>
|
||||
{<br>
|
||||
vault1 = <span style="color:blue;">new</span> <span style="color:#2b91af;">EdmVault5</span>();<br>
|
||||
<span style="color:#2b91af;">IEdmVault8</span> vault = (<span style="color:#2b91af;">IEdmVault8</span>)vault1;<br>
|
||||
<span style="color:#2b91af;">EdmViewInfo</span>[] Views = <span style="color:blue;">null</span>;<br>
|
||||
<br>
|
||||
vault.<b>GetVaultViews</b>(<span style="color:blue;">out</span> Views, <span style="color:blue;">false</span>);<br>
|
||||
VaultsComboBox.Items.Clear();<br>
|
||||
<span style="color:blue;">foreach</span> (<span style="color:#2b91af;">EdmViewInfo</span> View <span style="color:blue;">in</span> Views)<br>
|
||||
{<br>
|
||||
VaultsComboBox.Items.Add(View.<b>mbsVaultName</b>);<br>
|
||||
}<br>
|
||||
<span style="color:blue;">if</span> (VaultsComboBox.Items.Count > 0)<br>
|
||||
{<br>
|
||||
VaultsComboBox.Text = (<span style="color:blue;">string</span>)VaultsComboBox.Items[0];<br>
|
||||
}<br>
|
||||
<br>
|
||||
}<br>
|
||||
<span style="color:blue;">catch</span> (System.Runtime.InteropServices.<span style="color:#2b91af;">COMException</span> ex)<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> (<span style="color:#2b91af;">Exception</span> ex)<br>
|
||||
{<br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message);<br>
|
||||
}<br>
|
||||
}<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="color:blue;">public</span> <span style="color:blue;">void</span> GraphWorkflow_Click(System.<span style="color:#2b91af;">Object</span> sender, System.<span style="color:#2b91af;">EventArgs</span> e)<br>
|
||||
{<br>
|
||||
<span style="color:green;">//Graph workflow</span><br>
|
||||
<span style="color:blue;">try</span><br>
|
||||
{<br>
|
||||
<span style="color:#2b91af;">IEdmVault7</span> vault2 = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmVault7</span>);<br>
|
||||
<span style="color:blue;">if</span> (vault1 == <span style="color:blue;">null</span>)<br>
|
||||
{<br>
|
||||
vault1 = <span style="color:blue;">new</span> <span style="color:#2b91af;">EdmVault5</span>();<br>
|
||||
}<br>
|
||||
<br>
|
||||
vault2 = (<span style="color:#2b91af;">IEdmVault7</span>)vault1;<br>
|
||||
<span style="color:blue;">if</span> (!vault1.<b>IsLoggedIn</b>)<br>
|
||||
{<br>
|
||||
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color:blue;">this</span>.Handle.ToInt32());<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:green;">//Retrieve the graphics interface of this window</span><br>
|
||||
System.Drawing.<span style="color:#2b91af;">Graphics</span> gfx = <span style="color:blue;">default</span>(System.Drawing.<span style="color:#2b91af;">Graphics</span>);<br>
|
||||
gfx = <span style="color:blue;">this</span>.CreateGraphics();<br>
|
||||
gfx.Clear(<span style="color:#2b91af;">Color</span>.AliceBlue);<br>
|
||||
<br>
|
||||
<span style="color:green;">//Create font with which to draw text </span><br>
|
||||
System.Drawing.<span style="color:#2b91af;">Font</span> font = <span style="color:blue;">default</span>(System.Drawing.<span style="color:#2b91af;">Font</span>);<br>
|
||||
font = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Font</span>(<span style="color:#a31515;">"Arial"</span>, 10, <span style="color:#2b91af;">FontStyle</span>.Bold);<br>
|
||||
<br>
|
||||
<span style="color:green;">//Loop over all the workflows to find the selected workflow</span><br>
|
||||
pos = wfmgr.<b>GetFirstWorkflowPosition</b>();<br>
|
||||
<span style="color:blue;">while</span> (!pos.<b>IsNull</b>)<br>
|
||||
{<br>
|
||||
wf = wfmgr.<b>GetNextWorkflow</b>(pos);<br>
|
||||
<br>
|
||||
<span style="color:blue;">if</span> ((wf.<b>Name</b> == ListBox1.SelectedItem.ToString()))<br>
|
||||
{<br>
|
||||
<span style="color:green;">//Loop over all workflow transitions</span><br>
|
||||
pos = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmPos5</span>);<br>
|
||||
pos = wf.<b>GetFirstTransitionPosition</b>();<br>
|
||||
<span style="color:blue;">while</span> (!pos.<b>IsNull</b>)<br>
|
||||
{<br>
|
||||
<span style="color:#2b91af;">IEdmTransition7</span> trans = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmTransition7</span>);<br>
|
||||
trans = (<span style="color:#2b91af;">IEdmTransition7</span>)wf.<b>GetNextTransition</b>(pos);<br>
|
||||
<br>
|
||||
<span style="color:green;">//Draw the arrow of the transition</span><br>
|
||||
<span style="color:#2b91af;">EdmPoint</span>[] vertices = <span style="color:blue;">null</span>;<br>
|
||||
vertices = <span style="color:blue;">null</span>;<br>
|
||||
trans.<b>GetArrowVertices</b>(<span style="color:blue;">out</span> vertices);<br>
|
||||
PaintArrow(gfx, vertices);<br>
|
||||
<br>
|
||||
<span style="color:green;">//Get the transition box</span><br>
|
||||
<span style="color:#2b91af;">EdmRect</span> transRect = <span style="color:blue;">default</span>(<span style="color:#2b91af;">EdmRect</span>);<br>
|
||||
trans.<b>GetRect</b>(<span style="color:blue;">out</span> transRect);<br>
|
||||
System.Drawing.<span style="color:#2b91af;">RectangleF</span> rectF = <span style="color:blue;">default</span>(System.Drawing.<span style="color:#2b91af;">RectangleF</span>);<br>
|
||||
rectF.X = transRect.<b>mlLeft</b>;<br>
|
||||
rectF.Y = transRect.<b>mlTop</b>;<br>
|
||||
rectF.Width = transRect.<b>mlRight</b> - transRect.<b>mlLeft</b>;<br>
|
||||
rectF.Height = transRect.<b>mlBottom</b> - transRect.<b>mlTop</b>;<br>
|
||||
<br>
|
||||
<span style="color:green;">//Draw the transition box</span><br>
|
||||
gfx.FillRectangle(<span style="color:#2b91af;">Brushes</span>.LightYellow, rectF);<br>
|
||||
gfx.DrawRectangle(<span style="color:#2b91af;">Pens</span>.Black, rectF.X, rectF.Y, rectF.Width, rectF.Height);<br>
|
||||
gfx.DrawString(trans.<b>Name</b>, font, <span style="color:#2b91af;">Brushes</span>.Black, rectF);<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:green;">//Loop over all workflow states</span><br>
|
||||
pos = wf.<b>GetFirstStatePosition</b>();<br>
|
||||
<span style="color:blue;">while</span> (!pos.<b>IsNull</b>)<br>
|
||||
{<br>
|
||||
<span style="color:#2b91af;">IEdmState7</span> state = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmState7</span>);<br>
|
||||
state = (<span style="color:#2b91af;">IEdmState7</span>)wf.<b>GetNextState</b>(pos);<br>
|
||||
<br>
|
||||
<span style="color:green;">//Get the state box</span><br>
|
||||
<span style="color:#2b91af;">EdmRect</span> stateRect = <span style="color:blue;">default</span>(<span style="color:#2b91af;">EdmRect</span>);<br>
|
||||
state.<b>GetRect</b>(<span style="color:blue;">out</span> stateRect);<br>
|
||||
System.Drawing.<span style="color:#2b91af;">RectangleF</span> rectF = <span style="color:blue;">default</span>(System.Drawing.<span style="color:#2b91af;">RectangleF</span>);<br>
|
||||
rectF.X = stateRect.<b>mlLeft</b>;<br>
|
||||
rectF.Y = stateRect.<b>mlTop</b>;<br>
|
||||
rectF.Width = stateRect.<b>mlRight</b> - stateRect.<b>mlLeft</b>;<br>
|
||||
rectF.Height = stateRect.<b>mlBottom</b> - stateRect.<b>mlTop</b>;<br>
|
||||
<br>
|
||||
<span style="color:green;">//Draw the state box</span><br>
|
||||
gfx.FillRectangle(<span style="color:#2b91af;">Brushes</span>.Azure, rectF);<br>
|
||||
gfx.DrawRectangle(<span style="color:#2b91af;">Pens</span>.Black, rectF.X, rectF.Y, rectF.Width, rectF.Height);<br>
|
||||
gfx.DrawString(state.<b>Name</b>, font, <span style="color:#2b91af;">Brushes</span>.Black, rectF);<br>
|
||||
}<br>
|
||||
}<br>
|
||||
}<br>
|
||||
}<br>
|
||||
<span style="color:blue;">catch</span> (System.Runtime.InteropServices.<span style="color:#2b91af;">COMException</span> ex)<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> (<span style="color:#2b91af;">Exception</span> ex)<br>
|
||||
{<br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message);<br>
|
||||
}<br>
|
||||
<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:green;">//Draw the arrow of a transition</span><br>
|
||||
<span style="color:blue;">private</span> <span style="color:blue;">void</span> PaintArrow(System.Drawing.<span style="color:#2b91af;">Graphics</span> gfx, <span style="color:#2b91af;">EdmPoint</span>[] vertices)<br>
|
||||
{<br>
|
||||
<span style="color:blue;">try</span><br>
|
||||
{<br>
|
||||
System.Drawing.<span style="color:#2b91af;">PointF</span>[] points = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">PointF</span>[vertices.GetUpperBound(0) + 1];<br>
|
||||
<span style="color:blue;">int</span> i = 0;<br>
|
||||
i = vertices.GetLowerBound(0);<br>
|
||||
<span style="color:blue;">while</span> (i <= vertices.GetUpperBound(0))<br>
|
||||
{<br>
|
||||
points[i].X = vertices[i].mlX;<br>
|
||||
points[i].Y = vertices[i].mlY;<br>
|
||||
i = i + 1;<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:green;">//Draw the arrow lines</span><br>
|
||||
gfx.DrawLines(<span style="color:#2b91af;">Pens</span>.DarkRed, points);<br>
|
||||
<br>
|
||||
}<br>
|
||||
<span style="color:blue;">catch</span> (System.Runtime.InteropServices.<span style="color:#2b91af;">COMException</span> ex)<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> (<span style="color:#2b91af;">Exception</span> ex)<br>
|
||||
{<br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message);<br>
|
||||
}<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:blue;">private</span> <span style="color:blue;">void</span> VaultsComboBox_SelectedIndexChanged(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">EventArgs</span> e)<br>
|
||||
{<br>
|
||||
<span style="color:blue;">try</span><br>
|
||||
{<br>
|
||||
vault1 = <span style="color:blue;">new</span> <span style="color:#2b91af;">EdmVault5</span>();<br>
|
||||
<span style="color:#2b91af;">IEdmVault8</span> vault = (<span style="color:#2b91af;">IEdmVault8</span>)vault1;<br>
|
||||
<br>
|
||||
<span style="color:blue;">if</span> (!vault1.<b>IsLoggedIn</b>)<br>
|
||||
{<br>
|
||||
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color:blue;">this</span>.Handle.ToInt32());<br>
|
||||
}<br>
|
||||
<br>
|
||||
ListBox1.Items.Clear();<br>
|
||||
<br>
|
||||
wfmgr = (<span style="color:#2b91af;">IEdmWorkflowMgr6</span>)vault.<b>CreateUtility</b>(<span style="color:#2b91af;">EdmUtility</span>.EdmUtil_WorkflowMgr);<br>
|
||||
pos = wfmgr.<b>GetFirstWorkflowPosition</b>();<br>
|
||||
<span style="color:blue;">while</span> (!pos.<b>IsNull</b>)<br>
|
||||
{<br>
|
||||
wf = wfmgr.<b>GetNextWorkflow</b>(pos);<br>
|
||||
ListBox1.Items.Add(wf.<b>Name</b>);<br>
|
||||
}<br>
|
||||
<br>
|
||||
}<br>
|
||||
<span style="color:blue;">catch</span> (System.Runtime.InteropServices.<span style="color:#2b91af;">COMException</span> ex)<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> (<span style="color:#2b91af;">Exception</span> ex)<br>
|
||||
{<br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message);<br>
|
||||
}<br>
|
||||
}<br>
|
||||
}<br>
|
||||
}</p>
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE">
|
||||
</p>
|
||||
<p style="font-family: Courier New; color: black; background: white" align="center">
|
||||
<a href="#top">Back to top</a></p>
|
||||
<p style="font-family: Courier New; font-size: 13; color: #008000; background: white" class="APICODE">
|
||||
<a name="Form1.Designer.cs"></a>//Form1.Designer.cs</p>
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE">
|
||||
<span style="color:blue;">namespace</span> PaintWorkflowGraph_CSharp<br>
|
||||
{<br>
|
||||
<span style="color:blue;">partial</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">Form1</span><br>
|
||||
{<br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"><summary></span><br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> Required designer variable.</span><br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></summary></span><br>
|
||||
<span style="color:blue;">private</span> System.ComponentModel.<span style="color:#2b91af;">IContainer</span> components = <span style="color:blue;">null</span>;<br>
|
||||
<br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"><summary></span><br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> Clean up any resources being used.</span><br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></summary></span><br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"><param name="disposing"></span><span style="color:green;">true if managed resources should be disposed; otherwise, false.</span><span style="color:gray;"></param></span><br>
|
||||
<span style="color:blue;">protected</span> <span style="color:blue;">override</span> <span style="color:blue;">void</span> Dispose(<span style="color:blue;">bool</span> disposing)<br>
|
||||
{<br>
|
||||
<span style="color:blue;">if</span> (disposing && (components != <span style="color:blue;">null</span>))<br>
|
||||
{<br>
|
||||
components.Dispose();<br>
|
||||
}<br>
|
||||
<span style="color:blue;">base</span>.Dispose(disposing);<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:blue;"> #region</span> Windows Form Designer generated code<br>
|
||||
<br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"><summary></span><br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> Required method for Designer support - do not modify</span><br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> the contents of this method with the code editor.</span><br>
|
||||
<span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;"></summary></span><br>
|
||||
<span style="color:blue;">private</span> <span style="color:blue;">void</span> InitializeComponent()<br>
|
||||
{<br>
|
||||
<span style="color:blue;">this</span>.VaultsLabel = <span style="color:blue;">new</span> System.Windows.Forms.<span style="color:#2b91af;">Label</span>();<br>
|
||||
<span style="color:blue;">this</span>.VaultsComboBox = <span style="color:blue;">new</span> System.Windows.Forms.<span style="color:#2b91af;">ComboBox</span>();<br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow = <span style="color:blue;">new</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span>();<br>
|
||||
<span style="color:blue;">this</span>.ListBox1 = <span style="color:blue;">new</span> System.Windows.Forms.<span style="color:#2b91af;">ListBox</span>();<br>
|
||||
<span style="color:blue;">this</span>.Label1 = <span style="color:blue;">new</span> System.Windows.Forms.<span style="color:#2b91af;">Label</span>();<br>
|
||||
<span style="color:blue;">this</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;">this</span>.VaultsLabel.Anchor = ((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>)((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Bottom | System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Right)));<br>
|
||||
<span style="color:blue;">this</span>.VaultsLabel.AutoSize = <span style="color:blue;">true</span>;<br>
|
||||
<span style="color:blue;">this</span>.VaultsLabel.Location = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Point</span>(13, 26);<br>
|
||||
<span style="color:blue;">this</span>.VaultsLabel.Name = <span style="color:#a31515;">"VaultsLabel"</span>;<br>
|
||||
<span style="color:blue;">this</span>.VaultsLabel.Size = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Size</span>(94, 13);<br>
|
||||
<span style="color:blue;">this</span>.VaultsLabel.TabIndex = 0;<br>
|
||||
<span style="color:blue;">this</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;">this</span>.VaultsComboBox.Anchor = ((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>)((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Bottom | System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Right)));<br>
|
||||
<span style="color:blue;">this</span>.VaultsComboBox.FormattingEnabled = <span style="color:blue;">true</span>;<br>
|
||||
<span style="color:blue;">this</span>.VaultsComboBox.Location = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Point</span>(16, 42);<br>
|
||||
<span style="color:blue;">this</span>.VaultsComboBox.Name = <span style="color:#a31515;">"VaultsComboBox"</span>;<br>
|
||||
<span style="color:blue;">this</span>.VaultsComboBox.Size = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Size</span>(121, 21);<br>
|
||||
<span style="color:blue;">this</span>.VaultsComboBox.TabIndex = 1;<br>
|
||||
<span style="color:green;">// </span><br>
|
||||
<span style="color:green;">// GraphWorkflow</span><br>
|
||||
<span style="color:green;">// </span><br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow.Anchor = ((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>)((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Bottom | System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Right)));<br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow.Location = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Point</span>(15, 199);<br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow.Name = <span style="color:#a31515;">"GraphWorkflow"</span>;<br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow.Size = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Size</span>(121, 23);<br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow.TabIndex = 5;<br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow.Text = <span style="color:#a31515;">"Graph workflow"</span>;<br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow.UseVisualStyleBackColor = <span style="color:blue;">true</span>;<br>
|
||||
<span style="color:blue;">this</span>.GraphWorkflow.Click += <span style="color:blue;">new</span> System.<span style="color:#2b91af;">EventHandler</span>(<span style="color:blue;">this</span>.GraphWorkflow_Click);<br>
|
||||
<span style="color:green;">// </span><br>
|
||||
<span style="color:green;">// ListBox1</span><br>
|
||||
<span style="color:green;">// </span><br>
|
||||
<span style="color:blue;">this</span>.ListBox1.Anchor = ((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>)((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Bottom | System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Right)));<br>
|
||||
<span style="color:blue;">this</span>.ListBox1.FormattingEnabled = <span style="color:blue;">true</span>;<br>
|
||||
<span style="color:blue;">this</span>.ListBox1.HorizontalScrollbar = <span style="color:blue;">true</span>;<br>
|
||||
<span style="color:blue;">this</span>.ListBox1.Location = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Point</span>(15, 98);<br>
|
||||
<span style="color:blue;">this</span>.ListBox1.Name = <span style="color:#a31515;">"ListBox1"</span>;<br>
|
||||
<span style="color:blue;">this</span>.ListBox1.Size = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Size</span>(120, 95);<br>
|
||||
<span style="color:blue;">this</span>.ListBox1.TabIndex = 6;<br>
|
||||
<span style="color:green;">// </span><br>
|
||||
<span style="color:green;">// Label1</span><br>
|
||||
<span style="color:green;">// </span><br>
|
||||
<span style="color:blue;">this</span>.Label1.Anchor = ((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>)((System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Bottom | System.Windows.Forms.<span style="color:#2b91af;">AnchorStyles</span>.Right)));<br>
|
||||
<span style="color:blue;">this</span>.Label1.AutoSize = <span style="color:blue;">true</span>;<br>
|
||||
<span style="color:blue;">this</span>.Label1.Location = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Point</span>(13, 82);<br>
|
||||
<span style="color:blue;">this</span>.Label1.Name = <span style="color:#a31515;">"Label1"</span>;<br>
|
||||
<span style="color:blue;">this</span>.Label1.Size = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Size</span>(85, 13);<br>
|
||||
<span style="color:blue;">this</span>.Label1.TabIndex = 7;<br>
|
||||
<span style="color:blue;">this</span>.Label1.Text = <span style="color:#a31515;">"Select workflow:"</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;">this</span>.AutoScaleDimensions = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">SizeF</span>(6F, 13F);<br>
|
||||
<span style="color:blue;">this</span>.AutoScaleMode = System.Windows.Forms.<span style="color:#2b91af;">AutoScaleMode</span>.Font;<br>
|
||||
<span style="color:blue;">this</span>.ClientSize = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Size</span>(227, 262);<br>
|
||||
<span style="color:blue;">this</span>.Controls.Add(<span style="color:blue;">this</span>.Label1);<br>
|
||||
<span style="color:blue;">this</span>.Controls.Add(<span style="color:blue;">this</span>.ListBox1);<br>
|
||||
<span style="color:blue;">this</span>.Controls.Add(<span style="color:blue;">this</span>.GraphWorkflow);<br>
|
||||
<span style="color:blue;">this</span>.Controls.Add(<span style="color:blue;">this</span>.VaultsComboBox);<br>
|
||||
<span style="color:blue;">this</span>.Controls.Add(<span style="color:blue;">this</span>.VaultsLabel);<br>
|
||||
<span style="color:blue;">this</span>.Name = <span style="color:#a31515;">"Form1"</span>;<br>
|
||||
<span style="color:blue;">this</span>.Text = <span style="color:#a31515;">"Graph a workflow"</span>;<br>
|
||||
<span style="color:blue;">this</span>.Load += <span style="color:blue;">new</span> System.<span style="color:#2b91af;">EventHandler</span>(<span style="color:blue;">this</span>.Form1_Load);<br>
|
||||
<span style="color:blue;">this</span>.ResumeLayout(<span style="color:blue;">false</span>);<br>
|
||||
<span style="color:blue;">this</span>.PerformLayout();<br>
|
||||
<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:blue;"> #endregion</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">internal</span> System.Windows.Forms.<span style="color:#2b91af;">Label</span> VaultsLabel;<br>
|
||||
<span style="color:blue;">internal</span> System.Windows.Forms.<span style="color:#2b91af;">ComboBox</span> VaultsComboBox;<br>
|
||||
<span style="color:blue;">internal</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span> GraphWorkflow;<br>
|
||||
<span style="color:blue;">internal</span> System.Windows.Forms.<span style="color:#2b91af;">ListBox</span> ListBox1;<br>
|
||||
<span style="color:blue;">internal</span> System.Windows.Forms.<span style="color:#2b91af;">Label</span> Label1;<br>
|
||||
}<br>
|
||||
}</p>
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE">
|
||||
</p>
|
||||
<p style="font-family: Courier New; color: black; background: white" align="center">
|
||||
<a href="#top">Back to top</a></p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user