72 lines
2.1 KiB
C#
72 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using CommonLib;
|
|
using CommonLib.utils;
|
|
using System.Windows.Forms;
|
|
using Lskj.MyControl;
|
|
|
|
namespace Lskj.PubBrower
|
|
{
|
|
public sealed class DllBaseClass : IForm
|
|
{
|
|
public DllBaseClass()
|
|
{
|
|
|
|
}
|
|
//以数组传入参数,容易扩展
|
|
public DllBaseClass(string[] obj)
|
|
{
|
|
try
|
|
{
|
|
FrmMain frm = new FrmMain();
|
|
SubForm = frm;
|
|
frm.FormText = obj[0];
|
|
frm.OperatorId = obj[1];
|
|
frm.OperatorName = obj[2];
|
|
frm.Privilege = obj[3];
|
|
frm.DLLCoid = obj[4];
|
|
|
|
if (obj.Length > 6 && !string.IsNullOrWhiteSpace(obj[6]))
|
|
{
|
|
frm.UrlParame = obj[6];
|
|
}
|
|
if (obj.Length > 7)
|
|
{
|
|
frm.BetweenDLLCoid = obj[7];
|
|
}
|
|
if (obj.Length > 8 && !string.IsNullOrEmpty(obj[8]))
|
|
{
|
|
frm.downLoadFlag = Convert.ToInt32(obj[8]);
|
|
}
|
|
if (obj.Length > 9 && !string.IsNullOrEmpty(obj[9]))
|
|
{
|
|
frm.RightKeyFlag = Convert.ToInt32(obj[9]);
|
|
}
|
|
if (obj.Length > 10 && !string.IsNullOrEmpty(obj[10]))
|
|
{
|
|
frm.isView = Convert.ToInt32(obj[9]);
|
|
}
|
|
if (obj.Length > 11 && !string.IsNullOrEmpty(obj[11]))
|
|
{
|
|
frm.isPostFlag = 1;
|
|
frm.postData = obj[11];
|
|
}
|
|
DynamicPubBrowerModel moduleModel = new DynamicPubBrowerModel(obj);
|
|
//FrmMain frm = new FrmMain();
|
|
//SubForm = frm;
|
|
this.SubForm.Text = moduleModel.FormText;
|
|
frm.PubBrowerModel = moduleModel;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 窗口
|
|
/// </summary>
|
|
public Form SubForm { get; set; }
|
|
}
|
|
} |