MDI Resigning Help Needed

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

MDI Resigning Help Needed

Post by Eaton »

Ok, so my program has an MDI interface. I have two maps open. I have a button on my Menu Strip that is supposed to resign all open maps in the container. But it seems to resign one of the maps twice... This is my code:

Code: Select all

            var parent = (Main_Form)MdiParent;
            foreach (Form f in parent.MdiChildren)
            {
                ((Map_Form)f).map.ResignMap(map);
            }
Can someone tell me what I'm doing wrong? This has been racking my brain for hours.
Image
OwnZ joO




Articulatist 500

Posts: 980
Joined: Thu Nov 10, 2005 4:24 pm

Re: MDI Resigning Help Needed

Post by OwnZ joO »

Why does your ResignMap method need a map parameter? It seems like the method should just be map.Resign() and resign the map object it's being called on.
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

Re: MDI Resigning Help Needed

Post by Eaton »

You turned out to be right. It works now! :D Thank you!
Image
Post Reply