hytos / DTI_PID / SPPIDConverter / SPPIDConverter_AutoModeling.cs @ f1232880
이력 | 보기 | 이력해설 | 다운로드 (4.83 KB)
1 |
/*---------------------------------------------------------------------+\ |
---|---|
2 |
| | |
3 |
| Copyright 2016 Intergraph Corporation | |
4 |
| All Rights Reserved | |
5 |
| | |
6 |
| Including software, file formats, and audio-visual displays; | |
7 |
| may only be used pursuant to applicable software license | |
8 |
| agreement; contains confidential and proprietary information of| |
9 |
| Intergraph and/or third parties which is protected by copyright| |
10 |
| and trade secret law and may not be provided or otherwise made | |
11 |
| available without proper authorization. | |
12 |
| | |
13 |
| Unpublished -- rights reserved under the Copyright Laws of the | |
14 |
| United States. | |
15 |
| | |
16 |
| Intergraph Corporation | |
17 |
| Huntsville, Alabama 35894-0001 | |
18 |
| | |
19 |
\+---------------------------------------------------------------------*/ |
20 |
|
21 |
using System; |
22 |
|
23 |
namespace Converter.SPPID |
24 |
{ |
25 |
/// <summary> |
26 |
/// This command class is the mechanism by which the Intergraph application |
27 |
/// communicates with the command. |
28 |
/// </summary> |
29 |
public class SPPIDConverter_AutoModeling : IDisposable |
30 |
{ |
31 |
/// <remarks> |
32 |
/// Declare the form as member data of this class such that each new |
33 |
/// instance of the command gets its own form. |
34 |
/// </remarks> |
35 |
private ConverterForm run; |
36 |
|
37 |
/// <summary> |
38 |
|
39 |
/// Initialize the class and use the member form such that each new |
40 |
/// instance of the command gets it own form. |
41 |
/// </summary> |
42 |
public SPPIDConverter_AutoModeling() |
43 |
{ |
44 |
run = new ConverterForm(); |
45 |
} |
46 |
|
47 |
/// <summary> |
48 |
/// This function lets the Intergraph application communicate with the command. |
49 |
/// </summary> |
50 |
/// <param name="basicCommand">The basic command.</param> |
51 |
public void Command_Initialize(object basicCommand) |
52 |
{ |
53 |
run.commandControl.Command = basicCommand; |
54 |
} |
55 |
|
56 |
/// <summary> |
57 |
/// Gets the description. |
58 |
/// </summary> |
59 |
/// <value> |
60 |
/// The description of the command as assigned in the resources file. |
61 |
/// </value> |
62 |
public string Description |
63 |
{ |
64 |
get |
65 |
{ |
66 |
return ""; //Properties.Resources.ResourceManager.GetString("Description", System.Globalization.CultureInfo.CurrentCulture); |
67 |
} |
68 |
} |
69 |
|
70 |
/// <summary> |
71 |
/// Gets the tooltip of the command. |
72 |
/// </summary> |
73 |
/// <value> |
74 |
/// The tooltip of the command as assigned in the resources file. |
75 |
/// </value> |
76 |
public string GetTooltip |
77 |
{ |
78 |
get |
79 |
{ |
80 |
return "";// Properties.Resources.ResourceManager.GetString("Tooltip", System.Globalization.CultureInfo.CurrentCulture); |
81 |
} |
82 |
} |
83 |
|
84 |
/// <summary> |
85 |
/// Gets the toolbar image. |
86 |
/// </summary> |
87 |
/// <value> |
88 |
/// The toolbar image of the command as assigned in the resources file. |
89 |
/// </value> |
90 |
public System.Drawing.Image ToolbarImage |
91 |
{ |
92 |
get |
93 |
{ |
94 |
return null;// (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("ToolbarImage", System.Globalization.CultureInfo.CurrentCulture); |
95 |
} |
96 |
} |
97 |
/// <summary> |
98 |
/// All Command classes should implement IDisposable and call the dispose over the |
99 |
/// Form on which our RADNetCommandControl lives(i.e Main Form) |
100 |
/// </summary> |
101 |
void IDisposable.Dispose() |
102 |
{ |
103 |
/* http://stackoverflow.com/questions/3097364/c-sharp-form-close-vs-form-dispose |
104 |
* http://www.alwaysgetbetter.com/blog/2008/04/04/c-formclose-vs-formdispose/ |
105 |
* From the above thread in case of Modal Forms we need to explicitly dispose |
106 |
* of the Form. Don't call run.Close() here. The form should only be closed |
107 |
* when user explicitly does it either via Code or Interactively. Using Close |
108 |
* will cause re-entrance into the Form's close event handlers when form is |
109 |
* closed explicitly and Done property is set to True. In all the other cases |
110 |
* where it is Terminated this method is called by RADNetLoader. |
111 |
*/ |
112 |
run.Dispose(); // This helps in the destruction of underlying COM Command. |
113 |
} |
114 |
} |
115 |
} |