12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using Tofly.CoreUI.Plot;
- using System.Windows.Forms;
- namespace Tofly.CoreUI.Win.Design
- {
-
-
-
- [PluginComponentAttribute((long)Core.SysRegist.ModuleKey.FormDesign, PluginGISType.ArcGISAndSuperMap, GroupName = "表单", Caption = "表单设计", Describe = "表单设计")]
- [Tofly.Core.Stereotype.Component(IsSingleton = "false", Name = "Tofly.CoreUI.Win.Design.FormPlugin")]
- public class FormPlugin : PluginButtonBase
- {
- private XmlDesignerIDE designIDE;
- private object mainForm;
- public override void Create(IPluginContent content)
- {
- base.Create(content);
- mainForm = content.PluginMainForm;
- }
- public override void Click()
- {
- if (designIDE == null)
- {
- designIDE = new XmlDesignerIDE();
- designIDE.FormClosed += new FormClosedEventHandler(designIDE_FormClosed);
- }
- if (!designIDE.Visible)
- designIDE.Show(mainForm as IWin32Window);
- }
- void designIDE_FormClosed(object sender, FormClosedEventArgs e)
- {
- designIDE = null;
- }
- }
- }
|