Initial Commit of the PDM project (ready for DWS migration)
This commit is contained in:
@@ -0,0 +1,375 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Batch Update Card Variables 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, batches">
|
||||
<meta name=MS-HKWD content="C# examples, files">
|
||||
<meta name=MS-HKWD content="C# examples, folders">
|
||||
<meta name=MS-HKWD content="C# examples, card variables">
|
||||
<body>
|
||||
<h1><span style="font-weight: normal; font-size: 7.5pt;">SOLIDWORKS PDM Professional API Help</span></h1>
|
||||
<h1>Batch Update Card Variables Example (C#)</h1>
|
||||
<p><a name="top"></a>This example shows how to update file and folder card
|
||||
variables in one batch.</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="BatchUpdateVars.gif" width="300" height="191"></p>
|
||||
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE">
|
||||
<font color="#008000">
|
||||
//----------------------------------------------------------------------------<br>
|
||||
// Preconditions:<br>
|
||||
// 1. Start Microsoft Visual Studio.<br>
|
||||
// a. Click <b>File > New > Project > Visual C# > Windows
|
||||
Forms Application</b>.<br>
|
||||
// b. Type <b>BatchUpdateCardVarsCSharp</b> in <b>Name</b>.<br>
|
||||
// c. Click <b>Browse</b> and navigate to the folder where to
|
||||
create the project.<br>
|
||||
// d. Click <b>OK</b>. <br>
|
||||
// e. Click S<b>how All Files</b> in the Solution Explorer
|
||||
toolbar and expand <br>
|
||||
// <b>Form1.cs</b> in the Solution Explorer.<br>
|
||||
// f. Replace the code in <b>Form1.cs</b> with
|
||||
<a href="#Form1.cs">this code</a>.<br>
|
||||
// g. To create the form, replace the code in <b>
|
||||
Form1.Designer.cs</b> with <br>
|
||||
// <a href="#Form1.Designer.cs">this code</a>.<br>
|
||||
// 2. Add <b>EPDM.Interop.epdm.dll</b> as a reference (right-click the project<br>
|
||||
// name in the Solution Explorer, click <b>Add Reference</b>,
|
||||
click <br>
|
||||
// <b>Assemblies > Framework</b> in the left-side panel,
|
||||
browse to the top folder of <br>
|
||||
// your SOLIDWORKS PDM Professional installation, locate and
|
||||
click <br>
|
||||
// <b>EPDM.Interop.epdm.dll</b>, and click <b>
|
||||
Add</b>).<br>
|
||||
</font>
|
||||
<span style="color: green">// 3. Add <b>Microsoft.CSharp</b> as reference (click </span><br>
|
||||
<span style="color: green">// </span><font color="#008000"><b>Assemblies > Framework</b>
|
||||
in the left-side panel, select
|
||||
</font><span style="color: green"> </span><br>
|
||||
<span style="color: green">// <b>Microsoft.CSharp</b>, and click <b>OK</b>).</span><font color="#008000"><br>
|
||||
// 4. Right-click <b>EPDM.Interop.epdm</b> in References, click <b>Properties</b>,
|
||||
and set <br>
|
||||
// <b>Embed Interop Types</b> to <b>False</b> to handle
|
||||
methods that pass arrays of <br>
|
||||
// structures.<br>
|
||||
// 5.
|
||||
</font>
|
||||
<span style="color:green;"><font size="2">Ensure that at least one text file is
|
||||
checked out, and at least one folder <br>
|
||||
// with the word <b>Folder</b> in the name exists in the vault.</font></span><font color="#008000"><br>
|
||||
// 6. Click <b>Debug > Start Debugging</b> or press F5.<br>
|
||||
//<br>
|
||||
</font><span style="color: #008000; background-position: 0 0">//</span><font size="2"><span style="color:green;"> Postconditions: <br>
|
||||
// 1. Displays the Batch Update dialog box.</span><br>
|
||||
<span style="color: #008000">//</span><span style="color:green;"> a. Select a vault.<br>
|
||||
// b. Click <b>Batch Update Variables</b>.<br>
|
||||
// * Updates the Title and Comment
|
||||
variables in the data cards<br>
|
||||
// only of checked-out
|
||||
text files.<br>
|
||||
// * Updates the Description variable
|
||||
of the data cards of all folders<br>
|
||||
// with the word <b>
|
||||
Folder</b> in
|
||||
their names.<br>
|
||||
// * Displays a message box saying <b>
|
||||
Card variables updated</b>.<br>
|
||||
// c. Click <b>OK</b> to close the message box.</span><br>
|
||||
<span style="color: #008000">//</span><span style="color:green;"> 2. Close the Batch Update dialog box.<br>
|
||||
// 3. Inspect the data cards of any checked-out text files and folders
|
||||
with<br>
|
||||
// the word <b>Folder</b> in their names in the selected vault.</span></font><font color="#008000"><br>
|
||||
//----------------------------------------------------------------------------</font><br>
|
||||
</p>
|
||||
<p style="font-family: Courier New; font-size: 13; color: #008000; background: white" class="APICODE">
|
||||
<a name="Form1.cs"></a>//Form1.cs</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>
|
||||
<span style="color:blue;">namespace</span> BatchUpdateCardVarsCSharp<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:blue;">private</span> <span style="color:#2b91af;">IEdmVault5</span> vault1 = <span style="color:blue;">null</span>;<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>
|
||||
<span style="color:#2b91af;">IEdmVault5</span> 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>
|
||||
<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>
|
||||
<br>
|
||||
<span style="color:blue;">private</span> <span style="color:blue;">void</span> BatchUpdateButton_Click(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>
|
||||
<span style="color:#2b91af;">IEdmVault7</span> vault2 = <span style="color:blue;">null</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>
|
||||
vault2 = (<span style="color:#2b91af;">IEdmVault7</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>
|
||||
<span style="color:green;">//Create a batch update utility</span><br>
|
||||
<span style="color:#2b91af;">IEdmBatchUpdate2</span> Update = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmBatchUpdate2</span>);<br>
|
||||
Update = (<span style="color:#2b91af;">IEdmBatchUpdate2</span>)vault2.<b>CreateUtility</b>(<span style="color:#2b91af;">EdmUtility</span>.EdmUtil_BatchUpdate);<br>
|
||||
<br>
|
||||
<span style="color:green;">//Get the IDs of the file and folder
|
||||
card variables to update</span><br>
|
||||
<span style="color:blue;">int</span> TitleID = 0;<br>
|
||||
<span style="color:blue;">int</span> CommentID = 0;<br>
|
||||
<span style="color:blue;">int</span> DescriptionID = 0;<br>
|
||||
<span style="color:#2b91af;">IEdmVariableMgr5</span> VariableMgr = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmVariableMgr5</span>);<br>
|
||||
<br>
|
||||
VariableMgr = (<span style="color:#2b91af;">IEdmVariableMgr5</span>)vault1;<br>
|
||||
TitleID = VariableMgr.<b>GetVariable</b>(<span style="color:#a31515;">"Title"</span>).<b>ID</b>;<br>
|
||||
DescriptionID = VariableMgr.<b>GetVariable</b>(<span style="color:#a31515;">"Description"</span>).<b>ID</b>;<br>
|
||||
CommentID = VariableMgr.<b>GetVariable</b>(<span style="color:#a31515;">"Comment"</span>).<b>ID</b>;<br>
|
||||
<br>
|
||||
<span style="color:green;">//Search for all text files in the
|
||||
vault</span><br>
|
||||
<span style="color:#2b91af;">IEdmSearch5</span> Search = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmSearch5</span>);<br>
|
||||
Search = (<span style="color:#2b91af;">IEdmSearch5</span>)vault2.<b>CreateUtility</b>(<span style="color:#2b91af;">EdmUtility</span>.EdmUtil_Search);<br>
|
||||
<br>
|
||||
Search.<b>FileName</b> = <span style="color:#a31515;">"%.txt"</span>;<br>
|
||||
<br>
|
||||
<span style="color:#2b91af;">IEdmSearchResult5</span> Result = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmSearchResult5</span>);<br>
|
||||
Result = Search.<b>GetFirstResult</b>();<br>
|
||||
<br>
|
||||
<span style="color:blue;">while</span> ((Result != <span style="color:blue;">null</span>))<br>
|
||||
{<br>
|
||||
Update.<b>SetVar</b>(Result.<b>ID</b>, TitleID, <span style="color:#a31515;">"My Title"</span>, <span style="color:#a31515;">""</span>, (<span style="color:blue;">int</span>)<span style="color:#2b91af;">EdmBatchFlags</span>.EdmBatch_Nothing);<br>
|
||||
Update.<b>SetVar</b>(Result.<b>ID</b>, CommentID, <span style="color:#a31515;">"My Comment"</span>, <span style="color:#a31515;">""</span>, (<span style="color:blue;">int</span>)<span style="color:#2b91af;">EdmBatchFlags</span>.EdmBatch_Nothing);<br>
|
||||
Result = Search.<b>GetNextResult</b>();<br>
|
||||
}<br>
|
||||
<br>
|
||||
|
||||
<span style="color:green;">//Search for all folders whose names contain
|
||||
"Folder" in the vault</span><br>
|
||||
|
||||
Search.<b>FileName</b> = <span style="color:#a31515;">"%Folder%"</span>;<br>
|
||||
<br>
|
||||
Result = Search.<b>GetFirstResult</b>();<br>
|
||||
<br>
|
||||
<span style="color:blue;">while</span> ((Result != <span style="color:blue;">null</span>))<br>
|
||||
{<br>
|
||||
Update.<b>SetFolderVar</b>(Result.<b>ID</b>, DescriptionID, <span style="color:#a31515;">"My Description"</span>, (<span style="color:blue;">int</span>)<span style="color:#2b91af;">EdmBatchFlags</span>.EdmBatch_Nothing);<br>
|
||||
Result = Search.<b>GetNextResult</b>();<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:green;">//Write all the card
|
||||
variable values to the database</span><br>
|
||||
<span style="color:#2b91af;">EdmBatchError2</span>[] Errors = <span style="color:blue;">null</span>;<br>
|
||||
<span style="color:blue;">int</span> errorSize = 0;<br>
|
||||
errorSize = Update.<b>CommitUpdate</b>(<span style="color:blue;">out</span> Errors, <span style="color:blue;">null</span>);<br>
|
||||
<br>
|
||||
<span style="color:green;">//Display any errors </span><br>
|
||||
<span style="color:blue;">string</span> Msg = <span style="color:blue;">null</span>;<br>
|
||||
Msg = <span style="color:#a31515;">"Card
|
||||
variables updated."</span>;<br>
|
||||
<br>
|
||||
<span style="color:blue;">string</span> ErrName = <span style="color:blue;">null</span>;<br>
|
||||
<span style="color:blue;">string</span> ErrDesc = <span style="color:blue;">null</span>;<br>
|
||||
<span style="color:blue;">string</span> FileName = <span style="color:blue;">null</span>;<br>
|
||||
<br>
|
||||
<span style="color:blue;">int</span> Lo = 0;<br>
|
||||
Lo = Errors.GetLowerBound(0);<br>
|
||||
<br>
|
||||
<span style="color:blue;">int</span> Hi = 0;<br>
|
||||
Hi = Errors.GetUpperBound(0);</p>
|
||||
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"> <span style="color:#2b91af;">IEdmVault9</span> vault9;
|
||||
vault9 = (<span style="color:#2b91af;">IEdmVault9</span>)vault1;
|
||||
EdmObjectInfo[] ppoObjects = <span style="color:blue;">null</span>;
|
||||
|
||||
<span style="color:blue;">while</span> (Lo < Hi - 1)
|
||||
{
|
||||
ppoObjects[Lo].<b>meType</b> = <span style="color:#2b91af;">EdmObjectType</span>.EdmObject_File;
|
||||
Lo = Lo + 1;
|
||||
}
|
||||
|
||||
vault9.<b>GetObjects</b>(<span style="color:blue;">ref</span> ppoObjects);
|
||||
|
||||
<span style="color:blue;">while</span> (Lo < Hi - 1)
|
||||
{
|
||||
<span style="color:blue;">if</span> ((Errors[Lo].<b>mlFileID</b> > 0))
|
||||
{
|
||||
<span style="color:#2b91af;">IEdmFile6</span> File = <span style="color:blue;">default</span>(<span style="color:#2b91af;">IEdmFile6</span>);
|
||||
<span style="color:blue;">int</span> ID;
|
||||
ID = (<span style="color:blue;">int</span>)ppoObjects[Lo].<b>moObjectID</b>;
|
||||
<span style="color:blue;">if</span> (ppoObjects[Lo].<b>meType</b> == <span style="color:#2b91af;">EdmObjectType</span>.EdmObject_File)
|
||||
{
|
||||
<span style="color:blue;">if</span> (ID == Errors[Lo].<b>mlFileID</b>)
|
||||
{
|
||||
File = (<span style="color:#2b91af;">IEdmFile6</span>)ppoObjects[Lo].<b>mpoObject</b>;
|
||||
FileName = File.<b>Name</b>;
|
||||
}
|
||||
}
|
||||
}<br>
|
||||
<br>
|
||||
vault1.<b>GetErrorString</b>(Errors[Lo].<b>mlErrorCode</b>, <span style="color:blue;">out</span> ErrName, <span style="color:blue;">out</span> ErrDesc);<br>
|
||||
Msg = Msg + "\n" + ErrName + <span style="color:#a31515;">" "</span> + FileName;<br>
|
||||
Lo = Lo + 1;<br>
|
||||
}<br>
|
||||
<br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(Msg);<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>
|
||||
}</pre>
|
||||
|
||||
<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> BatchUpdateCardVarsCSharp<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>.BatchUpdateButton = <span style="color:blue;">new</span> System.Windows.Forms.<span style="color:#2b91af;">Button</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>.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;">//BatchUpdateButton</span><br>
|
||||
<span style="color:green;">//</span><br>
|
||||
<span style="color:blue;">this</span>.BatchUpdateButton.Location = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Point</span>(30, 100);<br>
|
||||
<span style="color:blue;">this</span>.BatchUpdateButton.Name = <span style="color:#a31515;">"BatchUpdateButton"</span>;<br>
|
||||
<span style="color:blue;">this</span>.BatchUpdateButton.Size = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Size</span>(215, 23);<br>
|
||||
<span style="color:blue;">this</span>.BatchUpdateButton.TabIndex = 0;<br>
|
||||
<span style="color:blue;">this</span>.BatchUpdateButton.Text = <span style="color:#a31515;">"Batch Update Variables"</span>;<br>
|
||||
<span style="color:blue;">this</span>.BatchUpdateButton.UseVisualStyleBackColor = <span style="color:blue;">true</span>;<br>
|
||||
<span style="color:blue;">this</span>.BatchUpdateButton.Click += <span style="color:blue;">new</span> System.<span style="color:#2b91af;">EventHandler</span>(<span style="color:blue;">this</span>.BatchUpdateButton_Click);<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.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>(30, 56);<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;">//Label1</span><br>
|
||||
<span style="color:green;">//</span><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>(27, 23);<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>(91, 13);<br>
|
||||
<span style="color:blue;">this</span>.Label1.TabIndex = 2;<br>
|
||||
<span style="color:blue;">this</span>.Label1.Text = <span style="color:#a31515;">"Select vault view:"</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>(284, 153);<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>.VaultsComboBox);<br>
|
||||
<span style="color:blue;">this</span>.Controls.Add(<span style="color:blue;">this</span>.BatchUpdateButton);<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;">"Batch Update"</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>
|
||||
<span style="color:blue;">internal</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span> BatchUpdateButton;<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;">Label</span> Label1;<br>
|
||||
<span style="color:blue;"> #endregion</span><br>
|
||||
}<br>
|
||||
}</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