Now we take the Visual Studio 2010 as an example and the development flow of Visual Studio 2010 can refer to this document.
- Start Visual Studio 2010 to create a new project.
Click File, point to New, then click Project. In the New Project window that shows up, click Visual C# in the Project types list, click SuperMap Desktop Plugin in the Templates list, type “MyCtrlAction” in the Name text box, select a folder to place the project, and then click OK.
If you cannot find the SuperMap Desktop Plugin template in the Templates list, please register the template.
-
MyCtrlAction Project
-
After creating new project through SuperMap Desktop Plugin, 9 files will be generated:
- DesktopPlugin.cs defines the plugin and deals with the plugin initialization of the plugin.
- MyCtrlAction.cs defines the action performed when the event is triggered.
- MyCtrlAction.config is the plugin configuration file, which is used to manage plugin loading and interface configuration.
- MyControl.cs defines the function of dock bar.
- MyCtrlActionCheckBox.cs defines the function of check box.
- MyCtrlActionColorButton.cs defines the function of color button.
- MyCtrlActionComboBox.cs defines the function of combo box.
- MyCtrlActionNum.cs defines the function of integer control.
- MyCtrlActionTextBox.cs defins the function for text box, which is used to acquire the input text and the action to be implemented according to the text content.
-
- As shown in Rectangle 1, common references will be added if you create a new project through SuperMap Desktop Plugin.
- If you want to add other references, right click References in the Solution Explorer, click “Add Reference”. This function is designed for users locating to SuperMap reference quickly.
It can add reference automatically in the ” Add Reference ” window. It will automatically search the dynamic file of bin directory by default.
- Reference : It is used to add the assembly to add. there are two sources: use the assembly under the installation directory\Bin directly and use the reference in other place. The assembly wil display teh name, version and place. The detailed description will be displayed when mouse over. In the “Reference” tab, select the assembly to reference. After clicking the Ok button, you can use the assembly in the project.
- Browse : It is used to add the reference. Click the Open button, and you can browse the files to reference.
- Recent : It is used to display the recent assembly. You can reuse the assembly when you select one or more assembly.
- You can add the files used in the project through the reference function of Visual Studio.