72 lines
2.0 KiB
C#
72 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
using DevExpress.UserSkins;
|
|
using DevExpress.Skins;
|
|
using DevExpress.LookAndFeel;
|
|
using Lskj.Util;
|
|
using Lskj.Model;
|
|
using Lskj.Business;
|
|
using Lskj.PubBrower;
|
|
|
|
|
|
|
|
namespace Lskj.PubBrower
|
|
{
|
|
/// <summary>
|
|
/// c#库被调用统一接口类
|
|
/// </summary>
|
|
public sealed class DllBaseClass : IForm
|
|
{
|
|
public DllBaseClass()
|
|
{
|
|
|
|
}
|
|
|
|
public DllBaseClass(string[] obj)
|
|
{
|
|
try
|
|
{
|
|
DynamicPubBrowerModel moduleModel = new DynamicPubBrowerModel(obj);
|
|
FrmMain main = new FrmMain();
|
|
this.SubForm = main;
|
|
this.SubForm.Text = moduleModel.FormText;
|
|
main.PubBrowerModel = moduleModel;
|
|
|
|
// CEF must be created after the caller has established the final
|
|
// WinForms owner/parent hierarchy and the form HWND exists.
|
|
if (moduleModel.downLoadFlag == 1)
|
|
{
|
|
main.OnLoad();
|
|
}
|
|
else
|
|
{
|
|
EventHandler shown = null;
|
|
shown = delegate
|
|
{
|
|
main.Shown -= shown;
|
|
try
|
|
{
|
|
main.OnLoad();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogUtil.WriteError("Lskj.PubBrower.dll--初始化错误-->" + obj.ToString(), ex);
|
|
}
|
|
};
|
|
main.Shown += shown;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogUtil.WriteError("Lskj.PubBrower.dll--参数错误-->" + obj.ToString(), ex);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 窗口
|
|
/// </summary>
|
|
public Form SubForm { get; set; }
|
|
}
|
|
}
|