using System; using System.Collections.Generic; using System.Linq; using System.Text; using Lskj.Util; using System.Windows.Forms; using Lskj.Model; using Lskj.Business; using Lskj.Business.Impl; namespace Lskj.PubArtworkDynamic { /// /// 单据模版入口 /// public class DllBaseClass : IForm { public DllBaseClass() { } public DllBaseClass(string[] obj) { try { FrmMain main = new FrmMain(); DynamicDllModel sysModel = new DynamicDllModel(obj); SubForm = main; main.SysModel = sysModel; } catch (Exception ex) { LogUtil.WriteError("Lskj.PubMrpAnalyze.dll--参数错误-->" + obj.ToString(), ex); } } public Form SubForm { get; set; } } /// ///图档功能链接模块 /// public class DynamicDllModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private readonly new string[] Params; /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicDllModel(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]; } if (args.Length > 7) { this.Params = new string[args.Length]; for (int i = 7; i < args.Length; i++) { Params[i - 7] = args[i]; } } } } }