105040 Update 增加编译标识,只在DEBUG模式下启用登录功能与多芯线线材选型菜单
This commit is contained in:
parent
6718d4432d
commit
07c665e481
|
@ -16,7 +16,7 @@ using System.Windows.Forms.Integration;
|
|||
|
||||
namespace Sinvo.EplanHpD.Plugin
|
||||
{
|
||||
#if Release_WireAndCable || DEBUG
|
||||
#if DEBUG
|
||||
public class MultiCoreWirePluginEntry : EPLAN.Harness.API.Plugins.IHpDPlugin
|
||||
#else
|
||||
public class MultiCoreWirePluginEntry
|
||||
|
@ -59,6 +59,7 @@ namespace Sinvo.EplanHpD.Plugin
|
|||
|
||||
public void Execute(HpdApi api)
|
||||
{
|
||||
#if DEBUG
|
||||
bool isLogin = PluginServices.IsLogin;
|
||||
if (!isLogin)
|
||||
{
|
||||
|
@ -70,6 +71,7 @@ namespace Sinvo.EplanHpD.Plugin
|
|||
}
|
||||
if (isLogin)
|
||||
{
|
||||
#endif
|
||||
new DBHelper().CodeFirst();
|
||||
var doc = api.CurrentProject.GetActiveDocument();
|
||||
if (window == null)
|
||||
|
@ -92,7 +94,9 @@ namespace Sinvo.EplanHpD.Plugin
|
|||
window.WindowState = System.Windows.WindowState.Normal;
|
||||
window.Activate();
|
||||
}
|
||||
#if DEBUG
|
||||
}
|
||||
#endif
|
||||
}
|
||||
public void Initialize()
|
||||
{
|
||||
|
|
|
@ -61,17 +61,17 @@ namespace Sinvo.EplanHpD.Plugin
|
|||
private MainWindow window;
|
||||
public void Execute(HpdApi api)
|
||||
{
|
||||
bool isLogin = PluginServices.IsLogin;
|
||||
if (!isLogin)
|
||||
{
|
||||
var LoginWindow = new LoginWindow();
|
||||
if (LoginWindow.ShowDialog() == true)
|
||||
{
|
||||
isLogin = PluginServices.IsLogin;
|
||||
}
|
||||
}
|
||||
if (isLogin)
|
||||
{
|
||||
//bool isLogin = PluginServices.IsLogin;
|
||||
//if (!isLogin)
|
||||
//{
|
||||
// var LoginWindow = new LoginWindow();
|
||||
// if (LoginWindow.ShowDialog() == true)
|
||||
// {
|
||||
// isLogin = PluginServices.IsLogin;
|
||||
// }
|
||||
//}
|
||||
//if (isLogin)
|
||||
//{
|
||||
|
||||
bool isUpdated = false;
|
||||
try
|
||||
|
@ -150,7 +150,7 @@ namespace Sinvo.EplanHpD.Plugin
|
|||
{
|
||||
FlexMessageBox.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
|
|
Loading…
Reference in New Issue