Exemple #1
0
        public void Edit(object mem, IWin32Window f)
        {
            MemStructObject o = (MemStructObject)mem;

            switch (o.Type)
            {
            case MemStructObject.ObjectType.OBJECT:
                ObjectBlock b = (ObjectBlock)o;

                ObjectFormManager om = new ObjectFormManager(sharedManager, b);
                om.Attach(this);

                ObjectForm of = new ObjectForm(sharedManager, om, "PuzzLearn - Edit Object", b);
                of.ShowDialog(f);

                break;

            case MemStructObject.ObjectType.REGION:
                AddressRegion r = (AddressRegion)o;

                RegionFormManager rm = new RegionFormManager(sharedManager, r);
                rm.Attach(this);

                RegionForm rf = new RegionForm(sharedManager, rm, "PuzzLearn - Edit Region", r);
                rf.ShowDialog(f);

                break;
            }
        }
        public void EditStruct(MemStructObject o, IWin32Window f)
        {
            switch (o.Type)
            {
            case MemStructObject.ObjectType.XYREGION:
                IXYFormManager xyManager = new XYFormManager((XYRegion)o);
                xyManager.Attach(this);

                XYRegionForm xyForm = new XYRegionForm(sharedManager, xyManager, "PuzzLearn - Edit XY Region", (XYRegion)o);
                xyForm.ShowDialog(f);

                break;

            case MemStructObject.ObjectType.REGION:
                RegionFormManager rm = new RegionFormManager(sharedManager, (AddressRegion)(o));
                rm.Attach(this);

                RegionForm rf = new RegionForm(sharedManager, rm, "PuzzLearn - Edit Region", (AddressRegion)(o));
                rf.ShowDialog(f);

                break;

            case MemStructObject.ObjectType.OBJECT:
                ObjectFormManager om = new ObjectFormManager(sharedManager, (ObjectBlock)o);
                om.Attach(this);

                ObjectForm of = new ObjectForm(sharedManager, om, "PuzzLearn - Edit Object", (ObjectBlock)o);
                of.ShowDialog(f);

                break;
            }
        }
Exemple #3
0
        public void AddRegion(IWin32Window f)
        {
            RegionFormManager rm = new RegionFormManager(sharedManager);

            rm.Attach(this);

            RegionForm rf = new RegionForm(sharedManager, rm, "PuzzLearn - Add Region");

            rf.ShowDialog(f);
        }