65 lines
1.6 KiB
C#
65 lines
1.6 KiB
C#
|
using EPLAN.Harness.API;
|
|||
|
using EPLAN.Harness.API.Plugins;
|
|||
|
using EPLAN.Harness.API.Plugins.Core;
|
|||
|
using Sinvo.EplanHpD.Plugin.WPFUI;
|
|||
|
using System;
|
|||
|
using System.Drawing;
|
|||
|
using System.IO;
|
|||
|
using System.Reflection;
|
|||
|
|
|||
|
namespace Sinvo.EplanHpD.Plugin
|
|||
|
{
|
|||
|
public class DesignPluginEntry : IHpDPlugin
|
|||
|
{
|
|||
|
public string Name => "兴禾ProD插件-3D";
|
|||
|
|
|||
|
public string Author => "Sinvo";
|
|||
|
|
|||
|
public string Description => "兴禾EPLAN Harness proD 2.9 Studio插件,提供线材数据抓取功能";
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 获取DLL版本
|
|||
|
/// </summary>
|
|||
|
public Version Version => Assembly.GetAssembly(this.GetType()).GetName().Version;
|
|||
|
|
|||
|
public System.Drawing.Image ToolbarIcon
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
var imageBytes = Resource.Sinvo;
|
|||
|
if (imageBytes != null)
|
|||
|
{
|
|||
|
using (var ms = new MemoryStream(imageBytes))
|
|||
|
{
|
|||
|
return Image.FromStream(ms);
|
|||
|
}
|
|||
|
}
|
|||
|
return null;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string ToolbarText => "抓取线材数据";
|
|||
|
|
|||
|
public string ToolbarTooltip => "抓取线材数据";
|
|||
|
|
|||
|
public HpDModule Module => HpDModule.WorkSpace;
|
|||
|
|
|||
|
public void Execute(HpdApi api)
|
|||
|
{
|
|||
|
var doc = api.CurrentProject.GetActiveDocument();
|
|||
|
new LectotypeWindow(doc.ID).Show();
|
|||
|
}
|
|||
|
|
|||
|
public void Initialize()
|
|||
|
{
|
|||
|
AppDomainDllLoader.SetLaoder();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public void Terminate()
|
|||
|
{
|
|||
|
//throw new NotImplementedException();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|