예제 #1
0
 /// <summary>
 /// 添加线程调用项对象
 /// </summary>
 /// <param name="item">线程调用项对象</param>
 private void Add(InvokeItem item)
 {
     lock (FItems)
     {
         FItems.Enqueue(item);
     }
 }
예제 #2
0
        /// <summary>
        /// 更新调用
        /// </summary>
        /// <typeparam name="T">泛型对象</typeparam>
        /// <typeparam name="T1">泛型对象</typeparam>
        /// <typeparam name="T2">泛型对象</typeparam>
        /// <typeparam name="T3">泛型对象</typeparam>
        /// <typeparam name="T4">泛型对象</typeparam>
        /// <param name="eui">线程调用更新界面UI数据委托对象</param>
        /// <param name="t">泛型对象</param>
        /// <param name="t1">泛型对象</param>
        /// <param name="t2">泛型对象</param>
        /// <param name="t3">泛型对象</param>
        /// <param name="t4">泛型对象</param>
        public void Invoke <T, T1, T2, T3, T4>(UpdateUIInvokeEventHandler <T, T1, T2, T3, T4> eui, T t, T1 t1, T2 t2, T3 t3, T4 t4)
        {
            InvokeItem item = new InvokeItem();

            item.Functions  = eui;
            item.Parameters = new object[] { t, t1, t2, t3, t4 };
            Add(item);
        }
예제 #3
0
        /// <summary>
        /// 更新调用
        /// </summary>
        /// <typeparam name="T">泛型对象</typeparam>
        /// <typeparam name="T1">泛型对象</typeparam>
        /// <param name="eui">线程调用更新界面UI数据委托对象</param>
        /// <param name="t">泛型对象</param>
        /// <param name="t1">泛型对象</param>
        public void Invoke <T, T1>(UpdateUIInvokeEventHandler <T, T1> eui, T t, T1 t1)
        {
            InvokeItem item = new InvokeItem();

            item.Functions  = eui;
            item.Parameters = new object[] { t, t1 };
            Add(item);
        }
예제 #4
0
        /// <summary>
        /// 更新调用
        /// </summary>
        /// <param name="eui">线程调用更新界面UI数据委托对象</param>
        public void Invoke(UpdateUIInvokeEventHandler eui)
        {
            InvokeItem item = new InvokeItem();

            item.Functions  = eui;
            item.Parameters = new object[0];
            Add(item);
        }