예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (type == null)
            {
                return;
            }
            int index = MethodsCB.SelectedIndex;

            if (index >= 0 && index < type.Methods.Length)
            {
                List <Type>   types = type.GetParametersOfMethod(index);
                List <object> param = InputParams(type.Methods[index].GetParameters()); if (param == null)
                {
                    return;
                }
                object ret = type.RunMethod(index, param.ToArray());
                if (ret != null)
                {
                    MessageBox.Show(ret.ToString());
                }
                else
                {
                    MessageBox.Show("");
                }
                UpdType();
            }
        }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (type != null)
     {
         int index = MethodsCB.SelectedIndex;
         if (index >= 0 && index < type.Methods.Length)
         {
             List <Type> types = type.GetParametersOfMethod(index);
             //List<object> param = InputParams(type.Methods[index].GetParameters()); if (param == null)
             //    return;
             object ret = type.RunMethod(index);
             if (ret != null)
             {
                 MessageBox.Show(ret.ToString());
             }
             //if (ret != null)
             //    output.Text = ret.ToString();
             //else
             //    output.Text = "";
             //UpdType();
         }
     }
 }