示例#1
0
 /// <summary>
 ///  实现销毁接口,防止没有调用Close方法
 /// </summary>
 public void Dispose()
 {
     if (infoCodeList != null && infoCodeList.Count > 0)
     {
         LocalInfoHelper.RevokeInfo(this);
     }
 }
示例#2
0
        /// <summary>
        ///  要求主窗口打开新窗口
        /// </summary>
        /// <param name="title">标题名称</param>
        /// <param name="module_name">模块</param>
        /// <param name="object_name">功能对象名</param>
        /// <param name="parameter">参数</param>
        /// <param name="open_flag">打开标志</param>
        /// <returns></returns>
        public static bool SendOpenForm(string title, string module_name, string object_name, string parameter, int open_flag)
        {
            DataFunction df = new DataFunction(title, module_name, object_name, parameter, open_flag);

            string info = StringHelper.SerializeObject <DataFunction>(df);

            return(LocalInfoHelper.SendInfo(OpenForm, info));
        }
示例#3
0
 /// <summary>
 ///  信息功能关闭
 /// </summary>
 public void Close()
 {
     if (infoCodeList.Count > 0)
     {
         LocalInfoHelper.RevokeInfo(this);
         infoCodeList = null;
     }
 }
示例#4
0
        /// <summary>
        ///  构造函数
        /// </summary>
        /// <param name="codes">接受的信息列表</param>
        /// <param name="callback">回调函数</param>
        public LocalInfoReceiver(List <String> codes, OnCallbackInfo callback)
        {
            infoCodeList = codes;
            callbackInfo = callback;

            //  注册信息码
            if (infoCodeList.Count > 0)
            {
                LocalInfoHelper.RegisterInfo(this, infoCodeList);
            }
        }
示例#5
0
        /// <summary>
        ///  要求主窗口撤销有关通知功能
        /// </summary>
        /// <param name="module_name">模块名称</param>
        /// <param name="object_name">对象名称</param>
        /// <param name="parameter">参数</param>
        /// <returns></returns>
        public static bool SendDelNotice(string module_name, string object_name, string parameter)
        {
            string info = module_name + ";" + object_name + ";" + parameter ?? string.Empty;

            return(LocalInfoHelper.SendInfo(DelNotice, info));
        }