ab56a9bcf7
SVN-Revision: r240
66 lines
1.7 KiB
C#
66 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Lskj.Util;
|
|
using Lskj.Business;
|
|
using System.Windows.Forms;
|
|
using Lskj.Model;
|
|
|
|
namespace Lskj.MesPopupButton
|
|
{
|
|
/// <summary>
|
|
/// c#库被调用统一接口类
|
|
/// </summary>
|
|
public sealed class DllBaseClass : IForm
|
|
{
|
|
public DllBaseClass()
|
|
{
|
|
|
|
}
|
|
|
|
public DllBaseClass(string[] obj)
|
|
{
|
|
try
|
|
{
|
|
FrmMain main = new FrmMain();
|
|
this.SubForm = main;
|
|
|
|
main.Model = new DynamicPopupButtonModel(obj);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogUtil.WriteError("Lskj.PubAdd.dll--参数错误-->" + obj.ToString(), ex);
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
/// 窗口
|
|
/// </summary>
|
|
public Form SubForm { get; set; }
|
|
}
|
|
|
|
public class DynamicPopupButtonModel : DynamicModel
|
|
{
|
|
public string FormText;
|
|
/// <summary>
|
|
/// 初始化基础档案动态链接库参数
|
|
/// </summary>
|
|
/// <param name="args">The arguments.</param>
|
|
public DynamicPopupButtonModel(string[] args)
|
|
: base(args)
|
|
{
|
|
// 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面.
|
|
if (!string.IsNullOrEmpty(args[5]))
|
|
{
|
|
base.ModuleId = Convert.ToInt32(args[5]);
|
|
}
|
|
if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6]))
|
|
{
|
|
base.ModuleCode = args[6];
|
|
}
|
|
this.FormText = args.Length > 7 ? args[7] : string.Empty;
|
|
}
|
|
}
|
|
}
|