Пример #1
0
        /// <summary>
        /// 功能按钮的双机事件处理
        /// </summary>
        /// <param name="sender"></param>`
        /// <param name="e"></param>
        void imageListBoxControl1_DoubleClick(object sender, EventArgs e)
        {
            ImageListBoxControl ilist = (sender as ImageListBoxControl);
            DataRowView         view  = ilist.SelectedItem as DataRowView;

            if (view != null)
            {
                string action = view["CmdName"].ToString();

                using (CActionFunction af = new CActionFunction(this.CurrentBusiness, this.Activitie))
                {
                    // af.Listguidelines(af, this);
                    Type       objectType = af.GetType();
                    MethodInfo o_Methods  = objectType.GetMethod(action);
                    if (o_Methods != null)
                    {
                        object[] args = new object[2];
                        args[0] = this.m_TopLevelForm;
                        args[1] = this.m_Activitie;
                        o_Methods.Invoke(af, args);

                        //af.Measures_Del(af, args);
                        //af.IncreaseCosts(MainForm, APP.General.CurrentProject);
                        //执行指定的方法
                    }
                    else
                    {
                        MsgBox.Alert("对不起,此功能不存在请联系系统维护人员!");
                    }
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 功能按钮的双机事件处理
        /// </summary>
        /// <param name="sender"></param>`
        /// <param name="e"></param>
        void imageListBoxControl1_DoubleClick(object sender, EventArgs e)
        {
            ImageListBoxControl ilist = (sender as ImageListBoxControl);
            DataRowView         view  = ilist.SelectedItem as DataRowView;

            if (view != null)
            {
                string action = view["CmdName"].ToString();

                using (CActionFunction af = new CActionFunction(this.CurrentBusiness, this.Activitie))
                {
                    switch (action)
                    {
                    case "ImportEXcel":
                        af.ImportEXcel(this.BusContainer, p_Params);
                        return;

                    default:
                        Type       objectType = af.GetType();
                        MethodInfo o_Methods  = objectType.GetMethod(action);

                        if (o_Methods != null)
                        {
                            object[] args = new object[2];
                            args[0] = this.BusContainer; //主窗体
                            args[1] = p_Params;          //
                            o_Methods.Invoke(af, args);


                            //af.MobToFB(this.BusContainer, args);
                            //af.IncreaseCosts(MainForm, APP.General.CurrentProject);
                            //执行指定的方法
                        }
                        else
                        {
                            MessageBox.Show("对不起,此功能不存在请联系系统维护人员!");
                        }
                        return;
                    }
                    // af.Listguidelines(af, this);
                }
            }
        }