Пример #1
0
        public void deleteBookmark(SimObject mark, int index)
        {
            GuiControl gui = ((GuiStackControl) ((EManageBookmarks) "EManageBookmarks").findObjectByInternalName("ManageBookmarksWindowStack", true)).findObjectByInternalName(mark.internalName, true);

            if (gui.isObject())
                gui.delete();
            else
                Util._warn("EManageBookmarks::deleteBookmark(): Could not find bookmark " + mark + " at index " + index);
        }
        public void deleteCameraSettingsGroup(string levelName, GuiControl rolloutCtrl)
        {
            Settings EditorSettings = "EditorSettings";

            if (levelName == ((EditorGui)"EditorGui")["levelName"])
            {
                messageBox.MessageBoxOK("Error", "You may not delete the settings group associated with the currently loaded level");
                return;
            }

            string levelInfoPath = "LevelInformation/levels/" + levelName;
            string fieldname     = EditorSettings.findFirstValue(levelInfoPath, true, true);

            while (fieldname != "")
            {
                EditorSettings.remove(fieldname, true);
                fieldname = EditorSettings.findNextValue();
            }
            rolloutCtrl.delete();
        }