Esempio n. 1
0
        public void WadChanged(WadArea wadArea)
        {
            switch (wadArea)
            {
            case WadArea.Source:
                RaiseEvent(new SourceWadChangedEvent());
                break;

            case WadArea.Destination:
                RaiseEvent(new DestinationWadChangedEvent());
                ToggleUnsavedChanges(true);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 2
0
        public static void DeleteObjects(WadToolClass tool, IWin32Window owner, WadArea wadArea, List <IWadObjectId> ObjectIdsToDelete)
        {
            if (ObjectIdsToDelete.Count == 0)
            {
                return;
            }
            if (DarkMessageBox.Show(owner, "You are about to delete " + ObjectIdsToDelete.Count + " objects. Are you sure?",
                                    "A question just in case...", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
            {
                return;
            }

            Wad2 wad = tool.GetWad(wadArea);

            foreach (IWadObjectId id in ObjectIdsToDelete)
            {
                wad.Remove(id);
            }
            tool.WadChanged(wadArea);
        }