示例#1
0
        void NewMethod(List <EntityDef.Method> methods, ListView lv)
        {
            MethodWindow mw = new MethodWindow(methods, null);

            if (mw.ShowDialog() == DialogResult.OK)
            {
                methods.Add(mw.Method);
                ResetMethodsView(lv, methods);
            }
        }
示例#2
0
        void AlterMethod(List <EntityDef.Method> methods, ListView lv)
        {
            if (!MakeSureSelectOne(lv))
            {
                return;
            }

            var          p  = lv.SelectedItems[0];
            MethodWindow pw = new MethodWindow(methods, methods.Find(b => b.Name == p.Name));
            var          r  = pw.ShowDialog();

            if (r == DialogResult.OK)
            {
                ResetMethodsView(lv, methods);
            }
        }